1 |
# (cg) Cheater... |
2 |
%define Werror_cflags %nil |
3 |
|
4 |
# (aco) Needed for the dri drivers |
5 |
%define _disable_ld_no_undefined 1 |
6 |
|
7 |
# https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e |
8 |
%define git 0 |
9 |
%define git_branch 19.0 |
10 |
|
11 |
%define opengl_ver 4.5 |
12 |
|
13 |
# define version, RC & release |
14 |
%define main_version 19.0.0 |
15 |
#define relc 1 |
16 |
%define rel 6 |
17 |
|
18 |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
19 |
|
20 |
%if %{git} |
21 |
%if %{?relc:1}%{!?relc:0} |
22 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
23 |
%else |
24 |
%define release 1.git%{git}.%{rel} |
25 |
%endif |
26 |
%endif |
27 |
|
28 |
%define makedepend %{_bindir}/gccmakedep |
29 |
|
30 |
%define clname mesaopencl |
31 |
%define d3dname d3d |
32 |
%define eglname mesaegl |
33 |
%define glname mesagl |
34 |
%define glwname mesaglw |
35 |
%define glesv1name mesaglesv1 |
36 |
%define glesv2name mesaglesv2 |
37 |
%define glapiname glapi |
38 |
%define gbmname gbm |
39 |
%define waylandeglname wayland-egl |
40 |
%define xaname xatracker |
41 |
%define vulkanname mesavulkan |
42 |
|
43 |
%define clmajor 1 |
44 |
%define d3dmajor 1 |
45 |
%define eglmajor 1 |
46 |
%define glmajor 1 |
47 |
%define glwmajor 1 |
48 |
%define glesv1major 1 |
49 |
%define glesv2major 2 |
50 |
%define glapimajor 0 |
51 |
%define gbmmajor 1 |
52 |
%define waylandeglmajor 1 |
53 |
%define osmesamajor 8 |
54 |
%define xamajor 2 |
55 |
|
56 |
%define libclname %mklibname %{clname} %{clmajor} |
57 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
58 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
59 |
%define libglname %mklibname %{glname} %{glmajor} |
60 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
61 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
62 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
63 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
64 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
65 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
66 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
67 |
%define libxaname %mklibname %{xaname} %{xamajor} |
68 |
|
69 |
%define dridrivers %mklibname dri-drivers |
70 |
|
71 |
%define vulkandrivers %mklibname %{vulkanname}-drivers |
72 |
%define vulkandevel %mklibname %{vulkanname} -d |
73 |
|
74 |
%define libcldevel %mklibname mesaopencl -d |
75 |
%define khrdevel %mklibname mesakhr -d |
76 |
%define osmesadevel %mklibname osmesa -d |
77 |
|
78 |
# Architecture-independent Virtual provides: |
79 |
%define libd3dname_virt lib%{d3dname} |
80 |
%define libeglname_virt lib%{eglname} |
81 |
%define libglname_virt lib%{glname} |
82 |
%define libglwname_virt lib%{glwname} |
83 |
%define libglesv1name_virt lib%{glesv1name} |
84 |
%define libglesv2name_virt lib%{glesv2name} |
85 |
%define libglapiname_virt lib%{glapiname} |
86 |
%define libgbmname_virt lib%{gbmname} |
87 |
%define libwaylandeglname_virt lib%{waylandeglname} |
88 |
%define libxaname_virt lib%{xaname} |
89 |
|
90 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
91 |
|
92 |
%define with_vaapi 1 |
93 |
|
94 |
%global with_hardware 1 |
95 |
%global with_vdpau 1 |
96 |
%global with_vaapi 1 |
97 |
%global with_nine 1 |
98 |
%global with_omx 1 |
99 |
%global with_opencl 1 |
100 |
%global base_drivers nouveau,r100,r200 |
101 |
|
102 |
%ifarch %{ix86} x86_64 |
103 |
%global platform_drivers ,i915,i965 |
104 |
%global with_vmware 1 |
105 |
%global with_xa 1 |
106 |
%global vulkan_drivers intel,amd |
107 |
%else |
108 |
%global vulkan_drivers amd |
109 |
%endif |
110 |
|
111 |
%ifarch %{arm} aarch64 |
112 |
%global with_etnaviv 1 |
113 |
%global with_freedreno 1 |
114 |
%global with_kmsro 1 |
115 |
%global with_tegra 1 |
116 |
%global with_vc4 1 |
117 |
%global with_xa 1 |
118 |
%endif |
119 |
|
120 |
%define with_wayland_egl 0 |
121 |
|
122 |
%global with_radeonsi 1 |
123 |
|
124 |
%global dri_drivers %{?base_drivers}%{?platform_drivers} |
125 |
|
126 |
Name: mesa |
127 |
Version: %{main_version} |
128 |
Release: %{release} |
129 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
130 |
Group: System/Libraries |
131 |
|
132 |
# temp force new gcc |
133 |
BuildRequires: gcc >= 5.4.0-2 |
134 |
|
135 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
136 |
BuildRequires: pkgconfig(xshmfence) |
137 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
138 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
139 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
140 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
141 |
BuildRequires: pkgconfig(expat) >= 2.0.1 |
142 |
BuildRequires: gccmakedep |
143 |
BuildRequires: x11-proto-devel >= 7.3 |
144 |
BuildRequires: pkgconfig(libdrm) >= 2.4.91 |
145 |
BuildRequires: pkgconfig(xcb-dri3) |
146 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
147 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
148 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
149 |
BuildRequires: pkgconfig(xi) >= 1.3 |
150 |
BuildRequires: pkgconfig(xrandr) |
151 |
%if 0%{?with_omx} |
152 |
BuildRequires: pkgconfig(libomxil-bellagio) |
153 |
%endif |
154 |
%if 0%{?with_opencl} |
155 |
BuildRequires: clang-devel |
156 |
BuildRequires: pkgconfig(libclc) |
157 |
%endif |
158 |
BuildRequires: pkgconfig(talloc) |
159 |
BuildRequires: python2-libxml2 |
160 |
BuildRequires: python2-mako |
161 |
BuildRequires: python3-libxml2 |
162 |
BuildRequires: python3-mako |
163 |
BuildRequires: makedepend |
164 |
BuildRequires: bison |
165 |
BuildRequires: flex |
166 |
BuildRequires: meson |
167 |
BuildRequires: pkgconfig(libelf) |
168 |
BuildRequires: llvm-devel >= 3.9.1-5 |
169 |
BuildRequires: pkgconfig(libudev) |
170 |
%if 0%{?with_vaapi} |
171 |
BuildRequires: pkgconfig(libva) |
172 |
%endif |
173 |
BuildRequires: pkgconfig(vdpau) |
174 |
BuildRequires: pkgconfig(wayland-client) |
175 |
BuildRequires: pkgconfig(wayland-server) |
176 |
BuildRequires: pkgconfig(wayland-protocols) |
177 |
BuildRequires: libgcrypt-devel |
178 |
BuildRequires: pkgconfig(wayland-protocols) >= 1.8 |
179 |
|
180 |
URL: http://www.mesa3d.org |
181 |
%if %{git} |
182 |
#Source0: %{name}-%{git}.tar.bz2 |
183 |
# (blino) snapshot of 13.0 branch |
184 |
Source0: %{name}-%{git_branch}-%{git}.tar.xz |
185 |
%else |
186 |
Source0: https://mesa.freedesktop.org/archive/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz |
187 |
%endif |
188 |
Source3: make-git-snapshot.sh |
189 |
|
190 |
Patch000: fix-linking.patch |
191 |
|
192 |
# mesa staging/19.0 branch from 1 |
193 |
Patch001: 0001-docs-Add-SHA256-sums-for-19.0.0.patch |
194 |
Patch002: 0002-radv-set-the-maximum-number-of-IBs-per-submit-to-192.patch |
195 |
Patch003: 0003-v3d-Fix-leak-of-the-renderonly-struct-on-screen-dest.patch |
196 |
Patch004: 0004-intel-fs-Fix-opt_peephole_csel-to-not-throw-away-sat.patch |
197 |
Patch005: 0005-glsl-lower_vector_derefs-Don-t-use-a-temporary-for-T.patch |
198 |
Patch006: 0006-glsl-list-Add-a-list-variant-of-insert_after.patch |
199 |
Patch007: 0007-egl-dri-Avoid-out-of-bounds-array-access.patch |
200 |
Patch008: 0008-anv-pass-Flag-the-need-for-a-RT-flush-for-resolve-at.patch |
201 |
Patch009: 0009-i965-Disable-ARB_fragment_shader_interlock-for-platf.patch |
202 |
Patch010: 0010-radv-always-initialize-HTILE-when-the-src-layout-is-.patch |
203 |
Patch011: 0011-d3d-meson-do-not-prefix-user-provided-d3d-drivers-pa.patch |
204 |
Patch012: 0012-mesa-properly-report-the-length-of-truncated-log-mes.patch |
205 |
Patch013: 0013-isl-fix-automake-build-when-sse41-is-not-supported.patch |
206 |
Patch014: 0014-anv-Treat-zero-size-XFB-buffer-as-disabled.patch |
207 |
#Patch015: 0015-cherry-ignore-Add-commit-that-doesn-t-apply.patch |
208 |
Patch016: 0016-nir-builder-Add-a-vector-extract-helper.patch |
209 |
Patch017: 0017-nir-Add-a-new-pass-to-lower-array-dereferences-on-ve.patch |
210 |
Patch018: 0018-radv-Use-correct-image-view-comparison-for-fast-clea.patch |
211 |
Patch019: 0019-glsl-correctly-validate-component-layout-qualifier-f.patch |
212 |
Patch020: 0020-glsl-linker-don-t-fail-non-static-used-inputs-withou.patch |
213 |
Patch021: 0021-glsl-linker-simplify-xfb_offset-vs-xfb_stride-overfl.patch |
214 |
Patch022: 0022-Revert-glsl-relax-input-output-validation-for-SSO-pr.patch |
215 |
Patch023: 0023-radv-fix-binding-transform-feedback-buffers.patch |
216 |
Patch024: 0024-intel-nir-Lower-array-deref-of-vector-UBO-and-SSBO-l.patch |
217 |
|
218 |
# mesa master branch from 201 |
219 |
|
220 |
#------------------------------------------------------------------------------ |
221 |
|
222 |
# package mesa |
223 |
License: MIT |
224 |
Requires: %{libglname} = %{version}-%{release} |
225 |
Provides: hackMesa = %{version} |
226 |
Obsoletes: hackMesa <= %{version} |
227 |
Provides: Mesa = %{version} |
228 |
Obsoletes: Mesa < %{version} |
229 |
|
230 |
%package -n %{libglname} |
231 |
Summary: Files for Mesa (GL and GLX libs) |
232 |
Group: System/Libraries |
233 |
Provides: %{libglname_virt} = %{version}-%{release} |
234 |
Requires: %{dridrivers} >= %{version}-%{release} |
235 |
|
236 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
237 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
238 |
Conflicts: x11-server-common < 1.3.0.0-17 |
239 |
|
240 |
%package -n %{dridrivers} |
241 |
Summary: Mesa DRI drivers |
242 |
Group: System/Libraries |
243 |
# do not require exact release to avoid conflicts when having |
244 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
245 |
Requires: mesa = %{version} |
246 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
247 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
248 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
249 |
|
250 |
%if 0%{?with_omx} |
251 |
%package omx-drivers |
252 |
Summary: Mesa-based OMX drivers |
253 |
%endif |
254 |
|
255 |
%package -n %{libd3dname} |
256 |
Summary: Mesa Direct3D9 state tracker |
257 |
Group: System/Libraries |
258 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
259 |
|
260 |
%package -n %{libd3dname}-devel |
261 |
Summary: Development files for Mesa Direct3D9 state tracker |
262 |
Group: Development/C |
263 |
Requires: %{libd3dname} = %{version}-%{release} |
264 |
Provides: lib%{d3dname}-devel |
265 |
Provides: %{d3dname}-devel |
266 |
Provides: libd3d-devel |
267 |
|
268 |
%package -n %{libglname}-devel |
269 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
270 |
Group: Development/C |
271 |
Requires: %{libglname} = %{version}-%{release} |
272 |
Requires: %{khrdevel} = %{version}-%{release} |
273 |
Provides: lib%{glname}-devel = %{version}-%{release} |
274 |
Provides: %{glname}-devel = %{version}-%{release} |
275 |
Provides: GL-devel |
276 |
Provides: libMesaGL-devel = %{version}-%{release} |
277 |
Provides: MesaGL-devel = %{version}-%{release} |
278 |
Provides: libgl-devel |
279 |
|
280 |
%package -n %{libeglname} |
281 |
Summary: Files for Mesa (EGL libs) |
282 |
Group: System/Libraries |
283 |
Provides: %{libeglname_virt} = %{version}-%{release} |
284 |
|
285 |
%package -n %{libeglname}-devel |
286 |
Summary: Development files for Mesa (EGL libs) |
287 |
Group: Development/C |
288 |
Requires: %{libeglname} = %{version}-%{release} |
289 |
Requires: %{khrdevel} = %{version}-%{release} |
290 |
Provides: EGL-devel |
291 |
Provides: lib%{eglname}-devel |
292 |
Provides: %{eglname}-devel |
293 |
Provides: libegl-devel |
294 |
|
295 |
%package -n %{khrdevel} |
296 |
Summary: Mesa Khronos development headers |
297 |
Group: Development/C |
298 |
Provides: mesakhr-devel = %{version}-%{release} |
299 |
|
300 |
%package -n %{libosmesaname} |
301 |
Summary: Mesa offscreen rendering library |
302 |
Group: System/Libraries |
303 |
|
304 |
%package -n %{osmesadevel} |
305 |
Summary: Development files for libosmesa |
306 |
Group: Development/C |
307 |
Requires: %{libosmesaname} = %{version}-%{release} |
308 |
Provides: osmesa-devel = %{version}-%{release} |
309 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
310 |
|
311 |
%package -n %{libglapiname} |
312 |
Summary: Files for mesa (glapi libs) |
313 |
Group: System/Libraries |
314 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
315 |
|
316 |
%package -n %{libglapiname}-devel |
317 |
Summary: Development files for glapi libs |
318 |
Group: Development/C |
319 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
320 |
Provides: lib%{glapiname}-devel |
321 |
Provides: %{libglapiname}-devel |
322 |
|
323 |
%if 0%{?with_opencl} |
324 |
%package -n %libclname |
325 |
Summary: Mesa OpenCL runtime library |
326 |
#Requires: libclc%{?_isa} |
327 |
#Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} |
328 |
|
329 |
%package -n %libcldevel |
330 |
Summary: Mesa OpenCL development package |
331 |
Requires: %libclname%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} |
332 |
%endif |
333 |
|
334 |
|
335 |
%package -n %{libglesv1name} |
336 |
Summary: Files for Mesa (glesv1 libs) |
337 |
Group: System/Libraries |
338 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
339 |
|
340 |
%package -n %{libglesv1name}-devel |
341 |
Summary: Development files for glesv1 libs |
342 |
Group: Development/C |
343 |
Requires: %{libglesv1name} = %{version}-%{release} |
344 |
Requires: %{khrdevel} = %{version}-%{release} |
345 |
Provides: lib%{glesv1name}-devel |
346 |
Provides: %{glesv1name}-devel |
347 |
Provides: libglesv1-devel |
348 |
|
349 |
%package -n %{libglesv2name} |
350 |
Summary: Files for Mesa (glesv2 libs) |
351 |
Group: System/Libraries |
352 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
353 |
|
354 |
%package -n %{libglesv2name}-devel |
355 |
Summary: Development files for glesv2 libs |
356 |
Group: Development/C |
357 |
Requires: %{libglesv2name} = %{version}-%{release} |
358 |
Requires: %{khrdevel} = %{version}-%{release} |
359 |
Provides: lib%{glesv2name}-devel |
360 |
Provides: %{glesv2name}-devel |
361 |
Provides: libglesv2-devel |
362 |
|
363 |
%package -n %{libgbmname} |
364 |
Summary: Files for Mesa (gbm libs) |
365 |
Group: System/Libraries |
366 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
367 |
|
368 |
%package -n %{libgbmname}-devel |
369 |
Summary: Development files for Mesa (gbm libs) |
370 |
Group: Development/C |
371 |
Requires: %{libgbmname} = %{version}-%{release} |
372 |
Provides: lib%{gbmname}-devel |
373 |
Provides: %{gbmname}-devel |
374 |
|
375 |
%if %{?with_wayland_egl} |
376 |
%package -n %{libwaylandeglname} |
377 |
Summary: Files for Mesa (Wayland EGL libs) |
378 |
Group: System/Libraries |
379 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
380 |
|
381 |
%package -n %{libwaylandeglname}-devel |
382 |
Summary: Development files for Mesa (Wayland EGL libs) |
383 |
Group: Development/C |
384 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
385 |
Provides: lib%{waylandeglname}-devel |
386 |
Provides: %{waylandeglname}-devel |
387 |
%endif |
388 |
|
389 |
%package -n %{_lib}vdpau-driver-nouveau |
390 |
Summary: VDPAU plugin for nouveau driver |
391 |
Group: System/Libraries |
392 |
# temporary: |
393 |
%rename vdpau-driver-nouveau |
394 |
|
395 |
%package -n %{_lib}vdpau-driver-r300 |
396 |
Summary: VDPAU plugin for r300 driver |
397 |
Group: System/Libraries |
398 |
# temporary: |
399 |
%rename vdpau-driver-r300 |
400 |
|
401 |
%package -n %{_lib}vdpau-driver-r600 |
402 |
Summary: VDPAU plugin for r600 driver |
403 |
Group: System/Libraries |
404 |
# temporary: |
405 |
%rename vdpau-driver-r600 |
406 |
|
407 |
%package -n %{_lib}vdpau-driver-radeonsi |
408 |
Summary: VDPAU plugin for radeonsi driver |
409 |
Group: System/Libraries |
410 |
# temporary: |
411 |
%rename vdpau-driver-radeonsi |
412 |
|
413 |
%package -n %{libxaname} |
414 |
Summary: Files for Mesa XA state tracker |
415 |
Group: System/Libraries |
416 |
Provides: %{libxaname_virt} = %{version}-%{release} |
417 |
|
418 |
%package -n %{libxaname}-devel |
419 |
Summary: Development files for XA libs |
420 |
Group: Development/C |
421 |
Requires: %{libxaname_virt} = %{version}-%{release} |
422 |
Provides: lib%{xaname}-devel |
423 |
Provides: %{libxaname}-devel |
424 |
|
425 |
%package -n %{vulkandrivers} |
426 |
Summary: Mesa Vulkan driver for Intel and Radeon GPUs |
427 |
Group: System/Libraries |
428 |
%ifarch %{ix86} x86_64 |
429 |
Obsoletes: %{_lib}vulkan_intel < 18.3.0-4 |
430 |
Provides: %{_lib}vulkan_intel = %{version}-%{release} |
431 |
%endif |
432 |
Obsoletes: %{_lib}vulkan_radeon < 18.3.0-4 |
433 |
Provides: %{_lib}vulkan_radeon = %{version}-%{release} |
434 |
|
435 |
%package -n %{vulkandevel} |
436 |
Summary: Mesa's Vulkan development files for Intel and Radeon drivers |
437 |
Group: Development/C |
438 |
Requires: %{vulkandrivers} = %{version}-%{release} |
439 |
Obsoletes: %{_lib}vulkan-devel < 0:18.3.0-4 |
440 |
Provides: %{vulkanname}-devel = %{version}-%{release} |
441 |
|
442 |
%package common-devel |
443 |
Summary: Meta package for mesa devel |
444 |
Group: Development/C |
445 |
Provides: Mesa-common-devel = %{version}-%{release} |
446 |
Provides: hackMesa-common-devel = %{version} |
447 |
Obsoletes: Mesa-common-devel < %{version} |
448 |
Obsoletes: hackMesa-common-devel < %{version} |
449 |
Requires: %{libglname}-devel = %{version} |
450 |
Requires: mesaglu-devel |
451 |
Requires: freeglut-devel |
452 |
Requires: %{libeglname}-devel = %{version} |
453 |
Requires: %{libglesv1name}-devel = %{version} |
454 |
Requires: %{libglesv2name}-devel = %{version} |
455 |
|
456 |
#------------------------------------------------------------------------------ |
457 |
|
458 |
%description |
459 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
460 |
|
461 |
%description common-devel |
462 |
Mesa common metapackage devel |
463 |
|
464 |
%description -n %{libeglname} |
465 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
466 |
EGL parts. |
467 |
|
468 |
%description -n %{libeglname}-devel |
469 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
470 |
EGL development parts. |
471 |
|
472 |
%description -n %{libglname} |
473 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
474 |
GL and GLX parts. |
475 |
|
476 |
%description -n %{dridrivers} |
477 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
478 |
DRI drivers. |
479 |
|
480 |
%if 0%{?with_omx} |
481 |
%description omx-drivers |
482 |
Mesa-based OMX drivers |
483 |
%endif |
484 |
|
485 |
%description -n %{libglname}-devel |
486 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
487 |
|
488 |
This package contains the headers needed to compile Mesa programs. |
489 |
|
490 |
%description -n %{libglesv1name} |
491 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
492 |
well-defined subset profiles of OpenGL. |
493 |
|
494 |
This package provides the OpenGL ES library version 1. |
495 |
|
496 |
%description -n %{khrdevel} |
497 |
Mesa Khronos development headers. |
498 |
|
499 |
%description -n %{libosmesaname} |
500 |
Mesa offscreen rendering libraries for rendering OpenGL into |
501 |
application-allocated blocks of memory. |
502 |
|
503 |
%description -n %{osmesadevel} |
504 |
This package contains the headers needed to compile programs against |
505 |
the Mesa offscreen rendering library. |
506 |
|
507 |
%description -n %{libglapiname} |
508 |
This packages provides the glapi shared library used by gallium. |
509 |
|
510 |
%description -n %{libglapiname}-devel |
511 |
This package contains the headers needed to compile programes against glapi shared library. |
512 |
|
513 |
%if 0%{?with_opencl} |
514 |
%description -n %libclname |
515 |
Mesa OpenCL runtime library |
516 |
|
517 |
%description -n %libcldevel |
518 |
Mesa OpenCL development package |
519 |
%endif |
520 |
|
521 |
%description -n %{libglesv1name}-devel |
522 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
523 |
|
524 |
%description -n %{libd3dname} |
525 |
Mesa Direct3D9 state tracker. |
526 |
|
527 |
%description -n %{libd3dname}-devel |
528 |
Mesa Direct3D9 state tracker development package. |
529 |
|
530 |
%description -n %{libglesv2name} |
531 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
532 |
well-defined subset profiles of OpenGL. |
533 |
|
534 |
This package provides the OpenGL ES library version 2. |
535 |
|
536 |
%description -n %{libglesv2name}-devel |
537 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
538 |
|
539 |
%description -n %{libgbmname} |
540 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
541 |
GBM (Graphics Buffer Manager) parts. |
542 |
|
543 |
%description -n %{libgbmname}-devel |
544 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
545 |
GBM (Graphics Buffer Manager) development parts. |
546 |
|
547 |
%if %{?with_wayland_egl} |
548 |
%description -n %{libwaylandeglname} |
549 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
550 |
Wayland EGL platform parts. |
551 |
|
552 |
%description -n %{libwaylandeglname}-devel |
553 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
554 |
Wayland EGL platform development parts. |
555 |
%endif |
556 |
|
557 |
%description -n %{libxaname} |
558 |
This packages provides the xa shared library used by gallium. |
559 |
|
560 |
%description -n %{libxaname}-devel |
561 |
This package contains the headers needed to compile programes against xa shared library. |
562 |
|
563 |
%description -n %{_lib}vdpau-driver-nouveau |
564 |
This packages provides a VPDAU plugin to enable video acceleration |
565 |
with the nouveau driver. |
566 |
|
567 |
%description -n %{_lib}vdpau-driver-r300 |
568 |
This packages provides a VPDAU plugin to enable video acceleration |
569 |
with the r300 driver. |
570 |
|
571 |
%description -n %{_lib}vdpau-driver-r600 |
572 |
This packages provides a VPDAU plugin to enable video acceleration |
573 |
with the r600 driver. |
574 |
|
575 |
%description -n %{_lib}vdpau-driver-radeonsi |
576 |
This packages provides a VPDAU plugin to enable video acceleration |
577 |
with the radeonsi driver. |
578 |
|
579 |
%description -n %{vulkandrivers} |
580 |
This package contains the Vulkan parts for Mesa's Intel and Radeon drivers. |
581 |
|
582 |
%description -n %{vulkandevel} |
583 |
This package contains the development files for Mesa's Vulkan implementation. |
584 |
|
585 |
#------------------------------------------------------------------------------ |
586 |
|
587 |
%prep |
588 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
589 |
|
590 |
%build |
591 |
%meson -Dcpp_std=gnu++11 \ |
592 |
-Dplatforms=x11,wayland,drm,surfaceless \ |
593 |
-Ddri3=true \ |
594 |
-Ddri-drivers=%{?dri_drivers} \ |
595 |
%if 0%{?with_hardware} |
596 |
-Dgallium-drivers=swrast,virgl,r300,nouveau%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_kmsro:,kmsro} \ |
597 |
%else |
598 |
-Dgallium-drivers=swrast,virgl \ |
599 |
%endif |
600 |
-Dgallium-vdpau=%{?with_vdpau:true}%{!?with_vdpau:false} \ |
601 |
-Dgallium-xvmc=false \ |
602 |
-Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \ |
603 |
-Dgallium-va=%{?with_vaapi:true}%{!?with_vaapi:false} \ |
604 |
-Dgallium-xa=%{?with_xa:true}%{!?with_xa:false} \ |
605 |
-Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \ |
606 |
-Dgallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \ |
607 |
-Dvulkan-drivers=%{?vulkan_drivers} \ |
608 |
-Dshared-glapi=true \ |
609 |
-Dgles1=true \ |
610 |
-Dgles2=true \ |
611 |
-Dopengl=true \ |
612 |
-Dgbm=true \ |
613 |
-Dglx=dri \ |
614 |
-Degl=true \ |
615 |
-Dasm=%{?with_asm:true}%{!?with_asm:false} \ |
616 |
-Dllvm=true \ |
617 |
-Dshared-llvm=true \ |
618 |
-Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \ |
619 |
-Dbuild-tests=false \ |
620 |
-Dselinux=false \ |
621 |
-Dosmesa=gallium \ |
622 |
%{nil} |
623 |
%meson_build |
624 |
|
625 |
%install |
626 |
%meson_install |
627 |
|
628 |
# FIXME: strip will likely break the hardlink |
629 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
630 |
# to prevent proprietary driver installers from removing them |
631 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
632 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
633 |
for l in ../libGL.so.*; do cp -a $l .; done |
634 |
popd |
635 |
|
636 |
%ifarch %{x86_64} |
637 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
638 |
%endif |
639 |
|
640 |
# libvdpau opens the versioned name, don't bother including the unversioned |
641 |
rm -f %{buildroot}%{_libdir}/vdpau/*.so |
642 |
|
643 |
# strip out useless headers |
644 |
rm -f %{buildroot}%{_includedir}/GL/w*.h |
645 |
|
646 |
# remove .la files |
647 |
find %{buildroot} -name '*.la' -delete |
648 |
|
649 |
# remove libwayland-egl on F28+ where it's built as part of wayland source package |
650 |
%if !%{?with_wayland_egl} |
651 |
rm -f %{buildroot}%{_libdir}/libwayland-egl.so* |
652 |
rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc |
653 |
%endif |
654 |
|
655 |
%ifnarch %{ix86} x86_64 |
656 |
# To have something to package for mesavulkan-devel on arm/aarch64 for now |
657 |
mkdir %{buildroot}%{_includedir}/vulkan |
658 |
%endif |
659 |
|
660 |
#------------------------------------------------------------------------------ |
661 |
|
662 |
%files |
663 |
/usr/share/drirc.d/ |
664 |
|
665 |
%files -n %{dridrivers} |
666 |
%dir %{_libdir}/dri |
667 |
%{_libdir}/dri/*_dri.so |
668 |
%{_libdir}/dri/*_drv*.so |
669 |
%if 0%{?with_hardware} |
670 |
%dir %{_libdir}/gallium-pipe |
671 |
%{_libdir}/gallium-pipe/*.so |
672 |
%endif |
673 |
|
674 |
%if 0%{?with_omx} |
675 |
%files omx-drivers |
676 |
%{_libdir}/bellagio/libomx_mesa.so |
677 |
%endif |
678 |
|
679 |
%if 0%{?with_opencl} |
680 |
%files -n %libclname |
681 |
%{_libdir}/libMesaOpenCL.so.* |
682 |
%{_sysconfdir}/OpenCL/vendors/mesa.icd |
683 |
|
684 |
%files -n %libcldevel |
685 |
%{_libdir}/libMesaOpenCL.so |
686 |
%endif |
687 |
|
688 |
%files -n %{libglname} |
689 |
%{_libdir}/libGL.so.* |
690 |
%dir %{_libdir}/mesa |
691 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
692 |
|
693 |
%files -n %{libeglname} |
694 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
695 |
|
696 |
%files -n %{libosmesaname} |
697 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
698 |
|
699 |
%files -n %{libglapiname} |
700 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
701 |
|
702 |
%files -n %{libglesv1name} |
703 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
704 |
|
705 |
%files -n %{libd3dname} |
706 |
%{_libdir}/d3d/*.so.* |
707 |
|
708 |
%files -n %{libglesv2name} |
709 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
710 |
|
711 |
%files -n %{libgbmname} |
712 |
%{_libdir}/libgbm.so.%{gbmmajor} |
713 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
714 |
|
715 |
%if %{?with_wayland_egl} |
716 |
%files -n %{libwaylandeglname} |
717 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
718 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
719 |
%endif |
720 |
|
721 |
%files -n %{libxaname} |
722 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
723 |
|
724 |
%files -n %{libglname}-devel |
725 |
%dir %{_includedir}/GL |
726 |
%{_includedir}/GL/gl.h |
727 |
%{_includedir}/GL/gl_mangle.h |
728 |
%{_includedir}/GL/glext.h |
729 |
%{_includedir}/GL/glx.h |
730 |
%{_includedir}/GL/glx_mangle.h |
731 |
%{_includedir}/GL/glxext.h |
732 |
%{_includedir}/GL/glcorearb.h |
733 |
%dir %{_includedir}/GL/internal |
734 |
%{_includedir}/GL/internal/dri_interface.h |
735 |
%{_libdir}/pkgconfig/dri.pc |
736 |
%{_libdir}/libGL.so |
737 |
%{_libdir}/pkgconfig/gl.pc |
738 |
|
739 |
%files common-devel |
740 |
|
741 |
%files -n %{libeglname}-devel |
742 |
%{_includedir}/EGL |
743 |
%{_libdir}/libEGL.so |
744 |
%{_libdir}/pkgconfig/egl.pc |
745 |
|
746 |
%files -n %{khrdevel} |
747 |
%{_includedir}/KHR |
748 |
|
749 |
%files -n %{osmesadevel} |
750 |
%dir %{_includedir}/GL |
751 |
%{_includedir}/GL/osmesa.h |
752 |
%{_libdir}/libOSMesa.so |
753 |
%{_libdir}/pkgconfig/osmesa.pc |
754 |
|
755 |
%files -n %{libglapiname}-devel |
756 |
%{_libdir}/libglapi.so |
757 |
|
758 |
%files -n %{libglesv1name}-devel |
759 |
%{_includedir}/GLES |
760 |
%{_libdir}/libGLESv1_CM.so |
761 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
762 |
|
763 |
%files -n %{libglesv2name}-devel |
764 |
%{_includedir}/GLES2 |
765 |
%{_includedir}/GLES3 |
766 |
%{_libdir}/libGLESv2.so |
767 |
%{_libdir}/pkgconfig/glesv2.pc |
768 |
|
769 |
%files -n %{libd3dname}-devel |
770 |
%{_includedir}/d3dadapter |
771 |
%{_libdir}/d3d/*.so |
772 |
%{_libdir}/pkgconfig/d3d.pc |
773 |
|
774 |
%files -n %{libgbmname}-devel |
775 |
%{_libdir}/libgbm.so |
776 |
%{_includedir}/gbm.h |
777 |
%{_libdir}/pkgconfig/gbm.pc |
778 |
|
779 |
%if %{?with_wayland_egl} |
780 |
%files -n %{libwaylandeglname}-devel |
781 |
%{_libdir}/libwayland-egl.so |
782 |
%{_libdir}/pkgconfig/wayland-egl.pc |
783 |
%endif |
784 |
|
785 |
%files -n %{libxaname}-devel |
786 |
%{_libdir}/libxatracker.so |
787 |
%{_includedir}/xa_tracker.h |
788 |
%{_includedir}/xa_composite.h |
789 |
%{_includedir}/xa_context.h |
790 |
%{_libdir}/pkgconfig/xatracker.pc |
791 |
|
792 |
%files -n %{_lib}vdpau-driver-nouveau |
793 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
794 |
|
795 |
%files -n %{_lib}vdpau-driver-r300 |
796 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
797 |
|
798 |
%files -n %{_lib}vdpau-driver-r600 |
799 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
800 |
|
801 |
%files -n %{_lib}vdpau-driver-radeonsi |
802 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
803 |
|
804 |
%files -n %{vulkandrivers} |
805 |
%dir %{_datadir}/vulkan |
806 |
%dir %{_datadir}/vulkan/icd.d |
807 |
%ifarch %{ix86} x86_64 |
808 |
%{_datadir}/vulkan/icd.d/intel_icd*.json |
809 |
%{_libdir}/libvulkan_intel.so |
810 |
%endif |
811 |
%{_datadir}/vulkan/icd.d/radeon_icd*.json |
812 |
%{_libdir}/libvulkan_radeon.so |
813 |
|
814 |
%files -n %{vulkandevel} |
815 |
%dir %{_includedir}/vulkan |
816 |
%ifarch %{ix86} x86_64 |
817 |
%{_includedir}/vulkan/vulkan_intel.h |
818 |
%endif |