1 |
%if "%distro_section" == "tainted" |
2 |
%global build_plf 1 |
3 |
%else |
4 |
%global build_plf 0 |
5 |
%endif |
6 |
|
7 |
# (cg) Cheater... |
8 |
%define Werror_cflags %nil |
9 |
|
10 |
# (aco) Needed for the dri drivers |
11 |
%define _disable_ld_no_undefined 1 |
12 |
|
13 |
# http://cgit.freedesktop.org/mesa/mesa/commit/?h=9.1&id=38e728498b8ef63bb7dce77c64af11c98ec2efa4 |
14 |
%define git 0 |
15 |
%define git_branch 9.2 |
16 |
%bcond_without hardware_gallium |
17 |
|
18 |
%define opengl_ver 4.3 |
19 |
|
20 |
# define version, RC & release |
21 |
%define main_version 12.0.2 |
22 |
%define relc %nil |
23 |
%define rel 1.1 |
24 |
|
25 |
%define release %mkrel %{rel} |
26 |
%define vsuffix %nil |
27 |
|
28 |
%if 0%{?relc} |
29 |
%define vsuffix -rc%{relc} |
30 |
%endif |
31 |
|
32 |
%if %{git} |
33 |
%if %{relc} |
34 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
35 |
%else |
36 |
%define release %mkrel 1.git%{git}.%{rel} |
37 |
%endif |
38 |
%endif |
39 |
|
40 |
%define makedepend %{_bindir}/gccmakedep |
41 |
|
42 |
%define d3dname d3d |
43 |
%define eglname mesaegl |
44 |
%define glname mesagl |
45 |
%define glwname mesaglw |
46 |
%define glesv1name mesaglesv1 |
47 |
%define glesv2name mesaglesv2 |
48 |
%define glapiname glapi |
49 |
%define gbmname gbm |
50 |
%define waylandeglname wayland-egl |
51 |
%define xaname xatracker |
52 |
%define vulkanname vulkan |
53 |
|
54 |
%define d3dmajor 1 |
55 |
%define eglmajor 1 |
56 |
%define glmajor 1 |
57 |
%define glwmajor 1 |
58 |
%define glesv1major 1 |
59 |
%define glesv2major 2 |
60 |
%define glapimajor 0 |
61 |
%define gbmmajor 1 |
62 |
%define waylandeglmajor 1 |
63 |
%define osmesamajor 8 |
64 |
%define xamajor 2 |
65 |
|
66 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
67 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
68 |
%define libglname %mklibname %{glname} %{glmajor} |
69 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
70 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
71 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
72 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
73 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
74 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
75 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
76 |
%define libxaname %mklibname %{xaname} %{xamajor} |
77 |
%define libvulkanname %mklibname %{vulkanname} |
78 |
|
79 |
%define dridrivers %mklibname dri-drivers |
80 |
|
81 |
%define osmesadevel %mklibname osmesa -d |
82 |
|
83 |
# Architecture-independent Virtual provides: |
84 |
%define libd3dname_virt lib%{d3dname} |
85 |
%define libeglname_virt lib%{eglname} |
86 |
%define libglname_virt lib%{glname} |
87 |
%define libglwname_virt lib%{glwname} |
88 |
%define libglesv1name_virt lib%{glesv1name} |
89 |
%define libglesv2name_virt lib%{glesv2name} |
90 |
%define libglapiname_virt lib%{glapiname} |
91 |
%define libgbmname_virt lib%{gbmname} |
92 |
%define libwaylandeglname_virt lib%{waylandeglname} |
93 |
%define libxaname_virt lib%{xaname} |
94 |
|
95 |
%define oldlibglname %mklibname MesaGL 1 |
96 |
|
97 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
98 |
%define driver_dir %{_libdir}/dri |
99 |
|
100 |
# (akien) Not adding on arm as it would break the build there |
101 |
%define enable_vulkan 0 |
102 |
%ifarch %{ix86} x86_64 |
103 |
%define enable_vulkan 1 |
104 |
%endif |
105 |
|
106 |
%define base_drivers swrast,nouveau,radeon,r200 |
107 |
%ifarch %{ix86} x86_64 |
108 |
%define platform_drivers ,i915,i965 |
109 |
%endif |
110 |
%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} |
111 |
|
112 |
Name: mesa |
113 |
Version: %{main_version} |
114 |
Release: %{release} |
115 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
116 |
Group: System/Libraries |
117 |
|
118 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
119 |
BuildRequires: pkgconfig(xshmfence) |
120 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
121 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
122 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
123 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
124 |
BuildRequires: libexpat-devel >= 2.0.1 |
125 |
BuildRequires: gccmakedep |
126 |
BuildRequires: x11-proto-devel >= 7.3 |
127 |
BuildRequires: pkgconfig(libdrm) >= 2.4.60 |
128 |
BuildRequires: pkgconfig(xcb-dri3) |
129 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
130 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
131 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
132 |
BuildRequires: pkgconfig(xi) >= 1.3 |
133 |
BuildRequires: pkgconfig(talloc) |
134 |
BuildRequires: libxml2-python |
135 |
BuildRequires: python-mako |
136 |
BuildRequires: makedepend |
137 |
BuildRequires: bison |
138 |
BuildRequires: flex |
139 |
BuildRequires: libelf-devel |
140 |
%if %{with hardware_gallium} |
141 |
BuildRequires: llvm-devel >= 3.8 |
142 |
%endif |
143 |
BuildRequires: pkgconfig(libudev) |
144 |
BuildRequires: pkgconfig(libva) |
145 |
BuildRequires: pkgconfig(vdpau) |
146 |
BuildRequires: wayland-devel |
147 |
%if %{enable_vulkan} |
148 |
BuildRequires: libgcrypt-devel |
149 |
%endif |
150 |
|
151 |
URL: http://www.mesa3d.org |
152 |
%if %{git} |
153 |
Source0: %{name}-%{git}.tar.bz2 |
154 |
# (blino) snapshot of 9.0 branch |
155 |
#Source0: %{name}-%{git_branch}-%{git}.tar.bz2 |
156 |
%else |
157 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{main_version}/mesa-%{main_version}%{vsuffix}.tar.xz |
158 |
%endif |
159 |
Source3: make-git-snapshot.sh |
160 |
|
161 |
# Instructions to setup your repository clone |
162 |
# git://git.freedesktop.org/git/mesa/mesa |
163 |
# git checkout mesa_7_5_branch |
164 |
# git branch mdv-cherry-picks |
165 |
# git am ../02??-*.patch |
166 |
# git branch mdv-redhat |
167 |
# git am ../03??-*.patch |
168 |
# git branch mdv-patches |
169 |
# git am ../09??-*.patch |
170 |
# In order to update to the branch via patches, issue this command: |
171 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
172 |
|
173 |
# upstream fixes |
174 |
Patch102: 0102-i956-Add-more-Kabylake-PCI-IDs.patch |
175 |
Patch103: 0103-i965-Removing-PCI-IDs-that-are-no-longer-listed-as-K.patch |
176 |
Patch106: 0106-mesa-Don-t-call-GenerateMipmap-if-Width-or-Height-0.patch |
177 |
|
178 |
# Cherry picks |
179 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
180 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
181 |
|
182 |
# Patches "liberated" from Fedora: |
183 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
184 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
185 |
|
186 |
# Patches from ChromiumOS |
187 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
188 |
|
189 |
# Mageia/Mandriva patches |
190 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
191 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
192 |
#Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch |
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 %{libglname} |
205 |
Summary: Files for Mesa (GL and GLX libs) |
206 |
Group: System/Libraries |
207 |
Obsoletes: %{oldlibglname} < 6.4 |
208 |
Provides: %{oldlibglname} = %{version}-%{release} |
209 |
Provides: %{libglname_virt} = %{version}-%{release} |
210 |
Requires: %{dridrivers} >= %{version}-%{release} |
211 |
%if %{build_plf} |
212 |
Requires: %mklibname txc-dxtn |
213 |
%endif |
214 |
|
215 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
216 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
217 |
Conflicts: x11-server-common < 1.3.0.0-17 |
218 |
|
219 |
%package -n %{dridrivers} |
220 |
Summary: Mesa DRI drivers |
221 |
Group: System/Libraries |
222 |
# do not require exact release to avoid conflicts when having |
223 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
224 |
Requires: mesa = %{version} |
225 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
226 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
227 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
228 |
|
229 |
%if %{with hardware_gallium} |
230 |
%package -n %{libd3dname} |
231 |
Summary: Mesa Direct3D9 state tracker |
232 |
Group: System/Libraries |
233 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
234 |
|
235 |
%package -n %{libd3dname}-devel |
236 |
Summary: Development files for Mesa Direct3D9 state tracker |
237 |
Group: Development/C |
238 |
Requires: %{libd3dname} = %{version}-%{release} |
239 |
Provides: lib%{d3dname}-devel |
240 |
Provides: %{d3dname}-devel |
241 |
Provides: libd3d-devel |
242 |
%endif |
243 |
|
244 |
%package -n %{libglname}-devel |
245 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
246 |
Group: Development/C |
247 |
Requires: %{libglname} = %{version}-%{release} |
248 |
Provides: lib%{glname}-devel = %{version}-%{release} |
249 |
Provides: %{glname}-devel = %{version}-%{release} |
250 |
Provides: GL-devel |
251 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
252 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
253 |
Provides: libMesaGL-devel = %{version}-%{release} |
254 |
Provides: MesaGL-devel = %{version}-%{release} |
255 |
Provides: libgl-devel |
256 |
|
257 |
%package -n %{libeglname} |
258 |
Summary: Files for Mesa (EGL libs) |
259 |
Group: System/Libraries |
260 |
Provides: %{libeglname_virt} = %{version}-%{release} |
261 |
|
262 |
%package -n %{libeglname}-devel |
263 |
Summary: Development files for Mesa (EGL libs) |
264 |
Group: Development/C |
265 |
Requires: %{libeglname} = %{version}-%{release} |
266 |
Provides: EGL-devel |
267 |
Provides: lib%{eglname}-devel |
268 |
Provides: %{eglname}-devel |
269 |
Provides: libegl-devel |
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 %{libgbmname} |
322 |
Summary: Files for Mesa (gbm libs) |
323 |
Group: System/Libraries |
324 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
325 |
|
326 |
%package -n %{libgbmname}-devel |
327 |
Summary: Development files for Mesa (gbm libs) |
328 |
Group: Development/C |
329 |
Requires: %{libgbmname} = %{version}-%{release} |
330 |
Provides: lib%{gbmname}-devel |
331 |
Provides: %{gbmname}-devel |
332 |
|
333 |
%package -n %{libwaylandeglname} |
334 |
Summary: Files for Mesa (Wayland EGL libs) |
335 |
Group: System/Libraries |
336 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
337 |
|
338 |
%package -n %{libwaylandeglname}-devel |
339 |
Summary: Development files for Mesa (Wayland EGL libs) |
340 |
Group: Development/C |
341 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
342 |
Provides: lib%{waylandeglname}-devel |
343 |
Provides: %{waylandeglname}-devel |
344 |
|
345 |
%if %{with hardware_gallium} |
346 |
%package -n %{_lib}vdpau-driver-nouveau |
347 |
Summary: VDPAU plugin for nouveau driver |
348 |
Group: System/Libraries |
349 |
# temporary: |
350 |
%rename vdpau-driver-nouveau |
351 |
|
352 |
%package -n %{_lib}vdpau-driver-r300 |
353 |
Summary: VDPAU plugin for r300 driver |
354 |
Group: System/Libraries |
355 |
# temporary: |
356 |
%rename vdpau-driver-r300 |
357 |
|
358 |
%package -n %{_lib}vdpau-driver-r600 |
359 |
Summary: VDPAU plugin for r600 driver |
360 |
Group: System/Libraries |
361 |
# temporary: |
362 |
%rename vdpau-driver-r600 |
363 |
|
364 |
%package -n %{_lib}vdpau-driver-radeonsi |
365 |
Summary: VDPAU plugin for radeonsi driver |
366 |
Group: System/Libraries |
367 |
# temporary: |
368 |
%rename vdpau-driver-radeonsi |
369 |
|
370 |
%package -n %{libxaname} |
371 |
Summary: Files for Mesa XA state tracker |
372 |
Group: System/Libraries |
373 |
Provides: %{libxaname_virt} = %{version}-%{release} |
374 |
|
375 |
%package -n %{libxaname}-devel |
376 |
Summary: Development files for XA libs |
377 |
Group: Development/C |
378 |
Requires: %{libxaname_virt} = %{version}-%{release} |
379 |
Provides: lib%{xaname}-devel |
380 |
Provides: %{libxaname}-devel |
381 |
%endif |
382 |
|
383 |
%if %{enable_vulkan} |
384 |
%package -n %{libvulkanname}_intel |
385 |
Summary: Mesa vulkan driver for Intel GPU |
386 |
Group: System/Libraries |
387 |
|
388 |
%package -n %{libvulkanname}-devel |
389 |
Summary: Mesa's Vulkan development files |
390 |
Group: Development/C |
391 |
Requires: %{libvulkanname}_intel = %{version}-%{release} |
392 |
Provides: libvulkan-devel |
393 |
Provides: libvulkan_intel-devel |
394 |
%endif |
395 |
|
396 |
%package common-devel |
397 |
Summary: Meta package for mesa devel |
398 |
Group: Development/C |
399 |
Provides: Mesa-common-devel = %{version}-%{release} |
400 |
Provides: hackMesa-common-devel = %{version} |
401 |
Obsoletes: Mesa-common-devel < %{version} |
402 |
Obsoletes: hackMesa-common-devel < %{version} |
403 |
Requires: %{libglname}-devel = %{version} |
404 |
Requires: mesaglu-devel |
405 |
Requires: freeglut-devel |
406 |
Requires: %{libeglname}-devel = %{version} |
407 |
Requires: %{libglesv1name}-devel = %{version} |
408 |
Requires: %{libglesv2name}-devel = %{version} |
409 |
|
410 |
#------------------------------------------------------------------------------ |
411 |
|
412 |
%description |
413 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
414 |
%if %{build_plf} |
415 |
|
416 |
This package is in the "tainted" section because it enables some |
417 |
OpenGL extentions that are covered by software patents. |
418 |
%endif |
419 |
|
420 |
%description common-devel |
421 |
Mesa common metapackage devel |
422 |
|
423 |
%description -n %{libeglname} |
424 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
425 |
EGL parts. |
426 |
|
427 |
%description -n %{libeglname}-devel |
428 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
429 |
EGL development parts. |
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 %{libglname}-devel |
445 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
446 |
|
447 |
This package contains the headers needed to compile Mesa programs. |
448 |
|
449 |
%description -n %{libglesv1name} |
450 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
451 |
well-defined subset profiles of OpenGL. |
452 |
|
453 |
This package provides the OpenGL ES library version 1. |
454 |
|
455 |
%description -n %{libosmesaname} |
456 |
Mesa offscreen rendering libraries for rendering OpenGL into |
457 |
application-allocated blocks of memory. |
458 |
|
459 |
%description -n %{osmesadevel} |
460 |
This package contains the headers needed to compile programs against |
461 |
the Mesa offscreen rendering library. |
462 |
|
463 |
%description -n %{libglapiname} |
464 |
This packages provides the glapi shared library used by gallium. |
465 |
|
466 |
%description -n %{libglapiname}-devel |
467 |
This package contains the headers needed to compile programes against glapi shared library. |
468 |
|
469 |
%description -n %{libglesv1name}-devel |
470 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
471 |
|
472 |
%if %{with hardware_gallium} |
473 |
%description -n %{libd3dname} |
474 |
Mesa Direct3D9 state tracker. |
475 |
|
476 |
%description -n %{libd3dname}-devel |
477 |
Mesa Direct3D9 state tracker development package. |
478 |
%endif |
479 |
|
480 |
%description -n %{libglesv2name} |
481 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
482 |
well-defined subset profiles of OpenGL. |
483 |
|
484 |
This package provides the OpenGL ES library version 2. |
485 |
|
486 |
%description -n %{libglesv2name}-devel |
487 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
488 |
|
489 |
%description -n %{libgbmname} |
490 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
491 |
GBM (Graphics Buffer Manager) parts. |
492 |
|
493 |
%description -n %{libgbmname}-devel |
494 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
495 |
GBM (Graphics Buffer Manager) development parts. |
496 |
|
497 |
%description -n %{libwaylandeglname} |
498 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
499 |
Wayland EGL platform parts. |
500 |
|
501 |
%description -n %{libwaylandeglname}-devel |
502 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
503 |
Wayland EGL platform development parts. |
504 |
|
505 |
%if %{with hardware_gallium} |
506 |
%description -n %{libxaname} |
507 |
This packages provides the xa shared library used by gallium. |
508 |
|
509 |
%description -n %{libxaname}-devel |
510 |
This package contains the headers needed to compile programes against xa shared library. |
511 |
|
512 |
%description -n %{_lib}vdpau-driver-nouveau |
513 |
This packages provides a VPDAU plugin to enable video acceleration |
514 |
with the nouveau driver. |
515 |
|
516 |
%description -n %{_lib}vdpau-driver-r300 |
517 |
This packages provides a VPDAU plugin to enable video acceleration |
518 |
with the r300 driver. |
519 |
|
520 |
%description -n %{_lib}vdpau-driver-r600 |
521 |
This packages provides a VPDAU plugin to enable video acceleration |
522 |
with the r600 driver. |
523 |
|
524 |
%description -n %{_lib}vdpau-driver-radeonsi |
525 |
This packages provides a VPDAU plugin to enable video acceleration |
526 |
with the radeonsi driver. |
527 |
%endif |
528 |
|
529 |
%if %{enable_vulkan} |
530 |
%description -n %{libvulkanname}_intel |
531 |
This package contains the Vulkan parts for Mesa's Intel driver. |
532 |
|
533 |
%description -n %{libvulkanname}-devel |
534 |
This package contains the development files for Mesa's Vulkan implementation. |
535 |
%endif |
536 |
|
537 |
#------------------------------------------------------------------------------ |
538 |
|
539 |
%prep |
540 |
%if %{git} |
541 |
%setup -q -n mesa-%{git} |
542 |
#setup -q -n mesa-%{git_branch}-%{git} |
543 |
%else |
544 |
%setup -q -n mesa-%{main_version}%{vsuffix} |
545 |
%endif |
546 |
|
547 |
%autopatch -p1 |
548 |
|
549 |
# Duplicate source tree for OSMesa, since building both versions out-of-tree |
550 |
# would break build. - Anssi 12/2012 |
551 |
all=$(ls) |
552 |
mkdir -p build-osmesa |
553 |
cp -al $all build-osmesa |
554 |
|
555 |
%build |
556 |
# (re)generate auto* generated files using our autotools and libtoolize |
557 |
autoreconf -vfi |
558 |
|
559 |
# for bin/test-driver: |
560 |
automake --add-missing |
561 |
|
562 |
%configure2_5x --enable-dri \ |
563 |
--enable-glx \ |
564 |
--enable-glx-tls \ |
565 |
--with-dri-driverdir=%{driver_dir} \ |
566 |
%if %{enable_vulkan} |
567 |
--with-vulkan-drivers=intel \ |
568 |
%endif |
569 |
--enable-va \ |
570 |
--enable-egl \ |
571 |
--with-egl-platforms=x11,wayland,drm \ |
572 |
--enable-gbm \ |
573 |
--enable-shared-glapi \ |
574 |
--enable-gles1 \ |
575 |
--enable-gles2 \ |
576 |
--enable-gallium-egl \ |
577 |
--disable-xvmc \ |
578 |
--enable-vdpau \ |
579 |
%if %{with hardware_gallium} |
580 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \ |
581 |
--enable-gallium-llvm \ |
582 |
--enable-xa \ |
583 |
--enable-nine \ |
584 |
%else |
585 |
--disable-gallium-llvm \ |
586 |
--with-gallium-drivers=swrast \ |
587 |
%endif |
588 |
%if %{build_plf} |
589 |
--enable-texture-float \ |
590 |
%endif |
591 |
%{?dri_drivers} |
592 |
# end of configure options |
593 |
|
594 |
|
595 |
# Build OSMesa separately, since we want to build OSMesa without shared-glapi, |
596 |
# since doing that causes OSMesa to miss the OpenGL symbols. |
597 |
# See e.g. https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599 |
598 |
# -Anssi 12/2012 |
599 |
|
600 |
pushd build-osmesa |
601 |
autoreconf -vfi |
602 |
%configure2_5x \ |
603 |
--enable-osmesa \ |
604 |
--disable-dri \ |
605 |
--disable-glx \ |
606 |
--disable-egl \ |
607 |
--enable-shared-glapi \ |
608 |
--without-gallium-drivers |
609 |
popd |
610 |
|
611 |
%make |
612 |
%make -C build-osmesa || ( %make -C build-osmesa/src/mesa/program libprogram.la && %make -C build-osmesa ) |
613 |
|
614 |
%install |
615 |
%make_install -C build-osmesa |
616 |
%make_install |
617 |
|
618 |
# FIXME: strip will likely break the hardlink |
619 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
620 |
# to prevent proprietary driver installers from removing them |
621 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
622 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
623 |
for l in ../libGL.so.*; do cp -a $l .; done |
624 |
popd |
625 |
|
626 |
%ifarch %{x86_64} |
627 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
628 |
%endif |
629 |
|
630 |
# .so files are not needed by vdpau |
631 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
632 |
|
633 |
# .la files are not needed by mesa |
634 |
find %{buildroot} -name '*.la' -delete |
635 |
|
636 |
# use swrastg if built (Anssi 12/2011) |
637 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
638 |
|
639 |
#------------------------------------------------------------------------------ |
640 |
|
641 |
%files |
642 |
%config(noreplace) %{_sysconfdir}/drirc |
643 |
|
644 |
%files -n %{dridrivers} |
645 |
%dir %{_libdir}/dri |
646 |
%{_libdir}/dri/*_dri.so |
647 |
%{_libdir}/dri/*_drv*.so |
648 |
|
649 |
%files -n %{libglname} |
650 |
%{_libdir}/libGL.so.* |
651 |
%dir %{_libdir}/mesa |
652 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
653 |
|
654 |
%files -n %{libeglname} |
655 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
656 |
# st_GL, built only when shared glapi is not enabled |
657 |
%{_libdir}/egl/st_GL.so |
658 |
|
659 |
%files -n %{libosmesaname} |
660 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
661 |
|
662 |
%files -n %{libglapiname} |
663 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
664 |
|
665 |
%files -n %{libglesv1name} |
666 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
667 |
|
668 |
%if %{with hardware_gallium} |
669 |
%files -n %{libd3dname} |
670 |
%{_libdir}/d3d/*.so.* |
671 |
%endif |
672 |
|
673 |
%files -n %{libglesv2name} |
674 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
675 |
|
676 |
%files -n %{libgbmname} |
677 |
%{_libdir}/libgbm.so.%{gbmmajor} |
678 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
679 |
|
680 |
%files -n %{libwaylandeglname} |
681 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
682 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
683 |
|
684 |
%if %{with hardware_gallium} |
685 |
%files -n %{libxaname} |
686 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
687 |
%endif |
688 |
|
689 |
%files -n %{libglname}-devel |
690 |
%dir %{_includedir}/GL |
691 |
%{_includedir}/GL/gl.h |
692 |
%{_includedir}/GL/gl_mangle.h |
693 |
%{_includedir}/GL/glext.h |
694 |
%{_includedir}/GL/glx.h |
695 |
%{_includedir}/GL/glx_mangle.h |
696 |
%{_includedir}/GL/glxext.h |
697 |
%{_includedir}/GL/glcorearb.h |
698 |
%{_includedir}/GL/mesa_glinterop.h |
699 |
%{_includedir}/GL/wglext.h |
700 |
%dir %{_includedir}/GL/internal |
701 |
%{_includedir}/GL/internal/dri_interface.h |
702 |
%{_libdir}/pkgconfig/dri.pc |
703 |
%{_libdir}/libGL.so |
704 |
%{_libdir}/pkgconfig/gl.pc |
705 |
|
706 |
%files common-devel |
707 |
|
708 |
%files -n %{libeglname}-devel |
709 |
%{_includedir}/EGL |
710 |
%{_includedir}/KHR |
711 |
%{_libdir}/libEGL.so |
712 |
%{_libdir}/pkgconfig/egl.pc |
713 |
|
714 |
%files -n %{osmesadevel} |
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 |
%{_libdir}/libglapi.so |
722 |
|
723 |
%files -n %{libglesv1name}-devel |
724 |
%{_includedir}/GLES |
725 |
%{_libdir}/libGLESv1_CM.so |
726 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
727 |
|
728 |
%files -n %{libglesv2name}-devel |
729 |
%{_includedir}/GLES2 |
730 |
%{_includedir}/GLES3 |
731 |
%{_libdir}/libGLESv2.so |
732 |
%{_libdir}/pkgconfig/glesv2.pc |
733 |
|
734 |
%if %{with hardware_gallium} |
735 |
%files -n %{libd3dname}-devel |
736 |
%{_includedir}/d3dadapter |
737 |
%{_libdir}/d3d/*.so |
738 |
%{_libdir}/pkgconfig/d3d.pc |
739 |
%endif |
740 |
|
741 |
%files -n %{libgbmname}-devel |
742 |
%{_libdir}/libgbm.so |
743 |
%{_includedir}/gbm.h |
744 |
%{_libdir}/pkgconfig/gbm.pc |
745 |
|
746 |
%files -n %{libwaylandeglname}-devel |
747 |
%{_libdir}/libwayland-egl.so |
748 |
%{_libdir}/pkgconfig/wayland-egl.pc |
749 |
|
750 |
%if %{with hardware_gallium} |
751 |
%files -n %{libxaname}-devel |
752 |
%{_libdir}/libxatracker.so |
753 |
%{_includedir}/xa_tracker.h |
754 |
%{_includedir}/xa_composite.h |
755 |
%{_includedir}/xa_context.h |
756 |
%{_libdir}/pkgconfig/xatracker.pc |
757 |
|
758 |
%files -n %{_lib}vdpau-driver-nouveau |
759 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
760 |
|
761 |
%files -n %{_lib}vdpau-driver-r300 |
762 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
763 |
|
764 |
%files -n %{_lib}vdpau-driver-r600 |
765 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
766 |
|
767 |
%files -n %{_lib}vdpau-driver-radeonsi |
768 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
769 |
%endif |
770 |
|
771 |
%if %{enable_vulkan} |
772 |
%files -n %{libvulkanname}_intel |
773 |
%dir %{_datadir}/vulkan |
774 |
%dir %{_datadir}/vulkan/icd.d |
775 |
%{_datadir}/vulkan/icd.d/intel_icd.json |
776 |
# (akien) No lib major? |
777 |
%{_libdir}/libvulkan_intel.so |
778 |
|
779 |
%files -n %{libvulkanname}-devel |
780 |
%{_includedir}/vulkan/ |
781 |
%endif |