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