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