]> git.pld-linux.org Git - packages/XFree86-glx.git/blob - XFree86-glx.spec
- for XFree86-glx-devel add:
[packages/XFree86-glx.git] / XFree86-glx.spec
1 %define mesaversion     3.2.1
2 %define glx_ver latest
3
4 Summary:        OpenGL 1.2 compatible 3D graphics library
5 Summary(pl):    Bilioteka grfiki 3D kompatybilna z OpenGL 1.2
6 Name:           XFree86-glx
7 Version:        4.2.0
8 Release:        0.2
9 License:        LGPL
10 Vendor:         Brian Paul <brian_paul@mesa3d.org>
11 Group:          X11/Libraries
12 Source0:        ftp://ftp.mesa3d.org/pub/sourceforge/mesa3d/MesaLib-%{mesaversion}.tar.bz2
13 Source1:        ftp://ftp.mesa3d.org/pub/sourceforge/mesa3d/MesaDemos-%{mesaversion}.tar.bz2
14 Source2:        http://snow.ashlu.bc.ca/glx/snapshots/utah-glx-src-%{glx_ver}.tar.gz
15 URL:            http://www.mesa3d.org/
16 BuildPreReq:    binutils >= 2.9.1.0.19a
17 BuildRequires:  tcl
18 Conflicts:      XFree86 =< 4.1.0
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Obsoletes:      Mesa
21 Obsoletes:      XFree86-OpenGL-core
22 Obsoletes:      XFree86-OpenGL-libs
23
24 %define         _prefix         /usr/X11R6
25 %define         _sysconfdir     /etc/X11
26
27 %description
28 This is an implementation of the Mesa 3D library and GLX with support
29 for hardware acceleration. GLX was developed by SGI as an extension to
30 the X window system to integrate OpenGL rendering functions. This
31 allows the Mesa 3D library to perform its 3D rendering functions
32 within the X server's process, rather than within the X client
33 program. This offers potential performance benefits, because the
34 rendered image does not have to be moved from the X client program to
35 the X server. (Only the commands required to render the image are
36 sent.) It also makes 3-D hardware acceleration much more practical
37 (and fast). This package includes a accelerated hardware drivers for
38 video card based on NVIDIA Riva series and ATI Rage Pro chipsets.
39
40 The Mesa 3D graphics library is a powerful and generic toolset for
41 creating hardware assisted computer graphics. To the extent that Mesa
42 utilizes the OpenGL command syntax or state machine, it is being used
43 with authorization from Silicon Graphics, Inc. However, the author
44 (Brian Paul) makes no claim that Mesa is in any way a compatible
45 replacement for OpenGL or associated with Silicon Graphics, Inc. Those
46 who want a licensed implementation of OpenGL should contact a licensed
47 vendor. However, Mesa is very similar to OpenGL, and you might find
48 Mesa to be a valid alternative to OpenGL.
49
50 This package is based on Mesa %{mesaver} and utah glx-%{glxver}.
51
52 please see http://utah-glx.sourceforge.net/ for more information.
53
54 %package        devel
55 Summary:        Development files for Mesa (OpenGL compatible 3D lib)
56 Summary(pl):    Pliki i biblioteki nag³ówkowe dla Mesy (biblioteka 3D OpenGL)
57 Group:          X11/Development/Libraries
58 Requires:       %{name}
59 Provides:       OpenGL-devel
60 Obsoletes:      Mesa-devel
61 Obsoletes:      XFree86-OpenGL-devel
62
63 %description devel
64 Mesa is an OpenGL 1.2 compatible 3D graphics library. Headers needed
65 to compile Mesa programs.
66
67 %prep
68 %setup -q -n Mesa-%{mesaversion} -b1 -a2
69 [ -d glx-xf4 ] && ln -s glx-xf4 glx;
70
71 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS| sed 's/-m486 *//g'`; export RPM_OPT_FLAGS;
72
73 perl -p -i -e "s/-O3/$RPM_OPT_FLAGS/" Make-config
74
75 %build
76 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS| sed 's/-m486 *//g'`; export RPM_OPT_FLAGS;
77 %ifarch i386 i486
78 CFLAGS="%{rpmcflags}" CXXFLAGS="%{rpmcflags}" \
79 ./configure     --prefix=%{_prefix} \
80                 --sysconfdir=%{_sysconfdir} \
81                 --disable-mmx \
82                 --disable-3dnow \
83                 --without-ggi \
84                 --enable-mga=no \
85                 --enable-mach64=no \
86                 --enable-tnt=yes \
87                 --enable-i810=no \
88                 --enable-s3virge=no \
89                 --enable-s3savage=no \
90                 --enable-sis6326=no
91
92 %endif
93 %ifarch i586 i686 k6 k7
94 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
95 ./configure     --prefix=%{_prefix} \
96                 --sysconfdir=%{_sysconfdir} \
97                 --with-glide=/usr \
98                 --without-ggi \
99                 --enable-mga=no \
100                 --enable-mach64=no \
101                 --enable-tnt=yes \
102                 --enable-i810=no \
103                 --enable-s3virge=no \
104                 --enable-s3savage=no \
105                 --enable-sis6326=no
106 %endif
107 %ifnarch i386 i486 i586 i686 k6 k7
108 ./configure     --prefix=%{_prefix} \
109                 --sysconfdir=%{_sysconfdir} \
110                 --disable-3dnow \
111                 --without-ggi \
112                 --enable-mga=no \
113                 --enable-mach64=no \
114                 --enable-tnt=yes \
115                 --enable-i810=no \
116                 --enable-s3virge=no \
117                 --enable-s3savage=no \
118                 --enable-sis6326=no
119 %endif
120
121 %{__make}
122
123 %ifarch alpha sparc sparc64 ppc # Skip utah_glx for alpha - (fg) also skip it for
124                                 # sparc - (jb) also added skip for ppc
125         echo 'utah_glx skipped for alpha, powerpc and sparcs'
126 %else
127 cd glx
128 cp -fv ../config.sub ./
129
130 CFLAGS="$RPM_OPT_FLAGS" \
131         ./autogen.sh    --with-chipset=both \
132                         --with-mesa=../ \
133                         --enable-extra \
134                         --disable-mtrr \
135                         --disable-agp \
136                         --disable-glut \
137                         --disable-GLU \
138                         --prefix=%{_prefix} \
139                         --sysconfdir=%{_sysconfdir} \
140                         --without-x86-asm \
141                         --without-mmx-asm \
142                         --without-3dnow-asm \
143                         --enable-mga=no \
144                         --enable-mach64=no \
145                         --enable-tnt=yes \
146                         --enable-i810=no \
147                         --enable-s3virge=no \
148                         --enable-s3savage=no \
149                         --enable-sis6326=no
150
151 # Arg docs sux ((Dadou) "are not OK", it's better ;)
152 cd docs
153 cat <<EOF > config.cache
154 ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
155 ac_cv_prog_CP=${ac_cv_prog_CP='cp -f'}
156 ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'}
157 ac_cv_prog_MKDIR=${ac_cv_prog_MKDIR='mkdir -p'}
158 ac_cv_prog_MV=${ac_cv_prog_MV='mv -f'}
159 ac_cv_prog_RM=${ac_cv_prog_RM='rm -f'}
160 ac_cv_prog_have_dvips=${ac_cv_prog_have_dvips=no}
161 ac_cv_prog_have_jade=${ac_cv_prog_have_jade=no}
162 ac_cv_prog_have_jadetex=${ac_cv_prog_have_jadetex=no}
163 ac_cv_prog_have_lynx=${ac_cv_prog_have_lynx=no}
164 ac_cv_prog_have_ps2pdf=${ac_cv_prog_have_ps2pdf=no}
165 ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
166 EOF
167
168 ./configure     --enable-text \
169                 --enable-html \
170                 --enable-ps \
171                 --enable-pdf
172 cd ..
173
174 %{__make}
175 cd ..
176 %endif # Skip glx for Alpha
177
178 %install
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT{%{_includedir}/GL,%{_sysconfdir},/usr/bin}
181 install -d $RPM_BUILD_ROOT%{_libdir}/modules
182
183 %{__make} DESTDIR=$RPM_BUILD_ROOT install
184 cp include/GL/svgamesa.h $RPM_BUILD_ROOT%{_includedir}/GL/
185 cp glx/servGL/libglx.so $RPM_BUILD_ROOT%{_libdir}/modules/
186
187 %ifarch alpha sparc sparc64 ppc
188 echo 'Skipping utah_glx'
189 %else
190 cat > $RPM_BUILD_ROOT/usr/bin/glx <<EOF
191 #!/bin/sh
192 LD_PRELOAD=%{_prefix}/lib/libGL.so.1.0 "\$@"
193 EOF
194
195 ## glx
196 cd glx
197 %{__make} DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
198 cd ..
199 %endif # glx
200
201 cd $RPM_BUILD_ROOT/%{_prefix}/lib/
202 ln -sf libGL.so.1 libGL.so
203 ln -sf libGLU.so.1 libGLU.so
204 ln -sf libGLU.so.1 libGLU.so.3
205 ln -sf libglut.so.3 libglut.so
206
207 # (gc) add Mesa symlinks for compatibility
208 ln -sf libGL.so libMesaGL.so
209 ln -sf libGL.so.1 libMesaGL.so.1
210 ln -sf libGL.so.1.0 libMesaGL.so.1.0
211 ln -sf libGLU.so libMesaGLU.so
212 ln -sf libGLU.so.1 libMesaGLU.so.1
213
214 %clean
215 [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
216
217 %post   -p /sbin/ldconfig
218 %postun -p /sbin/ldconfig
219
220 %files
221 %defattr(644,root,root,755)
222 %doc docs/{COPYRIGHT,README*,COPYING,DEVINFO,CONFORM,VERSIONS} glx/docs/README.*
223 %attr(755,root,root) /usr/bin/glx
224 %{_libdir}/*.so.*
225 %config %{_sysconfdir}/mesa.conf
226 %ifarch i386 i486 i586 i686 k6 k7
227 %{_prefix}/lib/modules/extensions/*.so
228 #%{_prefix}/lib/modules/extensions/*.so
229 %config %{_sysconfdir}/glx.conf
230 %endif
231
232 %files devel
233 %defattr(644,root,root,755)
234 %dir %{_includedir}/GL
235 %{_includedir}/GL/gl*.h
236 %{_includedir}/GL/o*.h
237 %{_includedir}/GL/x*.h
238 %ifarch i386 i486 i586 i686 k6 k7
239 %{_includedir}/GL/svgamesa.h
240 %endif
241 %{_prefix}/lib/lib*.so
242 %{_prefix}/lib/lib*.la
This page took 0.107191 seconds and 3 git commands to generate.