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