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