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