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 20120906 |
19 |
%define git_branch 9.0 |
20 |
%define with_hardware 1 |
21 |
|
22 |
%define relc 0 |
23 |
%define name mesa |
24 |
%define version 9.0.0 |
25 |
%define rel 1 |
26 |
|
27 |
%define release %mkrel %{rel} |
28 |
%define src_type tar.bz2 |
29 |
#define vsuffix %{expand:} |
30 |
%define vsuffix %nil |
31 |
|
32 |
%if %{relc} |
33 |
%define release %mkrel 0.rc%{relc}.%{rel} |
34 |
%define vsuffix -rc%{relc} |
35 |
%define src_type tar.bz2 |
36 |
%endif |
37 |
|
38 |
%if %{git} |
39 |
%if %{relc} |
40 |
%define release %mkrel 0.rc%{relc}.1.git%{git}.%{rel} |
41 |
%else |
42 |
%define release %mkrel 0.git%{git}.%{rel} |
43 |
%endif |
44 |
%endif |
45 |
|
46 |
%define makedepend %{_bindir}/gccmakedep |
47 |
|
48 |
%define dricorename dricore |
49 |
%define eglname mesaegl |
50 |
%define glname mesagl |
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 glwmajor 1 |
63 |
%define glesv1major 1 |
64 |
%define glesv2major 2 |
65 |
%define openvgmajor 1 |
66 |
%define glapimajor 0 |
67 |
%define gbmmajor 1 |
68 |
%define waylandeglmajor 1 |
69 |
%define osmesamajor 9 |
70 |
|
71 |
%define libdricorename %mklibname %{dricorename} %{dricoremajor} |
72 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
73 |
%define libglname %mklibname %{glname} %{glmajor} |
74 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
75 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
76 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
77 |
%define libopenvgname %mklibname %{openvgname} %{openvgmajor} |
78 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
79 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
80 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
81 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
82 |
|
83 |
%define dridrivers %mklibname dri-drivers |
84 |
|
85 |
%define osmesadevel %mklibname osmesa -d |
86 |
|
87 |
# Architecture-independent Virtual provides: |
88 |
%define libdricorename_virt lib%{dricorename} |
89 |
%define libeglname_virt lib%{eglname} |
90 |
%define libglname_virt lib%{glname} |
91 |
%define libglwname_virt lib%{glwname} |
92 |
%define libglesv1name_virt lib%{glesv1name} |
93 |
%define libglesv2name_virt lib%{glesv2name} |
94 |
%define libopenvgname_virt lib%{openvgname} |
95 |
%define libglapiname_virt lib%{glapiname} |
96 |
%define libgbmname_virt lib%{gbmname} |
97 |
%define libwaylandeglname_virt lib%{waylandeglname} |
98 |
|
99 |
%define oldlibglname %mklibname MesaGL 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 >= 3.1 |
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 |
# (blino) snapshot of 9.0 branch |
154 |
Source0: %{name}-%{git_branch}-%{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 |
Patch001: 0001-Fix-undefined-symbols-in-libOSMesa-and-libglapi.patch |
170 |
|
171 |
# In order to update to the branch via patches, issue this command: |
172 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
173 |
|
174 |
# Cherry picks |
175 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
176 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
177 |
# (blino) should be pushed to 9.0 branch upstream |
178 |
Patch202: 0202-radeon-llvm-Cleanup-makefile.patch |
179 |
|
180 |
# Patches "liberated" from Fedora: |
181 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
182 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
183 |
|
184 |
# Patches from ChromiumOS |
185 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
186 |
|
187 |
# Mageia/Mandriva patches |
188 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
189 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
190 |
Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch |
191 |
|
192 |
|
193 |
#------------------------------------------------------------------------------ |
194 |
|
195 |
# package mesa |
196 |
License: MIT |
197 |
Requires: %{libglname} = %{version}-%{release} |
198 |
Provides: hackMesa = %{version} |
199 |
Obsoletes: hackMesa <= %{version} |
200 |
Provides: Mesa = %{version} |
201 |
Obsoletes: Mesa < %{version} |
202 |
|
203 |
%package -n %{libdricorename} |
204 |
Summary: Shared library for DRI drivers |
205 |
Group: System/Libraries |
206 |
Provides: %{libdricorename_virt} = %{version}-%{release} |
207 |
|
208 |
%package -n %{libdricorename}-devel |
209 |
Summary: Development files for DRI core |
210 |
Group: Development/C |
211 |
Requires: %{libdricorename} = %{version}-%{release} |
212 |
Provides: lib%{dricorename}-devel = %{version}-%{release} |
213 |
Provides: %{dricorename}-devel = %{version}-%{release} |
214 |
|
215 |
%package -n %{libglname} |
216 |
Summary: Files for Mesa (GL and GLX libs) |
217 |
Group: System/Libraries |
218 |
Obsoletes: %{oldlibglname} < 6.4 |
219 |
Provides: %{oldlibglname} = %{version}-%{release} |
220 |
Provides: %{libglname_virt} = %{version}-%{release} |
221 |
Requires: %{dridrivers} >= %{version}-%{release} |
222 |
%if %{build_plf} |
223 |
Requires: %mklibname txc-dxtn |
224 |
%endif |
225 |
|
226 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
227 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
228 |
Conflicts: x11-server-common < 1.3.0.0-17 |
229 |
|
230 |
%package -n %{dridrivers} |
231 |
Summary: Mesa DRI drivers |
232 |
Group: System/Libraries |
233 |
# do not require exact release to avoid conflicts when having |
234 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
235 |
Requires: mesa = %{version} |
236 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
237 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
238 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
239 |
|
240 |
%package -n %{libglname}-devel |
241 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
242 |
Group: Development/C |
243 |
Requires: %{libglname} = %{version}-%{release} |
244 |
Provides: lib%{glname}-devel = %{version}-%{release} |
245 |
Provides: %{glname}-devel = %{version}-%{release} |
246 |
Provides: GL-devel |
247 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
248 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
249 |
Provides: libMesaGL-devel = %{version}-%{release} |
250 |
Provides: MesaGL-devel = %{version}-%{release} |
251 |
Provides: libgl-devel |
252 |
|
253 |
%if %{enable_egl} |
254 |
%package -n %{libeglname} |
255 |
Summary: Files for Mesa (EGL libs) |
256 |
Group: System/Libraries |
257 |
Provides: %{libeglname_virt} = %{version}-%{release} |
258 |
|
259 |
%package -n %{libeglname}-devel |
260 |
Summary: Development files for Mesa (EGL libs) |
261 |
Group: Development/C |
262 |
Requires: %{libeglname} = %{version}-%{release} |
263 |
Provides: EGL-devel |
264 |
Provides: lib%{eglname}-devel |
265 |
Provides: %{eglname}-devel |
266 |
Provides: libegl-devel |
267 |
%endif |
268 |
|
269 |
%package -n %{libosmesaname} |
270 |
Summary: Mesa offscreen rendering library |
271 |
Group: System/Libraries |
272 |
|
273 |
%package -n %{osmesadevel} |
274 |
Summary: Development files for libosmesa |
275 |
Group: Development/C |
276 |
Requires: %{libosmesaname} = %{version}-%{release} |
277 |
Provides: osmesa-devel = %{version}-%{release} |
278 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
279 |
|
280 |
%package -n %{libglapiname} |
281 |
Summary: Files for mesa (glapi libs) |
282 |
Group: System/Libraries |
283 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
284 |
|
285 |
%package -n %{libglapiname}-devel |
286 |
Summary: Development files for glapi libs |
287 |
Group: Development/C |
288 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
289 |
Provides: lib%{glapiname}-devel |
290 |
Provides: %{libglapiname}-devel |
291 |
|
292 |
%package -n %{libglesv1name} |
293 |
Summary: Files for Mesa (glesv1 libs) |
294 |
Group: System/Libraries |
295 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
296 |
|
297 |
%package -n %{libglesv1name}-devel |
298 |
Summary: Development files for glesv1 libs |
299 |
Group: Development/C |
300 |
Requires: %{libglesv1name} = %{version}-%{release} |
301 |
Provides: lib%{glesv1name}-devel |
302 |
Provides: %{glesv1name}-devel |
303 |
Provides: libglesv1-devel |
304 |
|
305 |
%package -n %{libglesv2name} |
306 |
Summary: Files for Mesa (glesv2 libs) |
307 |
Group: System/Libraries |
308 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
309 |
|
310 |
%package -n %{libglesv2name}-devel |
311 |
Summary: Development files for glesv2 libs |
312 |
Group: Development/C |
313 |
Requires: %{libglesv2name} = %{version}-%{release} |
314 |
Requires: %{libeglname}-devel = %{version}-%{release} |
315 |
Provides: lib%{glesv2name}-devel |
316 |
Provides: %{glesv2name}-devel |
317 |
Provides: libglesv2-devel |
318 |
|
319 |
%package -n %{libopenvgname} |
320 |
Summary: Files for MESA (OpenVG libs) |
321 |
Group: System/Libraries |
322 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
323 |
|
324 |
%package -n %{libopenvgname}-devel |
325 |
Summary: Development files vor OpenVG libs |
326 |
Group: Development/C |
327 |
Requires: %{libopenvgname} = %{version}-%{release} |
328 |
Provides: lib%{openvgname}-devel |
329 |
Provides: %{openvgname}-devel |
330 |
Provides: libopenvg-devel |
331 |
|
332 |
%if %{enable_wayland} |
333 |
%package -n %{libgbmname} |
334 |
Summary: Files for Mesa (gbm libs) |
335 |
Group: System/Libraries |
336 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
337 |
|
338 |
%package -n %{libgbmname}-devel |
339 |
Summary: Development files for Mesa (gbm libs) |
340 |
Group: Development/C |
341 |
Requires: %{libgbmname} = %{version}-%{release} |
342 |
Provides: lib%{gbmname}-devel |
343 |
Provides: %{gbmname}-devel |
344 |
|
345 |
%package -n %{libwaylandeglname} |
346 |
Summary: Files for Mesa (Wayland EGL libs) |
347 |
Group: System/Libraries |
348 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
349 |
|
350 |
%package -n %{libwaylandeglname}-devel |
351 |
Summary: Development files for Mesa (Wayland EGL libs) |
352 |
Group: Development/C |
353 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
354 |
Provides: lib%{waylandeglname}-devel |
355 |
Provides: %{waylandeglname}-devel |
356 |
%endif |
357 |
|
358 |
%package -n vdpau-driver-nouveau |
359 |
Summary: VDPAU plugin for nouveau driver |
360 |
Group: Video |
361 |
|
362 |
%package -n vdpau-driver-r300 |
363 |
Summary: VDPAU plugin for r300 driver |
364 |
Group: Video |
365 |
|
366 |
%package -n vdpau-driver-r600 |
367 |
Summary: VDPAU plugin for r600 driver |
368 |
Group: Video |
369 |
|
370 |
%package -n vdpau-driver-radeonsi |
371 |
Summary: VDPAU plugin for radeonsi driver |
372 |
Group: System/Libraries |
373 |
|
374 |
%package -n vdpau-driver-softpipe |
375 |
Summary: VDPAU plugin for softpipe driver |
376 |
Group: Video |
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: mesaglu-devel |
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 %{libglesv1name} |
443 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
444 |
well-defined subset profiles of OpenGL. |
445 |
|
446 |
This package provides the OpenGL ES library version 1. |
447 |
|
448 |
%description -n %{libosmesaname} |
449 |
Mesa offscreen rendering libraries for rendering OpenGL into |
450 |
application-allocated blocks of memory. |
451 |
|
452 |
%description -n %{osmesadevel} |
453 |
This package contains the headers needed to compile programs against |
454 |
the Mesa offscreen rendering library. |
455 |
|
456 |
%description -n %{libglapiname} |
457 |
This packages provides the glapi shared library used by gallium. |
458 |
|
459 |
%description -n %{libglapiname}-devel |
460 |
This package contains the headers needed to compile programes against glapi shared library. |
461 |
|
462 |
%description -n %{libglesv1name}-devel |
463 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
464 |
|
465 |
%description -n %{libglesv2name} |
466 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
467 |
well-defined subset profiles of OpenGL. |
468 |
|
469 |
This package provides the OpenGL ES library version 2. |
470 |
|
471 |
%description -n %{libglesv2name}-devel |
472 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
473 |
|
474 |
%description -n %{libopenvgname} |
475 |
OpenVG is a royalty-free, cross-platform API that provides a low-level hardware |
476 |
acceleration interface for vector graphics libraries such as Flash and SVG. |
477 |
|
478 |
%description -n %{libopenvgname}-devel |
479 |
Development files for OpenVG library. |
480 |
|
481 |
%if %{enable_wayland} |
482 |
%description -n %{libgbmname} |
483 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
484 |
GBM (Graphics Buffer Manager) parts. |
485 |
|
486 |
%description -n %{libgbmname}-devel |
487 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
488 |
GBM (Graphics Buffer Manager) development parts. |
489 |
|
490 |
%description -n %{libwaylandeglname} |
491 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
492 |
Wayland EGL platform parts. |
493 |
|
494 |
%description -n %{libwaylandeglname}-devel |
495 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
496 |
Wayland EGL platform development parts. |
497 |
%endif |
498 |
|
499 |
%description -n vdpau-driver-nouveau |
500 |
This packages provides a VPDAU plugin to enable video acceleration |
501 |
with the nouveau driver. |
502 |
|
503 |
%description -n vdpau-driver-r300 |
504 |
This packages provides a VPDAU plugin to enable video acceleration |
505 |
with the r300 driver. |
506 |
|
507 |
%description -n vdpau-driver-r600 |
508 |
This packages provides a VPDAU plugin to enable video acceleration |
509 |
with the r600 driver. |
510 |
|
511 |
%description -n vdpau-driver-radeonsi |
512 |
This packages provides a VPDAU plugin to enable video acceleration |
513 |
with the radeonsi driver. |
514 |
|
515 |
%description -n vdpau-driver-softpipe |
516 |
This packages provides a VPDAU plugin to enable video acceleration |
517 |
with the softpipe driver. |
518 |
|
519 |
#------------------------------------------------------------------------------ |
520 |
|
521 |
%prep |
522 |
%if %{git} |
523 |
%setup -q -n mesa-%{git_branch}-%{git} |
524 |
%else |
525 |
%setup -q -n Mesa-%{version}%{vsuffix} |
526 |
%endif |
527 |
|
528 |
%apply_patches |
529 |
autoreconf -vfi |
530 |
|
531 |
%build |
532 |
# fix build - TODO: should this be fixed in llvm somehow, or maybe the library |
533 |
# symlinks should be moved to %{_libdir}? -Anssi 08/2012 |
534 |
export LDFLAGS="-L%{_libdir}/llvm" |
535 |
|
536 |
%configure2_5x --enable-dri \ |
537 |
--enable-glx \ |
538 |
--with-dri-driverdir=%{driver_dir} \ |
539 |
--with-dri-drivers="%{dri_drivers}" \ |
540 |
--enable-shared-dricore \ |
541 |
%if %{enable_egl} |
542 |
--enable-egl \ |
543 |
%else |
544 |
--disable-egl \ |
545 |
%endif |
546 |
%if %{enable_wayland} |
547 |
--with-egl-platforms=x11,wayland,drm \ |
548 |
--enable-gbm \ |
549 |
--enable-shared-glapi \ |
550 |
%endif |
551 |
--enable-gles1 \ |
552 |
--enable-gles2 \ |
553 |
--enable-openvg \ |
554 |
--enable-gallium-egl \ |
555 |
--enable-gallium-g3dvl \ |
556 |
--enable-osmesa \ |
557 |
--disable-xvmc \ |
558 |
--enable-vdpau \ |
559 |
--disable-va \ |
560 |
%if %{with_hardware} |
561 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast \ |
562 |
--enable-gallium-llvm \ |
563 |
%else |
564 |
--disable-gallium-llvm \ |
565 |
--with-gallium-drivers=swrast \ |
566 |
%endif |
567 |
%if %{build_plf} |
568 |
--enable-texture-float \ |
569 |
%endif |
570 |
# end of configure options |
571 |
|
572 |
%make |
573 |
|
574 |
%install |
575 |
%makeinstall_std |
576 |
|
577 |
# FIXME: strip will likely break the hardlink |
578 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
579 |
# to prevent proprietary driver installers from removing them |
580 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
581 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
582 |
for l in ../libGL.so.*; do cp -a $l .; done |
583 |
popd |
584 |
|
585 |
%ifarch %{x86_64} |
586 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
587 |
%endif |
588 |
|
589 |
# .so files are not needed by vdpau |
590 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
591 |
|
592 |
# .la files are not needed by mesa |
593 |
find %{buildroot} -name '*.la' -exec rm {} \; |
594 |
|
595 |
# use swrastg if built (Anssi 12/2011) |
596 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
597 |
|
598 |
#------------------------------------------------------------------------------ |
599 |
|
600 |
%files |
601 |
%defattr(-,root,root) |
602 |
%doc docs/COPYING |
603 |
%config(noreplace) %{_sysconfdir}/drirc |
604 |
|
605 |
%files -n %{libdricorename} |
606 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor} |
607 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor}.* |
608 |
|
609 |
%files -n %{libdricorename}-devel |
610 |
%{_libdir}/libdricore%{version}.so |
611 |
|
612 |
%files -n %{dridrivers} |
613 |
%defattr(-,root,root) |
614 |
%doc docs/COPYING |
615 |
%ifnarch ppc64 |
616 |
%dir %{_libdir}/dri |
617 |
# (blino) new mesa 8.1 build system seems to use a static libglsl |
618 |
#%{_libdir}/dri/libglsl.so |
619 |
%{_libdir}/dri/*_dri.so |
620 |
%endif |
621 |
|
622 |
%files -n %{libglname} |
623 |
%defattr(-,root,root) |
624 |
%doc docs/COPYING |
625 |
%{_libdir}/libGL.so.* |
626 |
%dir %{_libdir}/mesa |
627 |
%{_libdir}/mesa/libGL.so.%{glmajor}* |
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 %{libosmesaname} |
643 |
%defattr(-,root,root) |
644 |
%{_libdir}/libOSMesa.so.%{osmesamajor}* |
645 |
|
646 |
%files -n %{libglapiname} |
647 |
%defattr(-,root,root) |
648 |
%{_libdir}/libglapi.so.%{glapimajor}* |
649 |
|
650 |
%files -n %{libglesv1name} |
651 |
%defattr(-,root,root) |
652 |
%doc docs/COPYING |
653 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}* |
654 |
|
655 |
%files -n %{libglesv2name} |
656 |
%defattr(-,root,root) |
657 |
%doc docs/COPYING |
658 |
%{_libdir}/libGLESv2.so.%{glesv2major}* |
659 |
|
660 |
%files -n %{libopenvgname} |
661 |
%defattr(-,root,root) |
662 |
%doc docs/COPYING |
663 |
%{_libdir}/libOpenVG.so.%{openvgmajor}* |
664 |
|
665 |
%if %{enable_wayland} |
666 |
%files -n %{libgbmname} |
667 |
%{_libdir}/libgbm.so.%{gbmmajor} |
668 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
669 |
%{_libdir}/gbm/gbm_*.so |
670 |
%{_libdir}/gbm/pipe_*.so |
671 |
|
672 |
%files -n %{libwaylandeglname} |
673 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
674 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
675 |
%endif |
676 |
|
677 |
|
678 |
%files -n %{libglname}-devel |
679 |
%defattr(-,root,root) |
680 |
%doc docs/COPYING |
681 |
%dir %{_includedir}/GL |
682 |
%{_includedir}/GL/gl.h |
683 |
%{_includedir}/GL/glext.h |
684 |
%{_includedir}/GL/gl_mangle.h |
685 |
%{_includedir}/GL/wglext.h |
686 |
%{_includedir}/GL/glx.h |
687 |
%{_includedir}/GL/glxext.h |
688 |
%{_includedir}/GL/glx_mangle.h |
689 |
%{_libdir}/libGL.so |
690 |
%{_libdir}/pkgconfig/gl.pc |
691 |
%{_libdir}/pkgconfig/dri.pc |
692 |
|
693 |
#FIXME: check those headers |
694 |
%{_includedir}/GL/vms_x_fix.h |
695 |
%{_includedir}/GL/wmesa.h |
696 |
%dir %{_includedir}/GL/internal |
697 |
%{_includedir}/GL/internal/dri_interface.h |
698 |
|
699 |
%files common-devel |
700 |
%defattr(-,root,root) |
701 |
|
702 |
%if %{enable_egl} |
703 |
%files -n %{libeglname}-devel |
704 |
%defattr(-,root,root) |
705 |
%doc docs/COPYING |
706 |
%{_includedir}/EGL |
707 |
%{_includedir}/KHR |
708 |
%{_libdir}/libEGL.so |
709 |
%{_libdir}/pkgconfig/egl.pc |
710 |
%endif |
711 |
|
712 |
%files -n %{osmesadevel} |
713 |
%defattr(-,root,root) |
714 |
%dir %{_includedir}/GL |
715 |
%{_includedir}/GL/osmesa.h |
716 |
%{_libdir}/libOSMesa.so |
717 |
%{_libdir}/pkgconfig/osmesa.pc |
718 |
|
719 |
%files -n %{libglapiname}-devel |
720 |
%defattr(-,root,root) |
721 |
%{_libdir}/libglapi.so |
722 |
|
723 |
%files -n %{libglesv1name}-devel |
724 |
%defattr(-,root,root) |
725 |
%{_includedir}/GLES |
726 |
%{_libdir}/libGLESv1_CM.so |
727 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
728 |
|
729 |
%files -n %{libglesv2name}-devel |
730 |
%defattr(-,root,root) |
731 |
%{_includedir}/GLES2 |
732 |
%{_libdir}/libGLESv2.so |
733 |
%{_libdir}/pkgconfig/glesv2.pc |
734 |
|
735 |
%files -n %{libopenvgname}-devel |
736 |
%defattr(-,root,root) |
737 |
%{_includedir}/VG |
738 |
%{_libdir}/libOpenVG.so |
739 |
%{_libdir}/pkgconfig/vg.pc |
740 |
|
741 |
%if %{enable_wayland} |
742 |
%files -n %{libgbmname}-devel |
743 |
%{_includedir}/gbm.h |
744 |
%{_libdir}/libgbm.so |
745 |
%{_libdir}/pkgconfig/gbm.pc |
746 |
|
747 |
%files -n %{libwaylandeglname}-devel |
748 |
%{_libdir}/libwayland-egl.so |
749 |
%{_libdir}/pkgconfig/wayland-egl.pc |
750 |
%endif |
751 |
|
752 |
%files -n vdpau-driver-nouveau |
753 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
754 |
|
755 |
%files -n vdpau-driver-r300 |
756 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
757 |
|
758 |
%files -n vdpau-driver-r600 |
759 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
760 |
|
761 |
%files -n vdpau-driver-radeonsi |
762 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
763 |
|
764 |
%files -n vdpau-driver-softpipe |
765 |
%{_libdir}/vdpau/libvdpau_softpipe.so.* |