1 |
%define bootstrap 0 |
2 |
%{?_without_bootstrap: %global bootstrap 0} |
3 |
%{?_with_bootstrap: %global bootstrap 1} |
4 |
|
5 |
%if "%distro_section" == "tainted" |
6 |
%global build_plf 1 |
7 |
%else |
8 |
%global build_plf 0 |
9 |
%endif |
10 |
|
11 |
# (cg) Cheater... |
12 |
%define Werror_cflags %nil |
13 |
|
14 |
# (aco) Needed for the dri drivers |
15 |
%define _disable_ld_no_undefined 1 |
16 |
|
17 |
|
18 |
%define git 0 |
19 |
%define with_hardware 1 |
20 |
|
21 |
%define relc 0 |
22 |
%define name mesa |
23 |
%define version 8.0.4 |
24 |
%define rel 1 |
25 |
|
26 |
%define release %mkrel %{rel} |
27 |
%define src_type tar.bz2 |
28 |
#define vsuffix %{expand:} |
29 |
%define vsuffix %nil |
30 |
|
31 |
%if %{relc} |
32 |
%define release %mkrel 0.rc%{relc}.%{rel} |
33 |
%define vsuffix -rc%{relc} |
34 |
%define src_type tar.bz2 |
35 |
%endif |
36 |
|
37 |
%if %{git} |
38 |
%if %{relc} |
39 |
%define release %mkrel 0.rc%{relc}.1.git%{git}.%{rel} |
40 |
%else |
41 |
%define release %mkrel 0.git%{git}.%{rel} |
42 |
%endif |
43 |
%endif |
44 |
|
45 |
%define makedepend %{_bindir}/gccmakedep |
46 |
|
47 |
%define eglname mesaegl |
48 |
%define glname mesagl |
49 |
%define gluname mesaglu |
50 |
%define glwname mesaglw |
51 |
%define glesv1name mesaglesv1 |
52 |
%define glesv2name mesaglesv2 |
53 |
%define openvgname mesaopenvg |
54 |
%define glapiname glapi |
55 |
%define gbmname gbm |
56 |
%define waylandeglname wayland-egl |
57 |
|
58 |
%define eglmajor 1 |
59 |
%define glmajor 1 |
60 |
%define glumajor 1 |
61 |
%define glwmajor 1 |
62 |
%define glesv1major 1 |
63 |
%define glesv2major 2 |
64 |
%define openvgmajor 1 |
65 |
%define glapimajor 0 |
66 |
%define gbmmajor 1 |
67 |
%define waylandeglmajor 1 |
68 |
|
69 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
70 |
%define libglname %mklibname %{glname} %{glmajor} |
71 |
%define libgluname %mklibname %{gluname} %{glumajor} |
72 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
73 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
74 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
75 |
%define libopenvgname %mklibname %{openvgname} %{openvgmajor} |
76 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
77 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
78 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
79 |
|
80 |
%define dridrivers %mklibname dri-drivers |
81 |
|
82 |
# Architecture-independent Virtual provides: |
83 |
%define libeglname_virt lib%{eglname} |
84 |
%define libglname_virt lib%{glname} |
85 |
%define libgluname_virt lib%{gluname} |
86 |
%define libglwname_virt lib%{glwname} |
87 |
%define libglesv1name_virt lib%{glesv1name} |
88 |
%define libglesv2name_virt lib%{glesv2name} |
89 |
%define libopenvgname_virt lib%{openvgname} |
90 |
%define libglapiname_virt lib%{glapiname} |
91 |
%define libgbmname_virt lib%{gbmname} |
92 |
%define libwaylandeglname_virt lib%{waylandeglname} |
93 |
|
94 |
%define oldlibglname %mklibname MesaGL 1 |
95 |
%define oldlibgluname %mklibname MesaGLU 1 |
96 |
|
97 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
98 |
%define driver_dir %{_libdir}/dri |
99 |
|
100 |
%define enable_egl 1 |
101 |
%define enable_wayland 1 |
102 |
|
103 |
#FIXME: (for 386/485) unset SSE, MMX and 3dnow flags |
104 |
#FIXME: (for >=i586) disable sse |
105 |
# SSE seems to have problem on some apps (gtulpas) for probing. |
106 |
%define dri_drivers_i386 "i915,i965,nouveau,r200,radeon,swrast" |
107 |
%define dri_drivers_x86_64 %{dri_drivers_i386} |
108 |
%define dri_drivers_ppc "r200,radeon,swrast" |
109 |
%define dri_drivers_ppc64 "" |
110 |
%define dri_drivers_ia64 "i915,i965,mga,r200,radeon,swrast" |
111 |
%define dri_drivers_alpha "r200,radeon,swrast" |
112 |
%define dri_drivers_sparc "ffb,radeon,swrast" |
113 |
%define dri_drivers_mipsel "r200,radeon,swrast" |
114 |
%define dri_drivers_arm "swrast" |
115 |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
116 |
|
117 |
Name: %{name} |
118 |
Version: %{version} |
119 |
Release: %{release} |
120 |
Summary: OpenGL 2.1 compatible 3D graphics library |
121 |
Group: System/Libraries |
122 |
|
123 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
124 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
125 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
126 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
127 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
128 |
BuildRequires: libexpat-devel >= 2.0.1 |
129 |
BuildRequires: gccmakedep |
130 |
BuildRequires: x11-proto-devel >= 7.3 |
131 |
BuildRequires: pkgconfig(libdrm) >= 2.4.21 |
132 |
|
133 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
134 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
135 |
BuildRequires: pkgconfig(xi) >= 1.3 |
136 |
BuildRequires: pkgconfig(talloc) |
137 |
BuildRequires: libxml2-python |
138 |
BuildRequires: makedepend |
139 |
BuildRequires: bison flex |
140 |
BuildRequires: llvm-devel |
141 |
BuildRequires: pkgconfig(libudev) |
142 |
%if %{enable_wayland} |
143 |
BuildRequires: wayland-devel |
144 |
%endif |
145 |
|
146 |
URL: http://www.mesa3d.org |
147 |
%if %{git} |
148 |
# (cg) Current commit ref: origin/mesa_7_5_branch |
149 |
Source0: %{name}-%{git}.tar.bz2 |
150 |
%else |
151 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{version}%{vsuffix}.%{src_type} |
152 |
%endif |
153 |
Source3: make-git-snapshot.sh |
154 |
Source5: mesa-driver-install |
155 |
|
156 |
|
157 |
# Instructions to setup your repository clone |
158 |
# git://git.freedesktop.org/git/mesa/mesa |
159 |
# git checkout mesa_7_5_branch |
160 |
# git branch mdv-cherry-picks |
161 |
# git am ../02??-*.patch |
162 |
# git branch mdv-redhat |
163 |
# git am ../03??-*.patch |
164 |
# git branch mdv-patches |
165 |
# git am ../09??-*.patch |
166 |
|
167 |
# In order to update to the branch via patches, issue this command: |
168 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
169 |
|
170 |
# Cherry picks |
171 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
172 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
173 |
Patch202: 0202-fix-includes-for-latest-libdrm.patch |
174 |
|
175 |
# Patches "liberated" from Fedora: |
176 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
177 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
178 |
|
179 |
# Backport nouveau commits to enable build with libdrm_nouveau-2 (Anssi) |
180 |
Patch401: 0401-dri-nouveau-don-t-use-nested-functions.patch |
181 |
Patch402: 0402-nouveau-vieux-switch-to-libdrm_nouveau-2.0.patch |
182 |
Patch403: 0403-nouveau-rework-and-simplify-nv04-nv05-driver-a-bit.patch |
183 |
Patch404: 0404-nvfx-completely-remove-this-driver-GeForce-FX-6-7.patch |
184 |
Patch405: 0405-nouveau-remove-automatic-buffer-migration-heuristics.patch |
185 |
Patch406: 0406-nvc0-remove-obsolete-nvc0_push2.c.patch |
186 |
Patch407: 0407-nouveau-switch-to-libdrm_nouveau-2.0.patch |
187 |
Patch408: 0408-nv30-import-new-driver-for-GeForce-FX-6-7-chipsets-a.patch |
188 |
Patch409: 0409-nvc0-remove-include-of-old-libdrm_nouveau-s-nouveau_.patch |
189 |
Patch410: 0410-targets-egl-static-gbm-further-clean-up-the-nvfx-rem.patch |
190 |
Patch411: 0411-xorg-nouveau-switch-to-libdrm_nouveau-2.0.patch |
191 |
Patch412: 0412-nv50-nvc0-hold-references-to-the-framebuffer-surface.patch |
192 |
Patch413: 0413-nvc0-only-force-early-fragment-tests-if-requested-by.patch |
193 |
Patch414: 0414-nouveau-add-new-shared-scratch-buffers.patch |
194 |
Patch415: 0415-nv50-nvc0-use-new-scratch-buffers-code.patch |
195 |
Patch416: 0416-nvc0-track-texture-dirty-state-individually.patch |
196 |
Patch417: 0417-nvc0-improve-vertex-state-validation.patch |
197 |
Patch418: 0418-nvc0-replace-VERTEX_DATA-push-mode-with-translate-to.patch |
198 |
Patch419: 0419-nvc0-prefix-all-macro-methods-with-MACRO.patch |
199 |
Patch420: 0420-nv50-nvc0-fix-handling-of-user-vbufs-with-stride-acc.patch |
200 |
Patch421: 0421-nouveau-fix-nv30-build-with-mesa-8.0.patch |
201 |
|
202 |
# Mandriva patches |
203 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
204 |
Patch902: 0902-remove-unfinished-GLX_ARB_render_texture.patch |
205 |
Patch903: 0903-Fix-NULL-pointer-dereference-in-viaXMesaWindowMoved.patch |
206 |
Patch904: Mesa-7.9-salome.patch |
207 |
|
208 |
Patch2004: mesa_652_mips.patch |
209 |
|
210 |
#------------------------------------------------------------------------------ |
211 |
|
212 |
# package mesa |
213 |
License: MIT |
214 |
Requires: %{libglname} = %{version}-%{release} |
215 |
Provides: hackMesa = %{version} |
216 |
Obsoletes: hackMesa <= %{version} |
217 |
Provides: Mesa = %{version} |
218 |
Obsoletes: Mesa < %{version} |
219 |
|
220 |
%package -n %{libglname} |
221 |
Summary: Files for Mesa (GL and GLX libs) |
222 |
Group: System/Libraries |
223 |
Obsoletes: %{oldlibglname} < 6.4 |
224 |
Provides: %{oldlibglname} = %{version}-%{release} |
225 |
Provides: %{libglname_virt} = %{version}-%{release} |
226 |
Requires: %{dridrivers} >= %{version}-%{release} |
227 |
%if %{build_plf} |
228 |
Requires: %mklibname txc-dxtn |
229 |
%endif |
230 |
|
231 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
232 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
233 |
Conflicts: x11-server-common < 1.3.0.0-17 |
234 |
|
235 |
%package -n %{dridrivers} |
236 |
Summary: Mesa DRI drivers |
237 |
Group: System/Libraries |
238 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
239 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
240 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
241 |
|
242 |
%package -n %{libglname}-devel |
243 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
244 |
Group: Development/C |
245 |
Requires: %{libglname} = %{version}-%{release} |
246 |
Provides: lib%{glname}-devel = %{version}-%{release} |
247 |
Provides: %{glname}-devel = %{version}-%{release} |
248 |
Provides: GL-devel |
249 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
250 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
251 |
Provides: libMesaGL-devel = %{version}-%{release} |
252 |
Provides: MesaGL-devel = %{version}-%{release} |
253 |
Provides: libgl-devel |
254 |
|
255 |
%package -n %{libgluname} |
256 |
Summary: Files for Mesa (GLU libs) |
257 |
Group: System/Libraries |
258 |
Obsoletes: %{oldlibgluname} < 6.4 |
259 |
Provides: %{oldlibgluname} = %{version}-%{release} |
260 |
Provides: %{libgluname_virt} = %{version}-%{release} |
261 |
|
262 |
%package -n %{libgluname}-devel |
263 |
Summary: Development files for GLU libs |
264 |
Group: Development/C |
265 |
Requires: %{libgluname} = %{version}-%{release} |
266 |
Provides: lib%{gluname}-devel = %{version}-%{release} |
267 |
Provides: %{gluname}-devel = %{version}-%{release} |
268 |
Obsoletes: %{oldlibgluname}-devel < 6.4 |
269 |
Provides: %{oldlibgluname}-devel = %{version}-%{release} |
270 |
Provides: libMesaGLU-devel = %{version}-%{release} |
271 |
Provides: MesaGLU-devel = %{version}-%{release} |
272 |
Provides: libglu-devel |
273 |
# pkgconfig files moved from libgl-devel: |
274 |
Conflicts: %{libglname}-devel < 7.10.2-4 |
275 |
|
276 |
%if %{enable_egl} |
277 |
%package -n %{libeglname} |
278 |
Summary: Files for Mesa (EGL libs) |
279 |
Group: System/Libraries |
280 |
Provides: %{libeglname_virt} = %{version}-%{release} |
281 |
|
282 |
%package -n %{libeglname}-devel |
283 |
Summary: Development files for Mesa (EGL libs) |
284 |
Group: Development/C |
285 |
Requires: %{libeglname} = %{version}-%{release} |
286 |
Provides: EGL-devel |
287 |
Provides: lib%{eglname}-devel |
288 |
Provides: %{eglname}-devel |
289 |
Provides: libegl-devel |
290 |
%endif |
291 |
|
292 |
%package -n %{libglapiname} |
293 |
Summary: Files for mesa (glapi libs) |
294 |
Group: System/Libraries |
295 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
296 |
|
297 |
%package -n %{libglapiname}-devel |
298 |
Summary: Development files for glapi libs |
299 |
Group: Development/C |
300 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
301 |
Provides: lib%{glapiname}-devel |
302 |
Provides: %{libglapiname}-devel |
303 |
|
304 |
%package -n %{libglesv1name} |
305 |
Summary: Files for Mesa (glesv1 libs) |
306 |
Group: System/Libraries |
307 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
308 |
|
309 |
%package -n %{libglesv1name}-devel |
310 |
Summary: Development files for glesv1 libs |
311 |
Group: Development/C |
312 |
Requires: %{libglesv1name} = %{version}-%{release} |
313 |
Provides: lib%{glesv1name}-devel |
314 |
Provides: %{glesv1name}-devel |
315 |
Provides: libglesv1-devel |
316 |
|
317 |
%package -n %{libglesv2name} |
318 |
Summary: Files for Mesa (glesv2 libs) |
319 |
Group: System/Libraries |
320 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
321 |
|
322 |
%package -n %{libglesv2name}-devel |
323 |
Summary: Development files for glesv2 libs |
324 |
Group: Development/C |
325 |
Requires: %{libglesv2name} = %{version}-%{release} |
326 |
Requires: %{libeglname}-devel = %{version}-%{release} |
327 |
Provides: lib%{glesv2name}-devel |
328 |
Provides: %{glesv2name}-devel |
329 |
Provides: libglesv2-devel |
330 |
|
331 |
%package -n %{libopenvgname} |
332 |
Summary: Files for MESA (OpenVG libs) |
333 |
Group: System/Libraries |
334 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
335 |
|
336 |
%package -n %{libopenvgname}-devel |
337 |
Summary: Development files vor OpenVG libs |
338 |
Group: Development/C |
339 |
Requires: %{libopenvgname} = %{version}-%{release} |
340 |
Provides: lib%{openvgname}-devel |
341 |
Provides: %{openvgname}-devel |
342 |
Provides: libopenvg-devel |
343 |
|
344 |
%if %{enable_wayland} |
345 |
%package -n %{libgbmname} |
346 |
Summary: Files for Mesa (gbm libs) |
347 |
Group: System/Libraries |
348 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
349 |
|
350 |
%package -n %{libgbmname}-devel |
351 |
Summary: Development files for Mesa (gbm libs) |
352 |
Group: Development/C |
353 |
Requires: %{libgbmname} = %{version}-%{release} |
354 |
Provides: lib%{gbmname}-devel |
355 |
Provides: %{gbmname}-devel |
356 |
|
357 |
%package -n %{libwaylandeglname} |
358 |
Summary: Files for Mesa (Wayland EGL libs) |
359 |
Group: System/Libraries |
360 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
361 |
|
362 |
%package -n %{libwaylandeglname}-devel |
363 |
Summary: Development files for Mesa (Wayland EGL libs) |
364 |
Group: Development/C |
365 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
366 |
Provides: lib%{waylandeglname}-devel |
367 |
Provides: %{waylandeglname}-devel |
368 |
%endif |
369 |
|
370 |
%package common-devel |
371 |
Summary: Meta package for mesa devel |
372 |
Group: Development/C |
373 |
Provides: Mesa-common-devel = %{version}-%{release} |
374 |
Provides: hackMesa-common-devel = %{version} |
375 |
Obsoletes: Mesa-common-devel < %{version} |
376 |
Obsoletes: hackMesa-common-devel < %{version} |
377 |
Requires: %{libglname}-devel = %{version} |
378 |
Requires: %{libgluname}-devel = %{version} |
379 |
Requires: freeglut-devel |
380 |
Requires: %{libeglname}-devel = %{version} |
381 |
Requires: %{libglesv1name}-devel = %{version} |
382 |
Requires: %{libglesv2name}-devel = %{version} |
383 |
|
384 |
#------------------------------------------------------------------------------ |
385 |
|
386 |
%description |
387 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
388 |
%if %{build_plf} |
389 |
|
390 |
This package is in the "tainted" section because it enables some |
391 |
OpenGL extentions that are covered by software patents. |
392 |
%endif |
393 |
|
394 |
%description common-devel |
395 |
Mesa common metapackage devel |
396 |
|
397 |
%if %{enable_egl} |
398 |
%description -n %{libeglname} |
399 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
400 |
EGL parts. |
401 |
|
402 |
%description -n %{libeglname}-devel |
403 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
404 |
EGL development parts. |
405 |
%endif |
406 |
|
407 |
%description -n %{libglname} |
408 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
409 |
GL and GLX parts. |
410 |
|
411 |
%if %{build_plf} |
412 |
This package is in the "tainted" section because it enables some |
413 |
OpenGL extentions that are covered by software patents. |
414 |
%endif |
415 |
|
416 |
%description -n %{dridrivers} |
417 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
418 |
DRI drivers. |
419 |
|
420 |
%description -n %{libglname}-devel |
421 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
422 |
|
423 |
This package contains the headers needed to compile Mesa programs. |
424 |
|
425 |
%description -n %{libgluname} |
426 |
GLU is the OpenGL Utility Library. |
427 |
It provides a number of functions upon the base OpenGL library to provide |
428 |
higher-level drawing routines from the more primitive routines provided by |
429 |
OpenGL. |
430 |
|
431 |
%description -n %{libgluname}-devel |
432 |
This package contains the headers needed to compile programs with GLU. |
433 |
|
434 |
%description -n %{libglesv1name} |
435 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
436 |
well-defined subset profiles of OpenGL. |
437 |
|
438 |
This package provides the OpenGL ES library version 1. |
439 |
|
440 |
%description -n %{libglapiname} |
441 |
This packages provides the glapi shared library used by gallium. |
442 |
|
443 |
%description -n %{libglapiname}-devel |
444 |
This package contains the headers needed to compile programes against glapi shared library. |
445 |
|
446 |
%description -n %{libglesv1name}-devel |
447 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
448 |
|
449 |
%description -n %{libglesv2name} |
450 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
451 |
well-defined subset profiles of OpenGL. |
452 |
|
453 |
This package provides the OpenGL ES library version 2. |
454 |
|
455 |
%description -n %{libglesv2name}-devel |
456 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
457 |
|
458 |
%description -n %{libopenvgname} |
459 |
OpenVG is a royalty-free, cross-platform API that provides a low-level hardware |
460 |
acceleration interface for vector graphics libraries such as Flash and SVG. |
461 |
|
462 |
%description -n %{libopenvgname}-devel |
463 |
Development files for OpenVG library. |
464 |
|
465 |
%if %{enable_wayland} |
466 |
%description -n %{libgbmname} |
467 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
468 |
GBM (Graphics Buffer Manager) parts. |
469 |
|
470 |
%description -n %{libgbmname}-devel |
471 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
472 |
GBM (Graphics Buffer Manager) development parts. |
473 |
|
474 |
%description -n %{libwaylandeglname} |
475 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
476 |
Wayland EGL platform parts. |
477 |
|
478 |
%description -n %{libwaylandeglname}-devel |
479 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
480 |
Wayland EGL platform development parts. |
481 |
%endif |
482 |
|
483 |
#------------------------------------------------------------------------------ |
484 |
|
485 |
%prep |
486 |
%if %{git} |
487 |
%setup -q -n mesa-%{git} |
488 |
%else |
489 |
%setup -q -n Mesa-%{version}%{vsuffix} |
490 |
%endif |
491 |
|
492 |
%patch201 -p1 |
493 |
#%patch202 -p1 |
494 |
|
495 |
%patch401 -p1 |
496 |
%patch402 -p1 |
497 |
%patch403 -p1 |
498 |
%patch404 -p1 |
499 |
%patch405 -p1 |
500 |
%patch406 -p1 |
501 |
%patch407 -p1 |
502 |
%patch408 -p1 |
503 |
%patch409 -p1 |
504 |
%patch410 -p1 |
505 |
%patch411 -p1 |
506 |
%patch412 -p1 |
507 |
%patch413 -p1 |
508 |
%patch414 -p1 |
509 |
%patch415 -p1 |
510 |
%patch416 -p1 |
511 |
%patch417 -p1 |
512 |
%patch418 -p1 |
513 |
%patch419 -p1 |
514 |
%patch420 -p1 |
515 |
%patch421 -p1 |
516 |
|
517 |
#%patch902 -p1 |
518 |
#%patch903 -p1 |
519 |
#%patch904 -p1 |
520 |
|
521 |
#%patch2004 -p1 |
522 |
|
523 |
chmod +x %{SOURCE5} |
524 |
|
525 |
%build |
526 |
%if %{git} |
527 |
./autogen.sh -v |
528 |
%endif |
529 |
|
530 |
# Required by patch200: |
531 |
autoreconf -vfi |
532 |
%configure2_5x --with-driver=dri \ |
533 |
--with-dri-driverdir=%{driver_dir} \ |
534 |
--with-dri-drivers="%{dri_drivers}" \ |
535 |
--with-state-trackers=dri \ |
536 |
--enable-shared-dricore \ |
537 |
%if %{enable_egl} |
538 |
--enable-egl \ |
539 |
%else |
540 |
--disable-egl \ |
541 |
%endif |
542 |
%if %{enable_wayland} |
543 |
--with-egl-platforms=x11,wayland,drm \ |
544 |
--enable-gbm \ |
545 |
--enable-shared-glapi \ |
546 |
%endif |
547 |
--enable-gles1 \ |
548 |
--enable-gles2 \ |
549 |
--enable-openvg \ |
550 |
--enable-gallium-egl \ |
551 |
%if %{with_hardware} |
552 |
--with-gallium-drivers=r300,r600,nouveau,swrast \ |
553 |
--enable-gallium-llvm \ |
554 |
%else |
555 |
--disable-gallium-llvm \ |
556 |
--with-gallium-drivers=swrast \ |
557 |
%endif |
558 |
%if %{build_plf} |
559 |
--enable-texture-float \ |
560 |
%endif |
561 |
--disable-glut |
562 |
|
563 |
%make |
564 |
|
565 |
%install |
566 |
%makeinstall_std |
567 |
|
568 |
# FIXME: strip will likely break the hardlink |
569 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
570 |
# to prevent proprietary driver installers from removing them |
571 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
572 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
573 |
for l in ../libGL.so.*; do cp -a $l .; done |
574 |
popd |
575 |
|
576 |
%ifarch %{x86_64} |
577 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
578 |
%endif |
579 |
|
580 |
rm -f %{buildroot}/%{_includedir}/GL/glut.h |
581 |
rm -f %{buildroot}/%{_includedir}/GL/glutf90.h |
582 |
|
583 |
# use swrastg if built (Anssi 12/2011) |
584 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
585 |
|
586 |
#------------------------------------------------------------------------------ |
587 |
|
588 |
%files |
589 |
%defattr(-,root,root) |
590 |
%doc docs/COPYING docs/README.* |
591 |
|
592 |
%files -n %{dridrivers} |
593 |
%defattr(-,root,root) |
594 |
%doc docs/COPYING |
595 |
%ifnarch ppc64 |
596 |
%dir %{_libdir}/dri |
597 |
%{_libdir}/dri/libdricore.so |
598 |
%{_libdir}/dri/libglsl.so |
599 |
%{_libdir}/dri/*_dri.so |
600 |
%endif |
601 |
|
602 |
%files -n %{libglname} |
603 |
%defattr(-,root,root) |
604 |
%doc docs/COPYING |
605 |
%{_libdir}/libGL.so.* |
606 |
%dir %{_libdir}/mesa |
607 |
%{_libdir}/mesa/libGL.so.%{glmajor}* |
608 |
|
609 |
%files -n %{libgluname} |
610 |
%defattr(-,root,root) |
611 |
%doc docs/COPYING |
612 |
%{_libdir}/libGLU.so.%{glumajor}* |
613 |
|
614 |
%if %{enable_egl} |
615 |
%files -n %{libeglname} |
616 |
%defattr(-,root,root) |
617 |
%doc docs/COPYING |
618 |
%{_libdir}/libEGL.so.%{eglmajor}* |
619 |
%dir %{_libdir}/egl |
620 |
%if !%{enable_wayland} |
621 |
# st_GL, built only when shared glapi is not enabled |
622 |
%{_libdir}/egl/st_GL.so |
623 |
%endif |
624 |
%{_libdir}/egl/egl_gallium.so |
625 |
%endif |
626 |
|
627 |
%files -n %{libglapiname} |
628 |
%defattr(-,root,root) |
629 |
%{_libdir}/libglapi.so.%{glapimajor}* |
630 |
|
631 |
%files -n %{libglesv1name} |
632 |
%defattr(-,root,root) |
633 |
%doc docs/COPYING |
634 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}* |
635 |
|
636 |
%files -n %{libglesv2name} |
637 |
%defattr(-,root,root) |
638 |
%doc docs/COPYING |
639 |
%{_libdir}/libGLESv2.so.%{glesv2major}* |
640 |
|
641 |
%files -n %{libopenvgname} |
642 |
%defattr(-,root,root) |
643 |
%doc docs/COPYING |
644 |
%{_libdir}/libOpenVG.so.%{openvgmajor}* |
645 |
|
646 |
%if %{enable_wayland} |
647 |
%files -n %{libgbmname} |
648 |
%{_libdir}/libgbm.so.%{gbmmajor} |
649 |
%{_libdir}/libgbm.so.%{gbmmajor}.0 |
650 |
%{_libdir}/gbm/gbm_*.so |
651 |
%{_libdir}/gbm/pipe_*.so |
652 |
|
653 |
%files -n %{libwaylandeglname} |
654 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
655 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.0 |
656 |
%endif |
657 |
|
658 |
|
659 |
%files -n %{libglname}-devel |
660 |
%defattr(-,root,root) |
661 |
%doc docs/COPYING |
662 |
%{_includedir}/GL/gl.h |
663 |
%{_includedir}/GL/glext.h |
664 |
%{_includedir}/GL/gl_mangle.h |
665 |
%{_includedir}/GL/osmesa.h |
666 |
%{_includedir}/GL/wglext.h |
667 |
%{_includedir}/GL/glx.h |
668 |
%{_includedir}/GL/glxext.h |
669 |
%{_includedir}/GL/glx_mangle.h |
670 |
%{_libdir}/libGL.so |
671 |
%{_libdir}/pkgconfig/gl.pc |
672 |
%{_libdir}/pkgconfig/dri.pc |
673 |
|
674 |
#FIXME: check those headers |
675 |
%{_includedir}/GL/vms_x_fix.h |
676 |
%{_includedir}/GL/wmesa.h |
677 |
%dir %{_includedir}/GL/internal |
678 |
%{_includedir}/GL/internal/dri_interface.h |
679 |
|
680 |
%files -n %{libgluname}-devel |
681 |
%defattr(-,root,root) |
682 |
%doc docs/COPYING |
683 |
%{_includedir}/GL/glu.h |
684 |
%{_includedir}/GL/glu_mangle.h |
685 |
%{_libdir}/libGLU.so |
686 |
%{_libdir}/pkgconfig/glu.pc |
687 |
|
688 |
%files common-devel |
689 |
%defattr(-,root,root) |
690 |
|
691 |
%if %{enable_egl} |
692 |
%files -n %{libeglname}-devel |
693 |
%defattr(-,root,root) |
694 |
%doc docs/COPYING |
695 |
%{_includedir}/EGL |
696 |
%{_includedir}/KHR |
697 |
%{_libdir}/libEGL.so |
698 |
%{_libdir}/pkgconfig/egl.pc |
699 |
%endif |
700 |
|
701 |
%files -n %{libglapiname}-devel |
702 |
%defattr(-,root,root) |
703 |
%{_libdir}/libglapi.so |
704 |
|
705 |
%files -n %{libglesv1name}-devel |
706 |
%defattr(-,root,root) |
707 |
%{_includedir}/GLES |
708 |
%{_libdir}/libGLESv1_CM.so |
709 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
710 |
|
711 |
%files -n %{libglesv2name}-devel |
712 |
%defattr(-,root,root) |
713 |
%{_includedir}/GLES2 |
714 |
%{_libdir}/libGLESv2.so |
715 |
%{_libdir}/pkgconfig/glesv2.pc |
716 |
|
717 |
%files -n %{libopenvgname}-devel |
718 |
%defattr(-,root,root) |
719 |
%{_includedir}/VG |
720 |
%{_libdir}/libOpenVG.so |
721 |
%{_libdir}/pkgconfig/vg.pc |
722 |
|
723 |
%if %{enable_wayland} |
724 |
%files -n %{libgbmname}-devel |
725 |
%{_includedir}/gbm.h |
726 |
%{_libdir}/libgbm.so |
727 |
%{_libdir}/pkgconfig/gbm.pc |
728 |
|
729 |
%files -n %{libwaylandeglname}-devel |
730 |
%{_libdir}/libwayland-egl.so |
731 |
%{_libdir}/pkgconfig/wayland-egl.pc |
732 |
%endif |