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.3.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(xrandr) |
137 |
BuildRequires: pkgconfig(talloc) |
138 |
BuildRequires: python2-libxml2 |
139 |
BuildRequires: python2-mako |
140 |
BuildRequires: python3-libxml2 |
141 |
BuildRequires: python3-mako |
142 |
BuildRequires: makedepend |
143 |
BuildRequires: bison |
144 |
BuildRequires: flex |
145 |
BuildRequires: pkgconfig(libelf) |
146 |
BuildRequires: llvm-devel >= 3.9.1-5 |
147 |
BuildRequires: pkgconfig(libudev) |
148 |
%if 0%{?with_vaapi} |
149 |
BuildRequires: pkgconfig(libva) |
150 |
%endif |
151 |
BuildRequires: pkgconfig(vdpau) |
152 |
BuildRequires: pkgconfig(wayland-client) |
153 |
BuildRequires: pkgconfig(wayland-server) |
154 |
BuildRequires: pkgconfig(wayland-protocols) |
155 |
%if %{enable_vulkan} |
156 |
BuildRequires: libgcrypt-devel |
157 |
%endif |
158 |
BuildRequires: pkgconfig(wayland-protocols) >= 1.8 |
159 |
|
160 |
URL: http://www.mesa3d.org |
161 |
%if %{git} |
162 |
#Source0: %{name}-%{git}.tar.bz2 |
163 |
# (blino) snapshot of 13.0 branch |
164 |
Source0: %{name}-%{git_branch}-%{git}.tar.xz |
165 |
%else |
166 |
Source0: https://mesa.freedesktop.org/archive/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz |
167 |
%endif |
168 |
Source3: make-git-snapshot.sh |
169 |
|
170 |
Patch000: fix-linking.patch |
171 |
|
172 |
# mesa staging/18.3 branch from 1 |
173 |
|
174 |
# mesa master branch from 101 |
175 |
|
176 |
|
177 |
#------------------------------------------------------------------------------ |
178 |
|
179 |
# package mesa |
180 |
License: MIT |
181 |
Requires: %{libglname} = %{version}-%{release} |
182 |
Provides: hackMesa = %{version} |
183 |
Obsoletes: hackMesa <= %{version} |
184 |
Provides: Mesa = %{version} |
185 |
Obsoletes: Mesa < %{version} |
186 |
|
187 |
%package -n %{libglname} |
188 |
Summary: Files for Mesa (GL and GLX libs) |
189 |
Group: System/Libraries |
190 |
Obsoletes: %{oldlibglname} < 6.4 |
191 |
Provides: %{oldlibglname} = %{version}-%{release} |
192 |
Provides: %{libglname_virt} = %{version}-%{release} |
193 |
Requires: %{dridrivers} >= %{version}-%{release} |
194 |
|
195 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
196 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
197 |
Conflicts: x11-server-common < 1.3.0.0-17 |
198 |
|
199 |
%package -n %{dridrivers} |
200 |
Summary: Mesa DRI drivers |
201 |
Group: System/Libraries |
202 |
# do not require exact release to avoid conflicts when having |
203 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
204 |
Requires: mesa = %{version} |
205 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
206 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
207 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
208 |
|
209 |
%package -n %{libd3dname} |
210 |
Summary: Mesa Direct3D9 state tracker |
211 |
Group: System/Libraries |
212 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
213 |
|
214 |
%package -n %{libd3dname}-devel |
215 |
Summary: Development files for Mesa Direct3D9 state tracker |
216 |
Group: Development/C |
217 |
Requires: %{libd3dname} = %{version}-%{release} |
218 |
Provides: lib%{d3dname}-devel |
219 |
Provides: %{d3dname}-devel |
220 |
Provides: libd3d-devel |
221 |
|
222 |
%package -n %{libglname}-devel |
223 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
224 |
Group: Development/C |
225 |
Requires: %{libglname} = %{version}-%{release} |
226 |
Provides: lib%{glname}-devel = %{version}-%{release} |
227 |
Provides: %{glname}-devel = %{version}-%{release} |
228 |
Provides: GL-devel |
229 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
230 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
231 |
Provides: libMesaGL-devel = %{version}-%{release} |
232 |
Provides: MesaGL-devel = %{version}-%{release} |
233 |
Provides: libgl-devel |
234 |
|
235 |
%package -n %{libeglname} |
236 |
Summary: Files for Mesa (EGL libs) |
237 |
Group: System/Libraries |
238 |
Provides: %{libeglname_virt} = %{version}-%{release} |
239 |
|
240 |
%package -n %{libeglname}-devel |
241 |
Summary: Development files for Mesa (EGL libs) |
242 |
Group: Development/C |
243 |
Requires: %{libeglname} = %{version}-%{release} |
244 |
Provides: EGL-devel |
245 |
Provides: lib%{eglname}-devel |
246 |
Provides: %{eglname}-devel |
247 |
Provides: libegl-devel |
248 |
|
249 |
%package -n %{libosmesaname} |
250 |
Summary: Mesa offscreen rendering library |
251 |
Group: System/Libraries |
252 |
|
253 |
%package -n %{osmesadevel} |
254 |
Summary: Development files for libosmesa |
255 |
Group: Development/C |
256 |
Requires: %{libosmesaname} = %{version}-%{release} |
257 |
Provides: osmesa-devel = %{version}-%{release} |
258 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
259 |
|
260 |
%package -n %{libglapiname} |
261 |
Summary: Files for mesa (glapi libs) |
262 |
Group: System/Libraries |
263 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
264 |
|
265 |
%package -n %{libglapiname}-devel |
266 |
Summary: Development files for glapi libs |
267 |
Group: Development/C |
268 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
269 |
Provides: lib%{glapiname}-devel |
270 |
Provides: %{libglapiname}-devel |
271 |
|
272 |
%package -n %{libglesv1name} |
273 |
Summary: Files for Mesa (glesv1 libs) |
274 |
Group: System/Libraries |
275 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
276 |
|
277 |
%package -n %{libglesv1name}-devel |
278 |
Summary: Development files for glesv1 libs |
279 |
Group: Development/C |
280 |
Requires: %{libglesv1name} = %{version}-%{release} |
281 |
Provides: lib%{glesv1name}-devel |
282 |
Provides: %{glesv1name}-devel |
283 |
Provides: libglesv1-devel |
284 |
|
285 |
%package -n %{libglesv2name} |
286 |
Summary: Files for Mesa (glesv2 libs) |
287 |
Group: System/Libraries |
288 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
289 |
|
290 |
%package -n %{libglesv2name}-devel |
291 |
Summary: Development files for glesv2 libs |
292 |
Group: Development/C |
293 |
Requires: %{libglesv2name} = %{version}-%{release} |
294 |
Requires: %{libeglname}-devel = %{version}-%{release} |
295 |
Provides: lib%{glesv2name}-devel |
296 |
Provides: %{glesv2name}-devel |
297 |
Provides: libglesv2-devel |
298 |
|
299 |
%package -n %{libgbmname} |
300 |
Summary: Files for Mesa (gbm libs) |
301 |
Group: System/Libraries |
302 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
303 |
|
304 |
%package -n %{libgbmname}-devel |
305 |
Summary: Development files for Mesa (gbm libs) |
306 |
Group: Development/C |
307 |
Requires: %{libgbmname} = %{version}-%{release} |
308 |
Provides: lib%{gbmname}-devel |
309 |
Provides: %{gbmname}-devel |
310 |
|
311 |
%if %{?with_wayland_egl} |
312 |
%package -n %{libwaylandeglname} |
313 |
Summary: Files for Mesa (Wayland EGL libs) |
314 |
Group: System/Libraries |
315 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
316 |
|
317 |
%package -n %{libwaylandeglname}-devel |
318 |
Summary: Development files for Mesa (Wayland EGL libs) |
319 |
Group: Development/C |
320 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
321 |
Provides: lib%{waylandeglname}-devel |
322 |
Provides: %{waylandeglname}-devel |
323 |
%endif |
324 |
|
325 |
%package -n %{_lib}vdpau-driver-nouveau |
326 |
Summary: VDPAU plugin for nouveau driver |
327 |
Group: System/Libraries |
328 |
# temporary: |
329 |
%rename vdpau-driver-nouveau |
330 |
|
331 |
%package -n %{_lib}vdpau-driver-r300 |
332 |
Summary: VDPAU plugin for r300 driver |
333 |
Group: System/Libraries |
334 |
# temporary: |
335 |
%rename vdpau-driver-r300 |
336 |
|
337 |
%package -n %{_lib}vdpau-driver-r600 |
338 |
Summary: VDPAU plugin for r600 driver |
339 |
Group: System/Libraries |
340 |
# temporary: |
341 |
%rename vdpau-driver-r600 |
342 |
|
343 |
%package -n %{_lib}vdpau-driver-radeonsi |
344 |
Summary: VDPAU plugin for radeonsi driver |
345 |
Group: System/Libraries |
346 |
# temporary: |
347 |
%rename vdpau-driver-radeonsi |
348 |
|
349 |
%package -n %{libxaname} |
350 |
Summary: Files for Mesa XA state tracker |
351 |
Group: System/Libraries |
352 |
Provides: %{libxaname_virt} = %{version}-%{release} |
353 |
|
354 |
%package -n %{libxaname}-devel |
355 |
Summary: Development files for XA libs |
356 |
Group: Development/C |
357 |
Requires: %{libxaname_virt} = %{version}-%{release} |
358 |
Provides: lib%{xaname}-devel |
359 |
Provides: %{libxaname}-devel |
360 |
|
361 |
%if %{enable_vulkan} |
362 |
%package -n %{libvulkanname}_intel |
363 |
Summary: Mesa vulkan driver for Intel GPU |
364 |
Group: System/Libraries |
365 |
|
366 |
%package -n %{libvulkanname}_radeon |
367 |
Summary: Mesa vulkan driver for Radeon GPU |
368 |
Group: System/Libraries |
369 |
|
370 |
%package -n %{libvulkanname}-devel |
371 |
Summary: Mesa's Vulkan development files |
372 |
Group: Development/C |
373 |
Requires: %{libvulkanname}_intel = %{version}-%{release} |
374 |
Provides: libvulkan-devel |
375 |
Provides: libvulkan_intel-devel |
376 |
%endif |
377 |
|
378 |
%package common-devel |
379 |
Summary: Meta package for mesa devel |
380 |
Group: Development/C |
381 |
Provides: Mesa-common-devel = %{version}-%{release} |
382 |
Provides: hackMesa-common-devel = %{version} |
383 |
Obsoletes: Mesa-common-devel < %{version} |
384 |
Obsoletes: hackMesa-common-devel < %{version} |
385 |
Requires: %{libglname}-devel = %{version} |
386 |
Requires: mesaglu-devel |
387 |
Requires: freeglut-devel |
388 |
Requires: %{libeglname}-devel = %{version} |
389 |
Requires: %{libglesv1name}-devel = %{version} |
390 |
Requires: %{libglesv2name}-devel = %{version} |
391 |
|
392 |
#------------------------------------------------------------------------------ |
393 |
|
394 |
%description |
395 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
396 |
|
397 |
%description common-devel |
398 |
Mesa common metapackage devel |
399 |
|
400 |
%description -n %{libeglname} |
401 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
402 |
EGL parts. |
403 |
|
404 |
%description -n %{libeglname}-devel |
405 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
406 |
EGL development parts. |
407 |
|
408 |
%description -n %{libglname} |
409 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
410 |
GL and GLX parts. |
411 |
|
412 |
%description -n %{dridrivers} |
413 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
414 |
DRI drivers. |
415 |
|
416 |
%description -n %{libglname}-devel |
417 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
418 |
|
419 |
This package contains the headers needed to compile Mesa programs. |
420 |
|
421 |
%description -n %{libglesv1name} |
422 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
423 |
well-defined subset profiles of OpenGL. |
424 |
|
425 |
This package provides the OpenGL ES library version 1. |
426 |
|
427 |
%description -n %{libosmesaname} |
428 |
Mesa offscreen rendering libraries for rendering OpenGL into |
429 |
application-allocated blocks of memory. |
430 |
|
431 |
%description -n %{osmesadevel} |
432 |
This package contains the headers needed to compile programs against |
433 |
the Mesa offscreen rendering library. |
434 |
|
435 |
%description -n %{libglapiname} |
436 |
This packages provides the glapi shared library used by gallium. |
437 |
|
438 |
%description -n %{libglapiname}-devel |
439 |
This package contains the headers needed to compile programes against glapi shared library. |
440 |
|
441 |
%description -n %{libglesv1name}-devel |
442 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
443 |
|
444 |
%description -n %{libd3dname} |
445 |
Mesa Direct3D9 state tracker. |
446 |
|
447 |
%description -n %{libd3dname}-devel |
448 |
Mesa Direct3D9 state tracker development package. |
449 |
|
450 |
%description -n %{libglesv2name} |
451 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
452 |
well-defined subset profiles of OpenGL. |
453 |
|
454 |
This package provides the OpenGL ES library version 2. |
455 |
|
456 |
%description -n %{libglesv2name}-devel |
457 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
458 |
|
459 |
%description -n %{libgbmname} |
460 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
461 |
GBM (Graphics Buffer Manager) parts. |
462 |
|
463 |
%description -n %{libgbmname}-devel |
464 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
465 |
GBM (Graphics Buffer Manager) development parts. |
466 |
|
467 |
%if %{?with_wayland_egl} |
468 |
%description -n %{libwaylandeglname} |
469 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
470 |
Wayland EGL platform parts. |
471 |
|
472 |
%description -n %{libwaylandeglname}-devel |
473 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
474 |
Wayland EGL platform development parts. |
475 |
%endif |
476 |
|
477 |
%description -n %{libxaname} |
478 |
This packages provides the xa shared library used by gallium. |
479 |
|
480 |
%description -n %{libxaname}-devel |
481 |
This package contains the headers needed to compile programes against xa shared library. |
482 |
|
483 |
%description -n %{_lib}vdpau-driver-nouveau |
484 |
This packages provides a VPDAU plugin to enable video acceleration |
485 |
with the nouveau driver. |
486 |
|
487 |
%description -n %{_lib}vdpau-driver-r300 |
488 |
This packages provides a VPDAU plugin to enable video acceleration |
489 |
with the r300 driver. |
490 |
|
491 |
%description -n %{_lib}vdpau-driver-r600 |
492 |
This packages provides a VPDAU plugin to enable video acceleration |
493 |
with the r600 driver. |
494 |
|
495 |
%description -n %{_lib}vdpau-driver-radeonsi |
496 |
This packages provides a VPDAU plugin to enable video acceleration |
497 |
with the radeonsi driver. |
498 |
|
499 |
%if %{enable_vulkan} |
500 |
%description -n %{libvulkanname}_intel |
501 |
This package contains the Vulkan parts for Mesa's Intel driver. |
502 |
|
503 |
%description -n %{libvulkanname}_radeon |
504 |
This package contains the Vulkan parts for Mesa's Radeon driver. |
505 |
|
506 |
%description -n %{libvulkanname}-devel |
507 |
This package contains the development files for Mesa's Vulkan implementation. |
508 |
%endif |
509 |
|
510 |
#------------------------------------------------------------------------------ |
511 |
|
512 |
%prep |
513 |
%autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 |
514 |
|
515 |
%build |
516 |
# (re)generate auto* generated files using our autotools and libtoolize |
517 |
autoreconf -vfi |
518 |
|
519 |
# for bin/test-driver: |
520 |
automake --add-missing |
521 |
|
522 |
%configure2_5x \ |
523 |
%if %{enable_vulkan} |
524 |
--with-vulkan-drivers=intel,radeon \ |
525 |
%endif |
526 |
--enable-gallium-osmesa \ |
527 |
--with-dri-driverdir=%{_libdir}/dri \ |
528 |
--enable-egl \ |
529 |
--enable-gles1 \ |
530 |
--enable-gles2 \ |
531 |
--disable-xvmc \ |
532 |
--enable-vdpau \ |
533 |
%{?with_vaapi:--enable-va} \ |
534 |
--with-platforms=x11,drm,surfaceless,wayland \ |
535 |
--enable-shared-glapi \ |
536 |
--enable-gbm \ |
537 |
--enable-glx \ |
538 |
--enable-glx-tls \ |
539 |
--enable-texture-float=yes \ |
540 |
--enable-llvm \ |
541 |
--enable-dri \ |
542 |
--enable-xa \ |
543 |
--enable-nine \ |
544 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl%{?gallium_platform_drivers} \ |
545 |
%{?dri_drivers} |
546 |
# end of configure options |
547 |
|
548 |
|
549 |
%make |
550 |
|
551 |
%install |
552 |
%make_install |
553 |
|
554 |
# FIXME: strip will likely break the hardlink |
555 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
556 |
# to prevent proprietary driver installers from removing them |
557 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
558 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
559 |
for l in ../libGL.so.*; do cp -a $l .; done |
560 |
popd |
561 |
|
562 |
%ifarch %{x86_64} |
563 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
564 |
%endif |
565 |
|
566 |
# libvdpau opens the versioned name, don't bother including the unversioned |
567 |
rm -f %{buildroot}%{_libdir}/vdpau/*.so |
568 |
|
569 |
# strip out useless headers |
570 |
rm -f %{buildroot}%{_includedir}/GL/w*.h |
571 |
|
572 |
# remove .la files |
573 |
find %{buildroot} -name '*.la' -delete |
574 |
|
575 |
# remove libwayland-egl on F28+ where it's built as part of wayland source package |
576 |
%if !%{?with_wayland_egl} |
577 |
rm -f %{buildroot}%{_libdir}/libwayland-egl.so* |
578 |
rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc |
579 |
%endif |
580 |
|
581 |
#------------------------------------------------------------------------------ |
582 |
|
583 |
%files |
584 |
/usr/share/drirc.d/ |
585 |
|
586 |
%files -n %{dridrivers} |
587 |
%dir %{_libdir}/dri |
588 |
%{_libdir}/dri/*_dri.so |
589 |
%{_libdir}/dri/*_drv*.so |
590 |
|
591 |
%files -n %{libglname} |
592 |
%{_libdir}/libGL.so.* |
593 |
%dir %{_libdir}/mesa |
594 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
595 |
|
596 |
%files -n %{libeglname} |
597 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
598 |
|
599 |
%files -n %{libosmesaname} |
600 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
601 |
|
602 |
%files -n %{libglapiname} |
603 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
604 |
|
605 |
%files -n %{libglesv1name} |
606 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
607 |
|
608 |
%files -n %{libd3dname} |
609 |
%{_libdir}/d3d/*.so.* |
610 |
|
611 |
%files -n %{libglesv2name} |
612 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
613 |
|
614 |
%files -n %{libgbmname} |
615 |
%{_libdir}/libgbm.so.%{gbmmajor} |
616 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
617 |
|
618 |
%if %{?with_wayland_egl} |
619 |
%files -n %{libwaylandeglname} |
620 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
621 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
622 |
%endif |
623 |
|
624 |
%files -n %{libxaname} |
625 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
626 |
|
627 |
%files -n %{libglname}-devel |
628 |
%dir %{_includedir}/GL |
629 |
%{_includedir}/GL/gl.h |
630 |
%{_includedir}/GL/gl_mangle.h |
631 |
%{_includedir}/GL/glext.h |
632 |
%{_includedir}/GL/glx.h |
633 |
%{_includedir}/GL/glx_mangle.h |
634 |
%{_includedir}/GL/glxext.h |
635 |
%{_includedir}/GL/glcorearb.h |
636 |
%dir %{_includedir}/GL/internal |
637 |
%{_includedir}/GL/internal/dri_interface.h |
638 |
%{_libdir}/pkgconfig/dri.pc |
639 |
%{_libdir}/libGL.so |
640 |
%{_libdir}/pkgconfig/gl.pc |
641 |
|
642 |
%files common-devel |
643 |
|
644 |
%files -n %{libeglname}-devel |
645 |
%{_includedir}/EGL |
646 |
%{_includedir}/KHR |
647 |
%{_libdir}/libEGL.so |
648 |
%{_libdir}/pkgconfig/egl.pc |
649 |
|
650 |
%files -n %{osmesadevel} |
651 |
%dir %{_includedir}/GL |
652 |
%{_includedir}/GL/osmesa.h |
653 |
%{_libdir}/libOSMesa.so |
654 |
%{_libdir}/pkgconfig/osmesa.pc |
655 |
|
656 |
%files -n %{libglapiname}-devel |
657 |
%{_libdir}/libglapi.so |
658 |
|
659 |
%files -n %{libglesv1name}-devel |
660 |
%{_includedir}/GLES |
661 |
%{_libdir}/libGLESv1_CM.so |
662 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
663 |
|
664 |
%files -n %{libglesv2name}-devel |
665 |
%{_includedir}/GLES2 |
666 |
%{_includedir}/GLES3 |
667 |
%{_libdir}/libGLESv2.so |
668 |
%{_libdir}/pkgconfig/glesv2.pc |
669 |
|
670 |
%files -n %{libd3dname}-devel |
671 |
%{_includedir}/d3dadapter |
672 |
%{_libdir}/d3d/*.so |
673 |
%{_libdir}/pkgconfig/d3d.pc |
674 |
|
675 |
%files -n %{libgbmname}-devel |
676 |
%{_libdir}/libgbm.so |
677 |
%{_includedir}/gbm.h |
678 |
%{_libdir}/pkgconfig/gbm.pc |
679 |
|
680 |
%if %{?with_wayland_egl} |
681 |
%files -n %{libwaylandeglname}-devel |
682 |
%{_libdir}/libwayland-egl.so |
683 |
%{_libdir}/pkgconfig/wayland-egl.pc |
684 |
%endif |
685 |
|
686 |
%files -n %{libxaname}-devel |
687 |
%{_libdir}/libxatracker.so |
688 |
%{_includedir}/xa_tracker.h |
689 |
%{_includedir}/xa_composite.h |
690 |
%{_includedir}/xa_context.h |
691 |
%{_libdir}/pkgconfig/xatracker.pc |
692 |
|
693 |
%files -n %{_lib}vdpau-driver-nouveau |
694 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
695 |
|
696 |
%files -n %{_lib}vdpau-driver-r300 |
697 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
698 |
|
699 |
%files -n %{_lib}vdpau-driver-r600 |
700 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
701 |
|
702 |
%files -n %{_lib}vdpau-driver-radeonsi |
703 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
704 |
|
705 |
%if %{enable_vulkan} |
706 |
%files -n %{libvulkanname}_intel |
707 |
%dir %{_datadir}/vulkan |
708 |
%dir %{_datadir}/vulkan/icd.d |
709 |
%{_datadir}/vulkan/icd.d/intel_icd*.json |
710 |
# (akien) No lib major? |
711 |
%{_libdir}/libvulkan_intel.so |
712 |
|
713 |
%files -n %{libvulkanname}_radeon |
714 |
%dir %{_datadir}/vulkan |
715 |
%dir %{_datadir}/vulkan/icd.d |
716 |
%{_datadir}/vulkan/icd.d/radeon_icd*.json |
717 |
# (akien) No lib major? |
718 |
%{_libdir}/libvulkan_radeon.so |
719 |
|
720 |
%files -n %{libvulkanname}-devel |
721 |
%{_includedir}/vulkan/ |
722 |
%endif |