]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
- athlon updates
[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 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%{_includedir} -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     %ifarch i686 \
159         --enable-katmai \
160     %else \
161         --disable-katmai \
162     %endif \
163   %else \
164     %ifarch athlon \
165         --enable-mmx \
166         --enable-3dnow \
167     %else \
168         --disable-mmx \
169         --disable-3dnow \
170     %endif \
171   %endif \
172 %else \
173         --disable-x86 \
174         --disable-mmx \
175         --disable-3dnow
176 %endif
177
178 %{__make}
179         
180 (cd widgets-mesa
181 %configure \
182         --with-motif
183 %{__make}
184 )
185
186 (cd widgets-sgi
187 touch depend
188 %{__make} dep
189 %{__make} linux OPTFLAGS="%{rpmcflags}"
190 )
191
192 %install
193 rm -rf $RPM_BUILD_ROOT
194 %{__make} install DESTDIR=$RPM_BUILD_ROOT
195
196 install -d $RPM_BUILD_ROOT%{_mandir}/man3
197
198 (cd widgets-mesa
199 %{__make} install \
200         prefix=$RPM_BUILD_ROOT%{_prefix} \
201         mandir=$RPM_BUILD_ROOT%{_mandir}/man3
202 # Mesa widgets are not binary compatible with SGI ones
203 cd $RPM_BUILD_ROOT%{_includedir}/GL
204 mkdir Mesa-widgets
205 mv -f GLw*.h Mesa*.h Mesa-widgets
206 )
207
208 install widgets-sgi/libGLw* $RPM_BUILD_ROOT%{_libdir}
209 install widgets-sgi/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
210
211 install -d $RPM_BUILD_ROOT/usr/src/examples/Mesa
212 for l in book demos samples xdemos images ; do
213         cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
214 done
215
216 gzip -9nf docs/*
217
218 %post   -p /sbin/ldconfig
219 %postun -p /sbin/ldconfig
220
221 %clean
222 rm -fr $RPM_BUILD_ROOT
223
224 %files
225 %defattr(644,root,root,755)
226 %doc docs/CONFIG.gz
227 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
228
229 %files devel
230 %defattr(644,root,root,755)
231 %doc docs/{IAFA-PACKAGE,README,RELNOTES-*,VERSIONS,CONFORM,COPYRIGHT,DEVINFO,*.spec}.gz
232 %doc docs/README.{3DFX,GGI,MITS,QUAKE,X11,THREADS}.gz
233 %attr(755,root,root) %{_libdir}/libGL*.so
234 %{_libdir}/libMesaGLw*.a
235 %{_libdir}/libGLw.a
236 %dir %{_includedir}/GL
237 %{_includedir}/GL/Mesa-widgets
238 %{_includedir}/GL/GLwDrawA.h
239 %{_includedir}/GL/GLwDrawAP.h
240 %{_includedir}/GL/GLwMDrawA.h
241 %{_includedir}/GL/GLwMDrawAP.h
242 %{_includedir}/GL/gl.h
243 %{_includedir}/GL/glext.h
244 %{_includedir}/GL/gl_mangle.h
245 %{_includedir}/GL/glu.h
246 %{_includedir}/GL/glu_mangle.h
247 %{_includedir}/GL/glx.h
248 %{_includedir}/GL/glx_mangle.h
249 %{_includedir}/GL/osmesa.h
250 %{_includedir}/GL/xmesa.h
251 %{_includedir}/GL/xmesa_x.h
252 %{_includedir}/GL/xmesa_xf86.h
253 %{_mandir}/man3/*
254
255 %files static
256 %defattr(644,root,root,755)
257 %{_libdir}/libGL.a
258 %{_libdir}/libGLU.a
259
260 %files demos
261 %defattr(644,root,root,755)
262 %dir /usr/src/examples/Mesa
263 %dir /usr/src/examples/Mesa/book
264 %dir /usr/src/examples/Mesa/demos
265 %dir /usr/src/examples/Mesa/samples
266 %dir /usr/src/examples/Mesa/xdemos
267
268 %doc /usr/src/examples/Mesa/book/*
269 %doc /usr/src/examples/Mesa/demos/*
270 %doc /usr/src/examples/Mesa/samples/*
271 %doc /usr/src/examples/Mesa/xdemos/*
This page took 0.07801 seconds and 4 git commands to generate.