1 |
# https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e |
2 |
%define git 0 |
3 |
%define git_branch 21.3 |
4 |
|
5 |
%define opengl_ver 4.6 |
6 |
|
7 |
# define version, RC & release |
8 |
%define main_version 21.3.8 |
9 |
#define relc 1 |
10 |
%define rel 1 |
11 |
|
12 |
%define release %mkrel %{?relc:0.rc%{relc}.}%{rel} |
13 |
|
14 |
%if %{git} |
15 |
%if %{?relc:1}%{!?relc:0} |
16 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
17 |
%else |
18 |
%define release 1.git%{git}.%{rel} |
19 |
%endif |
20 |
%endif |
21 |
|
22 |
%define clname mesaopencl |
23 |
%define d3dname d3d |
24 |
%define eglname mesaegl |
25 |
%define eglname_glvnd egl |
26 |
%define glname mesagl |
27 |
%define glname_glvnd gl |
28 |
%define glwname mesaglw |
29 |
%define glesv1name mesaglesv1 |
30 |
%define glesv2name mesaglesv2 |
31 |
%define glesv1name_glvnd glesv1_cm |
32 |
%define glesv2name_glvnd glesv2 |
33 |
%define gldispatchname_glvnd gldispatch |
34 |
%define glxname_glvnd glx |
35 |
%define glapiname glapi |
36 |
%define gbmname gbm |
37 |
%define xaname xatracker |
38 |
%define vulkanname mesavulkan |
39 |
%define openswrname openswr |
40 |
|
41 |
%define clmajor 1 |
42 |
%define d3dmajor 1 |
43 |
%define eglmajor 1 |
44 |
%define eglmajor_glvnd 1 |
45 |
%define glmajor 1 |
46 |
%define glmajor_glvnd 1 |
47 |
%define glwmajor 1 |
48 |
%define glesv1major 1 |
49 |
%define glesv2major 2 |
50 |
%define gldispatchmajor 0 |
51 |
%define glxmajor 0 |
52 |
%define glapimajor 0 |
53 |
%define gbmmajor 1 |
54 |
%define waylandeglmajor 1 |
55 |
%define osmesamajor 8 |
56 |
%define xamajor 2 |
57 |
%define openswrmajor 0 |
58 |
|
59 |
%define libclname %mklibname %{clname} %{clmajor} |
60 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
61 |
%define devd3dname %mklibname %{d3dname} -d |
62 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
63 |
%define deveglname %mklibname %{eglname} -d |
64 |
%define libeglname_glvnd %mklibname %{eglname_glvnd} %{eglmajor_glvnd} |
65 |
%define libglname %mklibname %{glname} %{glmajor} |
66 |
%define devglname %mklibname %{glname} -d |
67 |
%define libglname_glvnd %mklibname %{glname_glvnd} %{glmajor_glvnd} |
68 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
69 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
70 |
%define devglesv1name %mklibname %{glesv1name} -d |
71 |
%define libglesv1name_glvnd %mklibname %{glesv1name_glvnd} %{glesv1major} |
72 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
73 |
%define devglesv2name %mklibname %{glesv2name} -d |
74 |
%define libglesv2name_glvnd %mklibname %{glesv2name_glvnd} %{glesv2major} |
75 |
%define libgldispatchname_glvnd %mklibname %{gldispatchname_glvnd} %{gldispatchmajor} |
76 |
%define libglxname_glvnd %mklibname %{glxname_glvnd} %{glxmajor} |
77 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
78 |
%define devglapiname %mklibname %{glapiname} -d |
79 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
80 |
%define devgbmname %mklibname %{gbmname} -d |
81 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
82 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
83 |
%define libxaname %mklibname %{xaname} %{xamajor} |
84 |
%define devxaname %mklibname %{xaname} -d |
85 |
%define libopenswrname %mklibname %{openswrname} %{openswrmajor} |
86 |
%define devopenswrname %mklibname %{openswrname} -d |
87 |
|
88 |
%define dridrivers %mklibname dri-drivers |
89 |
|
90 |
%define vulkandrivers %mklibname %{vulkanname}-drivers |
91 |
%define vulkandevel %mklibname %{vulkanname} -d |
92 |
|
93 |
%define libcldevel %mklibname mesaopencl -d |
94 |
%define khrdevel %mklibname mesakhr -d |
95 |
%define osmesadevel %mklibname osmesa -d |
96 |
|
97 |
%define glvnd_devname %mklibname glvnd -d |
98 |
|
99 |
# Architecture-independent Virtual provides: |
100 |
%define libd3dname_virt lib%{d3dname} |
101 |
%define libeglname_virt lib%{eglname} |
102 |
%define libglname_virt lib%{glname} |
103 |
%define libglwname_virt lib%{glwname} |
104 |
%define libglesv1name_virt lib%{glesv1name} |
105 |
%define libglesv2name_virt lib%{glesv2name} |
106 |
%define libglapiname_virt lib%{glapiname} |
107 |
%define libgbmname_virt lib%{gbmname} |
108 |
%define libwaylandeglname_virt lib%{waylandeglname} |
109 |
%define libxaname_virt lib%{xaname} |
110 |
%define libopenswrname_virt lib%{openswrname} |
111 |
|
112 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
113 |
|
114 |
%define with_valgrind 1 |
115 |
|
116 |
# Note for packagers: to "bootstrap" mesa when switching to |
117 |
# libglvnd, you have to disable vaapi (commenting with_vaapi |
118 |
# below), as vaapi depends on mesa, so it would lead to a |
119 |
# cyclical dependency. Re-enable vaapi once bootstrapped. |
120 |
|
121 |
# undefine one of the following entries to disable |
122 |
%global with_hardware 1 |
123 |
%global with_vulkan_hw 1 |
124 |
%global with_vdpau 1 |
125 |
%global with_vaapi 1 |
126 |
%global with_nine 1 |
127 |
%global with_omx 1 |
128 |
%global with_opencl 1 |
129 |
%global base_dri nouveau,r100,r200 |
130 |
%global base_vulkan ,amd |
131 |
%if %mgaversion < 8 |
132 |
%global with_glvnd 0 |
133 |
%else |
134 |
%global with_glvnd 1 |
135 |
%endif |
136 |
%ifarch x86_64 |
137 |
%global with_openswr 1 |
138 |
%endif |
139 |
|
140 |
%ifarch %{ix86} x86_64 |
141 |
%global with_crocus 1 |
142 |
%global with_iris 1 |
143 |
%global with_vmware 1 |
144 |
%global with_xa 1 |
145 |
%global platform_dri ,i915,i965 |
146 |
%global platform_vulkan ,intel |
147 |
%endif |
148 |
|
149 |
%ifarch %{arm} aarch64 |
150 |
%global with_etnaviv 1 |
151 |
%global with_freedreno 1 |
152 |
%global with_kmsro 1 |
153 |
%global with_lima 1 |
154 |
%global with_panfrost 1 |
155 |
%global with_tegra 1 |
156 |
%global with_vc4 1 |
157 |
%global with_v3d 1 |
158 |
%global with_xa 1 |
159 |
%global platform_vulkan ,broadcom,freedreno |
160 |
%endif |
161 |
|
162 |
# define with_newname above to have: |
163 |
# lib(64)mesagl1 renamed as lib(64)glx_mesa0 and |
164 |
# lib(64)egl1 renamed as lib(64)egl_mesa0 |
165 |
#global with_newname 1 |
166 |
%if 0%{?with_newname} |
167 |
%define eglname egl_mesa |
168 |
%define glname glx_mesa |
169 |
%define glmajor 0 |
170 |
%define eglmajor 0 |
171 |
%define old_eglname mesaegl |
172 |
%define old_glname mesagl |
173 |
%define old_eglmajor 1 |
174 |
%define old_glmajor 1 |
175 |
%define libold_eglname %mklibname %{old_eglname} %{old_eglmajor} |
176 |
%define libold_glname %mklibname %{old_glname} %{old_glmajor} |
177 |
%endif |
178 |
|
179 |
%ifnarch %{arm} |
180 |
%global with_radeonsi 1 |
181 |
%endif |
182 |
|
183 |
#global with_docs 1 |
184 |
|
185 |
%global dri_drivers %{?base_dri}%{?platform_dri} |
186 |
%global vulkan_drivers swrast%{?base_vulkan}%{?platform_vulkan} |
187 |
|
188 |
Name: mesa |
189 |
Version: %{main_version} |
190 |
Release: %{release} |
191 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
192 |
Group: System/Libraries |
193 |
|
194 |
# temp force new gcc |
195 |
BuildRequires: gcc >= 10.3.0-1 |
196 |
|
197 |
# for building docs |
198 |
%if 0%{?with_docs} |
199 |
BuildRequires: doxygen |
200 |
%endif |
201 |
|
202 |
BuildRequires: pkgconfig(libdrm) >= 2.4.109 |
203 |
BuildRequires: pkgconfig(expat) |
204 |
BuildRequires: pkgconfig(zlib) >= 1.2.3 |
205 |
BuildRequires: pkgconfig(wayland-protocols) >= 1.8 |
206 |
BuildRequires: pkgconfig(wayland-client) >= 1.11 |
207 |
BuildRequires: pkgconfig(wayland-server) >= 1.11 |
208 |
BuildRequires: pkgconfig(x11) |
209 |
BuildRequires: pkgconfig(xext) |
210 |
BuildRequires: pkgconfig(xdamage) >= 1.1 |
211 |
BuildRequires: pkgconfig(xfixes) |
212 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
213 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
214 |
BuildRequires: x11-proto-devel >= 7.3 |
215 |
BuildRequires: pkgconfig(xcb-glx) >= 1.8.1 |
216 |
BuildRequires: pkgconfig(xxf86vm) |
217 |
BuildRequires: pkgconfig(xcb) |
218 |
BuildRequires: pkgconfig(x11-xcb) |
219 |
BuildRequires: pkgconfig(xcb-dri3) |
220 |
BuildRequires: pkgconfig(xcb-present) |
221 |
BuildRequires: pkgconfig(xcb-sync) |
222 |
BuildRequires: pkgconfig(xshmfence) >= 1.1 |
223 |
BuildRequires: pkgconfig(dri2proto) >= 2.8 |
224 |
BuildRequires: pkgconfig(glproto) >= 1.4.14 |
225 |
BuildRequires: pkgconfig(xcb-xfixes) |
226 |
BuildRequires: pkgconfig(xcb-randr) |
227 |
BuildRequires: pkgconfig(xi) >= 1.3 |
228 |
BuildRequires: pkgconfig(xrandr) >= 1.3 |
229 |
BuildRequires: bison |
230 |
BuildRequires: flex |
231 |
BuildRequires: pkgconfig(vdpau) >= 1.1 |
232 |
%if 0%{?with_vaapi} |
233 |
BuildRequires: pkgconfig(libva) >= 0.38.0 |
234 |
%endif |
235 |
%if 0%{?with_omx} |
236 |
BuildRequires: pkgconfig(libomxil-bellagio) |
237 |
%endif |
238 |
BuildRequires: pkgconfig(libelf) |
239 |
%if 0%{?with_glvnd} |
240 |
BuildRequires: pkgconfig(libglvnd) >= 1.3.2 |
241 |
%endif |
242 |
BuildRequires: llvm-devel >= 7.0.0 |
243 |
%if 0%{?with_opencl} |
244 |
BuildRequires: clang-devel |
245 |
BuildRequires: pkgconfig(libclc) >= 0.2.0-6 |
246 |
BuildRequires: polly |
247 |
%endif |
248 |
BuildRequires: pkgconfig(talloc) |
249 |
BuildRequires: meson >= 0.52 |
250 |
BuildRequires: pkgconfig(libudev) |
251 |
%if 0%{?with_valgrind} |
252 |
BuildRequires: pkgconfig(valgrind) |
253 |
%endif |
254 |
%if %mgaversion < 8 |
255 |
BuildRequires: python2-libxml2 |
256 |
BuildRequires: python2-mako |
257 |
%endif |
258 |
BuildRequires: python3-libxml2 |
259 |
BuildRequires: python3-mako |
260 |
BuildRequires: vulkan-headers |
261 |
BuildRequires: glslang |
262 |
%if 0%{?with_vulkan_hw} |
263 |
BuildRequires: pkgconfig(vulkan) |
264 |
%endif |
265 |
BuildRequires: libgcrypt-devel |
266 |
BuildRequires: lm_sensors-devel |
267 |
BuildRequires: pkgconfig(libzstd) |
268 |
%ifnarch %{arm} |
269 |
BuildRequires: pkgconfig(libunwind) |
270 |
%endif |
271 |
|
272 |
URL: https://www.mesa3d.org |
273 |
%if %{git} |
274 |
#Source0: %{name}-%{git}.tar.bz2 |
275 |
# (blino) snapshot of 13.0 branch |
276 |
Source0: %{name}-%{git_branch}-%{git}.tar.xz |
277 |
%else |
278 |
Source0: https://mesa.freedesktop.org/archive/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz |
279 |
%endif |
280 |
Source3: make-git-snapshot.sh |
281 |
|
282 |
# mesa staging/21.3 branch from 1 (https://www.mesa3d.org/releasing.html#stagingbranch) |
283 |
|
284 |
# mesa master branch from 200 |
285 |
Patch302: 0302-driconf-enable-glthread-for-Minecraft.patch |
286 |
Patch303: 0303-driconf-enable-glthread-for-Basemark-GPU.patch |
287 |
|
288 |
# mesa pending fixes from 300 |
289 |
|
290 |
#------------------------------------------------------------------------------ |
291 |
|
292 |
# package mesa |
293 |
License: MIT |
294 |
Requires: %{libglname} = %{version}-%{release} |
295 |
Requires: %{vulkandrivers} = %{version}-%{release} |
296 |
|
297 |
%package -n %{libglname} |
298 |
Summary: Files for Mesa (GL and GLX libs) |
299 |
Group: System/Libraries |
300 |
Provides: %{libglname_virt} = %{version}-%{release} |
301 |
Requires: %{dridrivers} >= %{version}-%{release} |
302 |
%if 0%{?with_glvnd} |
303 |
Requires: %{libglname_glvnd} >= 1.3.1-7 |
304 |
Requires: %{libgldispatchname_glvnd} >= 1.3.1-7 |
305 |
Requires: %{libglxname_glvnd} >= 1.3.1-7 |
306 |
Requires: libglvnd >= 1.3.1-7 |
307 |
%endif |
308 |
%if 0%{?with_newname} |
309 |
Obsoletes: %{libold_glname} < %{version}-%{release} |
310 |
Provides: %{libold_glname} = %{version}-%{release} |
311 |
%endif |
312 |
|
313 |
%package -n %{dridrivers} |
314 |
Summary: Mesa DRI drivers |
315 |
Group: System/Libraries |
316 |
Provides: mesa-dri-drivers |
317 |
# do not require exact release to avoid conflicts when having |
318 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
319 |
Requires: mesa = %{version} |
320 |
|
321 |
%if 0%{?with_omx} |
322 |
%package omx-drivers |
323 |
Summary: Mesa-based OMX drivers |
324 |
%endif |
325 |
|
326 |
%package -n %{libd3dname} |
327 |
Summary: Mesa Direct3D9 state tracker |
328 |
Group: System/Libraries |
329 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
330 |
|
331 |
%package -n %{devd3dname} |
332 |
Summary: Development files for Mesa Direct3D9 state tracker |
333 |
Group: Development/C |
334 |
Requires: %{libd3dname} = %{version}-%{release} |
335 |
Provides: lib%{d3dname}-devel |
336 |
Provides: %{d3dname}-devel |
337 |
Provides: libd3d-devel |
338 |
Obsoletes: %{_lib}d3d1-devel < 21.0.0-0.rc5.4 |
339 |
|
340 |
%package -n %{devglname} |
341 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
342 |
Group: Development/C |
343 |
Requires: %{libglname} = %{version}-%{release} |
344 |
Requires: %{khrdevel} = %{version}-%{release} |
345 |
Provides: lib%{glname}-devel = %{version}-%{release} |
346 |
Provides: %{glname}-devel = %{version}-%{release} |
347 |
Provides: libMesaGL-devel = %{version}-%{release} |
348 |
Provides: MesaGL-devel = %{version}-%{release} |
349 |
Provides: libgl-devel |
350 |
%if 0%{?with_glvnd} |
351 |
Requires: %{glvnd_devname} |
352 |
%else |
353 |
Provides: GL-devel |
354 |
%endif |
355 |
%if 0%{?with_newname} |
356 |
Obsoletes: %{libold_glname}-devel < %{version}-%{release} |
357 |
Provides: %{libold_glname}-devel = %{version}-%{release} |
358 |
%endif |
359 |
Obsoletes: %{_lib}mesagl1-devel < 21.0.0-0.rc5.4 |
360 |
|
361 |
%package -n %{libeglname} |
362 |
Summary: Files for Mesa (EGL libs) |
363 |
Group: System/Libraries |
364 |
Provides: %{libeglname_virt} = %{version}-%{release} |
365 |
%if 0%{?with_glvnd} |
366 |
Requires: %{libeglname_glvnd} >= 1.3.1-7 |
367 |
Requires: %{libgldispatchname_glvnd} >= 1.3.1-7 |
368 |
Requires: %{libglxname_glvnd} >= 1.3.1-7 |
369 |
Requires: libglvnd >= 1.3.1-7 |
370 |
%endif |
371 |
%if 0%{?with_newname} |
372 |
Obsoletes: %{libold_eglname} < %{version}-%{release} |
373 |
Provides: %{libold_eglname} = %{version}-%{release} |
374 |
%endif |
375 |
|
376 |
%package -n %{deveglname} |
377 |
Summary: Development files for Mesa (EGL libs) |
378 |
Group: Development/C |
379 |
Requires: %{libeglname} = %{version}-%{release} |
380 |
Requires: %{khrdevel} = %{version}-%{release} |
381 |
Provides: lib%{eglname}-devel |
382 |
Provides: %{eglname}-devel |
383 |
Provides: libegl-devel |
384 |
%if 0%{?with_glvnd} |
385 |
Requires: %{glvnd_devname} |
386 |
%else |
387 |
Provides: EGL-devel |
388 |
%endif |
389 |
%if 0%{?with_newname} |
390 |
Obsoletes: %{libold_eglname}-devel < %{version}-%{release} |
391 |
Provides: %{libold_eglname}-devel = %{version}-%{release} |
392 |
%endif |
393 |
Obsoletes: %{_lib}mesaegl1-devel < 21.0.0-0.rc5.4 |
394 |
|
395 |
%package -n %{khrdevel} |
396 |
Summary: Mesa Khronos development headers |
397 |
Group: Development/C |
398 |
Provides: mesakhr-devel = %{version}-%{release} |
399 |
# ease upgrade mga6 -> mga7 (mga#25625) |
400 |
Conflicts: %{_lib}mesaegl1-devel < 17.3.9-2 |
401 |
%if 0%{?with_glvnd} |
402 |
Requires: %{glvnd_devname} |
403 |
%endif |
404 |
|
405 |
%package -n %{libosmesaname} |
406 |
Summary: Mesa offscreen rendering library |
407 |
Group: System/Libraries |
408 |
|
409 |
%package -n %{osmesadevel} |
410 |
Summary: Development files for libosmesa |
411 |
Group: Development/C |
412 |
Requires: %{libosmesaname} = %{version}-%{release} |
413 |
Provides: osmesa-devel = %{version}-%{release} |
414 |
%if 0%{?with_glvnd} |
415 |
Requires: %{glvnd_devname} |
416 |
%endif |
417 |
|
418 |
%package -n %{libglapiname} |
419 |
Summary: Files for mesa (glapi libs) |
420 |
Group: System/Libraries |
421 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
422 |
|
423 |
%package -n %{devglapiname} |
424 |
Summary: Development files for glapi libs |
425 |
Group: Development/C |
426 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
427 |
Provides: lib%{glapiname}-devel |
428 |
Provides: %{libglapiname}-devel |
429 |
Obsoletes: %{_lib}glapi0-devel < 21.0.0-0.rc5.4 |
430 |
|
431 |
%if 0%{?with_opencl} |
432 |
%package -n %libclname |
433 |
Summary: Mesa OpenCL runtime library |
434 |
#Requires: libclc%%{?_isa} |
435 |
#Requires: %%{name}-libgbm%%{?_isa} = %%{?epoch:%%{epoch}:}%%{version}-%%{release} |
436 |
|
437 |
%package -n %libcldevel |
438 |
Summary: Mesa OpenCL development package |
439 |
Requires: %libclname%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} |
440 |
%endif |
441 |
|
442 |
%package -n %{libglesv1name} |
443 |
Summary: Files for Mesa (glesv1 libs) |
444 |
Group: System/Libraries |
445 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
446 |
%if 0%{?with_glvnd} |
447 |
Requires: %{libglesv1name_glvnd} >= 1.3.1-7 |
448 |
%endif |
449 |
|
450 |
%package -n %{devglesv1name} |
451 |
Summary: Development files for glesv1 libs |
452 |
Group: Development/C |
453 |
Requires: %{libglesv1name} = %{version}-%{release} |
454 |
Requires: %{khrdevel} = %{version}-%{release} |
455 |
Provides: lib%{glesv1name}-devel |
456 |
Provides: %{glesv1name}-devel |
457 |
Provides: libglesv1-devel |
458 |
%if 0%{?with_glvnd} |
459 |
Requires: %{glvnd_devname} |
460 |
%endif |
461 |
Obsoletes: %{_lib}mesaglesv1_1-devel < 21.0.0-0.rc5.4 |
462 |
|
463 |
%package -n %{libglesv2name} |
464 |
Summary: Files for Mesa (glesv2 libs) |
465 |
Group: System/Libraries |
466 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
467 |
%if 0%{?with_glvnd} |
468 |
Requires: %{libglesv2name_glvnd} >= 1.3.1-7 |
469 |
%endif |
470 |
|
471 |
%package -n %{devglesv2name} |
472 |
Summary: Development files for glesv2 libs |
473 |
Group: Development/C |
474 |
Requires: %{libglesv2name} = %{version}-%{release} |
475 |
Requires: %{khrdevel} = %{version}-%{release} |
476 |
Provides: lib%{glesv2name}-devel |
477 |
Provides: %{glesv2name}-devel |
478 |
Provides: libglesv2-devel |
479 |
%if 0%{?with_glvnd} |
480 |
Requires: %{glvnd_devname} |
481 |
%endif |
482 |
Obsoletes: %{_lib}mesaglesv2_2-devel < 21.0.0-0.rc5.4 |
483 |
|
484 |
%package -n %{libgbmname} |
485 |
Summary: Files for Mesa (gbm libs) |
486 |
Group: System/Libraries |
487 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
488 |
|
489 |
%package -n %{devgbmname} |
490 |
Summary: Development files for Mesa (gbm libs) |
491 |
Group: Development/C |
492 |
Requires: %{libgbmname} = %{version}-%{release} |
493 |
Provides: lib%{gbmname}-devel |
494 |
Provides: %{gbmname}-devel |
495 |
Obsoletes: %{_lib}gbm1-devel < 21.0.0-0.rc5.4 |
496 |
|
497 |
%package -n %{_lib}vdpau-driver-nouveau |
498 |
Summary: VDPAU plugin for nouveau driver |
499 |
Group: System/Libraries |
500 |
# temporary: |
501 |
%rename vdpau-driver-nouveau |
502 |
|
503 |
%package -n %{_lib}vdpau-driver-r300 |
504 |
Summary: VDPAU plugin for r300 driver |
505 |
Group: System/Libraries |
506 |
# temporary: |
507 |
%rename vdpau-driver-r300 |
508 |
|
509 |
%package -n %{_lib}vdpau-driver-r600 |
510 |
Summary: VDPAU plugin for r600 driver |
511 |
Group: System/Libraries |
512 |
# temporary: |
513 |
%rename vdpau-driver-r600 |
514 |
|
515 |
%package -n %{_lib}vdpau-driver-radeonsi |
516 |
Summary: VDPAU plugin for radeonsi driver |
517 |
Group: System/Libraries |
518 |
# temporary: |
519 |
%rename vdpau-driver-radeonsi |
520 |
|
521 |
%package -n %{libxaname} |
522 |
Summary: Files for Mesa XA state tracker |
523 |
Group: System/Libraries |
524 |
Provides: %{libxaname_virt} = %{version}-%{release} |
525 |
|
526 |
%package -n %{devxaname} |
527 |
Summary: Development files for XA libs |
528 |
Group: Development/C |
529 |
Requires: %{libxaname_virt} = %{version}-%{release} |
530 |
Provides: lib%{xaname}-devel |
531 |
Provides: %{libxaname}-devel |
532 |
Obsoletes: %{_lib}xatracker2-devel < 21.0.0-0.rc5.4 |
533 |
|
534 |
%package -n %{vulkandrivers} |
535 |
Summary: Mesa Vulkan driver for Intel and Radeon GPUs |
536 |
Group: System/Libraries |
537 |
%ifarch %{ix86} x86_64 |
538 |
Obsoletes: %{_lib}vulkan_intel < 18.3.0-4 |
539 |
Provides: %{_lib}vulkan_intel = %{version}-%{release} |
540 |
%endif |
541 |
Obsoletes: %{_lib}vulkan_radeon < 18.3.0-4 |
542 |
Provides: %{_lib}vulkan_radeon = %{version}-%{release} |
543 |
|
544 |
%package -n %{vulkandevel} |
545 |
Summary: Mesa Vulkan development files for Intel and Radeon drivers |
546 |
Group: Development/C |
547 |
Requires: %{vulkandrivers} = %{version}-%{release} |
548 |
Obsoletes: %{_lib}vulkan-devel < 0:18.3.0-4 |
549 |
Provides: %{vulkanname}-devel = %{version}-%{release} |
550 |
|
551 |
%if 0%{?with_openswr} |
552 |
%package -n %{libopenswrname} |
553 |
Summary: Mesa OpenSWR libs for AVX/AVX2/AVX512 based architectures |
554 |
Group: System/Libraries |
555 |
Provides: %{libopenswrname_virt} = %{version}-%{release} |
556 |
|
557 |
%package -n %{devopenswrname} |
558 |
Summary: Development files for OpenSWR libs |
559 |
Group: Development/C |
560 |
Requires: %{libopenswrname_virt} = %{version}-%{release} |
561 |
Provides: lib%{libopenswrname}-devel |
562 |
Provides: %{libopenswrname}-devel |
563 |
Obsoletes: %{_lib}openswr0-devel < 21.0.0-0.rc5.4 |
564 |
%endif |
565 |
|
566 |
%package common-devel |
567 |
Summary: Meta package for mesa devel |
568 |
Group: Development/C |
569 |
Requires: %{devglname} = %{version} |
570 |
Requires: mesaglu-devel |
571 |
Requires: freeglut-devel |
572 |
Requires: %{deveglname} = %{version} |
573 |
Requires: %{devglesv1name} = %{version} |
574 |
Requires: %{devglesv2name} = %{version} |
575 |
|
576 |
#------------------------------------------------------------------------------ |
577 |
|
578 |
%description |
579 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
580 |
|
581 |
%description common-devel |
582 |
Mesa common metapackage devel |
583 |
|
584 |
%description -n %{libeglname} |
585 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
586 |
EGL parts. |
587 |
|
588 |
%description -n %{deveglname} |
589 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
590 |
EGL development parts. |
591 |
|
592 |
%description -n %{libglname} |
593 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
594 |
GL and GLX parts. |
595 |
|
596 |
%description -n %{dridrivers} |
597 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
598 |
DRI drivers. |
599 |
|
600 |
%if 0%{?with_omx} |
601 |
%description omx-drivers |
602 |
Mesa-based OMX drivers |
603 |
%endif |
604 |
|
605 |
%description -n %{devglname} |
606 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
607 |
|
608 |
This package contains the headers needed to compile Mesa programs. |
609 |
|
610 |
%description -n %{libglesv1name} |
611 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
612 |
well-defined subset profiles of OpenGL. |
613 |
|
614 |
This package provides the OpenGL ES library version 1. |
615 |
|
616 |
%description -n %{khrdevel} |
617 |
Mesa Khronos development headers. |
618 |
|
619 |
%description -n %{libosmesaname} |
620 |
Mesa offscreen rendering libraries for rendering OpenGL into |
621 |
application-allocated blocks of memory. |
622 |
|
623 |
%description -n %{osmesadevel} |
624 |
This package contains the headers needed to compile programs against |
625 |
the Mesa offscreen rendering library. |
626 |
|
627 |
%description -n %{libglapiname} |
628 |
This packages provides the glapi shared library used by gallium. |
629 |
|
630 |
%description -n %{devglapiname} |
631 |
This package contains the headers needed to compile programes against glapi shared library. |
632 |
|
633 |
%if 0%{?with_opencl} |
634 |
%description -n %libclname |
635 |
Mesa OpenCL runtime library |
636 |
|
637 |
%description -n %libcldevel |
638 |
Mesa OpenCL development package |
639 |
%endif |
640 |
|
641 |
%description -n %{devglesv1name} |
642 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
643 |
|
644 |
%description -n %{libd3dname} |
645 |
Mesa Direct3D9 state tracker. |
646 |
|
647 |
%description -n %{devd3dname} |
648 |
Mesa Direct3D9 state tracker development package. |
649 |
|
650 |
%description -n %{libglesv2name} |
651 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
652 |
well-defined subset profiles of OpenGL. |
653 |
|
654 |
This package provides the OpenGL ES library version 2. |
655 |
|
656 |
%description -n %{devglesv2name} |
657 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
658 |
|
659 |
%description -n %{libgbmname} |
660 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
661 |
GBM (Graphics Buffer Manager) parts. |
662 |
|
663 |
%description -n %{devgbmname} |
664 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
665 |
GBM (Graphics Buffer Manager) development parts. |
666 |
|
667 |
%description -n %{libxaname} |
668 |
This packages provides the xa shared library used by gallium. |
669 |
|
670 |
%description -n %{devxaname} |
671 |
This package contains the headers needed to compile programes against xa shared library. |
672 |
|
673 |
%description -n %{_lib}vdpau-driver-nouveau |
674 |
This packages provides a VPDAU plugin to enable video acceleration |
675 |
with the nouveau driver. |
676 |
|
677 |
%description -n %{_lib}vdpau-driver-r300 |
678 |
This packages provides a VPDAU plugin to enable video acceleration |
679 |
with the r300 driver. |
680 |
|
681 |
%description -n %{_lib}vdpau-driver-r600 |
682 |
This packages provides a VPDAU plugin to enable video acceleration |
683 |
with the r600 driver. |
684 |
|
685 |
%description -n %{_lib}vdpau-driver-radeonsi |
686 |
This packages provides a VPDAU plugin to enable video acceleration |
687 |
with the radeonsi driver. |
688 |
|
689 |
%description -n %{vulkandrivers} |
690 |
This package contains the Vulkan parts for Mesa's Intel and Radeon drivers. |
691 |
|
692 |
%description -n %{vulkandevel} |
693 |
This package contains the development files for Mesa's Vulkan implementation. |
694 |
|
695 |
%if 0%{?with_openswr} |
696 |
%description -n %{libopenswrname} |
697 |
This packages provides the OpenSWR shared libraries. |
698 |
|
699 |
OpenSWR (former http://www.openswr.org) is a high performance, highly |
700 |
scalable OpenGL-compatible software rasterizer that fully utilizes |
701 |
Advanced Vector Extension instruction set (AVX, AVX2 and AVX512) to |
702 |
achieve high rendering performance. |
703 |
|
704 |
%description -n %{devopenswrname} |
705 |
This package contains the headers needed to compile programes against |
706 |
OpenSWR shared libraries. |
707 |
%endif |
708 |
|
709 |
#------------------------------------------------------------------------------ |
710 |
|
711 |
%prep |
712 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
713 |
|
714 |
# remove unused docs |
715 |
rm -f docs/README.WIN32 |
716 |
|
717 |
%if %mgaversion >= 8 |
718 |
# Make sure the build uses gnu++14 as llvm 10 headers require that |
719 |
sed -i -e 's/cpp_std=gnu++11/cpp_std=gnu++14/g' meson.build |
720 |
%endif |
721 |
|
722 |
%build |
723 |
%meson \ |
724 |
-Dcpp_std=gnu++14 \ |
725 |
-Dplatforms=x11,wayland \ |
726 |
-Ddri3=enabled \ |
727 |
-Ddri-drivers=%{?dri_drivers} \ |
728 |
-Dosmesa=true \ |
729 |
%ifarch %{ix86} |
730 |
-Dsse2=false \ |
731 |
%endif |
732 |
%if 0%{?with_hardware} |
733 |
-Dgallium-drivers=swrast,virgl,nouveau,r300%{?with_crocus:,crocus}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_kmsro:,kmsro}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink}%{?with_openswr:,swr} \ |
734 |
%else |
735 |
-Dgallium-drivers=swrast,virgl \ |
736 |
%endif |
737 |
%if 0%{?with_openswr} |
738 |
-Dswr-arches=avx,avx2,skx \ |
739 |
%endif |
740 |
-Dgallium-vdpau=%{?with_vdpau:enabled}%{!?with_vdpau:disabled} \ |
741 |
-Dgallium-xvmc=disabled \ |
742 |
-Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \ |
743 |
-Dgallium-va=%{?with_vaapi:enabled}%{!?with_vaapi:disabled} \ |
744 |
-Dgallium-xa=%{?with_xa:enabled}%{!?with_xa:disabled} \ |
745 |
-Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \ |
746 |
%if 0%{?with_opencl} |
747 |
-Dgallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \ |
748 |
%endif |
749 |
-Dvulkan-drivers=%{?vulkan_drivers} \ |
750 |
-Dvulkan-layers=device-select \ |
751 |
-Dshared-glapi=enabled \ |
752 |
-Dgles1=enabled \ |
753 |
-Dgles2=enabled \ |
754 |
-Dopengl=true \ |
755 |
-Dgbm=enabled \ |
756 |
-Dglx=dri \ |
757 |
-Degl=enabled \ |
758 |
%if 0%{?with_glvnd} |
759 |
-Dglvnd=true \ |
760 |
%endif |
761 |
-Dgallium-extra-hud=true \ |
762 |
-Dlmsensors=enabled \ |
763 |
-Dmicrosoft-clc=disabled \ |
764 |
-Dllvm=enabled \ |
765 |
-Dshared-llvm=enabled \ |
766 |
-Dvalgrind=%{?with_valgrind:enabled}%{!?with_valgrind:disabled} \ |
767 |
-Dbuild-tests=false \ |
768 |
-Dselinux=false \ |
769 |
%{nil} |
770 |
%meson_build |
771 |
|
772 |
# build docs |
773 |
%if 0%{?with_docs} |
774 |
(cd doxygen |
775 |
make |
776 |
) |
777 |
%endif |
778 |
|
779 |
%install |
780 |
%meson_install |
781 |
|
782 |
# FIXME: strip will likely break the hardlink |
783 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
784 |
# to prevent proprietary driver installers from removing them |
785 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
786 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
787 |
for l in \ |
788 |
%if 0%{?with_glvnd} |
789 |
../libGLX_mesa.so.* \ |
790 |
%else |
791 |
../libGL.so.* \ |
792 |
%endif |
793 |
; do cp -a $l .; done |
794 |
popd |
795 |
|
796 |
%if 0%{?with_glvnd} |
797 |
# default provider for indirect rendering when vendor is not determined |
798 |
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0 |
799 |
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0 |
800 |
%endif |
801 |
|
802 |
%ifarch %{x86_64} |
803 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
804 |
%endif |
805 |
|
806 |
# libvdpau opens the versioned name, don't bother including the unversioned |
807 |
rm -f %{buildroot}%{_libdir}/vdpau/*.so |
808 |
|
809 |
# strip out useless headers |
810 |
rm -f %{buildroot}%{_includedir}/GL/w*.h |
811 |
|
812 |
# remove .la files |
813 |
find %{buildroot} -name '*.la' -delete |
814 |
|
815 |
#------------------------------------------------------------------------------ |
816 |
|
817 |
%files |
818 |
/usr/share/drirc.d/ |
819 |
|
820 |
%files -n %{dridrivers} |
821 |
%dir %{_libdir}/dri |
822 |
%{_libdir}/dri/*_dri.so |
823 |
%if 0%{?with_vaapi} |
824 |
%{_libdir}/dri/*_drv*.so |
825 |
%endif |
826 |
%if 0%{?with_opencl} |
827 |
%dir %{_libdir}/gallium-pipe |
828 |
%{_libdir}/gallium-pipe/*.so |
829 |
%endif |
830 |
|
831 |
%if 0%{?with_omx} |
832 |
%files omx-drivers |
833 |
%{_libdir}/bellagio/libomx_mesa.so |
834 |
%endif |
835 |
|
836 |
%if 0%{?with_opencl} |
837 |
%files -n %libclname |
838 |
%{_libdir}/libMesaOpenCL.so.* |
839 |
%{_sysconfdir}/OpenCL/vendors/mesa.icd |
840 |
|
841 |
%files -n %libcldevel |
842 |
%{_libdir}/libMesaOpenCL.so |
843 |
%endif |
844 |
|
845 |
%files -n %{libglname} |
846 |
%dir %{_libdir}/mesa |
847 |
%if 0%{?with_glvnd} |
848 |
%{_libdir}/libGLX_mesa.so.* |
849 |
%{_libdir}/mesa/libGLX_mesa.so.* |
850 |
%{_libdir}/libGLX_indirect.so.* |
851 |
%{_libdir}/libGLX_system.so.* |
852 |
%else |
853 |
%{_libdir}/libGL.so.* |
854 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
855 |
%endif |
856 |
|
857 |
%files -n %{libeglname} |
858 |
%if 0%{?with_glvnd} |
859 |
%{_libdir}/libEGL_mesa.so.* |
860 |
%{_datadir}/glvnd/egl_vendor.d/50_mesa.json |
861 |
%else |
862 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
863 |
%endif |
864 |
|
865 |
%files -n %{libosmesaname} |
866 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
867 |
|
868 |
%files -n %{libglapiname} |
869 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
870 |
|
871 |
%files -n %{libglesv1name} |
872 |
%if 0%{?with_glvnd} == 0 |
873 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
874 |
%endif |
875 |
|
876 |
%files -n %{libd3dname} |
877 |
%{_libdir}/d3d/*.so.* |
878 |
|
879 |
%files -n %{libglesv2name} |
880 |
%if 0%{?with_glvnd} == 0 |
881 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
882 |
%endif |
883 |
|
884 |
%files -n %{libgbmname} |
885 |
%{_libdir}/libgbm.so.%{gbmmajor} |
886 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
887 |
|
888 |
%files -n %{libxaname} |
889 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
890 |
|
891 |
%files -n %{devglname} |
892 |
%dir %{_includedir}/GL |
893 |
%if 0%{?with_glvnd} |
894 |
%{_libdir}/libGLX_mesa.so |
895 |
%else |
896 |
%{_includedir}/GL/gl.h |
897 |
%{_includedir}/GL/glext.h |
898 |
%{_includedir}/GL/glx.h |
899 |
%{_includedir}/GL/glxext.h |
900 |
%{_includedir}/GL/glcorearb.h |
901 |
%{_libdir}/libGL.so |
902 |
%{_libdir}/pkgconfig/gl.pc |
903 |
%endif |
904 |
%dir %{_includedir}/GL/internal |
905 |
%{_includedir}/GL/internal/dri_interface.h |
906 |
%{_libdir}/pkgconfig/dri.pc |
907 |
|
908 |
%files common-devel |
909 |
|
910 |
%files -n %{deveglname} |
911 |
%{_includedir}/EGL |
912 |
%if 0%{?with_glvnd} |
913 |
%{_libdir}/libEGL_mesa.so |
914 |
%else |
915 |
%{_libdir}/libEGL.so |
916 |
%{_libdir}/pkgconfig/egl.pc |
917 |
%endif |
918 |
|
919 |
%files -n %{khrdevel} |
920 |
%if 0%{?with_glvnd} == 0 |
921 |
%{_includedir}/KHR |
922 |
%endif |
923 |
|
924 |
%files -n %{osmesadevel} |
925 |
%if 0%{?with_docs} |
926 |
%doc docs doxygen/main |
927 |
%endif |
928 |
%dir %{_includedir}/GL |
929 |
%{_includedir}/GL/osmesa.h |
930 |
%{_libdir}/libOSMesa.so |
931 |
%{_libdir}/pkgconfig/osmesa.pc |
932 |
|
933 |
%files -n %{devglapiname} |
934 |
%{_libdir}/libglapi.so |
935 |
|
936 |
%files -n %{devglesv1name} |
937 |
%if 0%{?with_glvnd} == 0 |
938 |
%{_includedir}/GLES |
939 |
%{_libdir}/libGLESv1_CM.so |
940 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
941 |
%endif |
942 |
|
943 |
%files -n %{devglesv2name} |
944 |
%if 0%{?with_glvnd} == 0 |
945 |
%{_includedir}/GLES2 |
946 |
%{_includedir}/GLES3 |
947 |
%{_libdir}/libGLESv2.so |
948 |
%{_libdir}/pkgconfig/glesv2.pc |
949 |
%endif |
950 |
|
951 |
%files -n %{devd3dname} |
952 |
%{_includedir}/d3dadapter |
953 |
%{_libdir}/d3d/*.so |
954 |
%{_libdir}/pkgconfig/d3d.pc |
955 |
|
956 |
%files -n %{devgbmname} |
957 |
%{_libdir}/libgbm.so |
958 |
%{_includedir}/gbm.h |
959 |
%{_libdir}/pkgconfig/gbm.pc |
960 |
|
961 |
%files -n %{devxaname} |
962 |
%{_libdir}/libxatracker.so |
963 |
%{_includedir}/xa_tracker.h |
964 |
%{_includedir}/xa_composite.h |
965 |
%{_includedir}/xa_context.h |
966 |
%{_libdir}/pkgconfig/xatracker.pc |
967 |
|
968 |
%files -n %{_lib}vdpau-driver-nouveau |
969 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
970 |
|
971 |
%files -n %{_lib}vdpau-driver-r300 |
972 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
973 |
|
974 |
%if 0%{?with_radeonsi} |
975 |
%files -n %{_lib}vdpau-driver-r600 |
976 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
977 |
|
978 |
%files -n %{_lib}vdpau-driver-radeonsi |
979 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
980 |
%endif |
981 |
|
982 |
%files -n %{vulkandrivers} |
983 |
%dir %{_datadir}/vulkan |
984 |
%dir %{_datadir}/vulkan/icd.d |
985 |
%{_libdir}/libvulkan_lvp.so |
986 |
%{_datadir}/vulkan/icd.d/lvp_icd.*.json |
987 |
%{_libdir}/libVkLayer_MESA_device_select.so |
988 |
%{_datadir}/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json |
989 |
%if 0%{?with_vulkan_hw} |
990 |
%{_libdir}/libvulkan_radeon.so |
991 |
%{_datadir}/vulkan/icd.d/radeon_icd.*.json |
992 |
%ifarch %{ix86} x86_64 |
993 |
%{_libdir}/libvulkan_intel.so |
994 |
%{_datadir}/vulkan/icd.d/intel_icd.*.json |
995 |
%endif |
996 |
%ifarch %{arm} aarch64 |
997 |
%{_libdir}/libvulkan_broadcom.so |
998 |
%{_datadir}/vulkan/icd.d/broadcom_icd.*.json |
999 |
%{_libdir}/libvulkan_freedreno.so |
1000 |
%{_datadir}/vulkan/icd.d/freedreno_icd.*.json |
1001 |
%endif |
1002 |
%endif |
1003 |
|
1004 |
%files -n %{vulkandevel} |
1005 |
|
1006 |
%if 0%{?with_openswr} |
1007 |
%files -n %{libopenswrname} |
1008 |
%{_libdir}/libswrAVX.so.%{openswrmajor}{,.*} |
1009 |
%{_libdir}/libswrAVX2.so.%{openswrmajor}{,.*} |
1010 |
%{_libdir}/libswrSKX.so.%{openswrmajor}{,.*} |
1011 |
# these libraries are opened for proper openswr working, instead of the |
1012 |
# libswr*.so.0 files, so do not move to the -devel package. |
1013 |
%{_libdir}/libswrAVX.so |
1014 |
%{_libdir}/libswrAVX2.so |
1015 |
%{_libdir}/libswrSKX.so |
1016 |
|
1017 |
#%%files -n %%{devopenswrname} |
1018 |
#{_libdir}/libswrAVX.so |
1019 |
#{_libdir}/libswrAVX2.so |
1020 |
#{_libdir}/libswrSKX.so |
1021 |
%endif |