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