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), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file
16 Source0: http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
17 # Source0-md5: 0df27701df0924d17ddf41185efa8ce1
18 Source1: http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
19 # Source1-md5: 96708868450c188205e42229b5d813c4
21 # 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
22 Patch0: %{name}-dri-asm.patch
23 URL: http://www.mesa3d.org/
24 BuildRequires: expat-devel
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 BuildRequires: xorg-lib-libXxf86vm-devel
34 BuildRequires: xorg-proto-glproto-devel
35 BuildRequires: xorg-util-makedepend
37 BuildRequires: Glide3-DRI-devel
40 Provides: OpenGL = 1.5
41 Provides: OpenGL-GLU = 1.3
42 # reports version 1.3, but supports glXGetProcAddress() from 1.4
43 Provides: OpenGL-GLX = 1.4
44 Obsoletes: XFree86-OpenGL-libGL
45 Obsoletes: XFree86-OpenGL-libs
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 # avoid XFree86-OpenGL* dependency
49 # Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
50 %define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.4 libglide3.so.3
52 %define _sysconfdir /etc/X11
55 Mesa is a 3-D graphics library with an API which is very similar to
56 that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
57 syntax or state machine, it is being used with authorization from
58 Silicon Graphics, Inc. However, the author does not possess an OpenGL
59 license from SGI, and makes no claim that Mesa is in any way a
60 compatible replacement for OpenGL or associated with SGI.
63 Mesa jest bibliotek± grafiki 3D z API bardzo podobnym do OpenGL(R). Do
64 tego stopnia, ¿e Mesa u¿ywa sk³adni i automatu OpenGL jest u¿ywana z
65 autoryzacj± Silicon Graphics, Inc. Jednak autor nie posiada licencji
66 OpenGL od SGI i nie twierdzi, ¿e Mesa jest kompatybilnym zamiennikiem
67 OpenGL ani powi±zana z SGI.
70 Summary: Development environment for Mesa
71 Summary(pl): ¦rodowisko programistyczne biblioteki Mesa
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
74 Requires: xorg-lib-libX11-devel
75 Requires: xorg-lib-libXp-devel
76 Provides: OpenGL-devel = 1.5
77 Provides: OpenGL-GLU-devel = 1.3
78 Provides: OpenGL-GLX-devel = 1.4
79 Obsoletes: XFree86-OpenGL-devel
80 Obsoletes: XFree86-OpenGL-devel-base
83 Header files and documentation needed for development.
85 %description devel -l pl
86 Pliki nag³ówkowe i dokumentacja do Mesy.
89 Summary: Mesa static libraries
90 Summary(pl): Biblioteki statyczne Mesy
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
93 Provides: OpenGL-static = 1.5
94 Provides: OpenGL-GLU-static = 1.3
95 Obsoletes: XFree86-OpenGL-static
98 The static version of the Mesa libraries.
100 %description static -l pl
101 Biblioteki statyczne Mesy.
105 Summary(pl): Demonstracje mo¿liwo¶ci bibliotek Mesa
106 Group: Development/Libraries
107 Requires: OpenGL-devel
110 Demonstration programs for the Mesa libraries.
112 %description demos -l pl
113 Programy demonstracyjne dla bibliotek Mesa.
116 Summary: X.org DRI drivers
117 Summary(pl): Sterowniki DRI dla X.org
118 Group: Development/Libraries
124 %description dri -l pl
125 Sterowniki DRI dla X.org.
128 %setup -q -n Mesa-%{version} -b 1
132 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
141 %{__make} linux${targ}-static \
144 OPT_FLAGS="%{rpmcflags}" \
145 XLIB_DIR=%{_libdir} \
146 GLW_SOURCES="GLwDrawA.c%{?with_motif: GLwMDrawA.c}" \
147 SRC_DIRS="mesa glu glw" \
152 %{__make} linux-dri${targ} \
156 OPT_FLAGS="%{rpmcflags}" \
157 XLIB_DIR=%{_libdir} \
158 SRC_DIRS="glx/x11 mesa glu glw" \
164 %{__make} linux${targ} \
167 OPT_FLAGS="%{rpmcflags}" \
168 XLIB_DIR=%{_libdir} \
169 SRC_DIRS="mesa glu glw" \
172 %{__make} -C progs/xdemos \
175 OPT_FLAGS="%{rpmcflags}" \
176 XLIB_DIR=%{_libdir} \
178 APP_LIB_DEPS="-L\$(LIB_DIR) -lGL"
180 %{__make} -C progs/xdemos \
183 OPT_FLAGS="%{rpmcflags}" \
184 XLIB_DIR=%{_libdir} \
186 APP_LIB_DEPS="-L\$(LIB_DIR) -lGLU -lGL"
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/GL,%{_examplesdir}/%{name}-%{version}}
191 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
193 cp -df lib-static/lib* $RPM_BUILD_ROOT%{_libdir}
194 cp -df lib-dri/lib* $RPM_BUILD_ROOT%{_libdir}
195 cp -df lib/libOS* $RPM_BUILD_ROOT%{_libdir}
196 cp -rf include/GL/{gl[!u]*,glu.h,glu_*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
197 cp -df lib-dri/*_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri
199 install progs/xdemos/{glxgears,glxinfo} $RPM_BUILD_ROOT%{_bindir}
200 for l in demos redbook samples xdemos ; do
201 %{__make} -C progs/$l clean
203 for l in demos redbook samples util xdemos images ; do
204 cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
206 rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
209 rm -rf $RPM_BUILD_ROOT
211 %post -p /sbin/ldconfig
212 %postun -p /sbin/ldconfig
215 %defattr(644,root,root,755)
216 %doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
217 %attr(755,root,root) %{_bindir}/glx*
218 %attr(755,root,root) %{_libdir}/libGL.so.*.*
219 %attr(755,root,root) %{_libdir}/libGLU.so.*.*
220 %attr(755,root,root) %{_libdir}/libGLw.so.*.*
221 %attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
222 # symlink for binary apps which fail to conform Linux OpenGL ABI
223 # (and dlopen libGL.so instead of libGL.so.1)
224 %attr(755,root,root) %{_libdir}/libGL.so
227 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libGLU.so
230 %attr(755,root,root) %{_libdir}/libGLw.so
231 %attr(755,root,root) %{_libdir}/libOSMesa.so
232 %dir %{_includedir}/GL
233 %{_includedir}/GL/GLwDrawA.h
234 %{_includedir}/GL/GLwDrawAP.h
235 %{_includedir}/GL/GLwMDrawA.h
236 %{_includedir}/GL/GLwMDrawAP.h
237 %{_includedir}/GL/gl.h
238 %{_includedir}/GL/glext.h
239 %{_includedir}/GL/gl_mangle.h
240 %{_includedir}/GL/glu.h
241 %{_includedir}/GL/glu_mangle.h
242 %{_includedir}/GL/glx.h
243 %{_includedir}/GL/glxext.h
244 %{_includedir}/GL/glx_mangle.h
245 %{_includedir}/GL/osmesa.h
246 %{_includedir}/GL/xmesa.h
247 %{_includedir}/GL/xmesa_x.h
248 %{_includedir}/GL/xmesa_xf86.h
251 %defattr(644,root,root,755)
255 %{_libdir}/libOSMesa.a
258 %defattr(644,root,root,755)
259 %{_examplesdir}/%{name}-%{version}
262 %defattr(644,root,root,755)
263 %dir %{_libdir}/xorg/modules/dri
264 %attr(755,root,root) %{_libdir}/xorg/modules/dri/*_dri.so