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