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