]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- require only OpenGL-devel for Mesa-demos (can be used with XFree86-OpenGL)
[packages/Mesa.git] / Mesa.spec
1 #
2 # _without_glide: without GLIDE
3 #
4 # _with_dri: add GLX/DRI support (taken from rawhide)
5 # (does it make any sense? we have XFree86-OpenGL-* packages...)
6 #
7 Summary:        Free OpenGL implementation
8 Summary(pl):    Bezp³atna implementacja standardu OpenGL
9 Name:           Mesa
10 Version:        3.4.2
11 Release:        3
12 License:        MIT (core), LGPL (libGLU), SGI (libGLw) and others - see COPYRIGHT file
13 Group:          X11/Libraries
14 Group(de):      X11/Libraries
15 Group(es):      X11/Bibliotecas
16 Group(fr):      X11/Librairies
17 Group(pl):      X11/Biblioteki
18 Source0:        ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Lib-%{version}.tar.bz2
19 Source1:        ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Demos-%{version}.tar.bz2
20 %{?_with_dri:Source2:   XFree86-4.0.2-GLonly.tar.gz}
21 Patch0:         %{name}-paths.patch
22 Patch1:         %{name}-badlibtool.patch
23 Patch2:         %{name}-glibc-2.2.patch
24 Patch3:         %{name}-am.patch
25 Patch4:         %{name}-libGLw.patch
26 %{?_with_dri:Patch5: %{name}-XF86DRI-4.0.2.patch}
27 #Patch6:        %{name}-3.3-glXcontext.patch
28 URL:            http://www.mesa3d.org/
29 BuildRequires:  XFree86-devel
30 BuildRequires:  motif-devel
31 %{!?_without_glide:BuildRequires:       Glide_V3-DRI-devel}
32 BuildRequires:  perl
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 Provides:       OpenGL
36 Obsoletes:      XFree86-OpenGL-core XFree86-OpenGL-libs
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
40
41 %define         _prefix         /usr/X11R6
42 %define         _mandir         %{_prefix}/man
43
44 %description
45 Mesa is a 3-D graphics library with an API which is very similar to
46 that of OpenGL*. To the extent that Mesa utilizes the OpenGL command
47 syntax or state machine, it is being used with authorization from
48 Silicon Graphics, Inc. However, the author makes no claim that Mesa is
49 in any way a compatible replacement for OpenGL or associated with
50 Silicon Graphics, Inc. Those who want a licensed implementation of
51 OpenGL should contact a licensed vendor. This software is distributed
52 under the terms of the GNU Library General Public License, see the
53 LICENSE file for details.
54
55 - OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
56
57 %description -l pl
58 Mesa jest bibliotek± 3D bêd±c± darmowym odpowiednikiem standardu
59 OpenGL(*).
60
61 - OpenGL jest zastrze¿onym znakiem towarowym firmy Silicon Graphics,
62   Inc.
63
64 %package devel
65 Summary:        Development environment for Mesa
66 Summary(pl):    ¦rodowisko programistyczne biblioteki Mesa
67 Group:          Development/Libraries
68 Group(de):      Entwicklung/Libraries
69 Group(fr):      Development/Librairies
70 Group(pl):      Programowanie/Biblioteki
71 Requires:       %{name} = %{version}
72 Requires:       XFree86-devel
73 Provides:       OpenGL-devel
74 Obsoletes:      XFree86-OpenGL-devel
75
76 %description devel
77 Header files and documentation needed for development.
78
79 %description -l pl devel
80 Pliki nag³ówkowe i dokumentacja do Mesy.
81
82 %package static
83 Summary:        Mesa static libraries
84 Summary(pl):    Biblioteki statyczne Mesy
85 Group:          Development/Libraries
86 Group(de):      Entwicklung/Libraries
87 Group(fr):      Development/Librairies
88 Group(pl):      Programowanie/Biblioteki
89 Requires:       %{name}-devel = %{version}
90 Provides:       OpenGL-static
91 Obsoletes:      XFree86-OpenGL-static
92
93 %description static
94 The static version of the Mesa libraries.
95
96 %description -l pl static
97 Biblioteki statyczne Mesy.
98
99 %package demos
100 Summary:        Mesa Demos
101 Summary(pl):    Demonstracje mo¿liwo¶ci bibliotek Mesa
102 Group:          Development/Libraries
103 Group(de):      Entwicklung/Libraries
104 Group(fr):      Development/Librairies
105 Group(pl):      Programowanie/Biblioteki
106 Requires:       OpenGL-devel
107
108 %description demos
109 Demonstration programs for the Mesa libraries.
110
111 %description -l pl demos
112 Programy demonstracyjne dla bibliotek Mesa.
113
114 %prep
115 %setup -q -n Mesa-%{version} -b 1
116
117 %if %{?_with_dri:1}%{!?_with_dri:0}
118         mkdir -p src/DRI/GL
119         tar xzf %{SOURCE2}
120         ln -f `find xc -type f` src/DRI
121         mv -f src/DRI/glxmd.h src/DRI/GL/glxmd.h
122 %endif
123
124 %patch0 -p1
125 %patch1 -p1
126 %patch2 -p1
127 %patch3 -p1
128 %patch4 -p1
129 %{?_with_dri:%patch5 -p1}
130 #%patch6 -p1
131 # fix demos
132 perl -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" demos/*
133
134 %build
135 aclocal -I .
136 autoheader
137 automake -a -c
138 autoconf
139 %configure \
140         --enable-static \
141         --enable-shared \
142         --with-ggi="no" \
143         --with-svga="no" \
144         --disable-ggi-fbdev \
145         --disable-ggi-genkgi \
146         --enable-optimize \
147         %{?_without_glide:--without-glide} \
148 %ifarch %{ix86} \
149         --enable-x86 \
150   %ifarch i586 i686 \
151         --enable-mmx \
152         --enable-3dnow \
153     %ifarch i686 \
154         --enable-katmai \
155     %else \
156         --disable-katmai \
157     %endif \
158   %else \
159     %ifarch k6 \
160         --enable-mmx \
161         --enable-3dnow \
162     %else \
163         --disable-mmx \
164         --disable-3dnow \
165     %endif \
166   %endif \
167 %else \
168         --disable-x86 \
169         --disable-mmx \
170         --disable-3dnow
171 %endif
172
173 %{__make}
174         
175 (cd widgets-mesa
176 %configure \
177         --with-motif
178 %{__make}
179 )
180
181 (cd widgets-sgi
182 touch depend
183 %{__make} dep
184 %{__make} linux OPTFLAGS="%{rpmcflags}"
185 )
186
187 %install
188 rm -rf $RPM_BUILD_ROOT
189 %{__make} install DESTDIR=$RPM_BUILD_ROOT
190
191 install -d $RPM_BUILD_ROOT%{_mandir}/man3
192
193 (cd widgets-mesa
194 %{__make} install \
195         prefix=$RPM_BUILD_ROOT%{_prefix} \
196         mandir=$RPM_BUILD_ROOT%{_mandir}/man3
197 # Mesa widgets are not binary compatible with SGI ones
198 cd $RPM_BUILD_ROOT%{_includedir}/GL
199 mkdir Mesa-widgets
200 mv -f GLw*.h Mesa*.h Mesa-widgets
201 )
202
203 install widgets-sgi/libGLw* $RPM_BUILD_ROOT%{_libdir}
204 install widgets-sgi/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
205
206 install -d $RPM_BUILD_ROOT/usr/src/examples/Mesa
207 for l in book demos samples xdemos images ; do
208         cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
209 done
210
211 gzip -9nf docs/*
212
213 %post   -p /sbin/ldconfig
214 %postun -p /sbin/ldconfig
215
216 %clean
217 rm -fr $RPM_BUILD_ROOT
218
219 %files
220 %defattr(644,root,root,755)
221 %doc docs/CONFIG.gz
222 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
223
224 %files devel
225 %defattr(644,root,root,755)
226 %doc docs/{IAFA-PACKAGE,README,RELNOTES-*,VERSIONS,CONFORM,COPYRIGHT,DEVINFO,*.spec}.gz
227 %doc docs/README.{3DFX,GGI,MITS,QUAKE,X11,THREADS}.gz
228 %attr(755,root,root) %{_libdir}/libGL*.so
229 %{_libdir}/libMesaGLw*.a
230 %{_libdir}/libGLw.a
231 %dir %{_includedir}/GL
232 %{_includedir}/GL/Mesa-widgets
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/glx_mangle.h
244 %{_includedir}/GL/osmesa.h
245 %{_includedir}/GL/xmesa.h
246 %{_includedir}/GL/xmesa_x.h
247 %{_includedir}/GL/xmesa_xf86.h
248 %{_mandir}/man3/*
249
250 %files static
251 %defattr(644,root,root,755)
252 %{_libdir}/libGL.a
253 %{_libdir}/libGLU.a
254
255 %files demos
256 %defattr(644,root,root,755)
257 %dir /usr/src/examples/Mesa
258 %dir /usr/src/examples/Mesa/book
259 %dir /usr/src/examples/Mesa/demos
260 %dir /usr/src/examples/Mesa/samples
261 %dir /usr/src/examples/Mesa/xdemos
262
263 %doc /usr/src/examples/Mesa/book/*
264 %doc /usr/src/examples/Mesa/demos/*
265 %doc /usr/src/examples/Mesa/samples/*
266 %doc /usr/src/examples/Mesa/xdemos/*
This page took 0.053361 seconds and 4 git commands to generate.