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 18.0 |
10 |
|
11 |
%define opengl_ver 4.5 |
12 |
|
13 |
# define version, RC & release |
14 |
%define main_version 18.1.0 |
15 |
%define relc 1 |
16 |
%define rel 1 |
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 d3dname d3d |
31 |
%define eglname mesaegl |
32 |
%define glname mesagl |
33 |
%define glwname mesaglw |
34 |
%define glesv1name mesaglesv1 |
35 |
%define glesv2name mesaglesv2 |
36 |
%define glapiname glapi |
37 |
%define gbmname gbm |
38 |
%define waylandeglname wayland-egl |
39 |
%define xaname xatracker |
40 |
%define vulkanname vulkan |
41 |
|
42 |
%define d3dmajor 1 |
43 |
%define eglmajor 1 |
44 |
%define glmajor 1 |
45 |
%define glwmajor 1 |
46 |
%define glesv1major 1 |
47 |
%define glesv2major 2 |
48 |
%define glapimajor 0 |
49 |
%define gbmmajor 1 |
50 |
%define waylandeglmajor 1 |
51 |
%define osmesamajor 8 |
52 |
%define xamajor 2 |
53 |
|
54 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
55 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
56 |
%define libglname %mklibname %{glname} %{glmajor} |
57 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
58 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
59 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
60 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
61 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
62 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
63 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
64 |
%define libxaname %mklibname %{xaname} %{xamajor} |
65 |
%define libvulkanname %mklibname %{vulkanname} |
66 |
|
67 |
%define dridrivers %mklibname dri-drivers |
68 |
|
69 |
%define osmesadevel %mklibname osmesa -d |
70 |
|
71 |
# Architecture-independent Virtual provides: |
72 |
%define libd3dname_virt lib%{d3dname} |
73 |
%define libeglname_virt lib%{eglname} |
74 |
%define libglname_virt lib%{glname} |
75 |
%define libglwname_virt lib%{glwname} |
76 |
%define libglesv1name_virt lib%{glesv1name} |
77 |
%define libglesv2name_virt lib%{glesv2name} |
78 |
%define libglapiname_virt lib%{glapiname} |
79 |
%define libgbmname_virt lib%{gbmname} |
80 |
%define libwaylandeglname_virt lib%{waylandeglname} |
81 |
%define libxaname_virt lib%{xaname} |
82 |
|
83 |
%define oldlibglname %mklibname MesaGL 1 |
84 |
|
85 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
86 |
|
87 |
%define with_vaapi 1 |
88 |
|
89 |
# (akien) Not adding on arm as it would break the build there |
90 |
%define enable_vulkan 0 |
91 |
%ifarch %{ix86} x86_64 |
92 |
%define enable_vulkan 1 |
93 |
%endif |
94 |
|
95 |
|
96 |
%ifarch %{arm} aarch64 |
97 |
%define with_etnaviv 1 |
98 |
%define with_freedreno 1 |
99 |
%define with_vc4 1 |
100 |
%endif |
101 |
|
102 |
%define base_drivers swrast,nouveau,radeon,r200 |
103 |
%ifarch %{ix86} x86_64 |
104 |
%define platform_drivers ,i915,i965 |
105 |
%define gallium_platform_drivers ,svga |
106 |
%endif |
107 |
|
108 |
%define with_wayland_egl 0 |
109 |
|
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 |
# temp force new gcc |
119 |
BuildRequires: gcc >= 5.4.0-2 |
120 |
|
121 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
122 |
BuildRequires: pkgconfig(xshmfence) |
123 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
124 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
125 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
126 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
127 |
BuildRequires: pkgconfig(expat) >= 2.0.1 |
128 |
BuildRequires: gccmakedep |
129 |
BuildRequires: x11-proto-devel >= 7.3 |
130 |
BuildRequires: pkgconfig(libdrm) >= 2.4.91 |
131 |
BuildRequires: pkgconfig(xcb-dri3) |
132 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
133 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
134 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
135 |
BuildRequires: pkgconfig(xi) >= 1.3 |
136 |
BuildRequires: pkgconfig(talloc) |
137 |
BuildRequires: python3-libxml2 |
138 |
BuildRequires: python3-mako |
139 |
BuildRequires: makedepend |
140 |
BuildRequires: bison |
141 |
BuildRequires: flex |
142 |
BuildRequires: pkgconfig(libelf) |
143 |
BuildRequires: llvm-devel >= 3.9.1-5 |
144 |
BuildRequires: pkgconfig(libudev) |
145 |
%if 0%{?with_vaapi} |
146 |
BuildRequires: pkgconfig(libva) |
147 |
%endif |
148 |
BuildRequires: pkgconfig(vdpau) |
149 |
BuildRequires: pkgconfig(wayland-client) |
150 |
BuildRequires: pkgconfig(wayland-server) |
151 |
BuildRequires: pkgconfig(wayland-protocols) |
152 |
%if %{enable_vulkan} |
153 |
BuildRequires: libgcrypt-devel |
154 |
%endif |
155 |
BuildRequires: pkgconfig(wayland-protocols) >= 1.8 |
156 |
|
157 |
URL: http://www.mesa3d.org |
158 |
%if %{git} |
159 |
#Source0: %{name}-%{git}.tar.bz2 |
160 |
# (blino) snapshot of 13.0 branch |
161 |
Source0: %{name}-%{git_branch}-%{git}.tar.xz |
162 |
%else |
163 |
Source0: https://mesa.freedesktop.org/archive/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz |
164 |
%endif |
165 |
Source3: make-git-snapshot.sh |
166 |
|
167 |
# Instructions to setup your repository clone |
168 |
# git://git.freedesktop.org/git/mesa/mesa |
169 |
# git checkout mesa_7_5_branch |
170 |
# git branch mdv-cherry-picks |
171 |
# git am ../02??-*.patch |
172 |
# git branch mdv-redhat |
173 |
# git am ../03??-*.patch |
174 |
# git branch mdv-patches |
175 |
# git am ../09??-*.patch |
176 |
# In order to update to the branch via patches, issue this command: |
177 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
178 |
|
179 |
# Cherry picks |
180 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
181 |
|
182 |
# Patches "liberated" from Fedora: |
183 |
# http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/ |
184 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
185 |
|
186 |
# https://cgit.freedesktop.org/~ajax/mesa/log/?h=mesa-17.2-s3tc |
187 |
|
188 |
# Patches from ChromiumOS |
189 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
190 |
|
191 |
# Mageia/Mandriva patches |
192 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
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 |
|
212 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
213 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
214 |
Conflicts: x11-server-common < 1.3.0.0-17 |
215 |
|
216 |
%package -n %{dridrivers} |
217 |
Summary: Mesa DRI drivers |
218 |
Group: System/Libraries |
219 |
# do not require exact release to avoid conflicts when having |
220 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
221 |
Requires: mesa = %{version} |
222 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
223 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
224 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
225 |
|
226 |
%package -n %{libd3dname} |
227 |
Summary: Mesa Direct3D9 state tracker |
228 |
Group: System/Libraries |
229 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
230 |
|
231 |
%package -n %{libd3dname}-devel |
232 |
Summary: Development files for Mesa Direct3D9 state tracker |
233 |
Group: Development/C |
234 |
Requires: %{libd3dname} = %{version}-%{release} |
235 |
Provides: lib%{d3dname}-devel |
236 |
Provides: %{d3dname}-devel |
237 |
Provides: libd3d-devel |
238 |
|
239 |
%package -n %{libglname}-devel |
240 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
241 |
Group: Development/C |
242 |
Requires: %{libglname} = %{version}-%{release} |
243 |
Provides: lib%{glname}-devel = %{version}-%{release} |
244 |
Provides: %{glname}-devel = %{version}-%{release} |
245 |
Provides: GL-devel |
246 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
247 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
248 |
Provides: libMesaGL-devel = %{version}-%{release} |
249 |
Provides: MesaGL-devel = %{version}-%{release} |
250 |
Provides: libgl-devel |
251 |
|
252 |
%package -n %{libeglname} |
253 |
Summary: Files for Mesa (EGL libs) |
254 |
Group: System/Libraries |
255 |
Provides: %{libeglname_virt} = %{version}-%{release} |
256 |
|
257 |
%package -n %{libeglname}-devel |
258 |
Summary: Development files for Mesa (EGL libs) |
259 |
Group: Development/C |
260 |
Requires: %{libeglname} = %{version}-%{release} |
261 |
Provides: EGL-devel |
262 |
Provides: lib%{eglname}-devel |
263 |
Provides: %{eglname}-devel |
264 |
Provides: libegl-devel |
265 |
|
266 |
%package -n %{libosmesaname} |
267 |
Summary: Mesa offscreen rendering library |
268 |
Group: System/Libraries |
269 |
|
270 |
%package -n %{osmesadevel} |
271 |
Summary: Development files for libosmesa |
272 |
Group: Development/C |
273 |
Requires: %{libosmesaname} = %{version}-%{release} |
274 |
Provides: osmesa-devel = %{version}-%{release} |
275 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
276 |
|
277 |
%package -n %{libglapiname} |
278 |
Summary: Files for mesa (glapi libs) |
279 |
Group: System/Libraries |
280 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
281 |
|
282 |
%package -n %{libglapiname}-devel |
283 |
Summary: Development files for glapi libs |
284 |
Group: Development/C |
285 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
286 |
Provides: lib%{glapiname}-devel |
287 |
Provides: %{libglapiname}-devel |
288 |
|
289 |
%package -n %{libglesv1name} |
290 |
Summary: Files for Mesa (glesv1 libs) |
291 |
Group: System/Libraries |
292 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
293 |
|
294 |
%package -n %{libglesv1name}-devel |
295 |
Summary: Development files for glesv1 libs |
296 |
Group: Development/C |
297 |
Requires: %{libglesv1name} = %{version}-%{release} |
298 |
Provides: lib%{glesv1name}-devel |
299 |
Provides: %{glesv1name}-devel |
300 |
Provides: libglesv1-devel |
301 |
|
302 |
%package -n %{libglesv2name} |
303 |
Summary: Files for Mesa (glesv2 libs) |
304 |
Group: System/Libraries |
305 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
306 |
|
307 |
%package -n %{libglesv2name}-devel |
308 |
Summary: Development files for glesv2 libs |
309 |
Group: Development/C |
310 |
Requires: %{libglesv2name} = %{version}-%{release} |
311 |
Requires: %{libeglname}-devel = %{version}-%{release} |
312 |
Provides: lib%{glesv2name}-devel |
313 |
Provides: %{glesv2name}-devel |
314 |
Provides: libglesv2-devel |
315 |
|
316 |
%package -n %{libgbmname} |
317 |
Summary: Files for Mesa (gbm libs) |
318 |
Group: System/Libraries |
319 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
320 |
|
321 |
%package -n %{libgbmname}-devel |
322 |
Summary: Development files for Mesa (gbm libs) |
323 |
Group: Development/C |
324 |
Requires: %{libgbmname} = %{version}-%{release} |
325 |
Provides: lib%{gbmname}-devel |
326 |
Provides: %{gbmname}-devel |
327 |
|
328 |
%if %{?with_wayland_egl} |
329 |
%package -n %{libwaylandeglname} |
330 |
Summary: Files for Mesa (Wayland EGL libs) |
331 |
Group: System/Libraries |
332 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
333 |
|
334 |
%package -n %{libwaylandeglname}-devel |
335 |
Summary: Development files for Mesa (Wayland EGL libs) |
336 |
Group: Development/C |
337 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
338 |
Provides: lib%{waylandeglname}-devel |
339 |
Provides: %{waylandeglname}-devel |
340 |
%endif |
341 |
|
342 |
%package -n %{_lib}vdpau-driver-nouveau |
343 |
Summary: VDPAU plugin for nouveau driver |
344 |
Group: System/Libraries |
345 |
# temporary: |
346 |
%rename vdpau-driver-nouveau |
347 |
|
348 |
%package -n %{_lib}vdpau-driver-r300 |
349 |
Summary: VDPAU plugin for r300 driver |
350 |
Group: System/Libraries |
351 |
# temporary: |
352 |
%rename vdpau-driver-r300 |
353 |
|
354 |
%package -n %{_lib}vdpau-driver-r600 |
355 |
Summary: VDPAU plugin for r600 driver |
356 |
Group: System/Libraries |
357 |
# temporary: |
358 |
%rename vdpau-driver-r600 |
359 |
|
360 |
%package -n %{_lib}vdpau-driver-radeonsi |
361 |
Summary: VDPAU plugin for radeonsi driver |
362 |
Group: System/Libraries |
363 |
# temporary: |
364 |
%rename vdpau-driver-radeonsi |
365 |
|
366 |
%package -n %{libxaname} |
367 |
Summary: Files for Mesa XA state tracker |
368 |
Group: System/Libraries |
369 |
Provides: %{libxaname_virt} = %{version}-%{release} |
370 |
|
371 |
%package -n %{libxaname}-devel |
372 |
Summary: Development files for XA libs |
373 |
Group: Development/C |
374 |
Requires: %{libxaname_virt} = %{version}-%{release} |
375 |
Provides: lib%{xaname}-devel |
376 |
Provides: %{libxaname}-devel |
377 |
|
378 |
%if %{enable_vulkan} |
379 |
%package -n %{libvulkanname}_intel |
380 |
Summary: Mesa vulkan driver for Intel GPU |
381 |
Group: System/Libraries |
382 |
|
383 |
%package -n %{libvulkanname}_radeon |
384 |
Summary: Mesa vulkan driver for Radeon GPU |
385 |
Group: System/Libraries |
386 |
|
387 |
%package -n %{libvulkanname}-devel |
388 |
Summary: Mesa's Vulkan development files |
389 |
Group: Development/C |
390 |
Requires: %{libvulkanname}_intel = %{version}-%{release} |
391 |
Provides: libvulkan-devel |
392 |
Provides: libvulkan_intel-devel |
393 |
%endif |
394 |
|
395 |
%package common-devel |
396 |
Summary: Meta package for mesa devel |
397 |
Group: Development/C |
398 |
Provides: Mesa-common-devel = %{version}-%{release} |
399 |
Provides: hackMesa-common-devel = %{version} |
400 |
Obsoletes: Mesa-common-devel < %{version} |
401 |
Obsoletes: hackMesa-common-devel < %{version} |
402 |
Requires: %{libglname}-devel = %{version} |
403 |
Requires: mesaglu-devel |
404 |
Requires: freeglut-devel |
405 |
Requires: %{libeglname}-devel = %{version} |
406 |
Requires: %{libglesv1name}-devel = %{version} |
407 |
Requires: %{libglesv2name}-devel = %{version} |
408 |
|
409 |
#------------------------------------------------------------------------------ |
410 |
|
411 |
%description |
412 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
413 |
|
414 |
%description common-devel |
415 |
Mesa common metapackage devel |
416 |
|
417 |
%description -n %{libeglname} |
418 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
419 |
EGL parts. |
420 |
|
421 |
%description -n %{libeglname}-devel |
422 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
423 |
EGL development parts. |
424 |
|
425 |
%description -n %{libglname} |
426 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
427 |
GL and GLX parts. |
428 |
|
429 |
%description -n %{dridrivers} |
430 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
431 |
DRI drivers. |
432 |
|
433 |
%description -n %{libglname}-devel |
434 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
435 |
|
436 |
This package contains the headers needed to compile Mesa programs. |
437 |
|
438 |
%description -n %{libglesv1name} |
439 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
440 |
well-defined subset profiles of OpenGL. |
441 |
|
442 |
This package provides the OpenGL ES library version 1. |
443 |
|
444 |
%description -n %{libosmesaname} |
445 |
Mesa offscreen rendering libraries for rendering OpenGL into |
446 |
application-allocated blocks of memory. |
447 |
|
448 |
%description -n %{osmesadevel} |
449 |
This package contains the headers needed to compile programs against |
450 |
the Mesa offscreen rendering library. |
451 |
|
452 |
%description -n %{libglapiname} |
453 |
This packages provides the glapi shared library used by gallium. |
454 |
|
455 |
%description -n %{libglapiname}-devel |
456 |
This package contains the headers needed to compile programes against glapi shared library. |
457 |
|
458 |
%description -n %{libglesv1name}-devel |
459 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
460 |
|
461 |
%description -n %{libd3dname} |
462 |
Mesa Direct3D9 state tracker. |
463 |
|
464 |
%description -n %{libd3dname}-devel |
465 |
Mesa Direct3D9 state tracker development package. |
466 |
|
467 |
%description -n %{libglesv2name} |
468 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
469 |
well-defined subset profiles of OpenGL. |
470 |
|
471 |
This package provides the OpenGL ES library version 2. |
472 |
|
473 |
%description -n %{libglesv2name}-devel |
474 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
475 |
|
476 |
%description -n %{libgbmname} |
477 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
478 |
GBM (Graphics Buffer Manager) parts. |
479 |
|
480 |
%description -n %{libgbmname}-devel |
481 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
482 |
GBM (Graphics Buffer Manager) development parts. |
483 |
|
484 |
%if %{?with_wayland_egl} |
485 |
%description -n %{libwaylandeglname} |
486 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
487 |
Wayland EGL platform parts. |
488 |
|
489 |
%description -n %{libwaylandeglname}-devel |
490 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
491 |
Wayland EGL platform development parts. |
492 |
%endif |
493 |
|
494 |
%description -n %{libxaname} |
495 |
This packages provides the xa shared library used by gallium. |
496 |
|
497 |
%description -n %{libxaname}-devel |
498 |
This package contains the headers needed to compile programes against xa shared library. |
499 |
|
500 |
%description -n %{_lib}vdpau-driver-nouveau |
501 |
This packages provides a VPDAU plugin to enable video acceleration |
502 |
with the nouveau driver. |
503 |
|
504 |
%description -n %{_lib}vdpau-driver-r300 |
505 |
This packages provides a VPDAU plugin to enable video acceleration |
506 |
with the r300 driver. |
507 |
|
508 |
%description -n %{_lib}vdpau-driver-r600 |
509 |
This packages provides a VPDAU plugin to enable video acceleration |
510 |
with the r600 driver. |
511 |
|
512 |
%description -n %{_lib}vdpau-driver-radeonsi |
513 |
This packages provides a VPDAU plugin to enable video acceleration |
514 |
with the radeonsi driver. |
515 |
|
516 |
%if %{enable_vulkan} |
517 |
%description -n %{libvulkanname}_intel |
518 |
This package contains the Vulkan parts for Mesa's Intel driver. |
519 |
|
520 |
%description -n %{libvulkanname}_radeon |
521 |
This package contains the Vulkan parts for Mesa's Radeon driver. |
522 |
|
523 |
%description -n %{libvulkanname}-devel |
524 |
This package contains the development files for Mesa's Vulkan implementation. |
525 |
%endif |
526 |
|
527 |
#------------------------------------------------------------------------------ |
528 |
|
529 |
%prep |
530 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
531 |
|
532 |
%build |
533 |
# (re)generate auto* generated files using our autotools and libtoolize |
534 |
autoreconf -vfi |
535 |
|
536 |
# for bin/test-driver: |
537 |
automake --add-missing |
538 |
|
539 |
%configure2_5x \ |
540 |
%if %{enable_vulkan} |
541 |
--with-vulkan-drivers=intel,radeon \ |
542 |
%endif |
543 |
--enable-gallium-osmesa \ |
544 |
--with-dri-driverdir=%{_libdir}/dri \ |
545 |
--enable-egl \ |
546 |
--enable-gles1 \ |
547 |
--enable-gles2 \ |
548 |
--disable-xvmc \ |
549 |
--enable-vdpau \ |
550 |
%{?with_vaapi:--enable-va} \ |
551 |
--with-platforms=x11,drm,surfaceless,wayland \ |
552 |
--enable-shared-glapi \ |
553 |
--enable-gbm \ |
554 |
--enable-glx \ |
555 |
--enable-glx-tls \ |
556 |
--enable-texture-float=yes \ |
557 |
--enable-llvm \ |
558 |
--enable-dri \ |
559 |
--enable-xa \ |
560 |
--enable-nine \ |
561 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl%{?gallium_platform_drivers} \ |
562 |
%{?dri_drivers} |
563 |
# end of configure options |
564 |
|
565 |
|
566 |
%make |
567 |
|
568 |
%install |
569 |
%make_install |
570 |
|
571 |
# FIXME: strip will likely break the hardlink |
572 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
573 |
# to prevent proprietary driver installers from removing them |
574 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
575 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
576 |
for l in ../libGL.so.*; do cp -a $l .; done |
577 |
popd |
578 |
|
579 |
%ifarch %{x86_64} |
580 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
581 |
%endif |
582 |
|
583 |
# libvdpau opens the versioned name, don't bother including the unversioned |
584 |
rm -f %{buildroot}%{_libdir}/vdpau/*.so |
585 |
|
586 |
# strip out useless headers |
587 |
rm -f %{buildroot}%{_includedir}/GL/w*.h |
588 |
|
589 |
# remove .la files |
590 |
find %{buildroot} -name '*.la' -delete |
591 |
|
592 |
# remove libwayland-egl on F28+ where it's built as part of wayland source package |
593 |
%if !%{?with_wayland_egl} |
594 |
rm -f %{buildroot}%{_libdir}/libwayland-egl.so* |
595 |
rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc |
596 |
%endif |
597 |
|
598 |
#------------------------------------------------------------------------------ |
599 |
|
600 |
%files |
601 |
%config(noreplace) %{_sysconfdir}/drirc |
602 |
|
603 |
%files -n %{dridrivers} |
604 |
%dir %{_libdir}/dri |
605 |
%{_libdir}/dri/*_dri.so |
606 |
%{_libdir}/dri/*_drv*.so |
607 |
|
608 |
%files -n %{libglname} |
609 |
%{_libdir}/libGL.so.* |
610 |
%dir %{_libdir}/mesa |
611 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
612 |
|
613 |
%files -n %{libeglname} |
614 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
615 |
|
616 |
%files -n %{libosmesaname} |
617 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
618 |
|
619 |
%files -n %{libglapiname} |
620 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
621 |
|
622 |
%files -n %{libglesv1name} |
623 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
624 |
|
625 |
%files -n %{libd3dname} |
626 |
%{_libdir}/d3d/*.so.* |
627 |
|
628 |
%files -n %{libglesv2name} |
629 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
630 |
|
631 |
%files -n %{libgbmname} |
632 |
%{_libdir}/libgbm.so.%{gbmmajor} |
633 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
634 |
|
635 |
%if %{?with_wayland_egl} |
636 |
%files -n %{libwaylandeglname} |
637 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
638 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
639 |
%endif |
640 |
|
641 |
%files -n %{libxaname} |
642 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
643 |
|
644 |
%files -n %{libglname}-devel |
645 |
%dir %{_includedir}/GL |
646 |
%{_includedir}/GL/gl.h |
647 |
%{_includedir}/GL/gl_mangle.h |
648 |
%{_includedir}/GL/glext.h |
649 |
%{_includedir}/GL/glx.h |
650 |
%{_includedir}/GL/glx_mangle.h |
651 |
%{_includedir}/GL/glxext.h |
652 |
%{_includedir}/GL/glcorearb.h |
653 |
%dir %{_includedir}/GL/internal |
654 |
%{_includedir}/GL/internal/dri_interface.h |
655 |
%{_libdir}/pkgconfig/dri.pc |
656 |
%{_libdir}/libGL.so |
657 |
%{_libdir}/pkgconfig/gl.pc |
658 |
|
659 |
%files common-devel |
660 |
|
661 |
%files -n %{libeglname}-devel |
662 |
%{_includedir}/EGL |
663 |
%{_includedir}/KHR |
664 |
%{_libdir}/libEGL.so |
665 |
%{_libdir}/pkgconfig/egl.pc |
666 |
|
667 |
%files -n %{osmesadevel} |
668 |
%dir %{_includedir}/GL |
669 |
%{_includedir}/GL/osmesa.h |
670 |
%{_libdir}/libOSMesa.so |
671 |
%{_libdir}/pkgconfig/osmesa.pc |
672 |
|
673 |
%files -n %{libglapiname}-devel |
674 |
%{_libdir}/libglapi.so |
675 |
|
676 |
%files -n %{libglesv1name}-devel |
677 |
%{_includedir}/GLES |
678 |
%{_libdir}/libGLESv1_CM.so |
679 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
680 |
|
681 |
%files -n %{libglesv2name}-devel |
682 |
%{_includedir}/GLES2 |
683 |
%{_includedir}/GLES3 |
684 |
%{_libdir}/libGLESv2.so |
685 |
%{_libdir}/pkgconfig/glesv2.pc |
686 |
|
687 |
%files -n %{libd3dname}-devel |
688 |
%{_includedir}/d3dadapter |
689 |
%{_libdir}/d3d/*.so |
690 |
%{_libdir}/pkgconfig/d3d.pc |
691 |
|
692 |
%files -n %{libgbmname}-devel |
693 |
%{_libdir}/libgbm.so |
694 |
%{_includedir}/gbm.h |
695 |
%{_libdir}/pkgconfig/gbm.pc |
696 |
|
697 |
%if %{?with_wayland_egl} |
698 |
%files -n %{libwaylandeglname}-devel |
699 |
%{_libdir}/libwayland-egl.so |
700 |
%{_libdir}/pkgconfig/wayland-egl.pc |
701 |
%endif |
702 |
|
703 |
%files -n %{libxaname}-devel |
704 |
%{_libdir}/libxatracker.so |
705 |
%{_includedir}/xa_tracker.h |
706 |
%{_includedir}/xa_composite.h |
707 |
%{_includedir}/xa_context.h |
708 |
%{_libdir}/pkgconfig/xatracker.pc |
709 |
|
710 |
%files -n %{_lib}vdpau-driver-nouveau |
711 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
712 |
|
713 |
%files -n %{_lib}vdpau-driver-r300 |
714 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
715 |
|
716 |
%files -n %{_lib}vdpau-driver-r600 |
717 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
718 |
|
719 |
%files -n %{_lib}vdpau-driver-radeonsi |
720 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
721 |
|
722 |
%if %{enable_vulkan} |
723 |
%files -n %{libvulkanname}_intel |
724 |
%dir %{_datadir}/vulkan |
725 |
%dir %{_datadir}/vulkan/icd.d |
726 |
%{_datadir}/vulkan/icd.d/intel_icd*.json |
727 |
# (akien) No lib major? |
728 |
%{_libdir}/libvulkan_intel.so |
729 |
|
730 |
%files -n %{libvulkanname}_radeon |
731 |
%dir %{_datadir}/vulkan |
732 |
%dir %{_datadir}/vulkan/icd.d |
733 |
%{_datadir}/vulkan/icd.d/radeon_icd*.json |
734 |
# (akien) No lib major? |
735 |
%{_libdir}/libvulkan_radeon.so |
736 |
|
737 |
%files -n %{libvulkanname}-devel |
738 |
%{_includedir}/vulkan/ |
739 |
%endif |