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