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