3 %bcond_with glide # with GLIDE (broken now)
4 %bcond_without motif # without libGLw Motif interface
6 Summary: Free OpenGL implementation
7 Summary(pl): Wolnodostêpna implementacja standardu OpenGL
11 License: MIT (core), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file
13 Source0: http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
14 # Source0-md5: 0df27701df0924d17ddf41185efa8ce1
15 Source1: http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
16 # Source1-md5: 96708868450c188205e42229b5d813c4
18 # http://www.gentoo.org/cgi-bin/viewcvs.cgi/media-libs/mesa/files/mesa-add-dri-asm-files.patch?rev=1.1&content-type=text/vnd.viewcvs-markup
19 Patch0: %{name}-dri-asm.patch
20 URL: http://www.mesa3d.org/
22 %{?with_glide:BuildRequires: Glide3-DRI-devel}
23 %{?with_glide:Requires: Glide3-DRI}
25 BuildRequires: libdrm-devel
26 BuildRequires: libstdc++-devel
27 BuildRequires: libtool >= 2:1.4d
28 %{?with_motif:BuildRequires: motif-devel}
29 BuildRequires: sed >= 4.0
30 BuildRequires: xorg-lib-libXi-devel
31 BuildRequires: xorg-lib-libXmu-devel
32 BuildRequires: xorg-lib-libXp-devel
33 Provides: OpenGL = 1.5
34 Provides: OpenGL-GLU = 1.3
35 # reports version 1.3, but supports glXGetProcAddress() from 1.4
36 Provides: OpenGL-GLX = 1.4
37 Obsoletes: XFree86-OpenGL-libGL
38 Obsoletes: XFree86-OpenGL-libs
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 # avoid XFree86-OpenGL* dependency
42 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
43 %define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.4 libglide3.so.3
45 %define _sysconfdir /etc/X11
48 Mesa is a 3-D graphics library with an API which is very similar to
49 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
50 syntax or state machine, it is being used with authorization from
51 Silicon Graphics, Inc. However, the author does not possess an OpenGL
52 license from SGI, and makes no claim that Mesa is in any way a
53 compatible replacement for OpenGL or associated with SGI.
56 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
57 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
58 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
59 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
60 OpenGL ani powi±zana z SGI.
63 Summary: Development environment for Mesa
64 Summary(pl): ¦rodowisko programistyczne biblioteki Mesa
65 Group: Development/Libraries
66 Requires: %{name} = %{version}-%{release}
67 Requires: xorg-lib-libX11-devel
68 Requires: xorg-lib-libXp-devel
69 Provides: OpenGL-devel = 1.5
70 Provides: OpenGL-GLU-devel = 1.3
71 Provides: OpenGL-GLX-devel = 1.4
72 Obsoletes: XFree86-OpenGL-devel
73 Obsoletes: XFree86-OpenGL-devel-base
76 Header files and documentation needed for development.
78 %description devel -l pl
79 Pliki nag³ówkowe i dokumentacja do Mesy.
82 Summary: Mesa static libraries
83 Summary(pl): Biblioteki statyczne Mesy
84 Group: Development/Libraries
85 Requires: %{name}-devel = %{version}-%{release}
86 Provides: OpenGL-static = 1.5
87 Provides: OpenGL-GLU-static = 1.3
88 Obsoletes: XFree86-OpenGL-static
91 The static version of the Mesa libraries.
93 %description static -l pl
94 Biblioteki statyczne Mesy.
98 Summary(pl): Demonstracje mo¿liwo¶ci bibliotek Mesa
99 Group: Development/Libraries
100 Requires: OpenGL-devel
103 Demonstration programs for the Mesa libraries.
105 %description demos -l pl
106 Programy demonstracyjne dla bibliotek Mesa.
109 Summary: X.org DRI drivers
110 Summary(pl): Sterowniki DRI dla X.org
111 Group: Development/Libraries
117 %description dri -l pl
118 Sterowniki DRI dla X.org.
121 %setup -q -n Mesa-%{version} -b 1
125 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g"
134 %{__make} linux${targ}-static \
137 OPT_FLAGS="%{rpmcflags}" \
138 XLIB_DIR=%{_libdir} \
139 GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
143 %{__make} linux-dri${targ} \
146 OPT_FLAGS="%{rpmcflags}" \
147 XLIB_DIR=%{_libdir} \
151 %{__make} linux${targ} \
154 OPT_FLAGS="%{rpmcflags}" \
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/GL,%{_mandir}/man3,%{_examplesdir}/Mesa}
161 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
163 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
164 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
165 cp -df lib/libOS* $RPM_BUILD_ROOT%{_libdir}
166 cp -rf include/GL/{gl*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
167 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
169 for l in demos redbook samples xdemos ; do
170 %{__make} -C progs/$l clean
172 for l in demos redbook samples util xdemos images ; do
173 cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
175 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/Mesa/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
178 rm -rf $RPM_BUILD_ROOT
180 %post -p /sbin/ldconfig
181 %postun -p /sbin/ldconfig
184 %defattr(644,root,root,755)
185 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
186 %attr(755,root,root) %{_libdir}/libGL.so
187 %attr(755,root,root) %{_libdir}/libGL.so.*.*
188 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
189 %attr(755,root,root) %{_libdir}/libglut.so.*.*
190 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
193 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_libdir}/libGLU.so
196 %attr(755,root,root) %{_libdir}/libglut.so
197 %attr(755,root,root) %{_libdir}/libOSMesa.so
199 %dir %{_includedir}/GL
200 %{_includedir}/GL/GLwDrawA.h
201 %{_includedir}/GL/GLwDrawAP.h
202 %{_includedir}/GL/GLwMDrawA.h
203 %{_includedir}/GL/GLwMDrawAP.h
204 %{_includedir}/GL/gl.h
205 %{_includedir}/GL/glext.h
206 %{_includedir}/GL/gl_mangle.h
207 %{_includedir}/GL/glu.h
208 %{_includedir}/GL/glu_mangle.h
209 %{_includedir}/GL/glx.h
210 %{_includedir}/GL/glxext.h
211 %{_includedir}/GL/glx_mangle.h
212 %{_includedir}/GL/osmesa.h
213 %{_includedir}/GL/xmesa.h
214 %{_includedir}/GL/xmesa_x.h
215 %{_includedir}/GL/xmesa_xf86.h
218 %defattr(644,root,root,755)
222 %{_libdir}/libOSMesa.a
225 %defattr(644,root,root,755)
229 %defattr(644,root,root,755)
230 %dir %{_libdir}/xorg/modules/dri
231 %attr(755,root,root) %{_libdir}/xorg/modules/dri/*_dri.so