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