1 |
%if "%distro_section" == "tainted" |
2 |
%global build_plf 1 |
3 |
%else |
4 |
%global build_plf 0 |
5 |
%endif |
6 |
|
7 |
# (cg) Cheater... |
8 |
%define Werror_cflags %nil |
9 |
|
10 |
# (aco) Needed for the dri drivers |
11 |
%define _disable_ld_no_undefined 1 |
12 |
|
13 |
# https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e |
14 |
%define git 0 |
15 |
%define git_branch 17.0 |
16 |
|
17 |
%define opengl_ver 4.5 |
18 |
|
19 |
# define version, RC & release |
20 |
%define main_version 17.0.5 |
21 |
#define relc 1 |
22 |
%define rel 3 |
23 |
|
24 |
%define release %mkrel %{rel} |
25 |
|
26 |
%if %{git} |
27 |
%if %{?relc:1}%{!?relc:0} |
28 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
29 |
%else |
30 |
%define release 1.git%{git}.%{rel} |
31 |
%endif |
32 |
%endif |
33 |
|
34 |
%define makedepend %{_bindir}/gccmakedep |
35 |
|
36 |
%define d3dname d3d |
37 |
%define eglname mesaegl |
38 |
%define glname mesagl |
39 |
%define glwname mesaglw |
40 |
%define glesv1name mesaglesv1 |
41 |
%define glesv2name mesaglesv2 |
42 |
%define glapiname glapi |
43 |
%define gbmname gbm |
44 |
%define waylandeglname wayland-egl |
45 |
%define xaname xatracker |
46 |
%define vulkanname vulkan |
47 |
|
48 |
%define d3dmajor 1 |
49 |
%define eglmajor 1 |
50 |
%define glmajor 1 |
51 |
%define glwmajor 1 |
52 |
%define glesv1major 1 |
53 |
%define glesv2major 2 |
54 |
%define glapimajor 0 |
55 |
%define gbmmajor 1 |
56 |
%define waylandeglmajor 1 |
57 |
%define osmesamajor 8 |
58 |
%define xamajor 2 |
59 |
|
60 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
61 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
62 |
%define libglname %mklibname %{glname} %{glmajor} |
63 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
64 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
65 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
66 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
67 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
68 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
69 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
70 |
%define libxaname %mklibname %{xaname} %{xamajor} |
71 |
%define libvulkanname %mklibname %{vulkanname} |
72 |
|
73 |
%define dridrivers %mklibname dri-drivers |
74 |
|
75 |
%define osmesadevel %mklibname osmesa -d |
76 |
|
77 |
# Architecture-independent Virtual provides: |
78 |
%define libd3dname_virt lib%{d3dname} |
79 |
%define libeglname_virt lib%{eglname} |
80 |
%define libglname_virt lib%{glname} |
81 |
%define libglwname_virt lib%{glwname} |
82 |
%define libglesv1name_virt lib%{glesv1name} |
83 |
%define libglesv2name_virt lib%{glesv2name} |
84 |
%define libglapiname_virt lib%{glapiname} |
85 |
%define libgbmname_virt lib%{gbmname} |
86 |
%define libwaylandeglname_virt lib%{waylandeglname} |
87 |
%define libxaname_virt lib%{xaname} |
88 |
|
89 |
%define oldlibglname %mklibname MesaGL 1 |
90 |
|
91 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
92 |
|
93 |
# (akien) Not adding on arm as it would break the build there |
94 |
%define enable_vulkan 0 |
95 |
%ifarch %{ix86} x86_64 |
96 |
%define enable_vulkan 1 |
97 |
%endif |
98 |
|
99 |
%define base_drivers swrast,nouveau,radeon,r200 |
100 |
%ifarch %{ix86} x86_64 |
101 |
%define platform_drivers ,i915,i965 |
102 |
%endif |
103 |
%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} |
104 |
|
105 |
Name: mesa |
106 |
Version: %{main_version} |
107 |
Release: %{release} |
108 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
109 |
Group: System/Libraries |
110 |
|
111 |
# temp force new gcc |
112 |
BuildRequires: gcc >= 5.4.0-2 |
113 |
|
114 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
115 |
BuildRequires: pkgconfig(xshmfence) |
116 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
117 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
118 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
119 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
120 |
BuildRequires: libexpat-devel >= 2.0.1 |
121 |
BuildRequires: gccmakedep |
122 |
BuildRequires: x11-proto-devel >= 7.3 |
123 |
BuildRequires: pkgconfig(libdrm) >= 2.4.60 |
124 |
BuildRequires: pkgconfig(xcb-dri3) |
125 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
126 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
127 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
128 |
BuildRequires: pkgconfig(xi) >= 1.3 |
129 |
BuildRequires: pkgconfig(talloc) |
130 |
BuildRequires: libxml2-python |
131 |
BuildRequires: python-mako |
132 |
BuildRequires: makedepend |
133 |
BuildRequires: bison |
134 |
BuildRequires: flex |
135 |
BuildRequires: libelf-devel |
136 |
BuildRequires: llvm-devel >= 3.9.1-5 |
137 |
BuildRequires: pkgconfig(libudev) |
138 |
BuildRequires: pkgconfig(libva) |
139 |
BuildRequires: pkgconfig(vdpau) |
140 |
BuildRequires: wayland-devel |
141 |
%if %{enable_vulkan} |
142 |
BuildRequires: libgcrypt-devel |
143 |
%endif |
144 |
|
145 |
URL: http://www.mesa3d.org |
146 |
%if %{git} |
147 |
#Source0: %{name}-%{git}.tar.bz2 |
148 |
# (blino) snapshot of 13.0 branch |
149 |
Source0: %{name}-%{git_branch}-%{git}.tar.xz |
150 |
%else |
151 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/mesa-%{main_version}%{?relc:-rc%{relc}}.tar.xz |
152 |
%endif |
153 |
Source3: make-git-snapshot.sh |
154 |
|
155 |
Patch001: 0001-Revert-i915-Always-enable-GL-2.0-support.patch |
156 |
|
157 |
# Instructions to setup your repository clone |
158 |
# git://git.freedesktop.org/git/mesa/mesa |
159 |
# git checkout mesa_7_5_branch |
160 |
# git branch mdv-cherry-picks |
161 |
# git am ../02??-*.patch |
162 |
# git branch mdv-redhat |
163 |
# git am ../03??-*.patch |
164 |
# git branch mdv-patches |
165 |
# git am ../09??-*.patch |
166 |
# In order to update to the branch via patches, issue this command: |
167 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
168 |
|
169 |
# Cherry picks |
170 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
171 |
|
172 |
# Patches "liberated" from Fedora: |
173 |
# http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/ |
174 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
175 |
|
176 |
# Patches from ChromiumOS |
177 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
178 |
|
179 |
# Mageia/Mandriva patches |
180 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
181 |
|
182 |
#------------------------------------------------------------------------------ |
183 |
|
184 |
# package mesa |
185 |
License: MIT |
186 |
Requires: %{libglname} = %{version}-%{release} |
187 |
Provides: hackMesa = %{version} |
188 |
Obsoletes: hackMesa <= %{version} |
189 |
Provides: Mesa = %{version} |
190 |
Obsoletes: Mesa < %{version} |
191 |
|
192 |
%package -n %{libglname} |
193 |
Summary: Files for Mesa (GL and GLX libs) |
194 |
Group: System/Libraries |
195 |
Obsoletes: %{oldlibglname} < 6.4 |
196 |
Provides: %{oldlibglname} = %{version}-%{release} |
197 |
Provides: %{libglname_virt} = %{version}-%{release} |
198 |
Requires: %{dridrivers} >= %{version}-%{release} |
199 |
%if %{build_plf} |
200 |
Requires: %mklibname txc-dxtn |
201 |
%endif |
202 |
|
203 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
204 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
205 |
Conflicts: x11-server-common < 1.3.0.0-17 |
206 |
|
207 |
%package -n %{dridrivers} |
208 |
Summary: Mesa DRI drivers |
209 |
Group: System/Libraries |
210 |
# do not require exact release to avoid conflicts when having |
211 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
212 |
Requires: mesa = %{version} |
213 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
214 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
215 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
216 |
|
217 |
%package -n %{libd3dname} |
218 |
Summary: Mesa Direct3D9 state tracker |
219 |
Group: System/Libraries |
220 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
221 |
|
222 |
%package -n %{libd3dname}-devel |
223 |
Summary: Development files for Mesa Direct3D9 state tracker |
224 |
Group: Development/C |
225 |
Requires: %{libd3dname} = %{version}-%{release} |
226 |
Provides: lib%{d3dname}-devel |
227 |
Provides: %{d3dname}-devel |
228 |
Provides: libd3d-devel |
229 |
|
230 |
%package -n %{libglname}-devel |
231 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
232 |
Group: Development/C |
233 |
Requires: %{libglname} = %{version}-%{release} |
234 |
Provides: lib%{glname}-devel = %{version}-%{release} |
235 |
Provides: %{glname}-devel = %{version}-%{release} |
236 |
Provides: GL-devel |
237 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
238 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
239 |
Provides: libMesaGL-devel = %{version}-%{release} |
240 |
Provides: MesaGL-devel = %{version}-%{release} |
241 |
Provides: libgl-devel |
242 |
|
243 |
%package -n %{libeglname} |
244 |
Summary: Files for Mesa (EGL libs) |
245 |
Group: System/Libraries |
246 |
Provides: %{libeglname_virt} = %{version}-%{release} |
247 |
|
248 |
%package -n %{libeglname}-devel |
249 |
Summary: Development files for Mesa (EGL libs) |
250 |
Group: Development/C |
251 |
Requires: %{libeglname} = %{version}-%{release} |
252 |
Provides: EGL-devel |
253 |
Provides: lib%{eglname}-devel |
254 |
Provides: %{eglname}-devel |
255 |
Provides: libegl-devel |
256 |
|
257 |
%package -n %{libosmesaname} |
258 |
Summary: Mesa offscreen rendering library |
259 |
Group: System/Libraries |
260 |
|
261 |
%package -n %{osmesadevel} |
262 |
Summary: Development files for libosmesa |
263 |
Group: Development/C |
264 |
Requires: %{libosmesaname} = %{version}-%{release} |
265 |
Provides: osmesa-devel = %{version}-%{release} |
266 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
267 |
|
268 |
%package -n %{libglapiname} |
269 |
Summary: Files for mesa (glapi libs) |
270 |
Group: System/Libraries |
271 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
272 |
|
273 |
%package -n %{libglapiname}-devel |
274 |
Summary: Development files for glapi libs |
275 |
Group: Development/C |
276 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
277 |
Provides: lib%{glapiname}-devel |
278 |
Provides: %{libglapiname}-devel |
279 |
|
280 |
%package -n %{libglesv1name} |
281 |
Summary: Files for Mesa (glesv1 libs) |
282 |
Group: System/Libraries |
283 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
284 |
|
285 |
%package -n %{libglesv1name}-devel |
286 |
Summary: Development files for glesv1 libs |
287 |
Group: Development/C |
288 |
Requires: %{libglesv1name} = %{version}-%{release} |
289 |
Provides: lib%{glesv1name}-devel |
290 |
Provides: %{glesv1name}-devel |
291 |
Provides: libglesv1-devel |
292 |
|
293 |
%package -n %{libglesv2name} |
294 |
Summary: Files for Mesa (glesv2 libs) |
295 |
Group: System/Libraries |
296 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
297 |
|
298 |
%package -n %{libglesv2name}-devel |
299 |
Summary: Development files for glesv2 libs |
300 |
Group: Development/C |
301 |
Requires: %{libglesv2name} = %{version}-%{release} |
302 |
Requires: %{libeglname}-devel = %{version}-%{release} |
303 |
Provides: lib%{glesv2name}-devel |
304 |
Provides: %{glesv2name}-devel |
305 |
Provides: libglesv2-devel |
306 |
|
307 |
%package -n %{libgbmname} |
308 |
Summary: Files for Mesa (gbm libs) |
309 |
Group: System/Libraries |
310 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
311 |
|
312 |
%package -n %{libgbmname}-devel |
313 |
Summary: Development files for Mesa (gbm libs) |
314 |
Group: Development/C |
315 |
Requires: %{libgbmname} = %{version}-%{release} |
316 |
Provides: lib%{gbmname}-devel |
317 |
Provides: %{gbmname}-devel |
318 |
|
319 |
%package -n %{libwaylandeglname} |
320 |
Summary: Files for Mesa (Wayland EGL libs) |
321 |
Group: System/Libraries |
322 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
323 |
|
324 |
%package -n %{libwaylandeglname}-devel |
325 |
Summary: Development files for Mesa (Wayland EGL libs) |
326 |
Group: Development/C |
327 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
328 |
Provides: lib%{waylandeglname}-devel |
329 |
Provides: %{waylandeglname}-devel |
330 |
|
331 |
%package -n %{_lib}vdpau-driver-nouveau |
332 |
Summary: VDPAU plugin for nouveau driver |
333 |
Group: System/Libraries |
334 |
# temporary: |
335 |
%rename vdpau-driver-nouveau |
336 |
|
337 |
%package -n %{_lib}vdpau-driver-r300 |
338 |
Summary: VDPAU plugin for r300 driver |
339 |
Group: System/Libraries |
340 |
# temporary: |
341 |
%rename vdpau-driver-r300 |
342 |
|
343 |
%package -n %{_lib}vdpau-driver-r600 |
344 |
Summary: VDPAU plugin for r600 driver |
345 |
Group: System/Libraries |
346 |
# temporary: |
347 |
%rename vdpau-driver-r600 |
348 |
|
349 |
%package -n %{_lib}vdpau-driver-radeonsi |
350 |
Summary: VDPAU plugin for radeonsi driver |
351 |
Group: System/Libraries |
352 |
# temporary: |
353 |
%rename vdpau-driver-radeonsi |
354 |
|
355 |
%package -n %{libxaname} |
356 |
Summary: Files for Mesa XA state tracker |
357 |
Group: System/Libraries |
358 |
Provides: %{libxaname_virt} = %{version}-%{release} |
359 |
|
360 |
%package -n %{libxaname}-devel |
361 |
Summary: Development files for XA libs |
362 |
Group: Development/C |
363 |
Requires: %{libxaname_virt} = %{version}-%{release} |
364 |
Provides: lib%{xaname}-devel |
365 |
Provides: %{libxaname}-devel |
366 |
|
367 |
%if %{enable_vulkan} |
368 |
%package -n %{libvulkanname}_intel |
369 |
Summary: Mesa vulkan driver for Intel GPU |
370 |
Group: System/Libraries |
371 |
|
372 |
%package -n %{libvulkanname}_radeon |
373 |
Summary: Mesa vulkan driver for Radeon GPU |
374 |
Group: System/Libraries |
375 |
|
376 |
%package -n %{libvulkanname}-devel |
377 |
Summary: Mesa's Vulkan development files |
378 |
Group: Development/C |
379 |
Requires: %{libvulkanname}_intel = %{version}-%{release} |
380 |
Provides: libvulkan-devel |
381 |
Provides: libvulkan_intel-devel |
382 |
%endif |
383 |
|
384 |
%package common-devel |
385 |
Summary: Meta package for mesa devel |
386 |
Group: Development/C |
387 |
Provides: Mesa-common-devel = %{version}-%{release} |
388 |
Provides: hackMesa-common-devel = %{version} |
389 |
Obsoletes: Mesa-common-devel < %{version} |
390 |
Obsoletes: hackMesa-common-devel < %{version} |
391 |
Requires: %{libglname}-devel = %{version} |
392 |
Requires: mesaglu-devel |
393 |
Requires: freeglut-devel |
394 |
Requires: %{libeglname}-devel = %{version} |
395 |
Requires: %{libglesv1name}-devel = %{version} |
396 |
Requires: %{libglesv2name}-devel = %{version} |
397 |
|
398 |
#------------------------------------------------------------------------------ |
399 |
|
400 |
%description |
401 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
402 |
%if %{build_plf} |
403 |
|
404 |
This package is in the "tainted" section because it enables some |
405 |
OpenGL extentions that are covered by software patents. |
406 |
%endif |
407 |
|
408 |
%description common-devel |
409 |
Mesa common metapackage devel |
410 |
|
411 |
%description -n %{libeglname} |
412 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
413 |
EGL parts. |
414 |
|
415 |
%description -n %{libeglname}-devel |
416 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
417 |
EGL development parts. |
418 |
|
419 |
%description -n %{libglname} |
420 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
421 |
GL and GLX parts. |
422 |
|
423 |
%if %{build_plf} |
424 |
This package is in the "tainted" section because it enables some |
425 |
OpenGL extentions that are covered by software patents. |
426 |
%endif |
427 |
|
428 |
%description -n %{dridrivers} |
429 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
430 |
DRI drivers. |
431 |
|
432 |
%description -n %{libglname}-devel |
433 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
434 |
|
435 |
This package contains the headers needed to compile Mesa programs. |
436 |
|
437 |
%description -n %{libglesv1name} |
438 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
439 |
well-defined subset profiles of OpenGL. |
440 |
|
441 |
This package provides the OpenGL ES library version 1. |
442 |
|
443 |
%description -n %{libosmesaname} |
444 |
Mesa offscreen rendering libraries for rendering OpenGL into |
445 |
application-allocated blocks of memory. |
446 |
|
447 |
%description -n %{osmesadevel} |
448 |
This package contains the headers needed to compile programs against |
449 |
the Mesa offscreen rendering library. |
450 |
|
451 |
%description -n %{libglapiname} |
452 |
This packages provides the glapi shared library used by gallium. |
453 |
|
454 |
%description -n %{libglapiname}-devel |
455 |
This package contains the headers needed to compile programes against glapi shared library. |
456 |
|
457 |
%description -n %{libglesv1name}-devel |
458 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
459 |
|
460 |
%description -n %{libd3dname} |
461 |
Mesa Direct3D9 state tracker. |
462 |
|
463 |
%description -n %{libd3dname}-devel |
464 |
Mesa Direct3D9 state tracker development package. |
465 |
|
466 |
%description -n %{libglesv2name} |
467 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
468 |
well-defined subset profiles of OpenGL. |
469 |
|
470 |
This package provides the OpenGL ES library version 2. |
471 |
|
472 |
%description -n %{libglesv2name}-devel |
473 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
474 |
|
475 |
%description -n %{libgbmname} |
476 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
477 |
GBM (Graphics Buffer Manager) parts. |
478 |
|
479 |
%description -n %{libgbmname}-devel |
480 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
481 |
GBM (Graphics Buffer Manager) development parts. |
482 |
|
483 |
%description -n %{libwaylandeglname} |
484 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
485 |
Wayland EGL platform parts. |
486 |
|
487 |
%description -n %{libwaylandeglname}-devel |
488 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
489 |
Wayland EGL platform development parts. |
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-egl-platforms=x11,wayland,drm \ |
549 |
--enable-shared-glapi \ |
550 |
--enable-gbm \ |
551 |
--enable-glx \ |
552 |
--enable-glx-tls \ |
553 |
%if %{build_plf} |
554 |
--enable-texture-float=yes \ |
555 |
%endif |
556 |
--enable-gallium-llvm \ |
557 |
--enable-dri \ |
558 |
--enable-xa \ |
559 |
--enable-nine \ |
560 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \ |
561 |
%{?dri_drivers} |
562 |
# end of configure options |
563 |
|
564 |
|
565 |
%make |
566 |
|
567 |
%install |
568 |
%make_install |
569 |
|
570 |
# FIXME: strip will likely break the hardlink |
571 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
572 |
# to prevent proprietary driver installers from removing them |
573 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
574 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
575 |
for l in ../libGL.so.*; do cp -a $l .; done |
576 |
popd |
577 |
|
578 |
%ifarch %{x86_64} |
579 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
580 |
%endif |
581 |
|
582 |
# libvdpau opens the versioned name, don't bother including the unversioned |
583 |
rm -f %{buildroot}%{_libdir}/vdpau/*.so |
584 |
|
585 |
# strip out useless headers |
586 |
rm -f %{buildroot}%{_includedir}/GL/w*.h |
587 |
|
588 |
# remove .la files |
589 |
find %{buildroot} -name '*.la' -delete |
590 |
|
591 |
#------------------------------------------------------------------------------ |
592 |
|
593 |
%files |
594 |
%config(noreplace) %{_sysconfdir}/drirc |
595 |
|
596 |
%files -n %{dridrivers} |
597 |
%dir %{_libdir}/dri |
598 |
%{_libdir}/dri/*_dri.so |
599 |
%{_libdir}/dri/*_drv*.so |
600 |
|
601 |
%files -n %{libglname} |
602 |
%{_libdir}/libGL.so.* |
603 |
%dir %{_libdir}/mesa |
604 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
605 |
|
606 |
%files -n %{libeglname} |
607 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
608 |
|
609 |
%files -n %{libosmesaname} |
610 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
611 |
|
612 |
%files -n %{libglapiname} |
613 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
614 |
|
615 |
%files -n %{libglesv1name} |
616 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
617 |
|
618 |
%files -n %{libd3dname} |
619 |
%{_libdir}/d3d/*.so.* |
620 |
|
621 |
%files -n %{libglesv2name} |
622 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
623 |
|
624 |
%files -n %{libgbmname} |
625 |
%{_libdir}/libgbm.so.%{gbmmajor} |
626 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
627 |
|
628 |
%files -n %{libwaylandeglname} |
629 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
630 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
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 |
%files -n %{libwaylandeglname}-devel |
689 |
%{_libdir}/libwayland-egl.so |
690 |
%{_libdir}/pkgconfig/wayland-egl.pc |
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 |
%if %{enable_vulkan} |
712 |
%files -n %{libvulkanname}_intel |
713 |
%dir %{_datadir}/vulkan |
714 |
%dir %{_datadir}/vulkan/icd.d |
715 |
%{_datadir}/vulkan/icd.d/intel_icd*.json |
716 |
# (akien) No lib major? |
717 |
%{_libdir}/libvulkan_intel.so |
718 |
|
719 |
%files -n %{libvulkanname}_radeon |
720 |
%dir %{_datadir}/vulkan |
721 |
%dir %{_datadir}/vulkan/icd.d |
722 |
%{_datadir}/vulkan/icd.d/radeon_icd*.json |
723 |
# (akien) No lib major? |
724 |
%{_libdir}/libvulkan_radeon.so |
725 |
|
726 |
%files -n %{libvulkanname}-devel |
727 |
%{_includedir}/vulkan/ |
728 |
%endif |