]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa.spec
switch to new conditional builds macros (bcond_on_ -> _with_/bcond_off_ -> _without_...
[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.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 %{?_with_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 %{?_with_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 %{!?_without_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 Requires:       XFree86-devel
67 Provides:       OpenGL-devel
68
69 %description devel
70 Header files and documentation needed for development.
71
72 %description -l pl devel
73 Pliki nag³ówkowe i dokumentacja do Mesy.
74
75 %package static
76 Summary:        Mesa static libraries
77 Summary(pl):    Biblioteki statyczne Mesy
78 Group:          Development/Libraries
79 Group(de):      Entwicklung/Libraries
80 Group(fr):      Development/Librairies
81 Group(pl):      Programowanie/Biblioteki
82 Requires:       %{name}-devel = %{version}
83 Provides:       OpenGL-static
84
85 %description static
86 The static version of the Mesa libraries.
87
88 %description -l pl static
89 Biblioteki statyczne Mesy.
90
91 %package demos
92 Summary:        Mesa Demos
93 Summary(pl):    Demonstracje mo¿liwo¶ci biblioteki MESA
94 Group:          Development/Libraries
95 Group(de):      Entwicklung/Libraries
96 Group(fr):      Development/Librairies
97 Group(pl):      Programowanie/Biblioteki
98 Requires:       %{name} = %{version}
99
100 %description demos
101 Demonstration programs for the Mesa libraries.
102
103 %description -l pl demos
104 Programy demonstracyjne dla biblioteki Mesa.
105
106 %prep
107 %setup -q -n Mesa-%{version} -b 1
108
109 %if %{?_with_dri:1}%{!?_with_dri:0}
110         mkdir -p src/DRI/GL
111         tar xzf %{SOURCE2}
112         ln -f `find xc -type f` src/DRI
113         mv -f src/DRI/glxmd.h src/DRI/GL/glxmd.h
114 %endif
115
116 %patch0 -p1
117 %patch1 -p1
118 %patch2 -p1
119 %patch3 -p1
120 %{?_with_dri:%patch4 -p1}
121 #%patch5 -p1
122 # fix demos
123 perl -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" demos/*
124
125 %build
126 aclocal -I .
127 autoheader
128 automake -a -c
129 autoconf
130 %configure \
131         --enable-static \
132         --enable-shared \
133         --with-ggi="no" \
134         --with-svga="no" \
135         --disable-ggi-fbdev \
136         --disable-ggi-genkgi \
137         --enable-optimize \
138         %{?_without_glide:--without-glide} \
139 %ifarch %{ix86} \
140         --enable-x86 \
141   %ifarch i586 i686 \
142         --enable-mmx \
143         --enable-3dnow \
144     %ifarch i686 \
145         --enable-katmai \
146     %else \
147         --disable-katmai \
148     %endif \
149   %else \
150     %ifarch k6 \
151         --enable-mmx \
152         --enable-3dnow \
153     %else \
154         --disable-mmx \
155         --disable-3dnow \
156     %endif \
157   %endif \
158 %else \
159         --disable-x86 \
160         --disable-mmx \
161         --disable-3dnow
162 %endif
163
164 %{__make}
165         
166 (cd widgets-mesa
167 %configure
168 %{__make}
169 )
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 %{__make} install DESTDIR=$RPM_BUILD_ROOT
174
175 install -d $RPM_BUILD_ROOT%{_mandir}/man3
176
177 (cd widgets-mesa; \
178 %{__make} install \
179         prefix=$RPM_BUILD_ROOT%{_prefix} \
180         mandir=$RPM_BUILD_ROOT%{_mandir}/man3)
181
182 install -d $RPM_BUILD_ROOT/usr/src/examples/Mesa
183 for l in book demos samples xdemos images ; do
184         cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
185 done
186
187 gzip -9nf docs/*
188
189 # resolve conflict with XFree86-devel
190 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/GLwCreateMDrawingArea.*
191 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/GLwDrawingArea{,MakeCurrent,SwapBuffers}.*
192
193 %post   -p /sbin/ldconfig
194 %postun -p /sbin/ldconfig
195
196 %clean
197 rm -fr $RPM_BUILD_ROOT
198
199 %files
200 %defattr(644,root,root,755)
201 %doc docs/CONFIG.gz
202 %attr(755,root,root) %{_libdir}/libGL*.so.*.*
203
204 %files devel
205 %defattr(644,root,root,755)
206 %doc docs/{IAFA-PACKAGE,README,RELNOTES-*,VERSIONS,CONFORM,COPYRIGHT,DEVINFO,*.spec}.gz
207 %doc docs/README.{3DFX,GGI,MITS,QUAKE,X11,THREADS}.gz
208 %attr(755,root,root) %{_libdir}/libGL*.so
209
210 %dir %{_includedir}/GL
211 %{_includedir}/GL/GLwDrawA.h
212 %{_includedir}/GL/GLwDrawAP.h
213 %{_includedir}/GL/GLwMDrawA.h
214 %{_includedir}/GL/GLwMDrawAP.h
215 %{_includedir}/GL/MesaDrawingArea.h
216 %{_includedir}/GL/MesaDrawingAreaP.h
217 %{_includedir}/GL/MesaMDrawingArea.h
218 %{_includedir}/GL/MesaMDrawingAreaP.h
219 %{_includedir}/GL/MesaWorkstation.h
220 %{_includedir}/GL/MesaWorkstationP.h
221 %{_includedir}/GL/gl.h
222 %{_includedir}/GL/glext.h
223 %{_includedir}/GL/gl_mangle.h
224 %{_includedir}/GL/glu.h
225 %{_includedir}/GL/glu_mangle.h
226 %{_includedir}/GL/glx.h
227 %{_includedir}/GL/glx_mangle.h
228 %{_includedir}/GL/osmesa.h
229 %{_includedir}/GL/xmesa.h
230 %{_includedir}/GL/xmesa_x.h
231 %{_includedir}/GL/xmesa_xf86.h
232 %{_mandir}/man3/*
233
234 %files static
235 %defattr(644,root,root,755)
236 %{_libdir}/libGL*.a
237
238 %files demos
239 %defattr(644,root,root,755)
240 %dir /usr/src/examples/Mesa/book
241 %dir /usr/src/examples/Mesa/demos
242 %dir /usr/src/examples/Mesa/samples
243 %dir /usr/src/examples/Mesa/xdemos
244
245 %doc /usr/src/examples/Mesa/book/*
246 %doc /usr/src/examples/Mesa/demos/*
247 %doc /usr/src/examples/Mesa/samples/*
248 %doc /usr/src/examples/Mesa/xdemos/*
This page took 0.071549 seconds and 4 git commands to generate.