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