1 |
%if "%distro_section" == "tainted" |
2 |
%global build_plf 1 |
3 |
%else |
4 |
%global build_plf 0 |
5 |
%endif |
6 |
|
7 |
# (cg) Cheater... |
8 |
%define Werror_cflags %nil |
9 |
|
10 |
# (aco) Needed for the dri drivers |
11 |
%define _disable_ld_no_undefined 1 |
12 |
|
13 |
# http://cgit.freedesktop.org/mesa/mesa/commit/?h=9.1&id=38e728498b8ef63bb7dce77c64af11c98ec2efa4 |
14 |
%define git 0 |
15 |
%define git_branch 9.2 |
16 |
%bcond_without hardware_gallium |
17 |
|
18 |
%define opengl_ver 3.3 |
19 |
|
20 |
# define version, RC & release: |
21 |
%define main_version 11.1.0 |
22 |
#define relc 3 |
23 |
%define rel 8 |
24 |
|
25 |
%define release %mkrel %{rel} |
26 |
%define vsuffix %nil |
27 |
|
28 |
%if 0%{?relc} |
29 |
%define vsuffix -rc%{relc} |
30 |
%endif |
31 |
|
32 |
%if %{git} |
33 |
%if %{relc} |
34 |
%define release %mkrel 1~rc%{relc}.1.git%{git}.%{rel} |
35 |
%else |
36 |
%define release %mkrel 1.git%{git}.%{rel} |
37 |
%endif |
38 |
%endif |
39 |
|
40 |
%define makedepend %{_bindir}/gccmakedep |
41 |
|
42 |
%define d3dname d3d |
43 |
%define eglname mesaegl |
44 |
%define glname mesagl |
45 |
%define glwname mesaglw |
46 |
%define glesv1name mesaglesv1 |
47 |
%define glesv2name mesaglesv2 |
48 |
%define openvgname mesaopenvg |
49 |
%define glapiname glapi |
50 |
%define gbmname gbm |
51 |
%define waylandeglname wayland-egl |
52 |
%define xaname xatracker |
53 |
|
54 |
%define d3dmajor 1 |
55 |
%define eglmajor 1 |
56 |
%define glmajor 1 |
57 |
%define glwmajor 1 |
58 |
%define glesv1major 1 |
59 |
%define glesv2major 2 |
60 |
%define openvgmajor 1 |
61 |
%define glapimajor 0 |
62 |
%define gbmmajor 1 |
63 |
%define waylandeglmajor 1 |
64 |
%define osmesamajor 8 |
65 |
%define xamajor 2 |
66 |
|
67 |
%define libd3dname %mklibname %{d3dname} %{d3dmajor} |
68 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
69 |
%define libglname %mklibname %{glname} %{glmajor} |
70 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
71 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
72 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
73 |
%define libopenvgname %mklibname %{openvgname} %{openvgmajor} |
74 |
%define libglapiname %mklibname %{glapiname} %{glapimajor} |
75 |
%define libgbmname %mklibname %{gbmname} %{gbmmajor} |
76 |
%define libwaylandeglname %mklibname %{waylandeglname} %{waylandeglmajor} |
77 |
%define libosmesaname %mklibname osmesa %{osmesamajor} |
78 |
%define libxaname %mklibname %{xaname} %{xamajor} |
79 |
|
80 |
%define dridrivers %mklibname dri-drivers |
81 |
|
82 |
%define osmesadevel %mklibname osmesa -d |
83 |
|
84 |
# Architecture-independent Virtual provides: |
85 |
%define libd3dname_virt lib%{d3dname} |
86 |
%define libeglname_virt lib%{eglname} |
87 |
%define libglname_virt lib%{glname} |
88 |
%define libglwname_virt lib%{glwname} |
89 |
%define libglesv1name_virt lib%{glesv1name} |
90 |
%define libglesv2name_virt lib%{glesv2name} |
91 |
%define libopenvgname_virt lib%{openvgname} |
92 |
%define libglapiname_virt lib%{glapiname} |
93 |
%define libgbmname_virt lib%{gbmname} |
94 |
%define libwaylandeglname_virt lib%{waylandeglname} |
95 |
%define libxaname_virt lib%{xaname} |
96 |
|
97 |
%define oldlibglname %mklibname MesaGL 1 |
98 |
|
99 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
100 |
%define driver_dir %{_libdir}/dri |
101 |
|
102 |
%define enable_egl 1 |
103 |
%define enable_vg 0 |
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_arm "nouveau,r200,radeon,swrast" |
112 |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
113 |
|
114 |
Name: mesa |
115 |
Version: %{main_version}%{?relc:~%{expand:rc%%relc}} |
116 |
Release: %{release} |
117 |
Summary: OpenGL %{opengl_ver} compatible 3D graphics library |
118 |
Group: System/Libraries |
119 |
|
120 |
BuildRequires: pkgconfig(xfixes) >= 4.0.3 |
121 |
BuildRequires: pkgconfig(xshmfence) |
122 |
BuildRequires: pkgconfig(xt) >= 1.0.5 |
123 |
BuildRequires: pkgconfig(xmu) >= 1.0.3 |
124 |
BuildRequires: pkgconfig(x11) >= 1.3.3 |
125 |
BuildRequires: pkgconfig(xdamage) >= 1.1.1 |
126 |
BuildRequires: libexpat-devel >= 2.0.1 |
127 |
BuildRequires: gccmakedep |
128 |
BuildRequires: x11-proto-devel >= 7.3 |
129 |
BuildRequires: pkgconfig(libdrm) >= 2.4.60 |
130 |
|
131 |
BuildRequires: pkgconfig(xcb-dri3) |
132 |
BuildRequires: pkgconfig(xcb-present) >= 1.11 |
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 |
140 |
BuildRequires: flex |
141 |
BuildRequires: libelf-devel |
142 |
%if %{with hardware_gallium} |
143 |
BuildRequires: llvm-devel >= 3.7.1-2 |
144 |
%endif |
145 |
BuildRequires: pkgconfig(libudev) |
146 |
BuildRequires: pkgconfig(libva) |
147 |
BuildRequires: pkgconfig(vdpau) |
148 |
%if %{enable_wayland} |
149 |
BuildRequires: wayland-devel |
150 |
%endif |
151 |
|
152 |
URL: http://www.mesa3d.org |
153 |
%if %{git} |
154 |
Source0: %{name}-%{git}.tar.bz2 |
155 |
# (blino) snapshot of 9.0 branch |
156 |
#Source0: %{name}-%{git_branch}-%{git}.tar.bz2 |
157 |
%else |
158 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{main_version}/mesa-%{main_version}%{vsuffix}.tar.xz |
159 |
%endif |
160 |
Source3: make-git-snapshot.sh |
161 |
|
162 |
# Instructions to setup your repository clone |
163 |
# git://git.freedesktop.org/git/mesa/mesa |
164 |
# git checkout mesa_7_5_branch |
165 |
# git branch mdv-cherry-picks |
166 |
# git am ../02??-*.patch |
167 |
# git branch mdv-redhat |
168 |
# git am ../03??-*.patch |
169 |
# git branch mdv-patches |
170 |
# git am ../09??-*.patch |
171 |
# In order to update to the branch via patches, issue this command: |
172 |
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' |
173 |
|
174 |
# upstream fixes |
175 |
Patch001: 0001-nv50-nvc0-fix-use-after-free-when-vertex-buffers-are.patch |
176 |
Patch002: 0002-mesa-varray-set-double-arrays-to-non-normalised.patch |
177 |
Patch003: 0003-gallium-util-return-correct-number-of-bound-vertex-b.patch |
178 |
Patch004: 0004-mesa-shader-return-correct-attribute-location-for-do.patch |
179 |
#Patch005: 0005-cherry-ignore-drop-the-re-enable-DCC-on-Stoney.patch |
180 |
Patch006: 0006-tgsi-scan-add-flag-colors_written.patch |
181 |
Patch007: 0007-r600g-write-all-MRTs-only-if-there-is-exactly-one-ou.patch |
182 |
Patch008: 0008-radeonsi-don-t-call-of-u_prims_for_vertices-for-patc.patch |
183 |
Patch009: 0009-radeonsi-apply-the-streamout-workaround-to-Fiji-as-w.patch |
184 |
Patch010: 0010-gallium-radeon-fix-Hyper-Z-hangs-by-programming-PA_S.patch |
185 |
Patch011: 0011-nv50-ir-can-t-have-predication-and-immediates.patch |
186 |
Patch012: 0012-gk104-ir-simplify-and-fool-proof-texbar-algorithm.patch |
187 |
Patch013: 0013-i965-Add-MESA_FORMAT_B8G8R8X8_SRGB-to-brw_format_for.patch |
188 |
Patch014: 0014-i965-Add-B8G8R8X8_SRGB-to-the-alpha-format-override.patch |
189 |
#Patch015: 0015-cherry-ignore-don-t-pick-a-specific-i965-formats-pat.patch |
190 |
Patch016: 0016-glsl-assign-varying-locations-to-tess-shaders-when-d.patch |
191 |
Patch017: 0017-meta-generate_mipmap-Work-around-GLES-1.x-problem-wi.patch |
192 |
Patch018: 0018-vc4-Warn-instead-of-abort-ing-on-exec-ioctl-failures.patch |
193 |
Patch019: 0019-i965-Fix-crash-when-calling-glViewport-with-no-surfa.patch |
194 |
Patch020: 0020-nvc0-free-memory-allocated-by-the-prog-which-reads-M.patch |
195 |
Patch021: 0021-nv50-nvc0-free-memory-allocated-by-performance-metri.patch |
196 |
Patch022: 0022-nv50-free-memory-allocated-by-the-prog-which-reads-M.patch |
197 |
Patch023: 0023-configure.ac-use-pkg-config-for-libelf.patch |
198 |
Patch024: 0024-configure-check-for-python2.7-for-PYTHON2.patch |
199 |
Patch025: 0025-configura.ac-fix-test-for-SSE4.1-assembler-support.patch |
200 |
Patch026: 0026-mesa-Don-t-leak-ATIfs-instructions-in-DeleteFragment.patch |
201 |
Patch027: 0027-gallium-radeon-only-dispose-locally-created-target-m.patch |
202 |
Patch028: 0028-freedreno-ir3-fix-32-bit-builds-with-pointer-to-int-.patch |
203 |
Patch029: 0029-vc4-Keep-sample-mask-writes-from-being-reordered-aft.patch |
204 |
Patch030: 0030-ralloc-Fix-ralloc_adopt-to-the-old-context-s-last-ch.patch |
205 |
Patch031: 0031-glx-dri3-a-drawable-might-not-be-bound-at-wait-time.patch |
206 |
Patch032: 0032-gallium-radeon-fix-regression-in-a-number-of-driver-.patch |
207 |
Patch033: 0033-nvc0-don-t-forget-to-reset-VTX_TMP-bufctx-slot-after.patch |
208 |
Patch034: 0034-r600-fix-constant-buffer-size-programming.patch |
209 |
Patch035: 0035-nv50-ir-float-s32-0xff-float-u8-not-s8.patch |
210 |
Patch036: 0036-drirc-Disable-ARB_blend_func_extended-for-Heaven-4.0.patch |
211 |
Patch037: 0037-glsl-pass-stage-into-mark-function.patch |
212 |
Patch038: 0038-glsl-fp64-add-helper-for-dual-slot-double-detection.patch |
213 |
Patch039: 0039-glsl-fix-count_attribute_slots-to-allow-for-differen.patch |
214 |
Patch040: 0040-glsl-only-update-doubles-inputs-for-vertex-inputs.patch |
215 |
Patch041: 0041-glsl-Fix-varying-struct-locations-when-varying-packi.patch |
216 |
Patch042: 0042-nvc0-Set-winding-order-regardless-of-domain.patch |
217 |
Patch043: 0043-nv50-nvc0-make-sure-there-s-pushbuf-space-and-that-w.patch |
218 |
Patch044: 0044-program-add-_mesa_reserve_parameter_storage.patch |
219 |
Patch045: 0045-st-mesa-fix-GLSL-uniform-updates-for-glBitmap-glDraw.patch |
220 |
Patch046: 0046-nv50-nvc0-fix-crash-when-increasing-bsp-bo-size-for-.patch |
221 |
Patch047: 0047-nvc0-scale-up-inter_bo-size-so-that-it-s-16M-for-a-4.patch |
222 |
Patch048: 0048-nir-Add-a-lower_fdiv-option-turn-fdiv-into-fmul-frcp.patch |
223 |
Patch049: 0049-st-mesa-check-state-mesa-in-early-return-check-in-st.patch |
224 |
Patch050: 0050-mesa-Add-KBL-PCI-IDs-and-platform-information.patch |
225 |
|
226 |
# Cherry picks |
227 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
228 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
229 |
|
230 |
# Patches "liberated" from Fedora: |
231 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
232 |
# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat |
233 |
|
234 |
# Patches from ChromiumOS |
235 |
# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD |
236 |
|
237 |
# Mageia/Mandriva patches |
238 |
# git format-patch --start-number 900 mdv-redhat..mdv-patches |
239 |
# (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167 |
240 |
#Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch |
241 |
|
242 |
#------------------------------------------------------------------------------ |
243 |
|
244 |
# package mesa |
245 |
License: MIT |
246 |
Requires: %{libglname} = %{version}-%{release} |
247 |
Provides: hackMesa = %{version} |
248 |
Obsoletes: hackMesa <= %{version} |
249 |
Provides: Mesa = %{version} |
250 |
Obsoletes: Mesa < %{version} |
251 |
|
252 |
%package -n %{libglname} |
253 |
Summary: Files for Mesa (GL and GLX libs) |
254 |
Group: System/Libraries |
255 |
Obsoletes: %{oldlibglname} < 6.4 |
256 |
Provides: %{oldlibglname} = %{version}-%{release} |
257 |
Provides: %{libglname_virt} = %{version}-%{release} |
258 |
Requires: %{dridrivers} >= %{version}-%{release} |
259 |
%if %{build_plf} |
260 |
Requires: %mklibname txc-dxtn |
261 |
%endif |
262 |
|
263 |
# (anssi) Forces the upgrade of x11-server-common to happen before |
264 |
# alternatives removal, which allows x11-server-common to grab the symlink. |
265 |
Conflicts: x11-server-common < 1.3.0.0-17 |
266 |
|
267 |
%package -n %{dridrivers} |
268 |
Summary: Mesa DRI drivers |
269 |
Group: System/Libraries |
270 |
# do not require exact release to avoid conflicts when having |
271 |
# x86_64 dri drivers from tainted and i586 dri drivers from core |
272 |
Requires: mesa = %{version} |
273 |
Conflicts: %{_lib}MesaGL1 < 7.7-5 |
274 |
Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4 |
275 |
Provides: %{_lib}dri-drivers-experimental = %{version}-%{release} |
276 |
|
277 |
%if %{with hardware_gallium} |
278 |
%package -n %{libd3dname} |
279 |
Summary: Mesa Direct3D9 state tracker |
280 |
Group: System/Libraries |
281 |
Provides: %{libd3dname_virt} = %{version}-%{release} |
282 |
|
283 |
%package -n %{libd3dname}-devel |
284 |
Summary: Development files for Mesa Direct3D9 state tracker |
285 |
Group: Development/C |
286 |
Requires: %{libd3dname} = %{version}-%{release} |
287 |
Provides: lib%{d3dname}-devel |
288 |
Provides: %{d3dname}-devel |
289 |
Provides: libd3d-devel |
290 |
%endif |
291 |
|
292 |
%package -n %{libglname}-devel |
293 |
Summary: Development files for Mesa (OpenGL compatible 3D lib) |
294 |
Group: Development/C |
295 |
Requires: %{libglname} = %{version}-%{release} |
296 |
Provides: lib%{glname}-devel = %{version}-%{release} |
297 |
Provides: %{glname}-devel = %{version}-%{release} |
298 |
Provides: GL-devel |
299 |
Obsoletes: %{oldlibglname}-devel < 6.4 |
300 |
Provides: %{oldlibglname}-devel = %{version}-%{release} |
301 |
Provides: libMesaGL-devel = %{version}-%{release} |
302 |
Provides: MesaGL-devel = %{version}-%{release} |
303 |
Provides: libgl-devel |
304 |
|
305 |
%if %{enable_egl} |
306 |
%package -n %{libeglname} |
307 |
Summary: Files for Mesa (EGL libs) |
308 |
Group: System/Libraries |
309 |
Provides: %{libeglname_virt} = %{version}-%{release} |
310 |
|
311 |
%package -n %{libeglname}-devel |
312 |
Summary: Development files for Mesa (EGL libs) |
313 |
Group: Development/C |
314 |
Requires: %{libeglname} = %{version}-%{release} |
315 |
Provides: EGL-devel |
316 |
Provides: lib%{eglname}-devel |
317 |
Provides: %{eglname}-devel |
318 |
Provides: libegl-devel |
319 |
%endif |
320 |
|
321 |
%package -n %{libosmesaname} |
322 |
Summary: Mesa offscreen rendering library |
323 |
Group: System/Libraries |
324 |
|
325 |
%package -n %{osmesadevel} |
326 |
Summary: Development files for libosmesa |
327 |
Group: Development/C |
328 |
Requires: %{libosmesaname} = %{version}-%{release} |
329 |
Provides: osmesa-devel = %{version}-%{release} |
330 |
Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3 |
331 |
|
332 |
%package -n %{libglapiname} |
333 |
Summary: Files for mesa (glapi libs) |
334 |
Group: System/Libraries |
335 |
Provides: %{libglapiname_virt} = %{version}-%{release} |
336 |
|
337 |
%package -n %{libglapiname}-devel |
338 |
Summary: Development files for glapi libs |
339 |
Group: Development/C |
340 |
Requires: %{libglapiname_virt} = %{version}-%{release} |
341 |
Provides: lib%{glapiname}-devel |
342 |
Provides: %{libglapiname}-devel |
343 |
|
344 |
%package -n %{libglesv1name} |
345 |
Summary: Files for Mesa (glesv1 libs) |
346 |
Group: System/Libraries |
347 |
Provides: %{libglesv1name_virt} = %{version}-%{release} |
348 |
|
349 |
%package -n %{libglesv1name}-devel |
350 |
Summary: Development files for glesv1 libs |
351 |
Group: Development/C |
352 |
Requires: %{libglesv1name} = %{version}-%{release} |
353 |
Provides: lib%{glesv1name}-devel |
354 |
Provides: %{glesv1name}-devel |
355 |
Provides: libglesv1-devel |
356 |
|
357 |
%package -n %{libglesv2name} |
358 |
Summary: Files for Mesa (glesv2 libs) |
359 |
Group: System/Libraries |
360 |
Provides: %{libglesv2name_virt} = %{version}-%{release} |
361 |
|
362 |
%package -n %{libglesv2name}-devel |
363 |
Summary: Development files for glesv2 libs |
364 |
Group: Development/C |
365 |
Requires: %{libglesv2name} = %{version}-%{release} |
366 |
Requires: %{libeglname}-devel = %{version}-%{release} |
367 |
Provides: lib%{glesv2name}-devel |
368 |
Provides: %{glesv2name}-devel |
369 |
Provides: libglesv2-devel |
370 |
|
371 |
%if %{enable_vg} |
372 |
%package -n %{libopenvgname} |
373 |
Summary: Files for MESA (OpenVG libs) |
374 |
Group: System/Libraries |
375 |
Provides: %{libopenvgname_virt} = %{version}-%{release} |
376 |
|
377 |
%package -n %{libopenvgname}-devel |
378 |
Summary: Development files vor OpenVG libs |
379 |
Group: Development/C |
380 |
Requires: %{libopenvgname} = %{version}-%{release} |
381 |
Provides: lib%{openvgname}-devel |
382 |
Provides: %{openvgname}-devel |
383 |
Provides: libopenvg-devel |
384 |
%endif |
385 |
|
386 |
%if %{enable_wayland} |
387 |
%package -n %{libgbmname} |
388 |
Summary: Files for Mesa (gbm libs) |
389 |
Group: System/Libraries |
390 |
Provides: %{libgbmname_virt} = %{version}-%{release} |
391 |
|
392 |
%package -n %{libgbmname}-devel |
393 |
Summary: Development files for Mesa (gbm libs) |
394 |
Group: Development/C |
395 |
Requires: %{libgbmname} = %{version}-%{release} |
396 |
Provides: lib%{gbmname}-devel |
397 |
Provides: %{gbmname}-devel |
398 |
|
399 |
%package -n %{libwaylandeglname} |
400 |
Summary: Files for Mesa (Wayland EGL libs) |
401 |
Group: System/Libraries |
402 |
Provides: %{libwaylandeglname_virt} = %{version}-%{release} |
403 |
|
404 |
%package -n %{libwaylandeglname}-devel |
405 |
Summary: Development files for Mesa (Wayland EGL libs) |
406 |
Group: Development/C |
407 |
Requires: %{libwaylandeglname} = %{version}-%{release} |
408 |
Provides: lib%{waylandeglname}-devel |
409 |
Provides: %{waylandeglname}-devel |
410 |
%endif |
411 |
|
412 |
%if %{with hardware_gallium} |
413 |
%package -n %{_lib}vdpau-driver-nouveau |
414 |
Summary: VDPAU plugin for nouveau driver |
415 |
Group: System/Libraries |
416 |
# temporary: |
417 |
%rename vdpau-driver-nouveau |
418 |
|
419 |
%package -n %{_lib}vdpau-driver-r300 |
420 |
Summary: VDPAU plugin for r300 driver |
421 |
Group: System/Libraries |
422 |
# temporary: |
423 |
%rename vdpau-driver-r300 |
424 |
|
425 |
%package -n %{_lib}vdpau-driver-r600 |
426 |
Summary: VDPAU plugin for r600 driver |
427 |
Group: System/Libraries |
428 |
# temporary: |
429 |
%rename vdpau-driver-r600 |
430 |
|
431 |
%package -n %{_lib}vdpau-driver-radeonsi |
432 |
Summary: VDPAU plugin for radeonsi driver |
433 |
Group: System/Libraries |
434 |
# temporary: |
435 |
%rename vdpau-driver-radeonsi |
436 |
|
437 |
%package -n %{libxaname} |
438 |
Summary: Files for Mesa XA state tracker |
439 |
Group: System/Libraries |
440 |
Provides: %{libxaname_virt} = %{version}-%{release} |
441 |
|
442 |
%package -n %{libxaname}-devel |
443 |
Summary: Development files for XA libs |
444 |
Group: Development/C |
445 |
Requires: %{libxaname_virt} = %{version}-%{release} |
446 |
Provides: lib%{xaname}-devel |
447 |
Provides: %{libxaname}-devel |
448 |
%endif |
449 |
|
450 |
%package common-devel |
451 |
Summary: Meta package for mesa devel |
452 |
Group: Development/C |
453 |
Provides: Mesa-common-devel = %{version}-%{release} |
454 |
Provides: hackMesa-common-devel = %{version} |
455 |
Obsoletes: Mesa-common-devel < %{version} |
456 |
Obsoletes: hackMesa-common-devel < %{version} |
457 |
Requires: %{libglname}-devel = %{version} |
458 |
Requires: mesaglu-devel |
459 |
Requires: freeglut-devel |
460 |
Requires: %{libeglname}-devel = %{version} |
461 |
Requires: %{libglesv1name}-devel = %{version} |
462 |
Requires: %{libglesv2name}-devel = %{version} |
463 |
|
464 |
#------------------------------------------------------------------------------ |
465 |
|
466 |
%description |
467 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
468 |
%if %{build_plf} |
469 |
|
470 |
This package is in the "tainted" section because it enables some |
471 |
OpenGL extentions that are covered by software patents. |
472 |
%endif |
473 |
|
474 |
%description common-devel |
475 |
Mesa common metapackage devel |
476 |
|
477 |
%if %{enable_egl} |
478 |
%description -n %{libeglname} |
479 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
480 |
EGL parts. |
481 |
|
482 |
%description -n %{libeglname}-devel |
483 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
484 |
EGL development parts. |
485 |
%endif |
486 |
|
487 |
%description -n %{libglname} |
488 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
489 |
GL and GLX parts. |
490 |
|
491 |
%if %{build_plf} |
492 |
This package is in the "tainted" section because it enables some |
493 |
OpenGL extentions that are covered by software patents. |
494 |
%endif |
495 |
|
496 |
%description -n %{dridrivers} |
497 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
498 |
DRI drivers. |
499 |
|
500 |
%description -n %{libglname}-devel |
501 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
502 |
|
503 |
This package contains the headers needed to compile Mesa programs. |
504 |
|
505 |
%description -n %{libglesv1name} |
506 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
507 |
well-defined subset profiles of OpenGL. |
508 |
|
509 |
This package provides the OpenGL ES library version 1. |
510 |
|
511 |
%description -n %{libosmesaname} |
512 |
Mesa offscreen rendering libraries for rendering OpenGL into |
513 |
application-allocated blocks of memory. |
514 |
|
515 |
%description -n %{osmesadevel} |
516 |
This package contains the headers needed to compile programs against |
517 |
the Mesa offscreen rendering library. |
518 |
|
519 |
%description -n %{libglapiname} |
520 |
This packages provides the glapi shared library used by gallium. |
521 |
|
522 |
%description -n %{libglapiname}-devel |
523 |
This package contains the headers needed to compile programes against glapi shared library. |
524 |
|
525 |
%description -n %{libglesv1name}-devel |
526 |
This package contains the headers needed to compile OpenGL ES 1 programs. |
527 |
|
528 |
%if %{with hardware_gallium} |
529 |
%description -n %{libd3dname} |
530 |
Mesa Direct3D9 state tracker. |
531 |
|
532 |
%description -n %{libd3dname}-devel |
533 |
Mesa Direct3D9 state tracker development package. |
534 |
%endif |
535 |
|
536 |
%description -n %{libglesv2name} |
537 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
538 |
well-defined subset profiles of OpenGL. |
539 |
|
540 |
This package provides the OpenGL ES library version 2. |
541 |
|
542 |
%description -n %{libglesv2name}-devel |
543 |
This package contains the headers needed to compile OpenGL ES 2 programs. |
544 |
|
545 |
%if %{enable_vg} |
546 |
%description -n %{libopenvgname} |
547 |
OpenVG is a royalty-free, cross-platform API that provides a low-level hardware |
548 |
acceleration interface for vector graphics libraries such as Flash and SVG. |
549 |
|
550 |
%description -n %{libopenvgname}-devel |
551 |
Development files for OpenVG library. |
552 |
%endif |
553 |
|
554 |
%if %{enable_wayland} |
555 |
%description -n %{libgbmname} |
556 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
557 |
GBM (Graphics Buffer Manager) parts. |
558 |
|
559 |
%description -n %{libgbmname}-devel |
560 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
561 |
GBM (Graphics Buffer Manager) development parts. |
562 |
|
563 |
%description -n %{libwaylandeglname} |
564 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
565 |
Wayland EGL platform parts. |
566 |
|
567 |
%description -n %{libwaylandeglname}-devel |
568 |
Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. |
569 |
Wayland EGL platform development parts. |
570 |
%endif |
571 |
|
572 |
%if %{with hardware_gallium} |
573 |
%description -n %{libxaname} |
574 |
This packages provides the xa shared library used by gallium. |
575 |
|
576 |
%description -n %{libxaname}-devel |
577 |
This package contains the headers needed to compile programes against xa shared library. |
578 |
|
579 |
%description -n %{_lib}vdpau-driver-nouveau |
580 |
This packages provides a VPDAU plugin to enable video acceleration |
581 |
with the nouveau driver. |
582 |
|
583 |
%description -n %{_lib}vdpau-driver-r300 |
584 |
This packages provides a VPDAU plugin to enable video acceleration |
585 |
with the r300 driver. |
586 |
|
587 |
%description -n %{_lib}vdpau-driver-r600 |
588 |
This packages provides a VPDAU plugin to enable video acceleration |
589 |
with the r600 driver. |
590 |
|
591 |
%description -n %{_lib}vdpau-driver-radeonsi |
592 |
This packages provides a VPDAU plugin to enable video acceleration |
593 |
with the radeonsi driver. |
594 |
%endif |
595 |
|
596 |
#------------------------------------------------------------------------------ |
597 |
|
598 |
%prep |
599 |
%if %{git} |
600 |
%setup -q -n mesa-%{git} |
601 |
#setup -q -n mesa-%{git_branch}-%{git} |
602 |
%else |
603 |
%setup -q -n mesa-%{main_version}%{vsuffix} |
604 |
%endif |
605 |
|
606 |
%autopatch -p1 |
607 |
|
608 |
# Duplicate source tree for OSMesa, since building both versions out-of-tree |
609 |
# would break build. - Anssi 12/2012 |
610 |
all=$(ls) |
611 |
mkdir -p build-osmesa |
612 |
cp -al $all build-osmesa |
613 |
|
614 |
%build |
615 |
# (re)generate auto* generated files using our autotools and libtoolize |
616 |
autoreconf -vfi |
617 |
|
618 |
# for bin/test-driver: |
619 |
automake --add-missing |
620 |
|
621 |
%configure2_5x --enable-dri \ |
622 |
--enable-glx \ |
623 |
--enable-glx-tls \ |
624 |
--with-dri-driverdir=%{driver_dir} \ |
625 |
--with-dri-drivers="%{dri_drivers}" \ |
626 |
--enable-va \ |
627 |
%if %{enable_egl} |
628 |
--enable-egl \ |
629 |
%else |
630 |
--disable-egl \ |
631 |
%endif |
632 |
%if %{enable_wayland} |
633 |
--with-egl-platforms=x11,wayland,drm \ |
634 |
--enable-gbm \ |
635 |
--enable-shared-glapi \ |
636 |
%endif |
637 |
--enable-gles1 \ |
638 |
--enable-gles2 \ |
639 |
%if %{enable_vg} |
640 |
--enable-openvg \ |
641 |
%endif |
642 |
--enable-gallium-egl \ |
643 |
--disable-xvmc \ |
644 |
--enable-vdpau \ |
645 |
%if %{with hardware_gallium} |
646 |
--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \ |
647 |
--enable-gallium-llvm \ |
648 |
--enable-xa \ |
649 |
--enable-nine \ |
650 |
%else |
651 |
--disable-gallium-llvm \ |
652 |
--with-gallium-drivers=swrast \ |
653 |
%endif |
654 |
%if %{build_plf} |
655 |
--enable-texture-float \ |
656 |
%endif |
657 |
# end of configure options |
658 |
|
659 |
|
660 |
# Build OSMesa separately, since we want to build OSMesa without shared-glapi, |
661 |
# since doing that causes OSMesa to miss the OpenGL symbols. |
662 |
# See e.g. https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599 |
663 |
# -Anssi 12/2012 |
664 |
|
665 |
pushd build-osmesa |
666 |
autoreconf -vfi |
667 |
%configure2_5x \ |
668 |
--enable-osmesa \ |
669 |
--disable-dri \ |
670 |
--disable-glx \ |
671 |
--disable-egl \ |
672 |
--enable-shared-glapi \ |
673 |
--without-gallium-drivers |
674 |
popd |
675 |
|
676 |
%make |
677 |
%make -C build-osmesa || ( %make -C build-osmesa/src/mesa/program libprogram.la && %make -C build-osmesa ) |
678 |
|
679 |
%install |
680 |
%makeinstall_std -C build-osmesa |
681 |
%makeinstall_std |
682 |
|
683 |
# FIXME: strip will likely break the hardlink |
684 |
# (blino) hardlink libGL files in %{_libdir}/mesa |
685 |
# to prevent proprietary driver installers from removing them |
686 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa |
687 |
pushd $RPM_BUILD_ROOT%{_libdir}/mesa |
688 |
for l in ../libGL.so.*; do cp -a $l .; done |
689 |
popd |
690 |
|
691 |
%ifarch %{x86_64} |
692 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
693 |
%endif |
694 |
|
695 |
# .so files are not needed by vdpau |
696 |
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so |
697 |
|
698 |
# .la files are not needed by mesa |
699 |
find %{buildroot} -name '*.la' -delete |
700 |
|
701 |
# use swrastg if built (Anssi 12/2011) |
702 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
703 |
|
704 |
#------------------------------------------------------------------------------ |
705 |
|
706 |
%files |
707 |
%doc docs/COPYING |
708 |
%config(noreplace) %{_sysconfdir}/drirc |
709 |
|
710 |
%files -n %{dridrivers} |
711 |
%doc docs/COPYING |
712 |
%dir %{_libdir}/dri |
713 |
%{_libdir}/dri/*_dri.so |
714 |
%{_libdir}/dri/*_drv*.so |
715 |
|
716 |
%files -n %{libglname} |
717 |
%doc docs/COPYING |
718 |
%{_libdir}/libGL.so.* |
719 |
%dir %{_libdir}/mesa |
720 |
%{_libdir}/mesa/libGL.so.%{glmajor}{,.*} |
721 |
|
722 |
%if %{enable_egl} |
723 |
%files -n %{libeglname} |
724 |
%doc docs/COPYING |
725 |
%{_libdir}/libEGL.so.%{eglmajor}{,.*} |
726 |
%if !%{enable_wayland} |
727 |
# st_GL, built only when shared glapi is not enabled |
728 |
%{_libdir}/egl/st_GL.so |
729 |
%endif |
730 |
%endif |
731 |
|
732 |
%files -n %{libosmesaname} |
733 |
%{_libdir}/libOSMesa.so.%{osmesamajor}{,.*} |
734 |
|
735 |
%files -n %{libglapiname} |
736 |
%{_libdir}/libglapi.so.%{glapimajor}{,.*} |
737 |
|
738 |
%files -n %{libglesv1name} |
739 |
%doc docs/COPYING |
740 |
%{_libdir}/libGLESv1_CM.so.%{glesv1major}{,.*} |
741 |
|
742 |
%if %{with hardware_gallium} |
743 |
%files -n %{libd3dname} |
744 |
%doc docs/COPYING |
745 |
%{_libdir}/d3d/*.so.* |
746 |
%endif |
747 |
|
748 |
%files -n %{libglesv2name} |
749 |
%doc docs/COPYING |
750 |
%{_libdir}/libGLESv2.so.%{glesv2major}{,.*} |
751 |
|
752 |
%if %{enable_vg} |
753 |
%files -n %{libopenvgname} |
754 |
%doc docs/COPYING |
755 |
%{_libdir}/libOpenVG.so.%{openvgmajor}{,.*} |
756 |
%endif |
757 |
|
758 |
%if %{enable_wayland} |
759 |
%files -n %{libgbmname} |
760 |
%{_libdir}/libgbm.so.%{gbmmajor} |
761 |
%{_libdir}/libgbm.so.%{gbmmajor}.* |
762 |
|
763 |
%files -n %{libwaylandeglname} |
764 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor} |
765 |
%{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* |
766 |
%endif |
767 |
|
768 |
%if %{with hardware_gallium} |
769 |
%files -n %{libxaname} |
770 |
%{_libdir}/libxatracker.so.%{xamajor}{,.*} |
771 |
%endif |
772 |
|
773 |
%files -n %{libglname}-devel |
774 |
%doc docs/COPYING |
775 |
%dir %{_includedir}/GL |
776 |
%{_includedir}/GL/gl.h |
777 |
%{_includedir}/GL/glcorearb.h |
778 |
%{_includedir}/GL/glext.h |
779 |
%{_includedir}/GL/gl_mangle.h |
780 |
%{_includedir}/GL/wglext.h |
781 |
%{_includedir}/GL/glx.h |
782 |
%{_includedir}/GL/glxext.h |
783 |
%{_includedir}/GL/glx_mangle.h |
784 |
%{_libdir}/libGL.so |
785 |
%{_libdir}/pkgconfig/gl.pc |
786 |
%{_libdir}/pkgconfig/dri.pc |
787 |
|
788 |
%dir %{_includedir}/GL/internal |
789 |
%{_includedir}/GL/internal/dri_interface.h |
790 |
|
791 |
%files common-devel |
792 |
%if %{enable_egl} |
793 |
%files -n %{libeglname}-devel |
794 |
%doc docs/COPYING |
795 |
%{_includedir}/EGL |
796 |
%{_includedir}/KHR |
797 |
%{_libdir}/libEGL.so |
798 |
%{_libdir}/pkgconfig/egl.pc |
799 |
%endif |
800 |
|
801 |
%files -n %{osmesadevel} |
802 |
%dir %{_includedir}/GL |
803 |
%{_includedir}/GL/osmesa.h |
804 |
%{_libdir}/libOSMesa.so |
805 |
%{_libdir}/pkgconfig/osmesa.pc |
806 |
|
807 |
%files -n %{libglapiname}-devel |
808 |
%{_libdir}/libglapi.so |
809 |
|
810 |
%files -n %{libglesv1name}-devel |
811 |
%{_includedir}/GLES |
812 |
%{_libdir}/libGLESv1_CM.so |
813 |
%{_libdir}/pkgconfig/glesv1_cm.pc |
814 |
|
815 |
%files -n %{libglesv2name}-devel |
816 |
%{_includedir}/GLES2 |
817 |
%{_includedir}/GLES3 |
818 |
%{_libdir}/libGLESv2.so |
819 |
%{_libdir}/pkgconfig/glesv2.pc |
820 |
|
821 |
%if %{with hardware_gallium} |
822 |
%files -n %{libd3dname}-devel |
823 |
%{_includedir}/d3dadapter |
824 |
%{_libdir}/d3d/*.so |
825 |
%{_libdir}/pkgconfig/d3d.pc |
826 |
%endif |
827 |
|
828 |
%if %{enable_vg} |
829 |
%files -n %{libopenvgname}-devel |
830 |
%{_includedir}/VG |
831 |
%{_libdir}/libOpenVG.so |
832 |
%{_libdir}/pkgconfig/vg.pc |
833 |
%endif |
834 |
|
835 |
%if %{enable_wayland} |
836 |
%files -n %{libgbmname}-devel |
837 |
%{_includedir}/gbm.h |
838 |
%{_libdir}/libgbm.so |
839 |
%{_libdir}/pkgconfig/gbm.pc |
840 |
|
841 |
%files -n %{libwaylandeglname}-devel |
842 |
%{_libdir}/libwayland-egl.so |
843 |
%{_libdir}/pkgconfig/wayland-egl.pc |
844 |
%endif |
845 |
|
846 |
%if %{with hardware_gallium} |
847 |
%files -n %{libxaname}-devel |
848 |
%{_libdir}/libxatracker.so |
849 |
%{_includedir}/xa_tracker.h |
850 |
%{_includedir}/xa_composite.h |
851 |
%{_includedir}/xa_context.h |
852 |
%{_libdir}/pkgconfig/xatracker.pc |
853 |
|
854 |
%files -n %{_lib}vdpau-driver-nouveau |
855 |
%{_libdir}/vdpau/libvdpau_nouveau.so.* |
856 |
|
857 |
%files -n %{_lib}vdpau-driver-r300 |
858 |
%{_libdir}/vdpau/libvdpau_r300.so.* |
859 |
|
860 |
%files -n %{_lib}vdpau-driver-r600 |
861 |
%{_libdir}/vdpau/libvdpau_r600.so.* |
862 |
|
863 |
%files -n %{_lib}vdpau-driver-radeonsi |
864 |
%{_libdir}/vdpau/libvdpau_radeonsi.so.* |
865 |
%endif |