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

  ViewVC Help
Powered by ViewVC 1.1.26