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 |
# http://cgit.freedesktop.org/mesa/mesa/commit/?h=9.1&id=38e728498b8ef63bb7dce77c64af11c98ec2efa4 |
14 |
%define git 0 |
15 |
%define git_branch 9.2 |
16 |
%bcond_without hardware_gallium |
17 |
|
18 |
%define opengl_ver 4.3 |
19 |
|
20 |
# define version, RC & release |
21 |
%define main_version 12.0.2 |
22 |
%define relc %nil |
23 |
%define rel 1.1 |
24 |
|
25 |
%define release %mkrel %{rel} |
26 |
%define vsuffix %nil |
27 |
|
28 |
%if 0%{?relc} |
29 |
%define vsuffix -rc%{relc} |
30 |
%endif |
31 |
|
32 |
%if %{git} |
33 |
%if %{relc} |
34 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
35 |
%else |
36 |
%define release %mkrel 1.git%{git}.%{rel} |
37 |
%endif |
38 |
%endif |
39 |
|
40 |
%define makedepend %{_bindir}/gccmakedep |
41 |
|
42 |
%define d3dname d3d |
43 |
%define eglname mesaegl |
44 |
%define glname mesagl |
45 |
%define glwname mesaglw |
46 |
%define glesv1name mesaglesv1 |
47 |
%define glesv2name mesaglesv2 |
48 |
%define openvgname mesaopenvg |
49 |
%define glapiname glapi |
50 |
%define gbmname gbm |
51 |
%define waylandeglname wayland-egl |
52 |
%define xaname xatracker |
53 |
%define vulkanname vulkan |
54 |
|
55 |
%define d3dmajor 1 |
56 |
%define eglmajor 1 |
57 |
%define glmajor 1 |
58 |
%define glwmajor 1 |
59 |
%define glesv1major 1 |
60 |
%define glesv2major 2 |
61 |
%define openvgmajor 1 |
62 |
%define glapimajor 0 |
63 |
%define gbmmajor 1 |
64 |
%define waylandeglmajor 1 |
65 |
%define osmesamajor 8 |
66 |
%define xamajor 2 |
67 |
|
68 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
69 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
70 |
%define libglname %mklibname %{glname} %{glmajor} |
71 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
72 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
73 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
74 |
%define libopenvgname %mklibname %{openvgname} %{openvgmajor} |
75 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
76 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
77 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
78 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
79 |
%define libxaname %mklibname %{xaname} %{xamajor} |
80 |
%define libvulkanname %mklibname %{vulkanname} |
81 |
|
82 |
%define dridrivers %mklibname dri-drivers |
83 |
|
84 |
%define osmesadevel %mklibname osmesa -d |
85 |
|
86 |
# Architecture-independent Virtual provides: |
87 |
%define libd3dname_virt lib%{d3dname} |
88 |
%define libeglname_virt lib%{eglname} |
89 |
%define libglname_virt lib%{glname} |
90 |
%define libglwname_virt lib%{glwname} |
91 |
%define libglesv1name_virt lib%{glesv1name} |
92 |
%define libglesv2name_virt lib%{glesv2name} |
93 |
%define libopenvgname_virt lib%{openvgname} |
94 |
%define libglapiname_virt lib%{glapiname} |
95 |
%define libgbmname_virt lib%{gbmname} |
96 |
%define libwaylandeglname_virt lib%{waylandeglname} |
97 |
%define libxaname_virt lib%{xaname} |
98 |
|
99 |
%define oldlibglname %mklibname MesaGL 1 |
100 |
|
101 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
102 |
%define driver_dir %{_libdir}/dri |
103 |
|
104 |
%define enable_egl 1 |
105 |
%define enable_vg 0 |
106 |
%define enable_wayland 1 |
107 |
|
108 |
# (akien) Not adding on arm as it would break the build there |
109 |
%define enable_vulkan 0 |
110 |
%ifarch %{ix86} x86_64 |
111 |
%define enable_vulkan 1 |
112 |
%endif |
113 |
|
114 |
#FIXME: (for 386/485) unset SSE, MMX and 3dnow flags |
115 |
#FIXME: (for >=i586) disable sse |
116 |
# SSE seems to have problem on some apps (gtulpas) for probing. |
117 |
%define dri_drivers_i386 "i915,i965,nouveau,r200,radeon,swrast" |
118 |
%define dri_drivers_x86_64 %{dri_drivers_i386} |
119 |
%define dri_drivers_arm "nouveau,r200,radeon,swrast" |
120 |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
121 |
|
122 |
Name: mesa |
123 |
Version: %{main_version} |
124 |
Release: %{release} |
125 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
126 |
Group: System/Libraries |
127 |
|
128 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
129 |
BuildRequires: pkgconfig(xshmfence) |
130 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
131 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
132 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
133 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
134 |
BuildRequires: libexpat-devel >= 2.0.1 |
135 |
BuildRequires: gccmakedep |
136 |
BuildRequires: x11-proto-devel >= 7.3 |
137 |
BuildRequires: pkgconfig(libdrm) >= 2.4.60 |
138 |
BuildRequires: pkgconfig(xcb-dri3) |
139 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
140 |
BuildRequires: pkgconfig(xext) >= 1.1.1 |
141 |
BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 |
142 |
BuildRequires: pkgconfig(xi) >= 1.3 |
143 |
BuildRequires: pkgconfig(talloc) |
144 |
BuildRequires: libxml2-python |
145 |
BuildRequires: python-mako |
146 |
BuildRequires: makedepend |
147 |
BuildRequires: bison |
148 |
BuildRequires: flex |
149 |
BuildRequires: libelf-devel |
150 |
%if %{with hardware_gallium} |
151 |
BuildRequires: llvm-devel >= 3.8 |
152 |
%endif |
153 |
BuildRequires: pkgconfig(libudev) |
154 |
BuildRequires: pkgconfig(libva) |
155 |
BuildRequires: pkgconfig(vdpau) |
156 |
%if %{enable_wayland} |
157 |
BuildRequires: wayland-devel |
158 |
%endif |
159 |
%if %{enable_vulkan} |
160 |
BuildRequires: libgcrypt-devel |
161 |
%endif |
162 |
|
163 |
URL: http://www.mesa3d.org |
164 |
%if %{git} |
165 |
Source0: %{name}-%{git}.tar.bz2 |
166 |
# (blino) snapshot of 9.0 branch |
167 |
#Source0: %{name}-%{git_branch}-%{git}.tar.bz2 |
168 |
%else |
169 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{main_version}/mesa-%{main_version}%{vsuffix}.tar.xz |
170 |
%endif |
171 |
Source3: make-git-snapshot.sh |
172 |
|
173 |
# Instructions to setup your repository clone |
174 |
# git://git.freedesktop.org/git/mesa/mesa |
175 |
# git checkout mesa_7_5_branch |
176 |
# git branch mdv-cherry-picks |
177 |
# git am ../02??-*.patch |
178 |
# git branch mdv-redhat |
179 |
# git am ../03??-*.patch |
180 |
# git branch mdv-patches |
181 |
# git am ../09??-*.patch |
182 |
# In order to update to the branch via patches, issue this command: |
183 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
184 |
|
185 |
# upstream fixes |
186 |
Patch102: 0102-i956-Add-more-Kabylake-PCI-IDs.patch |
187 |
Patch103: 0103-i965-Removing-PCI-IDs-that-are-no-longer-listed-as-K.patch |
188 |
Patch106: 0106-mesa-Don-t-call-GenerateMipmap-if-Width-or-Height-0.patch |
189 |
|
190 |
# Cherry picks |
191 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
192 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
193 |
|
194 |
# Patches "liberated" from Fedora: |
195 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
196 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
197 |
|
198 |
# Patches from ChromiumOS |
199 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
200 |
|
201 |
# Mageia/Mandriva patches |
202 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
203 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
204 |
#Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch |
205 |
|
206 |
#------------------------------------------------------------------------------ |
207 |
|
208 |
# package mesa |
209 |
License: MIT |
210 |
Requires: %{libglname} = %{version}-%{release} |
211 |
Provides: hackMesa = %{version} |
212 |
Obsoletes: hackMesa <= %{version} |
213 |
Provides: Mesa = %{version} |
214 |
Obsoletes: Mesa < %{version} |
215 |
|
216 |
%package -n %{libglname} |
217 |
Summary: Files for Mesa (GL and GLX libs) |
218 |
Group: System/Libraries |
219 |
Obsoletes: %{oldlibglname} < 6.4 |
220 |
Provides: %{oldlibglname} = %{version}-%{release} |
221 |
Provides: %{libglname_virt} = %{version}-%{release} |
222 |
Requires: %{dridrivers} >= %{version}-%{release} |
223 |
%if %{build_plf} |
224 |
Requires: %mklibname txc-dxtn |
225 |
%endif |
226 |
|
227 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
228 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
229 |
Conflicts: x11-server-common < 1.3.0.0-17 |
230 |
|
231 |
%package -n %{dridrivers} |
232 |
Summary: Mesa DRI drivers |
233 |
Group: System/Libraries |
234 |
# do not require exact release to avoid conflicts when having |
235 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
236 |
Requires: mesa = %{version} |
237 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
238 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
239 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
240 |
|
241 |
%if %{with hardware_gallium} |
242 |
%package -n %{libd3dname} |
243 |
Summary: Mesa Direct3D9 state tracker |
244 |
Group: System/Libraries |
245 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
246 |
|
247 |
%package -n %{libd3dname}-devel |
248 |
Summary: Development files for Mesa Direct3D9 state tracker |
249 |
Group: Development/C |
250 |
Requires: %{libd3dname} = %{version}-%{release} |
251 |
Provides: lib%{d3dname}-devel |
252 |
Provides: %{d3dname}-devel |
253 |
Provides: libd3d-devel |
254 |
%endif |
255 |
|
256 |
%package -n %{libglname}-devel |
257 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
258 |
Group: Development/C |
259 |
Requires: %{libglname} = %{version}-%{release} |
260 |
Provides: lib%{glname}-devel = %{version}-%{release} |
261 |
Provides: %{glname}-devel = %{version}-%{release} |
262 |
Provides: GL-devel |
263 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
264 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
265 |
Provides: libMesaGL-devel = %{version}-%{release} |
266 |
Provides: MesaGL-devel = %{version}-%{release} |
267 |
Provides: libgl-devel |
268 |
|
269 |
%if %{enable_egl} |
270 |
%package -n %{libeglname} |
271 |
Summary: Files for Mesa (EGL libs) |
272 |
Group: System/Libraries |
273 |
Provides: %{libeglname_virt} = %{version}-%{release} |
274 |
|
275 |
%package -n %{libeglname}-devel |
276 |
Summary: Development files for Mesa (EGL libs) |
277 |
Group: Development/C |
278 |
Requires: %{libeglname} = %{version}-%{release} |
279 |
Provides: EGL-devel |
280 |
Provides: lib%{eglname}-devel |
281 |
Provides: %{eglname}-devel |
282 |
Provides: libegl-devel |
283 |
%endif |
284 |
|
285 |
%package -n %{libosmesaname} |
286 |
Summary: Mesa offscreen rendering library |
287 |
Group: System/Libraries |
288 |
|
289 |
%package -n %{osmesadevel} |
290 |
Summary: Development files for libosmesa |
291 |
Group: Development/C |
292 |
Requires: %{libosmesaname} = %{version}-%{release} |
293 |
Provides: osmesa-devel = %{version}-%{release} |
294 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
295 |
|
296 |
%package -n %{libglapiname} |
297 |
Summary: Files for mesa (glapi libs) |
298 |
Group: System/Libraries |
299 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
300 |
|
301 |
%package -n %{libglapiname}-devel |
302 |
Summary: Development files for glapi libs |
303 |
Group: Development/C |
304 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
305 |
Provides: lib%{glapiname}-devel |
306 |
Provides: %{libglapiname}-devel |
307 |
|
308 |
%package -n %{libglesv1name} |
309 |
Summary: Files for Mesa (glesv1 libs) |
310 |
Group: System/Libraries |
311 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
312 |
|
313 |
%package -n %{libglesv1name}-devel |
314 |
Summary: Development files for glesv1 libs |
315 |
Group: Development/C |
316 |
Requires: %{libglesv1name} = %{version}-%{release} |
317 |
Provides: lib%{glesv1name}-devel |
318 |
Provides: %{glesv1name}-devel |
319 |
Provides: libglesv1-devel |
320 |
|
321 |
%package -n %{libglesv2name} |
322 |
Summary: Files for Mesa (glesv2 libs) |
323 |
Group: System/Libraries |
324 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
325 |
|
326 |
%package -n %{libglesv2name}-devel |
327 |
Summary: Development files for glesv2 libs |
328 |
Group: Development/C |
329 |
Requires: %{libglesv2name} = %{version}-%{release} |
330 |
Requires: %{libeglname}-devel = %{version}-%{release} |
331 |
Provides: lib%{glesv2name}-devel |
332 |
Provides: %{glesv2name}-devel |
333 |
Provides: libglesv2-devel |
334 |
|
335 |
%if %{enable_vg} |
336 |
%package -n %{libopenvgname} |
337 |
Summary: Files for MESA (OpenVG libs) |
338 |
Group: System/Libraries |
339 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
340 |
|
341 |
%package -n %{libopenvgname}-devel |
342 |
Summary: Development files vor OpenVG libs |
343 |
Group: Development/C |
344 |
Requires: %{libopenvgname} = %{version}-%{release} |
345 |
Provides: lib%{openvgname}-devel |
346 |
Provides: %{openvgname}-devel |
347 |
Provides: libopenvg-devel |
348 |
%endif |
349 |
|
350 |
%if %{enable_wayland} |
351 |
%package -n %{libgbmname} |
352 |
Summary: Files for Mesa (gbm libs) |
353 |
Group: System/Libraries |
354 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
355 |
|
356 |
%package -n %{libgbmname}-devel |
357 |
Summary: Development files for Mesa (gbm libs) |
358 |
Group: Development/C |
359 |
Requires: %{libgbmname} = %{version}-%{release} |
360 |
Provides: lib%{gbmname}-devel |
361 |
Provides: %{gbmname}-devel |
362 |
|
363 |
%package -n %{libwaylandeglname} |
364 |
Summary: Files for Mesa (Wayland EGL libs) |
365 |
Group: System/Libraries |
366 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
367 |
|
368 |
%package -n %{libwaylandeglname}-devel |
369 |
Summary: Development files for Mesa (Wayland EGL libs) |
370 |
Group: Development/C |
371 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
372 |
Provides: lib%{waylandeglname}-devel |
373 |
Provides: %{waylandeglname}-devel |
374 |
%endif |
375 |
|
376 |
%if %{with hardware_gallium} |
377 |
%package -n %{_lib}vdpau-driver-nouveau |
378 |
Summary: VDPAU plugin for nouveau driver |
379 |
Group: System/Libraries |
380 |
# temporary: |
381 |
%rename vdpau-driver-nouveau |
382 |
|
383 |
%package -n %{_lib}vdpau-driver-r300 |
384 |
Summary: VDPAU plugin for r300 driver |
385 |
Group: System/Libraries |
386 |
# temporary: |
387 |
%rename vdpau-driver-r300 |
388 |
|
389 |
%package -n %{_lib}vdpau-driver-r600 |
390 |
Summary: VDPAU plugin for r600 driver |
391 |
Group: System/Libraries |
392 |
# temporary: |
393 |
%rename vdpau-driver-r600 |
394 |
|
395 |
%package -n %{_lib}vdpau-driver-radeonsi |
396 |
Summary: VDPAU plugin for radeonsi driver |
397 |
Group: System/Libraries |
398 |
# temporary: |
399 |
%rename vdpau-driver-radeonsi |
400 |
|
401 |
%package -n %{libxaname} |
402 |
Summary: Files for Mesa XA state tracker |
403 |
Group: System/Libraries |
404 |
Provides: %{libxaname_virt} = %{version}-%{release} |
405 |
|
406 |
%package -n %{libxaname}-devel |
407 |
Summary: Development files for XA libs |
408 |
Group: Development/C |
409 |
Requires: %{libxaname_virt} = %{version}-%{release} |
410 |
Provides: lib%{xaname}-devel |
411 |
Provides: %{libxaname}-devel |
412 |
%endif |
413 |
|
414 |
%if %{enable_vulkan} |
415 |
%package -n %{libvulkanname}_intel |
416 |
Summary: Mesa vulkan driver for Intel GPU |
417 |
Group: System/Libraries |
418 |
|
419 |
%package -n %{libvulkanname}-devel |
420 |
Summary: Mesa's Vulkan development files |
421 |
Group: Development/C |
422 |
Requires: %{libvulkanname}_intel = %{version}-%{release} |
423 |
Provides: libvulkan-devel |
424 |
Provides: libvulkan_intel-devel |
425 |
%endif |
426 |
|
427 |
%package common-devel |
428 |
Summary: Meta package for mesa devel |
429 |
Group: Development/C |
430 |
Provides: Mesa-common-devel = %{version}-%{release} |
431 |
Provides: hackMesa-common-devel = %{version} |
432 |
Obsoletes: Mesa-common-devel < %{version} |
433 |
Obsoletes: hackMesa-common-devel < %{version} |
434 |
Requires: %{libglname}-devel = %{version} |
435 |
Requires: mesaglu-devel |
436 |
Requires: freeglut-devel |
437 |
Requires: %{libeglname}-devel = %{version} |
438 |
Requires: %{libglesv1name}-devel = %{version} |
439 |
Requires: %{libglesv2name}-devel = %{version} |
440 |
|
441 |
#------------------------------------------------------------------------------ |
442 |
|
443 |
%description |
444 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
445 |
%if %{build_plf} |
446 |
|
447 |
This package is in the "tainted" section because it enables some |
448 |
OpenGL extentions that are covered by software patents. |
449 |
%endif |
450 |
|
451 |
%description common-devel |
452 |
Mesa common metapackage devel |
453 |
|
454 |
%if %{enable_egl} |
455 |
%description -n %{libeglname} |
456 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
457 |
EGL parts. |
458 |
|
459 |
%description -n %{libeglname}-devel |
460 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
461 |
EGL development parts. |
462 |
%endif |
463 |
|
464 |
%description -n %{libglname} |
465 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
466 |
GL and GLX parts. |
467 |
|
468 |
%if %{build_plf} |
469 |
This package is in the "tainted" section because it enables some |
470 |
OpenGL extentions that are covered by software patents. |
471 |
%endif |
472 |
|
473 |
%description -n %{dridrivers} |
474 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
475 |
DRI drivers. |
476 |
|
477 |
%description -n %{libglname}-devel |
478 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
479 |
|
480 |
This package contains the headers needed to compile Mesa programs. |
481 |
|
482 |
%description -n %{libglesv1name} |
483 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
484 |
well-defined subset profiles of OpenGL. |
485 |
|
486 |
This package provides the OpenGL ES library version 1. |
487 |
|
488 |
%description -n %{libosmesaname} |
489 |
Mesa offscreen rendering libraries for rendering OpenGL into |
490 |
application-allocated blocks of memory. |
491 |
|
492 |
%description -n %{osmesadevel} |
493 |
This package contains the headers needed to compile programs against |
494 |
the Mesa offscreen rendering library. |
495 |
|
496 |
%description -n %{libglapiname} |
497 |
This packages provides the glapi shared library used by gallium. |
498 |
|
499 |
%description -n %{libglapiname}-devel |
500 |
This package contains the headers needed to compile programes against glapi shared library. |
501 |
|
502 |
%description -n %{libglesv1name}-devel |
503 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
504 |
|
505 |
%if %{with hardware_gallium} |
506 |
%description -n %{libd3dname} |
507 |
Mesa Direct3D9 state tracker. |
508 |
|
509 |
%description -n %{libd3dname}-devel |
510 |
Mesa Direct3D9 state tracker development package. |
511 |
%endif |
512 |
|
513 |
%description -n %{libglesv2name} |
514 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
515 |
well-defined subset profiles of OpenGL. |
516 |
|
517 |
This package provides the OpenGL ES library version 2. |
518 |
|
519 |
%description -n %{libglesv2name}-devel |
520 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
521 |
|
522 |
%if %{enable_vg} |
523 |
%description -n %{libopenvgname} |
524 |
OpenVG is a royalty-free, cross-platform API that provides a low-level hardware |
525 |
acceleration interface for vector graphics libraries such as Flash and SVG. |
526 |
|
527 |
%description -n %{libopenvgname}-devel |
528 |
Development files for OpenVG library. |
529 |
%endif |
530 |
|
531 |
%if %{enable_wayland} |
532 |
%description -n %{libgbmname} |
533 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
534 |
GBM (Graphics Buffer Manager) parts. |
535 |
|
536 |
%description -n %{libgbmname}-devel |
537 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
538 |
GBM (Graphics Buffer Manager) development parts. |
539 |
|
540 |
%description -n %{libwaylandeglname} |
541 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
542 |
Wayland EGL platform parts. |
543 |
|
544 |
%description -n %{libwaylandeglname}-devel |
545 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
546 |
Wayland EGL platform development parts. |
547 |
%endif |
548 |
|
549 |
%if %{with hardware_gallium} |
550 |
%description -n %{libxaname} |
551 |
This packages provides the xa shared library used by gallium. |
552 |
|
553 |
%description -n %{libxaname}-devel |
554 |
This package contains the headers needed to compile programes against xa shared library. |
555 |
|
556 |
%description -n %{_lib}vdpau-driver-nouveau |
557 |
This packages provides a VPDAU plugin to enable video acceleration |
558 |
with the nouveau driver. |
559 |
|
560 |
%description -n %{_lib}vdpau-driver-r300 |
561 |
This packages provides a VPDAU plugin to enable video acceleration |
562 |
with the r300 driver. |
563 |
|
564 |
%description -n %{_lib}vdpau-driver-r600 |
565 |
This packages provides a VPDAU plugin to enable video acceleration |
566 |
with the r600 driver. |
567 |
|
568 |
%description -n %{_lib}vdpau-driver-radeonsi |
569 |
This packages provides a VPDAU plugin to enable video acceleration |
570 |
with the radeonsi driver. |
571 |
%endif |
572 |
|
573 |
%if %{enable_vulkan} |
574 |
%description -n %{libvulkanname}_intel |
575 |
This package contains the Vulkan parts for Mesa's Intel driver. |
576 |
|
577 |
%description -n %{libvulkanname}-devel |
578 |
This package contains the development files for Mesa's Vulkan implementation. |
579 |
%endif |
580 |
|
581 |
#------------------------------------------------------------------------------ |
582 |
|
583 |
%prep |
584 |
%if %{git} |
585 |
%setup -q -n mesa-%{git} |
586 |
#setup -q -n mesa-%{git_branch}-%{git} |
587 |
%else |
588 |
%setup -q -n mesa-%{main_version}%{vsuffix} |
589 |
%endif |
590 |
|
591 |
%autopatch -p1 |
592 |
|
593 |
# Duplicate source tree for OSMesa, since building both versions out-of-tree |
594 |
# would break build. - Anssi 12/2012 |
595 |
all=$(ls) |
596 |
mkdir -p build-osmesa |
597 |
cp -al $all build-osmesa |
598 |
|
599 |
%build |
600 |
# (re)generate auto* generated files using our autotools and libtoolize |
601 |
autoreconf -vfi |
602 |
|
603 |
# for bin/test-driver: |
604 |
automake --add-missing |
605 |
|
606 |
%configure2_5x --enable-dri \ |
607 |
--enable-glx \ |
608 |
--enable-glx-tls \ |
609 |
--with-dri-driverdir=%{driver_dir} \ |
610 |
--with-dri-drivers="%{dri_drivers}" \ |
611 |
%if %{enable_vulkan} |
612 |
--with-vulkan-drivers=intel \ |
613 |
%endif |
614 |
--enable-va \ |
615 |
%if %{enable_egl} |
616 |
--enable-egl \ |
617 |
%else |
618 |
--disable-egl \ |
619 |
%endif |
620 |
%if %{enable_wayland} |
621 |
--with-egl-platforms=x11,wayland,drm \ |
622 |
--enable-gbm \ |
623 |
--enable-shared-glapi \ |
624 |
%endif |
625 |
--enable-gles1 \ |
626 |
--enable-gles2 \ |
627 |
%if %{enable_vg} |
628 |
--enable-openvg \ |
629 |
%endif |
630 |
--enable-gallium-egl \ |
631 |
--disable-xvmc \ |
632 |
--enable-vdpau \ |
633 |
%if %{with hardware_gallium} |
634 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \ |
635 |
--enable-gallium-llvm \ |
636 |
--enable-xa \ |
637 |
--enable-nine \ |
638 |
%else |
639 |
--disable-gallium-llvm \ |
640 |
--with-gallium-drivers=swrast \ |
641 |
%endif |
642 |
%if %{build_plf} |
643 |
--enable-texture-float \ |
644 |
%endif |
645 |
# end of configure options |
646 |
|
647 |
|
648 |
# Build OSMesa separately, since we want to build OSMesa without shared-glapi, |
649 |
# since doing that causes OSMesa to miss the OpenGL symbols. |
650 |
# See e.g. https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599 |
651 |
# -Anssi 12/2012 |
652 |
|
653 |
pushd build-osmesa |
654 |
autoreconf -vfi |
655 |
%configure2_5x \ |
656 |
--enable-osmesa \ |
657 |
--disable-dri \ |
658 |
--disable-glx \ |
659 |
--disable-egl \ |
660 |
--enable-shared-glapi \ |
661 |
--without-gallium-drivers |
662 |
popd |
663 |
|
664 |
%make |
665 |
%make -C build-osmesa || ( %make -C build-osmesa/src/mesa/program libprogram.la && %make -C build-osmesa ) |
666 |
|
667 |
%install |
668 |
%makeinstall_std -C build-osmesa |
669 |
%makeinstall_std |
670 |
|
671 |
# FIXME: strip will likely break the hardlink |
672 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
673 |
# to prevent proprietary driver installers from removing them |
674 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
675 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
676 |
for l in ../libGL.so.*; do cp -a $l .; done |
677 |
popd |
678 |
|
679 |
%ifarch %{x86_64} |
680 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
681 |
%endif |
682 |
|
683 |
# .so files are not needed by vdpau |
684 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
685 |
|
686 |
# .la files are not needed by mesa |
687 |
find %{buildroot} -name '*.la' -delete |
688 |
|
689 |
# use swrastg if built (Anssi 12/2011) |
690 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
691 |
|
692 |
#------------------------------------------------------------------------------ |
693 |
|
694 |
%files |
695 |
#doc docs/COPYING |
696 |
%config(noreplace) %{_sysconfdir}/drirc |
697 |
|
698 |
%files -n %{dridrivers} |
699 |
#doc docs/COPYING |
700 |
%dir %{_libdir}/dri |
701 |
%{_libdir}/dri/*_dri.so |
702 |
%{_libdir}/dri/*_drv*.so |
703 |
|
704 |
%files -n %{libglname} |
705 |
#doc docs/COPYING |
706 |
%{_libdir}/libGL.so.* |
707 |
%dir %{_libdir}/mesa |
708 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
709 |
|
710 |
%if %{enable_egl} |
711 |
%files -n %{libeglname} |
712 |
#doc docs/COPYING |
713 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
714 |
%if !%{enable_wayland} |
715 |
# st_GL, built only when shared glapi is not enabled |
716 |
%{_libdir}/egl/st_GL.so |
717 |
%endif |
718 |
%endif |
719 |
|
720 |
%files -n %{libosmesaname} |
721 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
722 |
|
723 |
%files -n %{libglapiname} |
724 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
725 |
|
726 |
%files -n %{libglesv1name} |
727 |
#doc docs/COPYING |
728 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
729 |
|
730 |
%if %{with hardware_gallium} |
731 |
%files -n %{libd3dname} |
732 |
#doc docs/COPYING |
733 |
%{_libdir}/d3d/*.so.* |
734 |
%endif |
735 |
|
736 |
%files -n %{libglesv2name} |
737 |
#doc docs/COPYING |
738 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
739 |
|
740 |
%if %{enable_vg} |
741 |
%files -n %{libopenvgname} |
742 |
#doc docs/COPYING |
743 |
%{_libdir}/libOpenVG.so.%{openvgmajor}{,.*} |
744 |
%endif |
745 |
|
746 |
%if %{enable_wayland} |
747 |
%files -n %{libgbmname} |
748 |
%{_libdir}/libgbm.so.%{gbmmajor} |
749 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
750 |
|
751 |
%files -n %{libwaylandeglname} |
752 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
753 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
754 |
%endif |
755 |
|
756 |
%if %{with hardware_gallium} |
757 |
%files -n %{libxaname} |
758 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
759 |
%endif |
760 |
|
761 |
%files -n %{libglname}-devel |
762 |
#doc docs/COPYING |
763 |
%dir %{_includedir}/GL |
764 |
%{_includedir}/GL/gl.h |
765 |
%{_includedir}/GL/glcorearb.h |
766 |
%{_includedir}/GL/glext.h |
767 |
%{_includedir}/GL/gl_mangle.h |
768 |
%{_includedir}/GL/glx.h |
769 |
%{_includedir}/GL/glxext.h |
770 |
%{_includedir}/GL/glx_mangle.h |
771 |
%{_includedir}/GL/mesa_glinterop.h |
772 |
%{_includedir}/GL/wglext.h |
773 |
%{_libdir}/libGL.so |
774 |
%{_libdir}/pkgconfig/gl.pc |
775 |
%{_libdir}/pkgconfig/dri.pc |
776 |
|
777 |
%dir %{_includedir}/GL/internal |
778 |
%{_includedir}/GL/internal/dri_interface.h |
779 |
|
780 |
%files common-devel |
781 |
%if %{enable_egl} |
782 |
%files -n %{libeglname}-devel |
783 |
#doc docs/COPYING |
784 |
%{_includedir}/EGL |
785 |
%{_includedir}/KHR |
786 |
%{_libdir}/libEGL.so |
787 |
%{_libdir}/pkgconfig/egl.pc |
788 |
%endif |
789 |
|
790 |
%files -n %{osmesadevel} |
791 |
%dir %{_includedir}/GL |
792 |
%{_includedir}/GL/osmesa.h |
793 |
%{_libdir}/libOSMesa.so |
794 |
%{_libdir}/pkgconfig/osmesa.pc |
795 |
|
796 |
%files -n %{libglapiname}-devel |
797 |
%{_libdir}/libglapi.so |
798 |
|
799 |
%files -n %{libglesv1name}-devel |
800 |
%{_includedir}/GLES |
801 |
%{_libdir}/libGLESv1_CM.so |
802 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
803 |
|
804 |
%files -n %{libglesv2name}-devel |
805 |
%{_includedir}/GLES2 |
806 |
%{_includedir}/GLES3 |
807 |
%{_libdir}/libGLESv2.so |
808 |
%{_libdir}/pkgconfig/glesv2.pc |
809 |
|
810 |
%if %{with hardware_gallium} |
811 |
%files -n %{libd3dname}-devel |
812 |
%{_includedir}/d3dadapter |
813 |
%{_libdir}/d3d/*.so |
814 |
%{_libdir}/pkgconfig/d3d.pc |
815 |
%endif |
816 |
|
817 |
%if %{enable_vg} |
818 |
%files -n %{libopenvgname}-devel |
819 |
%{_includedir}/VG |
820 |
%{_libdir}/libOpenVG.so |
821 |
%{_libdir}/pkgconfig/vg.pc |
822 |
%endif |
823 |
|
824 |
%if %{enable_wayland} |
825 |
%files -n %{libgbmname}-devel |
826 |
%{_includedir}/gbm.h |
827 |
%{_libdir}/libgbm.so |
828 |
%{_libdir}/pkgconfig/gbm.pc |
829 |
|
830 |
%files -n %{libwaylandeglname}-devel |
831 |
%{_libdir}/libwayland-egl.so |
832 |
%{_libdir}/pkgconfig/wayland-egl.pc |
833 |
%endif |
834 |
|
835 |
%if %{with hardware_gallium} |
836 |
%files -n %{libxaname}-devel |
837 |
%{_libdir}/libxatracker.so |
838 |
%{_includedir}/xa_tracker.h |
839 |
%{_includedir}/xa_composite.h |
840 |
%{_includedir}/xa_context.h |
841 |
%{_libdir}/pkgconfig/xatracker.pc |
842 |
|
843 |
%files -n %{_lib}vdpau-driver-nouveau |
844 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
845 |
|
846 |
%files -n %{_lib}vdpau-driver-r300 |
847 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
848 |
|
849 |
%files -n %{_lib}vdpau-driver-r600 |
850 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
851 |
|
852 |
%files -n %{_lib}vdpau-driver-radeonsi |
853 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
854 |
%endif |
855 |
|
856 |
%if %{enable_vulkan} |
857 |
%files -n %{libvulkanname}_intel |
858 |
%dir %{_datadir}/vulkan |
859 |
%dir %{_datadir}/vulkan/icd.d |
860 |
%{_datadir}/vulkan/icd.d/intel_icd.json |
861 |
# (akien) No lib major? |
862 |
%{_libdir}/libvulkan_intel.so |
863 |
|
864 |
%files -n %{libvulkanname}-devel |
865 |
%{_includedir}/vulkan/ |
866 |
%endif |