3 # - separate libGL/libGLU/libGLw,progs?
6 %bcond_with glide # with GLIDE (broken now)
7 %bcond_without motif # build static libGLw without Motif interface
9 Summary: Free OpenGL implementation
10 Summary(pl): Wolnodostêpna implementacja standardu OpenGL
14 License: MIT (core), SGI (GLU,libGLw) and others - see COPYRIGHT file
16 Source0: http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
17 # Source0-md5: 85a84e47a3f718f752f306b9e0954ef6
18 Source1: http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
19 # Source1-md5: 1a8c4d4fc699233f5fdb902b8753099e
20 URL: http://www.mesa3d.org/
21 %{?with_glide:BuildRequires: Glide3-DRI-devel}
22 BuildRequires: expat-devel
23 BuildRequires: libdrm-devel >= 1.0.4-1.20051022
24 BuildRequires: libstdc++-devel
25 BuildRequires: libtool >= 2:1.4d
26 %{?with_motif:BuildRequires: motif-devel}
27 BuildRequires: sed >= 4.0
28 BuildRequires: xorg-lib-libXxf86vm-devel
29 BuildRequires: xorg-proto-glproto-devel
30 BuildRequires: xorg-util-makedepend
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 # avoid XFree86-OpenGL* dependency
34 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
35 %define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.4 libglide3.so.3
37 %define _sysconfdir /etc/X11
40 Mesa is a 3-D graphics library with an API which is very similar to
41 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
42 syntax or state machine, it is being used with authorization from
43 Silicon Graphics, Inc. However, the author does not possess an OpenGL
44 license from SGI, and makes no claim that Mesa is in any way a
45 compatible replacement for OpenGL or associated with SGI.
48 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
49 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
50 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
51 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
52 OpenGL ani powi±zana z SGI.
55 Summary: Free Mesa3D implementation of libGL OpenGL library
56 Summary(pl): Wolnodostêpna implementacja Mesa3D biblioteki libGL ze standardu OpenGL
59 %{?with_glide:Requires: Glide3-DRI}
60 Provides: OpenGL = 1.5
61 # reports version 1.3, but supports glXGetProcAddress() from 1.4
62 Provides: OpenGL-GLX = 1.4
63 Obsoletes: XFree86-OpenGL-libGL
66 Mesa is a 3-D graphics library with an API which is very similar to
67 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
68 syntax or state machine, it is being used with authorization from
69 Silicon Graphics, Inc. However, the author does not possess an OpenGL
70 license from SGI, and makes no claim that Mesa is in any way a
71 compatible replacement for OpenGL or associated with SGI.
73 This package contains libGL which implements OpenGL 1.5 and GLX 1.4
74 specifications. It uses DRI for rendering.
76 %description libGL -l pl
77 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
78 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
79 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
80 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
81 OpenGL ani powi±zana z SGI.
83 Ten pakiet zawiera libGL implementuj±c± specyfikacje OpenGL 1.5 oraz
84 GLX 1.4. U¿ywa DRI do renderowania.
87 Summary: Header files for Mesa3D libGL library
88 Summary(pl): Pliki nag³ówkowe biblioteki libGL z projektu Mesa3D
90 Group: X11/Development/Libraries
91 # loose dependency on libGL to use with other libGL binaries
92 Requires: OpenGL >= 1.5
93 Requires: xorg-lib-libX11-devel
94 Provides: OpenGL-devel = 1.5
95 Provides: OpenGL-GLX-devel = 1.4
97 Obsoletes: XFree86-OpenGL-devel
98 Obsoletes: XFree86-OpenGL-devel-base
100 %description libGL-devel
101 Header files for Mesa3D libGL library.
103 %description libGL-devel -l pl
104 Pliki nag³ówkowe biblioteki libGL z projektu Mesa3D.
106 %package libGL-static
107 Summary: Static Mesa3D libGL library
108 Summary(pl): Statyczna biblioteka libGL z projektu Mesa3D
110 Group: X11/Development/Libraries
111 Requires: %{name}-libGL-devel = %{version}-%{release}
112 Provides: OpenGL-static = 1.5
113 Obsoletes: Mesa-static
115 %description libGL-static
116 Static Mesa3D libGL library. It uses software renderer.
118 %description libGL-static -l pl
119 Statyczna biblioteka libGL z projektu Mesa3D. U¿ywa programowego
123 Summary: SGI implementation of libGLU OpenGL library
124 Summary(pl): Implementacja SGI biblioteki libGLU ze standardu OpenGL
125 License: SGI Free Software License B v1.1
127 # loose dependency on libGL.so.1 to use with other libGL binaries
128 Requires: OpenGL >= 1.2
129 Provides: OpenGL-GLU = 1.3
130 Obsoletes: Mesa-devel
131 Obsoletes: XFree86-OpenGL-libs
134 SGI implementation of libGLU OpenGL library. It implements OpenGL GLU
137 %description libGLU -l pl
138 Implementacja SGI biblioteki libGLU ze standardu OpenGL. Implementuje
139 specyfikacjê OpenGL GLU 1.3.
141 %package libGLU-devel
142 Summary: Header files for SGI libGLU library
143 Summary(pl): Pliki nag³ówkowe biblioteki SGI libGLU
144 License: SGI Free Software License B v1.1
145 Group: Development/Libraries
146 Requires: %{name}-libGLU = %{version}-%{release}
147 Requires: OpenGL-devel >= 1.2
148 Requires: libstdc++-devel
149 Provides: OpenGL-GLU-devel = 1.3
151 %description libGLU-devel
152 Header files for SGI libGLU library.
154 %description libGLU-devel -l pl
155 Pliki nag³ówkowe biblioteki SGI libGLU.
157 %package libGLU-static
158 Summary: Static SGI libGLU library
159 Summary(pl): Statyczna biblioteka SGI libGLU
160 License: SGI Free Software License B v1.1
161 Group: Development/Libraries
162 Requires: %{name}-libGLU-devel = %{version}-%{release}
163 Provides: OpenGL-GLU-static = 1.3
165 %description libGLU-static
166 Static SGI libGLU library.
168 %description libGLU-static -l pl
169 Statyczna biblioteka SGI libGLU.
172 Summary: SGI OpenGL Xt widgets library
173 Summary(pl): Biblioteka SGI widgetów Xt dla OpenGL-a
174 License: SGI MIT-like
176 # loose dependency on libGL.so.1 to use with other libGL binaries
177 Requires: OpenGL >= 1.1
181 SGI OpenGL Xt widgets library.
183 %description libGLU -l pl
184 Biblioteka SGI widgetów Xt dla OpenGL-a.
186 %package libGLw-devel
187 Summary: Header files for SGI libGLw library
188 Summary(pl): Pliki nag³ówkowe biblioteki SGI libGLw
189 License: SGI Free Software License B v1.1
190 Group: Development/Libraries
191 Requires: %{name}-libGLw = %{version}-%{release}
192 Requires: OpenGL-devel >= 1.2
193 Provides: OpenGL-GLw-devel
195 %description libGLw-devel
196 Header files for SGI libGLw library.
198 %description libGLw-devel -l pl
199 Pliki nag³ówkowe biblioteki SGI libGLw.
201 %package libGLw-static
202 Summary: Static SGI libGLw library
203 Summary(pl): Statyczna biblioteka SGI libGLw
204 License: SGI Free Software License B v1.1
205 Group: Development/Libraries
206 Requires: %{name}-libGLw-devel = %{version}-%{release}
207 Provides: OpenGL-GLw-static
209 %description libGLw-static
210 Static SGI libGLw library.
212 %description libGLw-static -l pl
213 Statyczna biblioteka SGI libGLw.
216 Summary: OpenGL utilities from Mesa3D
217 Summary(pl): Programy narzêdziowe OpenGL z projektu Mesa3D
218 Group: X11/Applications/Graphisc
219 # loose deps on libGL/libGLU
222 OpenGL utilities from Mesa3D: glxgears and glxinfo.
224 %description utils -l pl
225 Programy narzêdziowe OpenGL z projektu Mesa3D: glxgears i glxinfo.
229 Summary(pl): Programy demonstruj±ce mo¿liwo¶ci bibliotek Mesa
230 Group: Development/Libraries
231 Requires: OpenGL-devel
234 Demonstration programs for the Mesa libraries.
236 %description demos -l pl
237 Programy demonstracyjne dla bibliotek Mesa.
240 Summary: X.org DRI drivers
241 Summary(pl): Sterowniki DRI dla X.org
242 Group: Development/Libraries
243 Requires: xorg-xserver-server
248 %description dri -l pl
249 Sterowniki DRI dla X.org.
251 #%package dri-driver-ffb ...
254 %setup -q -n Mesa-%{version} -b 1
257 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
259 %ifnarch sparc sparcv9 sparc64
260 # for sunffb driver - useful on sparc only
261 sed -i -e 's/ ffb$//' configs/linux-dri
271 %{__make} linux${targ}-static \
274 OPT_FLAGS="%{rpmcflags}" \
275 XLIB_DIR=%{_libdir} \
276 GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
277 SRC_DIRS="mesa glu glw" \
282 %{__make} linux-dri${targ} \
286 OPT_FLAGS="%{rpmcflags}" \
287 XLIB_DIR=%{_libdir} \
288 SRC_DIRS="glx/x11 mesa glu glw" \
294 %{__make} linux${targ} \
297 OPT_FLAGS="%{rpmcflags}" \
298 XLIB_DIR=%{_libdir} \
302 %{__make} -C progs/xdemos \
305 OPT_FLAGS="%{rpmcflags}" \
306 XLIB_DIR=%{_libdir} \
308 APP_LIB_DEPS="-L\$(LIB_DIR) -lGL"
310 %{__make} -C progs/xdemos \
313 OPT_FLAGS="%{rpmcflags}" \
314 XLIB_DIR=%{_libdir} \
316 APP_LIB_DEPS="-L\$(LIB_DIR) -lGLU -lGL"
319 rm -rf $RPM_BUILD_ROOT
320 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/GL,%{_examplesdir}/%{name}-%{version}}
321 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
323 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
324 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
325 cp -df lib/libOSMesa* $RPM_BUILD_ROOT%{_libdir}
326 cp -rf include/GL/{gl[!u]*,glu.h,glu_*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
327 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
329 install progs/xdemos/{glxgears,glxinfo} $RPM_BUILD_ROOT%{_bindir}
330 for l in demos redbook samples xdemos ; do
331 %{__make} -C progs/$l clean
333 for l in demos redbook samples util xdemos images ; do
334 cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
336 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
339 rm -rf $RPM_BUILD_ROOT
341 %post libGL -p /sbin/ldconfig
342 %postun libGL -p /sbin/ldconfig
344 %post libGLU -p /sbin/ldconfig
345 %postun libGLU -p /sbin/ldconfig
347 %post libGLw -p /sbin/ldconfig
348 %postun libGLw -p /sbin/ldconfig
351 %defattr(644,root,root,755)
352 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
353 %attr(755,root,root) %{_libdir}/libGL.so.*.*
354 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
355 # symlink for binary apps which fail to conform Linux OpenGL ABI
356 # (and dlopen libGL.so instead of libGL.so.1)
357 %attr(755,root,root) %{_libdir}/libGL.so
360 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/libOSMesa.so
363 %dir %{_includedir}/GL
364 %{_includedir}/GL/gl.h
365 %{_includedir}/GL/glext.h
366 %{_includedir}/GL/gl_mangle.h
367 %{_includedir}/GL/glx.h
368 %{_includedir}/GL/glxext.h
369 %{_includedir}/GL/glx_mangle.h
370 %{_includedir}/GL/osmesa.h
371 %{_includedir}/GL/xmesa.h
372 %{_includedir}/GL/xmesa_x.h
373 %{_includedir}/GL/xmesa_xf86.h
376 %defattr(644,root,root,755)
378 %{_libdir}/libOSMesa.a
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/libGLU.so
387 %{_includedir}/GL/glu.h
388 %{_includedir}/GL/glu_mangle.h
391 %defattr(644,root,root,755)
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libGLw.so.*.*
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libGLw.so
401 %{_includedir}/GL/GLwDrawA.h
402 %{_includedir}/GL/GLwDrawAP.h
403 %{_includedir}/GL/GLwMDrawA.h
404 %{_includedir}/GL/GLwMDrawAP.h
407 %defattr(644,root,root,755)
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/glxgears
413 %attr(755,root,root) %{_bindir}/glxinfo
416 %defattr(644,root,root,755)
417 %dir %{_libdir}/xorg/modules/dri
419 %ifarch sparc sparcv9 sparc64
420 # sunffb (sparc only)
421 %attr(755,root,root) %{_libdir}/xorg/modules/dri/ffb_dri.so
424 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i810_dri.so
425 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i830_dri.so
426 %attr(755,root,root) %{_libdir}/xorg/modules/dri/i915_dri.so
428 %attr(755,root,root) %{_libdir}/xorg/modules/dri/mach64_dri.so
429 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r128_dri.so
430 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r200_dri.so
431 %attr(755,root,root) %{_libdir}/xorg/modules/dri/r300_dri.so
432 %attr(755,root,root) %{_libdir}/xorg/modules/dri/radeon_dri.so
433 # glint (requires update)
434 #%attr(755,root,root) %{_libdir}/xorg/modules/dri/gamma_dri.so
436 %attr(755,root,root) %{_libdir}/xorg/modules/dri/mga_dri.so
437 # s3virge (but driver not ready?)
438 %attr(755,root,root) %{_libdir}/xorg/modules/dri/s3v_dri.so
440 %attr(755,root,root) %{_libdir}/xorg/modules/dri/savage_dri.so
442 %attr(755,root,root) %{_libdir}/xorg/modules/dri/sis_dri.so
444 %attr(755,root,root) %{_libdir}/xorg/modules/dri/tdfx_dri.so
446 %attr(755,root,root) %{_libdir}/xorg/modules/dri/trident_dri.so
448 %attr(755,root,root) %{_libdir}/xorg/modules/dri/unichrome_dri.so
451 %defattr(644,root,root,755)
452 %{_examplesdir}/%{name}-%{version}