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