/[packages]/cauldron/mesa/current/SPECS/mesa.spec
ViewVC logotype

Contents of /cauldron/mesa/current/SPECS/mesa.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 823068 - (show annotations) (download)
Sat Jun 13 18:48:45 2015 UTC (4 years, 8 months ago) by tmb
File size: 23885 byte(s)
- i965: Fix HW blitter pitch limits
- i915: Blit RGBX<->RGBA drawpixels
- i965: Export format comparison for blitting between miptrees
- i965: do_blit_drawpixels: decode array formats


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

  ViewVC Help
Powered by ViewVC 1.1.26