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