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