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