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 20120727 |
19 |
%define with_hardware 1 |
20 |
|
21 |
%define relc 0 |
22 |
%define name mesa |
23 |
%define version 8.1.0 |
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 dricorename dricore |
48 |
%define eglname mesaegl |
49 |
%define glname mesagl |
50 |
%define gluname mesaglu |
51 |
%define glwname mesaglw |
52 |
%define glesv1name mesaglesv1 |
53 |
%define glesv2name mesaglesv2 |
54 |
%define openvgname mesaopenvg |
55 |
%define glapiname glapi |
56 |
%define gbmname gbm |
57 |
%define waylandeglname wayland-egl |
58 |
|
59 |
%define dricoremajor 1 |
60 |
%define eglmajor 1 |
61 |
%define glmajor 1 |
62 |
%define glumajor 1 |
63 |
%define glwmajor 1 |
64 |
%define glesv1major 1 |
65 |
%define glesv2major 2 |
66 |
%define openvgmajor 1 |
67 |
%define glapimajor 0 |
68 |
%define gbmmajor 1 |
69 |
%define waylandeglmajor 1 |
70 |
|
71 |
%define libdricorename %mklibname %{dricorename} %{dricoremajor} |
72 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
73 |
%define libglname %mklibname %{glname} %{glmajor} |
74 |
%define libgluname %mklibname %{gluname} %{glumajor} |
75 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
76 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
77 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
78 |
%define libopenvgname %mklibname %{openvgname} %{openvgmajor} |
79 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
80 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
81 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
82 |
|
83 |
%define dridrivers %mklibname dri-drivers |
84 |
|
85 |
# Architecture-independent Virtual provides: |
86 |
%define libdricorename_virt lib%{dricorename} |
87 |
%define libeglname_virt lib%{eglname} |
88 |
%define libglname_virt lib%{glname} |
89 |
%define libgluname_virt lib%{gluname} |
90 |
%define libglwname_virt lib%{glwname} |
91 |
%define libglesv1name_virt lib%{glesv1name} |
92 |
%define libglesv2name_virt lib%{glesv2name} |
93 |
%define libopenvgname_virt lib%{openvgname} |
94 |
%define libglapiname_virt lib%{glapiname} |
95 |
%define libgbmname_virt lib%{gbmname} |
96 |
%define libwaylandeglname_virt lib%{waylandeglname} |
97 |
|
98 |
%define oldlibglname %mklibname MesaGL 1 |
99 |
%define oldlibgluname %mklibname MesaGLU 1 |
100 |
|
101 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
102 |
%define driver_dir %{_libdir}/dri |
103 |
|
104 |
%define enable_egl 1 |
105 |
%define enable_wayland 1 |
106 |
|
107 |
#FIXME: (for 386/485) unset SSE, MMX and 3dnow flags |
108 |
#FIXME: (for >=i586) disable sse |
109 |
# SSE seems to have problem on some apps (gtulpas) for probing. |
110 |
%define dri_drivers_i386 "i915,i965,nouveau,r200,radeon,swrast" |
111 |
%define dri_drivers_x86_64 %{dri_drivers_i386} |
112 |
%define dri_drivers_ppc "r200,radeon,swrast" |
113 |
%define dri_drivers_ppc64 "" |
114 |
%define dri_drivers_ia64 "i915,i965,mga,r200,radeon,swrast" |
115 |
%define dri_drivers_alpha "r200,radeon,swrast" |
116 |
%define dri_drivers_sparc "ffb,radeon,swrast" |
117 |
%define dri_drivers_mipsel "r200,radeon,swrast" |
118 |
%define dri_drivers_arm "swrast" |
119 |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
120 |
|
121 |
Name: %{name} |
122 |
Version: %{version} |
123 |
Release: %{release} |
124 |
Summary: OpenGL 2.1 compatible 3D graphics library |
125 |
Group: System/Libraries |
126 |
|
127 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
128 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
129 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
130 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
131 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
132 |
BuildRequires: libexpat-devel >= 2.0.1 |
133 |
BuildRequires: gccmakedep |
134 |
BuildRequires: x11-proto-devel >= 7.3 |
135 |
BuildRequires: pkgconfig(libdrm) >= 2.4.21 |
136 |
|
137 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
138 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
139 |
BuildRequires: pkgconfig(xi) >= 1.3 |
140 |
BuildRequires: pkgconfig(talloc) |
141 |
BuildRequires: libxml2-python |
142 |
BuildRequires: makedepend |
143 |
BuildRequires: bison flex |
144 |
BuildRequires: llvm-devel |
145 |
BuildRequires: pkgconfig(libudev) |
146 |
BuildRequires: pkgconfig(vdpau) |
147 |
%if %{enable_wayland} |
148 |
BuildRequires: wayland-devel |
149 |
%endif |
150 |
|
151 |
URL: http://www.mesa3d.org |
152 |
%if %{git} |
153 |
# (cg) Current commit ref: origin/mesa_7_5_branch |
154 |
Source0: %{name}-%{git}.tar.bz2 |
155 |
%else |
156 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{version}%{vsuffix}.%{src_type} |
157 |
%endif |
158 |
Source3: make-git-snapshot.sh |
159 |
|
160 |
# Instructions to setup your repository clone |
161 |
# git://git.freedesktop.org/git/mesa/mesa |
162 |
# git checkout mesa_7_5_branch |
163 |
# git branch mdv-cherry-picks |
164 |
# git am ../02??-*.patch |
165 |
# git branch mdv-redhat |
166 |
# git am ../03??-*.patch |
167 |
# git branch mdv-patches |
168 |
# git am ../09??-*.patch |
169 |
|
170 |
# In order to update to the branch via patches, issue this command: |
171 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
172 |
|
173 |
# Cherry picks |
174 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
175 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
176 |
|
177 |
# Patches "liberated" from Fedora: |
178 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
179 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
180 |
|
181 |
# Mageia/Mandriva patches |
182 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
183 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
184 |
Patch901: 0901-llvmpipe-ldl.patch |
185 |
|
186 |
|
187 |
#------------------------------------------------------------------------------ |
188 |
|
189 |
# package mesa |
190 |
License: MIT |
191 |
Requires: %{libglname} = %{version}-%{release} |
192 |
Provides: hackMesa = %{version} |
193 |
Obsoletes: hackMesa <= %{version} |
194 |
Provides: Mesa = %{version} |
195 |
Obsoletes: Mesa < %{version} |
196 |
|
197 |
%package -n %{libdricorename} |
198 |
Summary: Shared library for DRI drivers |
199 |
Group: System/Libraries |
200 |
Provides: %{libdricorename_virt} = %{version}-%{release} |
201 |
|
202 |
%package -n %{libdricorename}-devel |
203 |
Summary: Development files for DRI core |
204 |
Group: Development/C |
205 |
Requires: %{libdricorename} = %{version}-%{release} |
206 |
Provides: lib%{dricorename}-devel = %{version}-%{release} |
207 |
Provides: %{dricorename}-devel = %{version}-%{release} |
208 |
|
209 |
%package -n %{libglname} |
210 |
Summary: Files for Mesa (GL and GLX libs) |
211 |
Group: System/Libraries |
212 |
Obsoletes: %{oldlibglname} < 6.4 |
213 |
Provides: %{oldlibglname} = %{version}-%{release} |
214 |
Provides: %{libglname_virt} = %{version}-%{release} |
215 |
Requires: %{dridrivers} >= %{version}-%{release} |
216 |
%if %{build_plf} |
217 |
Requires: %mklibname txc-dxtn |
218 |
%endif |
219 |
|
220 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
221 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
222 |
Conflicts: x11-server-common < 1.3.0.0-17 |
223 |
|
224 |
%package -n %{dridrivers} |
225 |
Summary: Mesa DRI drivers |
226 |
Group: System/Libraries |
227 |
# do not require exact release to avoid conflicts when having |
228 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
229 |
Requires: mesa = %{version} |
230 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
231 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
232 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
233 |
|
234 |
%package -n %{libglname}-devel |
235 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
236 |
Group: Development/C |
237 |
Requires: %{libglname} = %{version}-%{release} |
238 |
Provides: lib%{glname}-devel = %{version}-%{release} |
239 |
Provides: %{glname}-devel = %{version}-%{release} |
240 |
Provides: GL-devel |
241 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
242 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
243 |
Provides: libMesaGL-devel = %{version}-%{release} |
244 |
Provides: MesaGL-devel = %{version}-%{release} |
245 |
Provides: libgl-devel |
246 |
|
247 |
%package -n %{libgluname} |
248 |
Summary: Files for Mesa (GLU libs) |
249 |
Group: System/Libraries |
250 |
Obsoletes: %{oldlibgluname} < 6.4 |
251 |
Provides: %{oldlibgluname} = %{version}-%{release} |
252 |
Provides: %{libgluname_virt} = %{version}-%{release} |
253 |
|
254 |
%package -n %{libgluname}-devel |
255 |
Summary: Development files for GLU libs |
256 |
Group: Development/C |
257 |
Requires: %{libgluname} = %{version}-%{release} |
258 |
Provides: lib%{gluname}-devel = %{version}-%{release} |
259 |
Provides: %{gluname}-devel = %{version}-%{release} |
260 |
Obsoletes: %{oldlibgluname}-devel < 6.4 |
261 |
Provides: %{oldlibgluname}-devel = %{version}-%{release} |
262 |
Provides: libMesaGLU-devel = %{version}-%{release} |
263 |
Provides: MesaGLU-devel = %{version}-%{release} |
264 |
Provides: libglu-devel |
265 |
# pkgconfig files moved from libgl-devel: |
266 |
Conflicts: %{libglname}-devel < 7.10.2-4 |
267 |
|
268 |
%if %{enable_egl} |
269 |
%package -n %{libeglname} |
270 |
Summary: Files for Mesa (EGL libs) |
271 |
Group: System/Libraries |
272 |
Provides: %{libeglname_virt} = %{version}-%{release} |
273 |
|
274 |
%package -n %{libeglname}-devel |
275 |
Summary: Development files for Mesa (EGL libs) |
276 |
Group: Development/C |
277 |
Requires: %{libeglname} = %{version}-%{release} |
278 |
Provides: EGL-devel |
279 |
Provides: lib%{eglname}-devel |
280 |
Provides: %{eglname}-devel |
281 |
Provides: libegl-devel |
282 |
%endif |
283 |
|
284 |
%package -n %{libglapiname} |
285 |
Summary: Files for mesa (glapi libs) |
286 |
Group: System/Libraries |
287 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
288 |
|
289 |
%package -n %{libglapiname}-devel |
290 |
Summary: Development files for glapi libs |
291 |
Group: Development/C |
292 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
293 |
Provides: lib%{glapiname}-devel |
294 |
Provides: %{libglapiname}-devel |
295 |
|
296 |
%package -n %{libglesv1name} |
297 |
Summary: Files for Mesa (glesv1 libs) |
298 |
Group: System/Libraries |
299 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
300 |
|
301 |
%package -n %{libglesv1name}-devel |
302 |
Summary: Development files for glesv1 libs |
303 |
Group: Development/C |
304 |
Requires: %{libglesv1name} = %{version}-%{release} |
305 |
Provides: lib%{glesv1name}-devel |
306 |
Provides: %{glesv1name}-devel |
307 |
Provides: libglesv1-devel |
308 |
|
309 |
%package -n %{libglesv2name} |
310 |
Summary: Files for Mesa (glesv2 libs) |
311 |
Group: System/Libraries |
312 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
313 |
|
314 |
%package -n %{libglesv2name}-devel |
315 |
Summary: Development files for glesv2 libs |
316 |
Group: Development/C |
317 |
Requires: %{libglesv2name} = %{version}-%{release} |
318 |
Requires: %{libeglname}-devel = %{version}-%{release} |
319 |
Provides: lib%{glesv2name}-devel |
320 |
Provides: %{glesv2name}-devel |
321 |
Provides: libglesv2-devel |
322 |
|
323 |
%package -n %{libopenvgname} |
324 |
Summary: Files for MESA (OpenVG libs) |
325 |
Group: System/Libraries |
326 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
327 |
|
328 |
%package -n %{libopenvgname}-devel |
329 |
Summary: Development files vor OpenVG libs |
330 |
Group: Development/C |
331 |
Requires: %{libopenvgname} = %{version}-%{release} |
332 |
Provides: lib%{openvgname}-devel |
333 |
Provides: %{openvgname}-devel |
334 |
Provides: libopenvg-devel |
335 |
|
336 |
%if %{enable_wayland} |
337 |
%package -n %{libgbmname} |
338 |
Summary: Files for Mesa (gbm libs) |
339 |
Group: System/Libraries |
340 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
341 |
|
342 |
%package -n %{libgbmname}-devel |
343 |
Summary: Development files for Mesa (gbm libs) |
344 |
Group: Development/C |
345 |
Requires: %{libgbmname} = %{version}-%{release} |
346 |
Provides: lib%{gbmname}-devel |
347 |
Provides: %{gbmname}-devel |
348 |
|
349 |
%package -n %{libwaylandeglname} |
350 |
Summary: Files for Mesa (Wayland EGL libs) |
351 |
Group: System/Libraries |
352 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
353 |
|
354 |
%package -n %{libwaylandeglname}-devel |
355 |
Summary: Development files for Mesa (Wayland EGL libs) |
356 |
Group: Development/C |
357 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
358 |
Provides: lib%{waylandeglname}-devel |
359 |
Provides: %{waylandeglname}-devel |
360 |
%endif |
361 |
|
362 |
%package -n vdpau-driver-nouveau |
363 |
Summary: VDPAU plugin for nouveau driver |
364 |
Group: System/Libraries |
365 |
|
366 |
%package -n vdpau-driver-r300 |
367 |
Summary: VDPAU plugin for r300 driver |
368 |
Group: System/Libraries |
369 |
|
370 |
%package -n vdpau-driver-r600 |
371 |
Summary: VDPAU plugin for r600 driver |
372 |
Group: System/Libraries |
373 |
|
374 |
%package -n vdpau-driver-softpipe |
375 |
Summary: VDPAU plugin for softpipe driver |
376 |
Group: System/Libraries |
377 |
|
378 |
%package common-devel |
379 |
Summary: Meta package for mesa devel |
380 |
Group: Development/C |
381 |
Provides: Mesa-common-devel = %{version}-%{release} |
382 |
Provides: hackMesa-common-devel = %{version} |
383 |
Obsoletes: Mesa-common-devel < %{version} |
384 |
Obsoletes: hackMesa-common-devel < %{version} |
385 |
Requires: %{libglname}-devel = %{version} |
386 |
Requires: %{libgluname}-devel = %{version} |
387 |
Requires: freeglut-devel |
388 |
Requires: %{libeglname}-devel = %{version} |
389 |
Requires: %{libglesv1name}-devel = %{version} |
390 |
Requires: %{libglesv2name}-devel = %{version} |
391 |
|
392 |
#------------------------------------------------------------------------------ |
393 |
|
394 |
%description |
395 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
396 |
%if %{build_plf} |
397 |
|
398 |
This package is in the "tainted" section because it enables some |
399 |
OpenGL extentions that are covered by software patents. |
400 |
%endif |
401 |
|
402 |
%description common-devel |
403 |
Mesa common metapackage devel |
404 |
|
405 |
%if %{enable_egl} |
406 |
%description -n %{libeglname} |
407 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
408 |
EGL parts. |
409 |
|
410 |
%description -n %{libeglname}-devel |
411 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
412 |
EGL development parts. |
413 |
%endif |
414 |
|
415 |
%description -n %{libdricorename} |
416 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
417 |
DRI core part. |
418 |
|
419 |
%description -n %{libglname} |
420 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
421 |
GL and GLX parts. |
422 |
|
423 |
%if %{build_plf} |
424 |
This package is in the "tainted" section because it enables some |
425 |
OpenGL extentions that are covered by software patents. |
426 |
%endif |
427 |
|
428 |
%description -n %{dridrivers} |
429 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
430 |
DRI drivers. |
431 |
|
432 |
%description -n %{libdricorename}-devel |
433 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
434 |
|
435 |
This package contains the headers needed to compile DRI drivers. |
436 |
|
437 |
%description -n %{libglname}-devel |
438 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
439 |
|
440 |
This package contains the headers needed to compile Mesa programs. |
441 |
|
442 |
%description -n %{libgluname} |
443 |
GLU is the OpenGL Utility Library. |
444 |
It provides a number of functions upon the base OpenGL library to provide |
445 |
higher-level drawing routines from the more primitive routines provided by |
446 |
OpenGL. |
447 |
|
448 |
%description -n %{libgluname}-devel |
449 |
This package contains the headers needed to compile programs with GLU. |
450 |
|
451 |
%description -n %{libglesv1name} |
452 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
453 |
well-defined subset profiles of OpenGL. |
454 |
|
455 |
This package provides the OpenGL ES library version 1. |
456 |
|
457 |
%description -n %{libglapiname} |
458 |
This packages provides the glapi shared library used by gallium. |
459 |
|
460 |
%description -n %{libglapiname}-devel |
461 |
This package contains the headers needed to compile programes against glapi shared library. |
462 |
|
463 |
%description -n %{libglesv1name}-devel |
464 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
465 |
|
466 |
%description -n %{libglesv2name} |
467 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
468 |
well-defined subset profiles of OpenGL. |
469 |
|
470 |
This package provides the OpenGL ES library version 2. |
471 |
|
472 |
%description -n %{libglesv2name}-devel |
473 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
474 |
|
475 |
%description -n %{libopenvgname} |
476 |
OpenVG is a royalty-free, cross-platform API that provides a low-level hardware |
477 |
acceleration interface for vector graphics libraries such as Flash and SVG. |
478 |
|
479 |
%description -n %{libopenvgname}-devel |
480 |
Development files for OpenVG library. |
481 |
|
482 |
%if %{enable_wayland} |
483 |
%description -n %{libgbmname} |
484 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
485 |
GBM (Graphics Buffer Manager) parts. |
486 |
|
487 |
%description -n %{libgbmname}-devel |
488 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
489 |
GBM (Graphics Buffer Manager) development parts. |
490 |
|
491 |
%description -n %{libwaylandeglname} |
492 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
493 |
Wayland EGL platform parts. |
494 |
|
495 |
%description -n %{libwaylandeglname}-devel |
496 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
497 |
Wayland EGL platform development parts. |
498 |
%endif |
499 |
|
500 |
%description -n vdpau-driver-nouveau |
501 |
This packages provides a VPDAU plugin to enable video acceleration |
502 |
with the nouveau driver. |
503 |
|
504 |
%description -n vdpau-driver-r300 |
505 |
This packages provides a VPDAU plugin to enable video acceleration |
506 |
with the r300 driver. |
507 |
|
508 |
%description -n vdpau-driver-r600 |
509 |
This packages provides a VPDAU plugin to enable video acceleration |
510 |
with the r600 driver. |
511 |
|
512 |
%description -n vdpau-driver-softpipe |
513 |
This packages provides a VPDAU plugin to enable video acceleration |
514 |
with the softpipe driver. |
515 |
|
516 |
#------------------------------------------------------------------------------ |
517 |
|
518 |
%prep |
519 |
%if %{git} |
520 |
%setup -q -n mesa-%{git} |
521 |
%else |
522 |
%setup -q -n Mesa-%{version}%{vsuffix} |
523 |
%endif |
524 |
|
525 |
%patch201 -p1 |
526 |
%patch901 -p1 |
527 |
|
528 |
%build |
529 |
autoreconf -vfi |
530 |
%configure2_5x --with-driver=dri \ |
531 |
--with-dri-driverdir=%{driver_dir} \ |
532 |
--with-dri-drivers="%{dri_drivers}" \ |
533 |
--enable-shared-dricore \ |
534 |
%if %{enable_egl} |
535 |
--enable-egl \ |
536 |
%else |
537 |
--disable-egl \ |
538 |
%endif |
539 |
%if %{enable_wayland} |
540 |
--with-egl-platforms=x11,wayland,drm \ |
541 |
--enable-gbm \ |
542 |
--enable-shared-glapi \ |
543 |
%endif |
544 |
--enable-gles1 \ |
545 |
--enable-gles2 \ |
546 |
--enable-openvg \ |
547 |
--enable-gallium-egl \ |
548 |
--enable-gallium-g3dvl \ |
549 |
--disable-xvmc \ |
550 |
--enable-vdpau \ |
551 |
--disable-va \ |
552 |
%if %{with_hardware} |
553 |
--with-gallium-drivers=r300,r600,nouveau,swrast \ |
554 |
--enable-gallium-llvm \ |
555 |
%else |
556 |
--disable-gallium-llvm \ |
557 |
--with-gallium-drivers=swrast \ |
558 |
%endif |
559 |
%if %{build_plf} |
560 |
--enable-texture-float \ |
561 |
%endif |
562 |
# end of configure options |
563 |
|
564 |
%make |
565 |
|
566 |
%install |
567 |
%makeinstall_std |
568 |
|
569 |
# FIXME: strip will likely break the hardlink |
570 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
571 |
# to prevent proprietary driver installers from removing them |
572 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
573 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
574 |
for l in ../libGL.so.*; do cp -a $l .; done |
575 |
popd |
576 |
|
577 |
%ifarch %{x86_64} |
578 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
579 |
%endif |
580 |
|
581 |
rm -f %{buildroot}/%{_includedir}/GL/glut.h |
582 |
rm -f %{buildroot}/%{_includedir}/GL/glutf90.h |
583 |
|
584 |
# .so files are not needed by vdpau |
585 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
586 |
|
587 |
# .la files are not needed by mesa |
588 |
find %{buildroot} -name '*.la' -exec rm {} \; |
589 |
|
590 |
# use swrastg if built (Anssi 12/2011) |
591 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
592 |
|
593 |
#------------------------------------------------------------------------------ |
594 |
|
595 |
%files |
596 |
%defattr(-,root,root) |
597 |
%doc docs/COPYING |
598 |
%config(noreplace) %{_sysconfdir}/drirc |
599 |
|
600 |
%files -n %{libdricorename} |
601 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor} |
602 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor}.* |
603 |
|
604 |
%files -n %{libdricorename}-devel |
605 |
%{_libdir}/libdricore%{version}.so |
606 |
|
607 |
%files -n %{dridrivers} |
608 |
%defattr(-,root,root) |
609 |
%doc docs/COPYING |
610 |
%ifnarch ppc64 |
611 |
%dir %{_libdir}/dri |
612 |
# (blino) new mesa 8.1 build system seems to use a static libglsl |
613 |
#%{_libdir}/dri/libglsl.so |
614 |
%{_libdir}/dri/*_dri.so |
615 |
%endif |
616 |
|
617 |
%files -n %{libglname} |
618 |
%defattr(-,root,root) |
619 |
%doc docs/COPYING |
620 |
%{_libdir}/libGL.so.* |
621 |
%dir %{_libdir}/mesa |
622 |
%{_libdir}/mesa/libGL.so.%{glmajor}* |
623 |
|
624 |
%files -n %{libgluname} |
625 |
%defattr(-,root,root) |
626 |
%doc docs/COPYING |
627 |
%{_libdir}/libGLU.so.%{glumajor}* |
628 |
|
629 |
%if %{enable_egl} |
630 |
%files -n %{libeglname} |
631 |
%defattr(-,root,root) |
632 |
%doc docs/COPYING |
633 |
%{_libdir}/libEGL.so.%{eglmajor}* |
634 |
%dir %{_libdir}/egl |
635 |
%if !%{enable_wayland} |
636 |
# st_GL, built only when shared glapi is not enabled |
637 |
%{_libdir}/egl/st_GL.so |
638 |
%endif |
639 |
%{_libdir}/egl/egl_gallium.so |
640 |
%endif |
641 |
|
642 |
%files -n %{libglapiname} |
643 |
%defattr(-,root,root) |
644 |
%{_libdir}/libglapi.so.%{glapimajor}* |
645 |
|
646 |
%files -n %{libglesv1name} |
647 |
%defattr(-,root,root) |
648 |
%doc docs/COPYING |
649 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}* |
650 |
|
651 |
%files -n %{libglesv2name} |
652 |
%defattr(-,root,root) |
653 |
%doc docs/COPYING |
654 |
%{_libdir}/libGLESv2.so.%{glesv2major}* |
655 |
|
656 |
%files -n %{libopenvgname} |
657 |
%defattr(-,root,root) |
658 |
%doc docs/COPYING |
659 |
%{_libdir}/libOpenVG.so.%{openvgmajor}* |
660 |
|
661 |
%if %{enable_wayland} |
662 |
%files -n %{libgbmname} |
663 |
%{_libdir}/libgbm.so.%{gbmmajor} |
664 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
665 |
%{_libdir}/gbm/gbm_*.so |
666 |
%{_libdir}/gbm/pipe_*.so |
667 |
|
668 |
%files -n %{libwaylandeglname} |
669 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
670 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
671 |
%endif |
672 |
|
673 |
|
674 |
%files -n %{libglname}-devel |
675 |
%defattr(-,root,root) |
676 |
%doc docs/COPYING |
677 |
%{_includedir}/GL/gl.h |
678 |
%{_includedir}/GL/glext.h |
679 |
%{_includedir}/GL/gl_mangle.h |
680 |
%{_includedir}/GL/osmesa.h |
681 |
%{_includedir}/GL/wglext.h |
682 |
%{_includedir}/GL/glx.h |
683 |
%{_includedir}/GL/glxext.h |
684 |
%{_includedir}/GL/glx_mangle.h |
685 |
%{_libdir}/libGL.so |
686 |
%{_libdir}/pkgconfig/gl.pc |
687 |
%{_libdir}/pkgconfig/dri.pc |
688 |
|
689 |
#FIXME: check those headers |
690 |
%{_includedir}/GL/vms_x_fix.h |
691 |
%{_includedir}/GL/wmesa.h |
692 |
%dir %{_includedir}/GL/internal |
693 |
%{_includedir}/GL/internal/dri_interface.h |
694 |
|
695 |
%files -n %{libgluname}-devel |
696 |
%defattr(-,root,root) |
697 |
%doc docs/COPYING |
698 |
%{_includedir}/GL/glu.h |
699 |
%{_includedir}/GL/glu_mangle.h |
700 |
%{_libdir}/libGLU.so |
701 |
%{_libdir}/pkgconfig/glu.pc |
702 |
|
703 |
%files common-devel |
704 |
%defattr(-,root,root) |
705 |
|
706 |
%if %{enable_egl} |
707 |
%files -n %{libeglname}-devel |
708 |
%defattr(-,root,root) |
709 |
%doc docs/COPYING |
710 |
%{_includedir}/EGL |
711 |
%{_includedir}/KHR |
712 |
%{_libdir}/libEGL.so |
713 |
%{_libdir}/pkgconfig/egl.pc |
714 |
%endif |
715 |
|
716 |
%files -n %{libglapiname}-devel |
717 |
%defattr(-,root,root) |
718 |
%{_libdir}/libglapi.so |
719 |
|
720 |
%files -n %{libglesv1name}-devel |
721 |
%defattr(-,root,root) |
722 |
%{_includedir}/GLES |
723 |
%{_libdir}/libGLESv1_CM.so |
724 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
725 |
|
726 |
%files -n %{libglesv2name}-devel |
727 |
%defattr(-,root,root) |
728 |
%{_includedir}/GLES2 |
729 |
%{_libdir}/libGLESv2.so |
730 |
%{_libdir}/pkgconfig/glesv2.pc |
731 |
|
732 |
%files -n %{libopenvgname}-devel |
733 |
%defattr(-,root,root) |
734 |
%{_includedir}/VG |
735 |
%{_libdir}/libOpenVG.so |
736 |
%{_libdir}/pkgconfig/vg.pc |
737 |
|
738 |
%if %{enable_wayland} |
739 |
%files -n %{libgbmname}-devel |
740 |
%{_includedir}/gbm.h |
741 |
%{_libdir}/libgbm.so |
742 |
%{_libdir}/pkgconfig/gbm.pc |
743 |
|
744 |
%files -n %{libwaylandeglname}-devel |
745 |
%{_libdir}/libwayland-egl.so |
746 |
%{_libdir}/pkgconfig/wayland-egl.pc |
747 |
%endif |
748 |
|
749 |
%files -n vdpau-driver-nouveau |
750 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
751 |
|
752 |
%files -n vdpau-driver-r300 |
753 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
754 |
|
755 |
%files -n vdpau-driver-r600 |
756 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
757 |
|
758 |
%files -n vdpau-driver-softpipe |
759 |
%{_libdir}/vdpau/libvdpau_softpipe.so.* |