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