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