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