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