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 |
Patch203: 0203-radeon-llvm-Remove-R600InstrInfo.td-from-TD_FILES.patch |
180 |
|
181 |
# Patches "liberated" from Fedora: |
182 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
183 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
184 |
|
185 |
# Patches from ChromiumOS |
186 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
187 |
|
188 |
# Mageia/Mandriva patches |
189 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
190 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
191 |
Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch |
192 |
|
193 |
|
194 |
#------------------------------------------------------------------------------ |
195 |
|
196 |
# package mesa |
197 |
License: MIT |
198 |
Requires: %{libglname} = %{version}-%{release} |
199 |
Provides: hackMesa = %{version} |
200 |
Obsoletes: hackMesa <= %{version} |
201 |
Provides: Mesa = %{version} |
202 |
Obsoletes: Mesa < %{version} |
203 |
|
204 |
%package -n %{libdricorename} |
205 |
Summary: Shared library for DRI drivers |
206 |
Group: System/Libraries |
207 |
Provides: %{libdricorename_virt} = %{version}-%{release} |
208 |
|
209 |
%package -n %{libdricorename}-devel |
210 |
Summary: Development files for DRI core |
211 |
Group: Development/C |
212 |
Requires: %{libdricorename} = %{version}-%{release} |
213 |
Provides: lib%{dricorename}-devel = %{version}-%{release} |
214 |
Provides: %{dricorename}-devel = %{version}-%{release} |
215 |
|
216 |
%package -n %{libglname} |
217 |
Summary: Files for Mesa (GL and GLX libs) |
218 |
Group: System/Libraries |
219 |
Obsoletes: %{oldlibglname} < 6.4 |
220 |
Provides: %{oldlibglname} = %{version}-%{release} |
221 |
Provides: %{libglname_virt} = %{version}-%{release} |
222 |
Requires: %{dridrivers} >= %{version}-%{release} |
223 |
%if %{build_plf} |
224 |
Requires: %mklibname txc-dxtn |
225 |
%endif |
226 |
|
227 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
228 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
229 |
Conflicts: x11-server-common < 1.3.0.0-17 |
230 |
|
231 |
%package -n %{dridrivers} |
232 |
Summary: Mesa DRI drivers |
233 |
Group: System/Libraries |
234 |
# do not require exact release to avoid conflicts when having |
235 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
236 |
Requires: mesa = %{version} |
237 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
238 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
239 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
240 |
|
241 |
%package -n %{libglname}-devel |
242 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
243 |
Group: Development/C |
244 |
Requires: %{libglname} = %{version}-%{release} |
245 |
Provides: lib%{glname}-devel = %{version}-%{release} |
246 |
Provides: %{glname}-devel = %{version}-%{release} |
247 |
Provides: GL-devel |
248 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
249 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
250 |
Provides: libMesaGL-devel = %{version}-%{release} |
251 |
Provides: MesaGL-devel = %{version}-%{release} |
252 |
Provides: libgl-devel |
253 |
|
254 |
%if %{enable_egl} |
255 |
%package -n %{libeglname} |
256 |
Summary: Files for Mesa (EGL libs) |
257 |
Group: System/Libraries |
258 |
Provides: %{libeglname_virt} = %{version}-%{release} |
259 |
|
260 |
%package -n %{libeglname}-devel |
261 |
Summary: Development files for Mesa (EGL libs) |
262 |
Group: Development/C |
263 |
Requires: %{libeglname} = %{version}-%{release} |
264 |
Provides: EGL-devel |
265 |
Provides: lib%{eglname}-devel |
266 |
Provides: %{eglname}-devel |
267 |
Provides: libegl-devel |
268 |
%endif |
269 |
|
270 |
%package -n %{libosmesaname} |
271 |
Summary: Mesa offscreen rendering library |
272 |
Group: System/Libraries |
273 |
|
274 |
%package -n %{osmesadevel} |
275 |
Summary: Development files for libosmesa |
276 |
Group: Development/C |
277 |
Requires: %{libosmesaname} = %{version}-%{release} |
278 |
Provides: osmesa-devel = %{version}-%{release} |
279 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
280 |
|
281 |
%package -n %{libglapiname} |
282 |
Summary: Files for mesa (glapi libs) |
283 |
Group: System/Libraries |
284 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
285 |
|
286 |
%package -n %{libglapiname}-devel |
287 |
Summary: Development files for glapi libs |
288 |
Group: Development/C |
289 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
290 |
Provides: lib%{glapiname}-devel |
291 |
Provides: %{libglapiname}-devel |
292 |
|
293 |
%package -n %{libglesv1name} |
294 |
Summary: Files for Mesa (glesv1 libs) |
295 |
Group: System/Libraries |
296 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
297 |
|
298 |
%package -n %{libglesv1name}-devel |
299 |
Summary: Development files for glesv1 libs |
300 |
Group: Development/C |
301 |
Requires: %{libglesv1name} = %{version}-%{release} |
302 |
Provides: lib%{glesv1name}-devel |
303 |
Provides: %{glesv1name}-devel |
304 |
Provides: libglesv1-devel |
305 |
|
306 |
%package -n %{libglesv2name} |
307 |
Summary: Files for Mesa (glesv2 libs) |
308 |
Group: System/Libraries |
309 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
310 |
|
311 |
%package -n %{libglesv2name}-devel |
312 |
Summary: Development files for glesv2 libs |
313 |
Group: Development/C |
314 |
Requires: %{libglesv2name} = %{version}-%{release} |
315 |
Requires: %{libeglname}-devel = %{version}-%{release} |
316 |
Provides: lib%{glesv2name}-devel |
317 |
Provides: %{glesv2name}-devel |
318 |
Provides: libglesv2-devel |
319 |
|
320 |
%package -n %{libopenvgname} |
321 |
Summary: Files for MESA (OpenVG libs) |
322 |
Group: System/Libraries |
323 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
324 |
|
325 |
%package -n %{libopenvgname}-devel |
326 |
Summary: Development files vor OpenVG libs |
327 |
Group: Development/C |
328 |
Requires: %{libopenvgname} = %{version}-%{release} |
329 |
Provides: lib%{openvgname}-devel |
330 |
Provides: %{openvgname}-devel |
331 |
Provides: libopenvg-devel |
332 |
|
333 |
%if %{enable_wayland} |
334 |
%package -n %{libgbmname} |
335 |
Summary: Files for Mesa (gbm libs) |
336 |
Group: System/Libraries |
337 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
338 |
|
339 |
%package -n %{libgbmname}-devel |
340 |
Summary: Development files for Mesa (gbm libs) |
341 |
Group: Development/C |
342 |
Requires: %{libgbmname} = %{version}-%{release} |
343 |
Provides: lib%{gbmname}-devel |
344 |
Provides: %{gbmname}-devel |
345 |
|
346 |
%package -n %{libwaylandeglname} |
347 |
Summary: Files for Mesa (Wayland EGL libs) |
348 |
Group: System/Libraries |
349 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
350 |
|
351 |
%package -n %{libwaylandeglname}-devel |
352 |
Summary: Development files for Mesa (Wayland EGL libs) |
353 |
Group: Development/C |
354 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
355 |
Provides: lib%{waylandeglname}-devel |
356 |
Provides: %{waylandeglname}-devel |
357 |
%endif |
358 |
|
359 |
%package -n vdpau-driver-nouveau |
360 |
Summary: VDPAU plugin for nouveau driver |
361 |
Group: Video |
362 |
|
363 |
%package -n vdpau-driver-r300 |
364 |
Summary: VDPAU plugin for r300 driver |
365 |
Group: Video |
366 |
|
367 |
%package -n vdpau-driver-r600 |
368 |
Summary: VDPAU plugin for r600 driver |
369 |
Group: Video |
370 |
|
371 |
%package -n vdpau-driver-radeonsi |
372 |
Summary: VDPAU plugin for radeonsi driver |
373 |
Group: System/Libraries |
374 |
|
375 |
%package -n vdpau-driver-softpipe |
376 |
Summary: VDPAU plugin for softpipe driver |
377 |
Group: Video |
378 |
|
379 |
%package common-devel |
380 |
Summary: Meta package for mesa devel |
381 |
Group: Development/C |
382 |
Provides: Mesa-common-devel = %{version}-%{release} |
383 |
Provides: hackMesa-common-devel = %{version} |
384 |
Obsoletes: Mesa-common-devel < %{version} |
385 |
Obsoletes: hackMesa-common-devel < %{version} |
386 |
Requires: %{libglname}-devel = %{version} |
387 |
Requires: mesaglu-devel |
388 |
Requires: freeglut-devel |
389 |
Requires: %{libeglname}-devel = %{version} |
390 |
Requires: %{libglesv1name}-devel = %{version} |
391 |
Requires: %{libglesv2name}-devel = %{version} |
392 |
|
393 |
#------------------------------------------------------------------------------ |
394 |
|
395 |
%description |
396 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
397 |
%if %{build_plf} |
398 |
|
399 |
This package is in the "tainted" section because it enables some |
400 |
OpenGL extentions that are covered by software patents. |
401 |
%endif |
402 |
|
403 |
%description common-devel |
404 |
Mesa common metapackage devel |
405 |
|
406 |
%if %{enable_egl} |
407 |
%description -n %{libeglname} |
408 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
409 |
EGL parts. |
410 |
|
411 |
%description -n %{libeglname}-devel |
412 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
413 |
EGL development parts. |
414 |
%endif |
415 |
|
416 |
%description -n %{libdricorename} |
417 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
418 |
DRI core part. |
419 |
|
420 |
%description -n %{libglname} |
421 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
422 |
GL and GLX parts. |
423 |
|
424 |
%if %{build_plf} |
425 |
This package is in the "tainted" section because it enables some |
426 |
OpenGL extentions that are covered by software patents. |
427 |
%endif |
428 |
|
429 |
%description -n %{dridrivers} |
430 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
431 |
DRI drivers. |
432 |
|
433 |
%description -n %{libdricorename}-devel |
434 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
435 |
|
436 |
This package contains the headers needed to compile DRI drivers. |
437 |
|
438 |
%description -n %{libglname}-devel |
439 |
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
440 |
|
441 |
This package contains the headers needed to compile Mesa programs. |
442 |
|
443 |
%description -n %{libglesv1name} |
444 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
445 |
well-defined subset profiles of OpenGL. |
446 |
|
447 |
This package provides the OpenGL ES library version 1. |
448 |
|
449 |
%description -n %{libosmesaname} |
450 |
Mesa offscreen rendering libraries for rendering OpenGL into |
451 |
application-allocated blocks of memory. |
452 |
|
453 |
%description -n %{osmesadevel} |
454 |
This package contains the headers needed to compile programs against |
455 |
the Mesa offscreen rendering library. |
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-radeonsi |
513 |
This packages provides a VPDAU plugin to enable video acceleration |
514 |
with the radeonsi driver. |
515 |
|
516 |
%description -n vdpau-driver-softpipe |
517 |
This packages provides a VPDAU plugin to enable video acceleration |
518 |
with the softpipe driver. |
519 |
|
520 |
#------------------------------------------------------------------------------ |
521 |
|
522 |
%prep |
523 |
%if %{git} |
524 |
%setup -q -n mesa-%{git_branch}-%{git} |
525 |
%else |
526 |
%setup -q -n Mesa-%{version}%{vsuffix} |
527 |
%endif |
528 |
|
529 |
%apply_patches |
530 |
autoreconf -vfi |
531 |
|
532 |
%build |
533 |
# fix build - TODO: should this be fixed in llvm somehow, or maybe the library |
534 |
# symlinks should be moved to %{_libdir}? -Anssi 08/2012 |
535 |
export LDFLAGS="-L%{_libdir}/llvm" |
536 |
|
537 |
%configure2_5x --enable-dri \ |
538 |
--enable-glx \ |
539 |
--with-dri-driverdir=%{driver_dir} \ |
540 |
--with-dri-drivers="%{dri_drivers}" \ |
541 |
--enable-shared-dricore \ |
542 |
%if %{enable_egl} |
543 |
--enable-egl \ |
544 |
%else |
545 |
--disable-egl \ |
546 |
%endif |
547 |
%if %{enable_wayland} |
548 |
--with-egl-platforms=x11,wayland,drm \ |
549 |
--enable-gbm \ |
550 |
--enable-shared-glapi \ |
551 |
%endif |
552 |
--enable-gles1 \ |
553 |
--enable-gles2 \ |
554 |
--enable-openvg \ |
555 |
--enable-gallium-egl \ |
556 |
--enable-gallium-g3dvl \ |
557 |
--enable-osmesa \ |
558 |
--disable-xvmc \ |
559 |
--enable-vdpau \ |
560 |
--disable-va \ |
561 |
%if %{with_hardware} |
562 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast \ |
563 |
--enable-gallium-llvm \ |
564 |
%else |
565 |
--disable-gallium-llvm \ |
566 |
--with-gallium-drivers=swrast \ |
567 |
%endif |
568 |
%if %{build_plf} |
569 |
--enable-texture-float \ |
570 |
%endif |
571 |
# end of configure options |
572 |
|
573 |
%make |
574 |
|
575 |
%install |
576 |
%makeinstall_std |
577 |
|
578 |
# FIXME: strip will likely break the hardlink |
579 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
580 |
# to prevent proprietary driver installers from removing them |
581 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
582 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
583 |
for l in ../libGL.so.*; do cp -a $l .; done |
584 |
popd |
585 |
|
586 |
%ifarch %{x86_64} |
587 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
588 |
%endif |
589 |
|
590 |
# .so files are not needed by vdpau |
591 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
592 |
|
593 |
# .la files are not needed by mesa |
594 |
find %{buildroot} -name '*.la' -exec rm {} \; |
595 |
|
596 |
# use swrastg if built (Anssi 12/2011) |
597 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
598 |
|
599 |
#------------------------------------------------------------------------------ |
600 |
|
601 |
%files |
602 |
%defattr(-,root,root) |
603 |
%doc docs/COPYING |
604 |
%config(noreplace) %{_sysconfdir}/drirc |
605 |
|
606 |
%files -n %{libdricorename} |
607 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor} |
608 |
%{_libdir}/libdricore%{version}.so.%{dricoremajor}.* |
609 |
|
610 |
%files -n %{libdricorename}-devel |
611 |
%{_libdir}/libdricore%{version}.so |
612 |
|
613 |
%files -n %{dridrivers} |
614 |
%defattr(-,root,root) |
615 |
%doc docs/COPYING |
616 |
%ifnarch ppc64 |
617 |
%dir %{_libdir}/dri |
618 |
# (blino) new mesa 8.1 build system seems to use a static libglsl |
619 |
#%{_libdir}/dri/libglsl.so |
620 |
%{_libdir}/dri/*_dri.so |
621 |
%endif |
622 |
|
623 |
%files -n %{libglname} |
624 |
%defattr(-,root,root) |
625 |
%doc docs/COPYING |
626 |
%{_libdir}/libGL.so.* |
627 |
%dir %{_libdir}/mesa |
628 |
%{_libdir}/mesa/libGL.so.%{glmajor}* |
629 |
|
630 |
%if %{enable_egl} |
631 |
%files -n %{libeglname} |
632 |
%defattr(-,root,root) |
633 |
%doc docs/COPYING |
634 |
%{_libdir}/libEGL.so.%{eglmajor}* |
635 |
%dir %{_libdir}/egl |
636 |
%if !%{enable_wayland} |
637 |
# st_GL, built only when shared glapi is not enabled |
638 |
%{_libdir}/egl/st_GL.so |
639 |
%endif |
640 |
%{_libdir}/egl/egl_gallium.so |
641 |
%endif |
642 |
|
643 |
%files -n %{libosmesaname} |
644 |
%defattr(-,root,root) |
645 |
%{_libdir}/libOSMesa.so.%{osmesamajor}* |
646 |
|
647 |
%files -n %{libglapiname} |
648 |
%defattr(-,root,root) |
649 |
%{_libdir}/libglapi.so.%{glapimajor}* |
650 |
|
651 |
%files -n %{libglesv1name} |
652 |
%defattr(-,root,root) |
653 |
%doc docs/COPYING |
654 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}* |
655 |
|
656 |
%files -n %{libglesv2name} |
657 |
%defattr(-,root,root) |
658 |
%doc docs/COPYING |
659 |
%{_libdir}/libGLESv2.so.%{glesv2major}* |
660 |
|
661 |
%files -n %{libopenvgname} |
662 |
%defattr(-,root,root) |
663 |
%doc docs/COPYING |
664 |
%{_libdir}/libOpenVG.so.%{openvgmajor}* |
665 |
|
666 |
%if %{enable_wayland} |
667 |
%files -n %{libgbmname} |
668 |
%{_libdir}/libgbm.so.%{gbmmajor} |
669 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
670 |
%{_libdir}/gbm/gbm_*.so |
671 |
%{_libdir}/gbm/pipe_*.so |
672 |
|
673 |
%files -n %{libwaylandeglname} |
674 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
675 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
676 |
%endif |
677 |
|
678 |
|
679 |
%files -n %{libglname}-devel |
680 |
%defattr(-,root,root) |
681 |
%doc docs/COPYING |
682 |
%dir %{_includedir}/GL |
683 |
%{_includedir}/GL/gl.h |
684 |
%{_includedir}/GL/glext.h |
685 |
%{_includedir}/GL/gl_mangle.h |
686 |
%{_includedir}/GL/wglext.h |
687 |
%{_includedir}/GL/glx.h |
688 |
%{_includedir}/GL/glxext.h |
689 |
%{_includedir}/GL/glx_mangle.h |
690 |
%{_libdir}/libGL.so |
691 |
%{_libdir}/pkgconfig/gl.pc |
692 |
%{_libdir}/pkgconfig/dri.pc |
693 |
|
694 |
#FIXME: check those headers |
695 |
%{_includedir}/GL/vms_x_fix.h |
696 |
%{_includedir}/GL/wmesa.h |
697 |
%dir %{_includedir}/GL/internal |
698 |
%{_includedir}/GL/internal/dri_interface.h |
699 |
|
700 |
%files common-devel |
701 |
%defattr(-,root,root) |
702 |
|
703 |
%if %{enable_egl} |
704 |
%files -n %{libeglname}-devel |
705 |
%defattr(-,root,root) |
706 |
%doc docs/COPYING |
707 |
%{_includedir}/EGL |
708 |
%{_includedir}/KHR |
709 |
%{_libdir}/libEGL.so |
710 |
%{_libdir}/pkgconfig/egl.pc |
711 |
%endif |
712 |
|
713 |
%files -n %{osmesadevel} |
714 |
%defattr(-,root,root) |
715 |
%dir %{_includedir}/GL |
716 |
%{_includedir}/GL/osmesa.h |
717 |
%{_libdir}/libOSMesa.so |
718 |
%{_libdir}/pkgconfig/osmesa.pc |
719 |
|
720 |
%files -n %{libglapiname}-devel |
721 |
%defattr(-,root,root) |
722 |
%{_libdir}/libglapi.so |
723 |
|
724 |
%files -n %{libglesv1name}-devel |
725 |
%defattr(-,root,root) |
726 |
%{_includedir}/GLES |
727 |
%{_libdir}/libGLESv1_CM.so |
728 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
729 |
|
730 |
%files -n %{libglesv2name}-devel |
731 |
%defattr(-,root,root) |
732 |
%{_includedir}/GLES2 |
733 |
%{_libdir}/libGLESv2.so |
734 |
%{_libdir}/pkgconfig/glesv2.pc |
735 |
|
736 |
%files -n %{libopenvgname}-devel |
737 |
%defattr(-,root,root) |
738 |
%{_includedir}/VG |
739 |
%{_libdir}/libOpenVG.so |
740 |
%{_libdir}/pkgconfig/vg.pc |
741 |
|
742 |
%if %{enable_wayland} |
743 |
%files -n %{libgbmname}-devel |
744 |
%{_includedir}/gbm.h |
745 |
%{_libdir}/libgbm.so |
746 |
%{_libdir}/pkgconfig/gbm.pc |
747 |
|
748 |
%files -n %{libwaylandeglname}-devel |
749 |
%{_libdir}/libwayland-egl.so |
750 |
%{_libdir}/pkgconfig/wayland-egl.pc |
751 |
%endif |
752 |
|
753 |
%files -n vdpau-driver-nouveau |
754 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
755 |
|
756 |
%files -n vdpau-driver-r300 |
757 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
758 |
|
759 |
%files -n vdpau-driver-r600 |
760 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
761 |
|
762 |
%files -n vdpau-driver-radeonsi |
763 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
764 |
|
765 |
%files -n vdpau-driver-softpipe |
766 |
%{_libdir}/vdpau/libvdpau_softpipe.so.* |