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