/[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 564877 - (show annotations) (download)
Sun Jan 5 18:52:01 2014 UTC (10 years, 9 months ago) by tmb
File size: 23294 byte(s)
- r600g/sb: fix stack size computation on evergreen
- mesa: fix interpretation of glClearBuffer(drawbuffer)
- dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context
- mesa: Fix error code generation in glBeginConditionalRender()
- Use line number information from entire function expression
- i965: Fix 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet creation
- i915: Add support for gl_FragData[0] reads.
- st/mesa: use pipe_sampler_view_release() (fixes segfault)
- llvmpipe: use pipe_sampler_view_release() to avoid segfault
- clover: Remove unused variable
- pipe_loader/sw: close dev->lib when initialization fails
- radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcode
- r600/compute: Free compiled kernels when deleting compute state
- r600/compute: Use the correct FREE macro when deleting compute state
- radeon/llvm: Free target data at end of optimization
- st/vdpau: Destroy context when initialization fails
- r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CM
- r600g: fix SUMO2 pci id
- Revert "mesa: Remove GLXContextID typedef from glx.h."
- glcpp: error on multiple #else/#elif directives
- st/mesa: fix glClear with multiple colorbuffers and different formats
- i965/gen6: Fix HiZ hang in WebGL Google Maps
- glsl: Teach ir_variable_refcount about ir_loop::counter variables.
- glsl: Fix inconsistent assumptions about ir_loop::counter.
- nv50: fix a small leak on context destroy


1 %define bootstrap 0
2 %{?_without_bootstrap: %global bootstrap 0}
3 %{?_with_bootstrap: %global bootstrap 1}
4
5 %if "%distro_section" == "tainted"
6 %global build_plf 1
7 %else
8 %global build_plf 0
9 %endif
10
11 # (cg) Cheater...
12 %define Werror_cflags %nil
13
14 # (aco) Needed for the dri drivers
15 %define _disable_ld_no_undefined 1
16
17 # http://cgit.freedesktop.org/mesa/mesa/commit/?h=9.1&id=38e728498b8ef63bb7dce77c64af11c98ec2efa4
18 %define git 0
19 %define git_branch 9.2
20 %define with_hardware 1
21
22 %define opengl_ver 3.0
23
24 %define relc 0
25 %define name mesa
26 %define fversion 10.0.1
27 %define version 10.0.1
28 %define rel 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(xt) >= 1.0.5
128 BuildRequires: pkgconfig(xmu) >= 1.0.3
129 BuildRequires: pkgconfig(x11) >= 1.3.3
130 BuildRequires: pkgconfig(xdamage) >= 1.1.1
131 BuildRequires: libexpat-devel >= 2.0.1
132 BuildRequires: gccmakedep
133 BuildRequires: x11-proto-devel >= 7.3
134 BuildRequires: pkgconfig(libdrm) >= 2.4.49
135
136 BuildRequires: pkgconfig(xext) >= 1.1.1
137 BuildRequires: pkgconfig(xxf86vm) >= 1.1.0
138 BuildRequires: pkgconfig(xi) >= 1.3
139 BuildRequires: pkgconfig(talloc)
140 BuildRequires: libxml2-python
141 BuildRequires: makedepend
142 BuildRequires: bison flex
143 BuildRequires: libelf-devel
144 BuildRequires: llvm-devel > 3.3-1
145 BuildRequires: pkgconfig(libudev)
146 BuildRequires: pkgconfig(vdpau)
147 %if %{enable_wayland}
148 BuildRequires: wayland-devel
149 %endif
150
151 URL: http://www.mesa3d.org
152 %if %{git}
153 Source0: %{name}-%{git}.tar.bz2
154 # (blino) snapshot of 9.0 branch
155 #Source0: %{name}-%{git_branch}-%{git}.tar.bz2
156 %else
157 Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{fversion}%{vsuffix}.%{src_type}
158 %endif
159 Source3: make-git-snapshot.sh
160 # (tmb) disable as it breaks the build
161 #Patch0: MesaLib-9.2.0-rc1-automake-1.14.patch
162
163 # Instructions to setup your repository clone
164 # git://git.freedesktop.org/git/mesa/mesa
165 # git checkout mesa_7_5_branch
166 # git branch mdv-cherry-picks
167 # git am ../02??-*.patch
168 # git branch mdv-redhat
169 # git am ../03??-*.patch
170 # git branch mdv-patches
171 # git am ../09??-*.patch
172 # In order to update to the branch via patches, issue this command:
173 # git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/'
174
175 # Upstream git
176 Patch101: 0101-r600g-sb-fix-stack-size-computation-on-evergreen.patch
177 Patch102: 0102-mesa-fix-interpretation-of-glClearBuffer-drawbuffer.patch
178 Patch103: 0103-dri_util-Don-t-assume-__DRIcontext-driverPrivate-is-.patch
179 Patch104: 0104-mesa-Fix-error-code-generation-in-glBeginConditional.patch
180 Patch105: 0105-Use-line-number-information-from-entire-function-exp.patch
181 Patch106: 0106-i965-Fix-3DSTATE_PUSH_CONSTANT_ALLOC_PS-packet-creat.patch
182 Patch107: 0107-i915-Add-support-for-gl_FragData-0-reads.patch
183 Patch108: 0108-st-mesa-use-pipe_sampler_view_release.patch
184 Patch109: 0109-llvmpipe-use-pipe_sampler_view_release-to-avoid-segf.patch
185 Patch110: 0110-clover-Remove-unused-variable.patch
186 Patch111: 0111-pipe_loader-sw-close-dev-lib-when-initialization-fai.patch
187 Patch112: 0112-radeon-compute-Stop-leaking-LLVMContexts-in-radeon_l.patch
188 Patch113: 0113-r600-compute-Free-compiled-kernels-when-deleting-com.patch
189 Patch114: 0114-r600-compute-Use-the-correct-FREE-macro-when-deletin.patch
190 Patch115: 0115-radeon-llvm-Free-target-data-at-end-of-optimization.patch
191 Patch116: 0116-st-vdpau-Destroy-context-when-initialization-fails.patch
192 Patch117: 0117-r600-pipe-Stop-leaking-context-start_compute_cs_cmd..patch
193 Patch118: 0118-r600g-fix-SUMO2-pci-id.patch
194 Patch119: 0119-Revert-mesa-Remove-GLXContextID-typedef-from-glx.h.patch
195 Patch120: 0120-glcpp-error-on-multiple-else-elif-directives.patch
196 Patch121: 0121-st-mesa-fix-glClear-with-multiple-colorbuffers-and-d.patch
197 Patch122: 0122-i965-gen6-Fix-HiZ-hang-in-WebGL-Google-Maps.patch
198 Patch123: 0123-glsl-Teach-ir_variable_refcount-about-ir_loop-counte.patch
199 Patch124: 0124-glsl-Fix-inconsistent-assumptions-about-ir_loop-coun.patch
200 Patch125: 0125-nv50-fix-a-small-leak-on-context-destroy.patch
201
202 # Cherry picks
203 # git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks
204 Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch
205
206 # (blino) should be pushed to 9.0 branch upstream
207 #Patch202: 0202-radeon-llvm-Cleanup-makefile.patch
208 #Patch203: 0203-radeon-llvm-Remove-R600InstrInfo.td-from-TD_FILES.patch
209
210 # Patches "liberated" from Fedora:
211 # http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/
212 # git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat
213
214 # Patches from ChromiumOS
215 # http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD
216
217 # Mageia/Mandriva patches
218 # git format-patch --start-number 900 mdv-redhat..mdv-patches
219 # (blino) llvmpipe test programs link fails when ld --as-needed option is used, reported as fdo #52167
220 #Patch901: 0901-gallium-only-link-static-archives-between-ld-start-e.patch
221
222 #------------------------------------------------------------------------------
223
224 # package mesa
225 License: MIT
226 Requires: %{libglname} = %{version}-%{release}
227 Provides: hackMesa = %{version}
228 Obsoletes: hackMesa <= %{version}
229 Provides: Mesa = %{version}
230 Obsoletes: Mesa < %{version}
231
232 %package -n %{libglname}
233 Summary: Files for Mesa (GL and GLX libs)
234 Group: System/Libraries
235 Obsoletes: %{oldlibglname} < 6.4
236 Provides: %{oldlibglname} = %{version}-%{release}
237 Provides: %{libglname_virt} = %{version}-%{release}
238 Requires: %{dridrivers} >= %{version}-%{release}
239 %if %{build_plf}
240 Requires: %mklibname txc-dxtn
241 %endif
242
243 # (anssi) Forces the upgrade of x11-server-common to happen before
244 # alternatives removal, which allows x11-server-common to grab the symlink.
245 Conflicts: x11-server-common < 1.3.0.0-17
246
247 %package -n %{dridrivers}
248 Summary: Mesa DRI drivers
249 Group: System/Libraries
250 # do not require exact release to avoid conflicts when having
251 # x86_64 dri drivers from tainted and i586 dri drivers from core
252 Requires: mesa = %{version}
253 Conflicts: %{_lib}MesaGL1 < 7.7-5
254 Obsoletes: %{_lib}dri-drivers-experimental < 7.11.2-4
255 Provides: %{_lib}dri-drivers-experimental = %{version}-%{release}
256
257 %package -n %{libglname}-devel
258 Summary: Development files for Mesa (OpenGL compatible 3D lib)
259 Group: Development/C
260 Requires: %{libglname} = %{version}-%{release}
261 Provides: lib%{glname}-devel = %{version}-%{release}
262 Provides: %{glname}-devel = %{version}-%{release}
263 Provides: GL-devel
264 Obsoletes: %{oldlibglname}-devel < 6.4
265 Provides: %{oldlibglname}-devel = %{version}-%{release}
266 Provides: libMesaGL-devel = %{version}-%{release}
267 Provides: MesaGL-devel = %{version}-%{release}
268 Provides: libgl-devel
269
270 %if %{enable_egl}
271 %package -n %{libeglname}
272 Summary: Files for Mesa (EGL libs)
273 Group: System/Libraries
274 Provides: %{libeglname_virt} = %{version}-%{release}
275
276 %package -n %{libeglname}-devel
277 Summary: Development files for Mesa (EGL libs)
278 Group: Development/C
279 Requires: %{libeglname} = %{version}-%{release}
280 Provides: EGL-devel
281 Provides: lib%{eglname}-devel
282 Provides: %{eglname}-devel
283 Provides: libegl-devel
284 %endif
285
286 %package -n %{libosmesaname}
287 Summary: Mesa offscreen rendering library
288 Group: System/Libraries
289
290 %package -n %{osmesadevel}
291 Summary: Development files for libosmesa
292 Group: Development/C
293 Requires: %{libosmesaname} = %{version}-%{release}
294 Provides: osmesa-devel = %{version}-%{release}
295 Conflicts: MesaGL-devel < 8.1.0-0.git20120727.3
296
297 %package -n %{libglapiname}
298 Summary: Files for mesa (glapi libs)
299 Group: System/Libraries
300 Provides: %{libglapiname_virt} = %{version}-%{release}
301
302 %package -n %{libglapiname}-devel
303 Summary: Development files for glapi libs
304 Group: Development/C
305 Requires: %{libglapiname_virt} = %{version}-%{release}
306 Provides: lib%{glapiname}-devel
307 Provides: %{libglapiname}-devel
308
309 %package -n %{libglesv1name}
310 Summary: Files for Mesa (glesv1 libs)
311 Group: System/Libraries
312 Provides: %{libglesv1name_virt} = %{version}-%{release}
313
314 %package -n %{libglesv1name}-devel
315 Summary: Development files for glesv1 libs
316 Group: Development/C
317 Requires: %{libglesv1name} = %{version}-%{release}
318 Provides: lib%{glesv1name}-devel
319 Provides: %{glesv1name}-devel
320 Provides: libglesv1-devel
321
322 %package -n %{libglesv2name}
323 Summary: Files for Mesa (glesv2 libs)
324 Group: System/Libraries
325 Provides: %{libglesv2name_virt} = %{version}-%{release}
326
327 %package -n %{libglesv2name}-devel
328 Summary: Development files for glesv2 libs
329 Group: Development/C
330 Requires: %{libglesv2name} = %{version}-%{release}
331 Requires: %{libeglname}-devel = %{version}-%{release}
332 Provides: lib%{glesv2name}-devel
333 Provides: %{glesv2name}-devel
334 Provides: libglesv2-devel
335
336 %package -n %{libopenvgname}
337 Summary: Files for MESA (OpenVG libs)
338 Group: System/Libraries
339 Provides: %{libopenvgname_virt} = %{version}-%{release}
340
341 %package -n %{libopenvgname}-devel
342 Summary: Development files vor OpenVG libs
343 Group: Development/C
344 Requires: %{libopenvgname} = %{version}-%{release}
345 Provides: lib%{openvgname}-devel
346 Provides: %{openvgname}-devel
347 Provides: libopenvg-devel
348
349 %if %{enable_wayland}
350 %package -n %{libgbmname}
351 Summary: Files for Mesa (gbm libs)
352 Group: System/Libraries
353 Provides: %{libgbmname_virt} = %{version}-%{release}
354
355 %package -n %{libgbmname}-devel
356 Summary: Development files for Mesa (gbm libs)
357 Group: Development/C
358 Requires: %{libgbmname} = %{version}-%{release}
359 Provides: lib%{gbmname}-devel
360 Provides: %{gbmname}-devel
361
362 %package -n %{libwaylandeglname}
363 Summary: Files for Mesa (Wayland EGL libs)
364 Group: System/Libraries
365 Provides: %{libwaylandeglname_virt} = %{version}-%{release}
366
367 %package -n %{libwaylandeglname}-devel
368 Summary: Development files for Mesa (Wayland EGL libs)
369 Group: Development/C
370 Requires: %{libwaylandeglname} = %{version}-%{release}
371 Provides: lib%{waylandeglname}-devel
372 Provides: %{waylandeglname}-devel
373 %endif
374
375 %package -n %{_lib}vdpau-driver-nouveau
376 Summary: VDPAU plugin for nouveau driver
377 Group: System/Libraries
378 # temporary:
379 %rename vdpau-driver-nouveau
380
381 %package -n %{_lib}vdpau-driver-r600
382 Summary: VDPAU plugin for r600 driver
383 Group: System/Libraries
384 # temporary:
385 %rename vdpau-driver-r600
386
387 %package -n %{_lib}vdpau-driver-radeonsi
388 Summary: VDPAU plugin for radeonsi driver
389 Group: System/Libraries
390 # temporary:
391 %rename vdpau-driver-radeonsi
392
393 %package common-devel
394 Summary: Meta package for mesa devel
395 Group: Development/C
396 Provides: Mesa-common-devel = %{version}-%{release}
397 Provides: hackMesa-common-devel = %{version}
398 Obsoletes: Mesa-common-devel < %{version}
399 Obsoletes: hackMesa-common-devel < %{version}
400 Requires: %{libglname}-devel = %{version}
401 Requires: mesaglu-devel
402 Requires: freeglut-devel
403 Requires: %{libeglname}-devel = %{version}
404 Requires: %{libglesv1name}-devel = %{version}
405 Requires: %{libglesv2name}-devel = %{version}
406
407 #------------------------------------------------------------------------------
408
409 %description
410 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
411 %if %{build_plf}
412
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 common-devel
418 Mesa common metapackage devel
419
420 %if %{enable_egl}
421 %description -n %{libeglname}
422 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
423 EGL parts.
424
425 %description -n %{libeglname}-devel
426 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
427 EGL development parts.
428 %endif
429
430 %description -n %{libglname}
431 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
432 GL and GLX parts.
433
434 %if %{build_plf}
435 This package is in the "tainted" section because it enables some
436 OpenGL extentions that are covered by software patents.
437 %endif
438
439 %description -n %{dridrivers}
440 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
441 DRI drivers.
442
443 %description -n %{libglname}-devel
444 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
445
446 This package contains the headers needed to compile Mesa programs.
447
448 %description -n %{libglesv1name}
449 OpenGL ES is a low-level, lightweight API for advanced embedded graphics using
450 well-defined subset profiles of OpenGL.
451
452 This package provides the OpenGL ES library version 1.
453
454 %description -n %{libosmesaname}
455 Mesa offscreen rendering libraries for rendering OpenGL into
456 application-allocated blocks of memory.
457
458 %description -n %{osmesadevel}
459 This package contains the headers needed to compile programs against
460 the Mesa offscreen rendering library.
461
462 %description -n %{libglapiname}
463 This packages provides the glapi shared library used by gallium.
464
465 %description -n %{libglapiname}-devel
466 This package contains the headers needed to compile programes against glapi shared library.
467
468 %description -n %{libglesv1name}-devel
469 This package contains the headers needed to compile OpenGL ES 1 programs.
470
471 %description -n %{libglesv2name}
472 OpenGL ES is a low-level, lightweight API for advanced embedded graphics using
473 well-defined subset profiles of OpenGL.
474
475 This package provides the OpenGL ES library version 2.
476
477 %description -n %{libglesv2name}-devel
478 This package contains the headers needed to compile OpenGL ES 2 programs.
479
480 %description -n %{libopenvgname}
481 OpenVG is a royalty-free, cross-platform API that provides a low-level hardware
482 acceleration interface for vector graphics libraries such as Flash and SVG.
483
484 %description -n %{libopenvgname}-devel
485 Development files for OpenVG library.
486
487 %if %{enable_wayland}
488 %description -n %{libgbmname}
489 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
490 GBM (Graphics Buffer Manager) parts.
491
492 %description -n %{libgbmname}-devel
493 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
494 GBM (Graphics Buffer Manager) development parts.
495
496 %description -n %{libwaylandeglname}
497 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
498 Wayland EGL platform parts.
499
500 %description -n %{libwaylandeglname}-devel
501 Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
502 Wayland EGL platform development parts.
503 %endif
504
505 %description -n %{_lib}vdpau-driver-nouveau
506 This packages provides a VPDAU plugin to enable video acceleration
507 with the nouveau driver.
508
509 %description -n %{_lib}vdpau-driver-r600
510 This packages provides a VPDAU plugin to enable video acceleration
511 with the r600 driver.
512
513 %description -n %{_lib}vdpau-driver-radeonsi
514 This packages provides a VPDAU plugin to enable video acceleration
515 with the radeonsi driver.
516
517 #------------------------------------------------------------------------------
518
519 %prep
520 %if %{git}
521 %setup -q -n mesa-%{git}
522 #setup -q -n mesa-%{git_branch}-%{git}
523 %else
524 %setup -q -n Mesa-%{fversion}%{vsuffix}
525 %endif
526
527 %apply_patches
528
529 # Duplicate source tree for OSMesa, since building both versions out-of-tree
530 # would break build. - Anssi 12/2012
531 all=$(ls)
532 mkdir -p build-osmesa
533 cp -al $all build-osmesa
534
535 %build
536 # (re)generate auto* generated files using our autotools and libtoolize
537 autoreconf -vfi
538
539 # for bin/test-driver:
540 automake --add-missing
541
542 # fix build - TODO: should this be fixed in llvm somehow, or maybe the library
543 # symlinks should be moved to %{_libdir}? -Anssi 08/2012
544 export LDFLAGS="-L%{_libdir}/llvm"
545
546 %configure2_5x --enable-dri \
547 --enable-glx \
548 --with-dri-driverdir=%{driver_dir} \
549 --with-dri-drivers="%{dri_drivers}" \
550 %if %{enable_egl}
551 --enable-egl \
552 %else
553 --disable-egl \
554 %endif
555 %if %{enable_wayland}
556 --with-egl-platforms=x11,wayland,drm \
557 --enable-gbm \
558 --enable-shared-glapi \
559 %endif
560 --enable-gles1 \
561 --enable-gles2 \
562 --enable-openvg \
563 --enable-gallium-egl \
564 --disable-xvmc \
565 --enable-vdpau \
566 %if %{with_hardware}
567 --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast \
568 --enable-gallium-llvm \
569 %else
570 --disable-gallium-llvm \
571 --with-gallium-drivers=swrast \
572 %endif
573 %if %{build_plf}
574 --enable-texture-float \
575 %endif
576 # end of configure options
577
578
579 # Build OSMesa separately, since we want to build OSMesa without shared-glapi,
580 # since doing that causes OSMesa to miss the OpenGL symbols.
581 # See e.g. https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599
582 # -Anssi 12/2012
583
584 pushd build-osmesa
585 autoreconf -vfi
586 %configure2_5x \
587 --enable-osmesa \
588 --disable-dri \
589 --disable-glx \
590 --disable-egl \
591 --disable-shared-glapi \
592 --without-gallium-drivers
593 popd
594
595 %make
596 %make -C build-osmesa || ( %make -C build-osmesa/src/mesa/program libprogram.la && %make -C build-osmesa )
597
598 %install
599 %makeinstall_std -C build-osmesa
600 %makeinstall_std
601
602 # FIXME: strip will likely break the hardlink
603 # (blino) hardlink libGL files in %{_libdir}/mesa
604 # to prevent proprietary driver installers from removing them
605 mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa
606 pushd $RPM_BUILD_ROOT%{_libdir}/mesa
607 for l in ../libGL.so.*; do cp -a $l .; done
608 popd
609
610 %ifarch %{x86_64}
611 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri
612 %endif
613
614 # .so files are not needed by vdpau
615 rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so
616
617 # .la files are not needed by mesa
618 find %{buildroot} -name '*.la' -exec rm {} \;
619
620 # use swrastg if built (Anssi 12/2011)
621 [ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so
622
623 #------------------------------------------------------------------------------
624
625 %files
626 %defattr(-,root,root)
627 %doc docs/COPYING
628 %config(noreplace) %{_sysconfdir}/drirc
629
630 %files -n %{dridrivers}
631 %defattr(-,root,root)
632 %doc docs/COPYING
633 %ifnarch ppc64
634 %dir %{_libdir}/dri
635 # (blino) new mesa 8.1 build system seems to use a static libglsl
636 #%{_libdir}/dri/libglsl.so
637 %{_libdir}/dri/*_dri.so
638 %endif
639
640 %files -n %{libglname}
641 %defattr(-,root,root)
642 %doc docs/COPYING
643 %{_libdir}/libGL.so.*
644 %dir %{_libdir}/mesa
645 %{_libdir}/mesa/libGL.so.%{glmajor}*
646
647 %if %{enable_egl}
648 %files -n %{libeglname}
649 %defattr(-,root,root)
650 %doc docs/COPYING
651 %{_libdir}/libEGL.so.%{eglmajor}*
652 %dir %{_libdir}/egl
653 %if !%{enable_wayland}
654 # st_GL, built only when shared glapi is not enabled
655 %{_libdir}/egl/st_GL.so
656 %endif
657 %{_libdir}/egl/egl_gallium.so
658 %endif
659
660 %files -n %{libosmesaname}
661 %defattr(-,root,root)
662 %{_libdir}/libOSMesa.so.%{osmesamajor}*
663
664 %files -n %{libglapiname}
665 %defattr(-,root,root)
666 %{_libdir}/libglapi.so.%{glapimajor}*
667
668 %files -n %{libglesv1name}
669 %defattr(-,root,root)
670 %doc docs/COPYING
671 %{_libdir}/libGLESv1_CM.so.%{glesv1major}*
672
673 %files -n %{libglesv2name}
674 %defattr(-,root,root)
675 %doc docs/COPYING
676 %{_libdir}/libGLESv2.so.%{glesv2major}*
677
678 %files -n %{libopenvgname}
679 %defattr(-,root,root)
680 %doc docs/COPYING
681 %{_libdir}/libOpenVG.so.%{openvgmajor}*
682
683 %if %{enable_wayland}
684 %files -n %{libgbmname}
685 %{_libdir}/libgbm.so.%{gbmmajor}
686 %{_libdir}/libgbm.so.%{gbmmajor}.*
687 %{_libdir}/gbm/gbm_*.so
688 %{_libdir}/gallium-pipe/pipe_*.so
689
690 %files -n %{libwaylandeglname}
691 %{_libdir}/libwayland-egl.so.%{waylandeglmajor}
692 %{_libdir}/libwayland-egl.so.%{waylandeglmajor}.*
693 %endif
694
695
696 %files -n %{libglname}-devel
697 %defattr(-,root,root)
698 %doc docs/COPYING
699 %dir %{_includedir}/GL
700 %{_includedir}/GL/gl.h
701 %{_includedir}/GL/glext.h
702 %{_includedir}/GL/gl_mangle.h
703 %{_includedir}/GL/wglext.h
704 %{_includedir}/GL/glx.h
705 %{_includedir}/GL/glxext.h
706 %{_includedir}/GL/glx_mangle.h
707 %{_libdir}/libGL.so
708 %{_libdir}/pkgconfig/gl.pc
709 %{_libdir}/pkgconfig/dri.pc
710
711 #FIXME: check those headers
712 #{_includedir}/GL/vms_x_fix.h
713 %{_includedir}/GL/wmesa.h
714 %dir %{_includedir}/GL/internal
715 %{_includedir}/GL/internal/dri_interface.h
716
717 %files common-devel
718 %defattr(-,root,root)
719
720 %if %{enable_egl}
721 %files -n %{libeglname}-devel
722 %defattr(-,root,root)
723 %doc docs/COPYING
724 %{_includedir}/EGL
725 %{_includedir}/KHR
726 %{_libdir}/libEGL.so
727 %{_libdir}/pkgconfig/egl.pc
728 %endif
729
730 %files -n %{osmesadevel}
731 %defattr(-,root,root)
732 %dir %{_includedir}/GL
733 %{_includedir}/GL/osmesa.h
734 %{_libdir}/libOSMesa.so
735 %{_libdir}/pkgconfig/osmesa.pc
736
737 %files -n %{libglapiname}-devel
738 %defattr(-,root,root)
739 %{_libdir}/libglapi.so
740
741 %files -n %{libglesv1name}-devel
742 %defattr(-,root,root)
743 %{_includedir}/GLES
744 %{_libdir}/libGLESv1_CM.so
745 %{_libdir}/pkgconfig/glesv1_cm.pc
746
747 %files -n %{libglesv2name}-devel
748 %defattr(-,root,root)
749 %{_includedir}/GLES2
750 %{_includedir}/GLES3
751 %{_libdir}/libGLESv2.so
752 %{_libdir}/pkgconfig/glesv2.pc
753
754 %files -n %{libopenvgname}-devel
755 %defattr(-,root,root)
756 %{_includedir}/VG
757 %{_libdir}/libOpenVG.so
758 %{_libdir}/pkgconfig/vg.pc
759
760 %if %{enable_wayland}
761 %files -n %{libgbmname}-devel
762 %{_includedir}/gbm.h
763 %{_libdir}/libgbm.so
764 %{_libdir}/pkgconfig/gbm.pc
765
766 %files -n %{libwaylandeglname}-devel
767 %{_libdir}/libwayland-egl.so
768 %{_libdir}/pkgconfig/wayland-egl.pc
769 %endif
770
771 %files -n %{_lib}vdpau-driver-nouveau
772 %{_libdir}/vdpau/libvdpau_nouveau.so.*
773
774 %files -n %{_lib}vdpau-driver-r600
775 %{_libdir}/vdpau/libvdpau_r600.so.*
776
777 %files -n %{_lib}vdpau-driver-radeonsi
778 %{_libdir}/vdpau/libvdpau_radeonsi.so.*
779

  ViewVC Help
Powered by ViewVC 1.1.30