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/
21 BuildRequires: libdrm-devel
22 BuildRequires: libstdc++-devel
23 BuildRequires: libtool >= 2:1.4d
24 %{?with_motif:BuildRequires: motif-devel}
25 BuildRequires: sed >= 4.0
26 BuildRequires: xorg-lib-libXi-devel
27 BuildRequires: xorg-lib-libXmu-devel
28 BuildRequires: xorg-lib-libXp-devel
29 BuildRequires: xorg-lib-libXxf86vm-devel
30 BuildRequires: xorg-proto-glproto-devel
31 BuildRequires: xorg-util-makedepend
33 BuildRequires: Glide3-DRI-devel
36 Provides: OpenGL = 1.5
37 Provides: OpenGL-GLU = 1.3
38 # reports version 1.3, but supports glXGetProcAddress() from 1.4
39 Provides: OpenGL-GLX = 1.4
40 Obsoletes: XFree86-OpenGL-libGL
41 Obsoletes: XFree86-OpenGL-libs
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 # avoid XFree86-OpenGL* dependency
45 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
46 %define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.4 libglide3.so.3
48 %define _sysconfdir /etc/X11
51 Mesa is a 3-D graphics library with an API which is very similar to
52 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
53 syntax or state machine, it is being used with authorization from
54 Silicon Graphics, Inc. However, the author does not possess an OpenGL
55 license from SGI, and makes no claim that Mesa is in any way a
56 compatible replacement for OpenGL or associated with SGI.
59 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
60 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
61 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
62 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
63 OpenGL ani powi±zana z SGI.
66 Summary: Development environment for Mesa
67 Summary(pl): ¦rodowisko programistyczne biblioteki Mesa
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
70 Requires: xorg-lib-libX11-devel
71 Requires: xorg-lib-libXp-devel
72 Provides: OpenGL-devel = 1.5
73 Provides: OpenGL-GLU-devel = 1.3
74 Provides: OpenGL-GLX-devel = 1.4
75 Obsoletes: XFree86-OpenGL-devel
76 Obsoletes: XFree86-OpenGL-devel-base
79 Header files and documentation needed for development.
81 %description devel -l pl
82 Pliki nag³ówkowe i dokumentacja do Mesy.
85 Summary: Mesa static libraries
86 Summary(pl): Biblioteki statyczne Mesy
87 Group: Development/Libraries
88 Requires: %{name}-devel = %{version}-%{release}
89 Provides: OpenGL-static = 1.5
90 Provides: OpenGL-GLU-static = 1.3
91 Obsoletes: XFree86-OpenGL-static
94 The static version of the Mesa libraries.
96 %description static -l pl
97 Biblioteki statyczne Mesy.
101 Summary(pl): Demonstracje mo¿liwo¶ci bibliotek Mesa
102 Group: Development/Libraries
103 Requires: OpenGL-devel
106 Demonstration programs for the Mesa libraries.
108 %description demos -l pl
109 Programy demonstracyjne dla bibliotek Mesa.
112 Summary: X.org DRI drivers
113 Summary(pl): Sterowniki DRI dla X.org
114 Group: Development/Libraries
120 %description dri -l pl
121 Sterowniki DRI dla X.org.
124 %setup -q -n Mesa-%{version} -b 1
128 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g"
137 %{__make} linux${targ}-static \
140 OPT_FLAGS="%{rpmcflags}" \
141 XLIB_DIR=%{_libdir} \
142 GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
146 %{__make} linux-dri${targ} \
150 OPT_FLAGS="%{rpmcflags}" \
151 XLIB_DIR=%{_libdir} \
155 %{__make} linux${targ} \
158 OPT_FLAGS="%{rpmcflags}" \
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/GL,%{_mandir}/man3,%{_examplesdir}/Mesa}
165 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
167 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
168 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
169 cp -df lib/libOS* $RPM_BUILD_ROOT%{_libdir}
170 cp -rf include/GL/{gl*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
171 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
173 for l in demos redbook samples xdemos ; do
174 %{__make} -C progs/$l clean
176 for l in demos redbook samples util xdemos images ; do
177 cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
179 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/Mesa/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
182 rm -rf $RPM_BUILD_ROOT
184 %post -p /sbin/ldconfig
185 %postun -p /sbin/ldconfig
188 %defattr(644,root,root,755)
189 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
190 %attr(755,root,root) %{_libdir}/libGL.so
191 %attr(755,root,root) %{_libdir}/libGL.so.*.*
192 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
193 %attr(755,root,root) %{_libdir}/libglut.so.*.*
194 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
197 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_libdir}/libGLU.so
200 %attr(755,root,root) %{_libdir}/libglut.so
201 %attr(755,root,root) %{_libdir}/libOSMesa.so
203 %dir %{_includedir}/GL
204 %{_includedir}/GL/GLwDrawA.h
205 %{_includedir}/GL/GLwDrawAP.h
206 %{_includedir}/GL/GLwMDrawA.h
207 %{_includedir}/GL/GLwMDrawAP.h
208 %{_includedir}/GL/gl.h
209 %{_includedir}/GL/glext.h
210 %{_includedir}/GL/gl_mangle.h
211 %{_includedir}/GL/glu.h
212 %{_includedir}/GL/glu_mangle.h
213 %{_includedir}/GL/glx.h
214 %{_includedir}/GL/glxext.h
215 %{_includedir}/GL/glx_mangle.h
216 %{_includedir}/GL/osmesa.h
217 %{_includedir}/GL/xmesa.h
218 %{_includedir}/GL/xmesa_x.h
219 %{_includedir}/GL/xmesa_xf86.h
222 %defattr(644,root,root,755)
226 %{_libdir}/libOSMesa.a
229 %defattr(644,root,root,755)
233 %defattr(644,root,root,755)
234 %dir %{_libdir}/xorg/modules/dri
235 %attr(755,root,root) %{_libdir}/xorg/modules/dri/*_dri.so