/[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 88438 - (show annotations) (download)
Tue Apr 19 14:36:56 2011 UTC (9 years, 1 month ago) by tv
File size: 16465 byte(s)
add "generic" provides to libs
1 %define bootstrap 0
2 %{?_without_bootstrap: %global bootstrap 0}
3 %{?_with_bootstrap: %global bootstrap 1}
4
5 # (cg) Cheater...
6 %define Werror_cflags %nil
7
8 # (aco) Needed for the dri drivers
9 %define _disable_ld_no_undefined 1
10
11 # freeglut should replace mesaglut soon
12 %define with_mesaglut 1
13
14 %define git 0
15 %define relc 0
16 %define name mesa
17 %define version 7.10.2
18 %define rel 3
19
20 %define release %mkrel %{rel}
21 %define src_type tar.bz2
22 %define vsuffix %{expand:}
23
24 %if %{relc}
25 %define release %mkrel 0.rc%{relc}.%{rel}
26 %define vsuffix -rc%{relc}
27 %define src_type tar.bz2
28 %endif
29
30 %if %{git}
31 %if %{relc}
32 %define release %mkrel 0.rc%{relc}.2.git%{git}.%{rel}
33 %else
34 %define release %mkrel 0.git%{git}.%{rel}
35 %endif
36 %endif
37
38 %define makedepend %{_bindir}/gccmakedep
39
40 %define eglname mesaegl
41 %define glname mesagl
42 %define gluname mesaglu
43 %define glutname mesaglut
44 %define glwname mesaglw
45 %define eglmajor 1
46 %define glmajor 1
47 %define glumajor 1
48 %define glutmajor 3
49 %define glwmajor 1
50 %define libeglname %mklibname %{eglname} %{eglmajor}
51 %define libglname %mklibname %{glname} %{glmajor}
52 %define libgluname %mklibname %{gluname} %{glumajor}
53 %define libglutname %mklibname %{glutname} %{glutmajor}
54 %define libglwname %mklibname %{glwname} %{glwmajor}
55
56 %define dridrivers %mklibname dri-drivers
57
58 # Architecture-independent Virtual provides:
59 %define libeglname_virt lib%{eglname}
60 %define libglname_virt lib%{glname}
61 %define libgluname_virt lib%{gluname}
62 %define libglutname_virt lib%{glutname}
63 %define libglwname_virt lib%{glwname}
64
65 %define oldlibglname %mklibname MesaGL 1
66 %define oldlibgluname %mklibname MesaGLU 1
67 %define oldlibglutname %mklibname Mesaglut 3
68
69 %define mesasrcdir %{_prefix}/src/Mesa/
70 %define driver_dir %{_libdir}/dri
71
72 %define enable_egl 0
73
74 #FIXME: (for 386/485) unset SSE, MMX and 3dnow flags
75 #FIXME: (for >=i586) disable sse
76 # SSE seems to have problem on some apps (gtulpas) for probing.
77 %define dri_drivers_i386 "i810,i915,i965,mga,mach64,nouveau,r128,r200,r300,r600,radeon,savage,sis,unichrome,tdfx,swrast"
78 %define dri_drivers_x86_64 %{dri_drivers_i386}
79 %define dri_drivers_ppc "mach64,r128,r200,r300,radeon,tdfx,swrast"
80 %define dri_drivers_ppc64 ""
81 %define dri_drivers_ia64 "i810,i915,i965,mga,r128,r200,radeon,swrast"
82 %define dri_drivers_alpha "mga,r128,r200,radeon,swrast"
83 %define dri_drivers_sparc "ffb,mach64,mga,radeon,savage,swrast"
84 %define dri_drivers_mipsel "mach64,mga,r128,r200,radeon,savage,tdfx,swrast"
85 %define dri_drivers_arm "swrast"
86 %define dri_drivers %{expand:%{dri_drivers_%{_arch}}}
87
88 Name: %{name}
89 Version: %{version}
90 Release: %{release}
91 Summary: OpenGL 2.1 compatible 3D graphics library
92 Group: System/Libraries
93
94 BuildRequires: libxfixes-devel >= 4.0.3
95 BuildRequires: libxt-devel >= 1.0.5
96 BuildRequires: libxmu-devel >= 1.0.3
97 BuildRequires: libx11-devel >= 1.3.3
98 BuildRequires: libxdamage-devel >= 1.1.1
99 BuildRequires: libexpat-devel >= 2.0.1
100 BuildRequires: gccmakedep
101 BuildRequires: x11-proto-devel >= 7.3
102 BuildRequires: libdrm-devel >= 2.4.21
103
104 BuildRequires: libxext-devel >= 1.1.1
105 BuildRequires: libxxf86vm-devel >= 1.1.0
106 BuildRequires: libxi-devel >= 1.3
107 BuildRequires: talloc-devel libxml2-python
108 BuildRequires: makedepend
109
110 %if !%bootstrap
111 BuildRequires: libglew-devel
112 %endif
113 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
114 URL: http://www.mesa3d.org
115 %if %{git}
116 # (cg) Current commit ref: origin/mesa_7_5_branch
117 Source0: %{name}-%{git}.tar.bz2
118 %else
119 Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{version}%{vsuffix}.%{src_type}
120 Source2: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaGLUT-%{version}%{vsuffix}.%{src_type}
121 %endif
122 Source3: make-git-snapshot.sh
123 Source5: mesa-driver-install
124
125
126 # Instructions to setup your repository clone
127 # git://git.freedesktop.org/git/mesa/mesa
128 # git checkout mesa_7_5_branch
129 # git branch mdv-cherry-picks
130 # git am ../02??-*.patch
131 # git branch mdv-redhat
132 # git am ../03??-*.patch
133 # git branch mdv-patches
134 # git am ../09??-*.patch
135
136 # In order to update to the branch via patches, issue this command:
137 # git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/'
138
139 # Cherry picks
140 # git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks
141 Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch
142 Patch202: 0202-fix-includes-for-latest-libdrm.patch
143
144 # Patches "liberated" from Fedora:
145 # http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/
146 # git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat
147 Patch300: 0300-RH-mesa-7.1-nukeglthread-debug-v1.1.patch
148 Patch301: 0301-RH-mesa-7.1-link-shared-v1.7.patch
149
150 # Mandriva patches
151 # git format-patch --start-number 900 mdv-redhat..mdv-patches
152 Patch902: 0902-remove-unfinished-GLX_ARB_render_texture.patch
153 Patch903: 0903-Fix-NULL-pointer-dereference-in-viaXMesaWindowMoved.patch
154 Patch904: Mesa-7.9-salome.patch
155
156 # (tmb) speeds up OpenGL on SandyBridge
157 Patch1000: i965-bump-CS-thread-number-on-SNB.patch
158
159 Patch2004: mesa_652_mips.patch
160
161 License: MIT
162 Requires: %{libglname} = %{version}-%{release}
163 Provides: hackMesa = %{version}
164 Obsoletes: hackMesa <= %{version}
165 Provides: Mesa = %{version}
166 Obsoletes: Mesa < %{version}
167
168 %package -n %{libglname}
169 Summary: Files for Mesa (GL and GLX libs)
170 Group: System/Libraries
171 Obsoletes: %{oldlibglname} < 6.4
172 Provides: %{oldlibglname} = %{version}-%{release}
173 Provides: %{libglname_virt} = %{version}-%{release}
174 Requires: %{dridrivers} >= %{version}-%{release}
175
176 # (anssi) Forces the upgrade of x11-server-common to happen before
177 # alternatives removal, which allows x11-server-common to grab the symlink.
178 Conflicts: x11-server-common < 1.3.0.0-17
179
180 %package -n %{dridrivers}
181 Summary: Mesa DRI drivers
182 Group: System/Libraries
183 Conflicts: %{_lib}MesaGL1 < 7.7-5
184
185 %package -n %{dridrivers}-experimental
186 Summary: Mesa DRI - unstable experimental drivers
187 Group: System/Libraries
188 # for dri driver directory
189 Requires: %{dridrivers}
190
191 %package -n %{libglname}-devel
192 Summary: Development files for Mesa (OpenGL compatible 3D lib)
193 Group: Development/C
194 Requires: %{libglname} = %{version}-%{release}
195 Provides: lib%{glname}-devel = %{version}-%{release}
196 Provides: %{glname}-devel = %{version}-%{release}
197 Provides: GL-devel
198 Obsoletes: %{oldlibglname}-devel < 6.4
199 Provides: %{oldlibglname}-devel = %{version}-%{release}
200 Provides: libMesaGL-devel = %{version}-%{release}
201 Provides: MesaGL-devel = %{version}-%{release}
202 Provides: libgl-devel
203
204 %package -n %{libgluname}
205 Summary: Files for Mesa (GLU libs)
206 Group: System/Libraries
207 Obsoletes: %{oldlibgluname} < 6.4
208 Provides: %{oldlibgluname} = %{version}-%{release}
209 Provides: %{libgluname_virt} = %{version}-%{release}
210
211 %package -n %{libgluname}-devel
212 Summary: Development files for GLU libs
213 Group: Development/C
214 Requires: %{libgluname} = %{version}-%{release}
215 Provides: lib%{gluname}-devel = %{version}-%{release}
216 Provides: %{gluname}-devel = %{version}-%{release}
217 Obsoletes: %{oldlibgluname}-devel < 6.4
218 Provides: %{oldlibgluname}-devel = %{version}-%{release}
219 Provides: libMesaGLU-devel = %{version}-%{release}
220 Provides: MesaGLU-devel = %{version}-%{release}
221 Provides: libglu-devel
222 # pkgconfig files moved from libgl-devel:
223 Conflicts: %{libglname}-devel < 7.10.2-4
224
225 %if %{with_mesaglut}
226 %package -n %{libglutname}
227 Summary: Files for Mesa (glut libs)
228 Group: System/Libraries
229 Requires: %{libgluname} = %{version}-%{release}
230 Provides: Mesa-common = %{version}-%{release} hackMesa-common = %{version}
231 Obsoletes: Mesa-common <= %{version} hackMesa-common <= %{version}
232 Obsoletes: %{oldlibglutname} < 6.4
233 Provides: %{oldlibglutname} = %{version}-%{release}
234 Provides: %{libglutname_virt} = %{version}-%{release}
235
236 %package -n %{libglutname}-devel
237 Summary: Development files for glut libs
238 Group: Development/C
239 Requires: %{libglutname} = %{version}-%{release} %{libgluname}-devel = %{version}-%{release}
240 # (gc) /usr/lib/pkgconfig/glut.pc depends on /usr/lib/pkgconfig/{x11,xmu,xi}.pc (Requires.private) and pkg-config --list-all
241 # goes wild without these deps
242 Requires: libx11-devel libxmu-devel libxi-devel
243 Provides: lib%{glutname}-devel = %{version}-%{release}
244 Provides: %{glutname}-devel = %{version}-%{release}
245 Obsoletes: %{oldlibglutname}-devel < 6.4
246 Provides: %{oldlibglutname}-devel = %{version}-%{release}
247 Provides: libMesaGLUT-devel = %{version}-%{release}
248 Provides: MesaGLUT-devel = %{version}-%{release}
249 Provides: libglut-devel
250 # pkgconfig files moved from libgl-devel:
251 Conflicts: %{libglname}-devel < 7.10.2-4
252 %endif
253
254 %package -n %{libglwname}
255 Summary: Files for Mesa (glw libs)
256 Group: System/Libraries
257 Provides: Mesa-common = %{version}-%{release} hackMesa-common = %{version}
258 Obsoletes: Mesa-common <= %{version} hackMesa-common <= %{version}
259 Provides: %{libglwname_virt} = %{version}-%{release}
260
261 %package -n %{libglwname}-devel
262 Summary: Development files for glw libs
263 Group: Development/C
264 Requires: %{libglwname} = %{version}-%{release}
265 Provides: lib%{glwname}-devel = %{version}-%{release}
266 Provides: %{glwname}-devel = %{version}-%{release}
267 Provides: libglw-devel
268 # pkgconfig files moved from libgl-devel:
269 Conflicts: %{libglname}-devel < 7.10.2-4
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: %{name} = %{version}
281 Provides: EGL-devel
282 Provides: lib%{eglname}-devel
283 Provides: %{eglname}-devel
284 Provides: libegl-devel
285 %endif
286
287 %package common-devel
288 Summary: Meta package for mesa devel
289 Group: Development/C
290 Provides: Mesa-common-devel = %{version}-%{release}
291 Provides: hackMesa-common-devel = %{version}
292 Obsoletes: Mesa-common-devel < %{version}
293 Obsoletes: hackMesa-common-devel < %{version}
294 Requires: %{libglname}-devel = %{version}
295 Requires: %{libglwname}-devel = %{version}
296 Requires: %{libgluname}-devel = %{version}
297 %if %{with_mesaglut}
298 Requires: %{libglutname}-devel = %{version}
299 %else
300 Requires: libglut-devel
301 %endif
302
303
304 %description
305 Mesa is an OpenGL 2.1 compatible 3D graphics library.
306
307 %description common-devel
308 Mesa common metapackage devel
309
310 %if %{enable_egl}
311 %description -n %{libeglname}
312 Mesa is an OpenGL 2.1 compatible 3D graphics library.
313 EGL parts.
314
315 %description -n %{libeglname}-devel
316 Mesa is an OpenGL 2.1 compatible 3D graphics library.
317 EGL development parts.
318 %endif
319
320 %description -n %{libglname}
321 Mesa is an OpenGL 2.1 compatible 3D graphics library.
322 GL and GLX parts.
323
324 %description -n %{dridrivers}
325 Mesa is an OpenGL 2.1 compatible 3D graphics library.
326 DRI drivers.
327
328 %description -n %{dridrivers}-experimental
329 Mesa is an OpenGL 2.1 compatible 3D graphics library.
330 Experimental unstable DRI drivers.
331
332 This package contains experimental DRI drivers for NVIDIA cards, for
333 OpenGL acceleration with nouveau driver. These drivers are not stable
334 and may crash your system. Please do not report bugs encountered with
335 these drivers.
336
337 %description -n %{libglname}-devel
338 Mesa is an OpenGL 2.1 compatible 3D graphics library.
339
340 This package contains the headers needed to compile Mesa programs.
341
342 %description -n %{libgluname}
343 GLU is the OpenGL Utility Library.
344 It provides a number of functions upon the base OpenGL library to provide
345 higher-level drawing routines from the more primitive routines provided by
346 OpenGL.
347
348 %description -n %{libgluname}-devel
349 This package contains the headers needed to compile programs with GLU.
350
351 %if %{with_mesaglut}
352 %description -n %{libglutname}
353 GLUT (OpenGL Utility Toolkit) is a addon library for OpenGL programs. It
354 provides them utilities to define and control windows, input from the keyboard
355 and the mouse, drawing some geometric primitives (cubes, spheres, ...).
356 GLUT can even create pop-up windows.
357
358 %description -n %{libglutname}-devel
359 Mesa is an OpenGL 2.1 compatible 3D graphics library.
360 glut parts.
361
362 This package contains the headers needed to compile Mesa programs.
363 %endif
364
365 %description -n %{libglwname}
366 GLw adds Motif bindings to the OpenGL "canvas" (Xt/Motif/OpenGL widget code).
367
368 %description -n %{libglwname}-devel
369 Mesa is an OpenGL 2.1 compatible 3D graphics library.
370 GLw parts.
371
372 This package contains the headers needed to compile Mesa programs.
373
374 %prep
375 %if %{git}
376 %setup -q -n mesa-%{git}
377 %else
378 %setup -q -n Mesa-%{version}%{vsuffix} -b2
379 %endif
380
381 %patch201 -p1
382 %patch202 -p1
383
384 %patch300 -p1
385 ## (Anssi 03/2010) FIXME: Currently results in either missing NEEDED tag or
386 ## NEEDED tag with '../../../../../lib/libdricore.so', while NEEDED tag of libdricore.so
387 ## is wanted.
388 #%patch301 -p1
389
390 %patch902 -p1
391 %patch903 -p1
392 %patch904 -p1
393
394 %patch1000 -p1
395
396 %patch2004 -p1
397
398 chmod +x %{SOURCE5}
399
400 # for dri-drivers-experimental
401 cat > README.install.urpmi <<EOF
402 This package contains experimental DRI drivers for NVIDIA cards, for
403 OpenGL acceleration with nouveau driver. These drivers are not stable
404 and may crash your system. Please do not report bugs encountered with
405 these drivers.
406 EOF
407
408 %build
409 #%if %{git}
410 #./autogen.sh -v
411 #%endif
412
413 # Required by patch200:
414 autoreconf -vfi
415 %configure2_5x --with-driver=dri \
416 --with-dri-driverdir=%{driver_dir} \
417 --with-dri-drivers="%{dri_drivers}" \
418 --with-state-trackers=dri \
419 --enable-gallium-nouveau \
420 %if %{enable_egl}
421 --enable-egl \
422 %else
423 --disable-egl \
424 %endif
425 %if %{with_mesaglut}
426 --enable-glut
427 %else
428 --disable-glut
429 %endif
430
431 # (cg) Parallel build breaks the dricore shared stuff.
432 make -j 1
433
434 %install
435 rm -rf %{buildroot}
436 %makeinstall_std
437
438 # (blino) hardlink libGL files in %{_libdir}/mesa
439 # to prevent proprietary driver installers from removing them
440 mkdir -p $RPM_BUILD_ROOT%{_libdir}/mesa
441 pushd $RPM_BUILD_ROOT%{_libdir}/mesa
442 for l in ../libGL.so.*; do cp -a $l .; done
443 popd
444
445 %ifarch %{x86_64}
446 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri
447 %endif
448
449 %if !%{with_mesaglut}
450 rm -f %{buildroot}/%{_includedir}/GL/glut.h
451 rm -f %{buildroot}/%{_includedir}/GL/glutf90.h
452 %endif
453
454 %clean
455 rm -fr $RPM_BUILD_ROOT
456
457 %files
458 %defattr(-,root,root)
459 %doc docs/COPYING docs/README.*
460
461 %files -n %{dridrivers}
462 %defattr(-,root,root)
463 %doc docs/COPYING
464 %ifnarch ppc64
465 %dir %{_libdir}/dri
466 #%{_libdir}/dri/libdricore.so
467 %{_libdir}/dri/*_dri.so
468 %exclude %{_libdir}/dri/nouveau_dri.so
469 %ifnarch %arm %mips
470 %exclude %{_libdir}/dri/nouveau_vieux_dri.so
471 %endif
472 %endif
473
474 %files -n %{dridrivers}-experimental
475 %defattr(-,root,root)
476 %doc docs/COPYING
477 %doc README.install.urpmi
478 %{_libdir}/dri/nouveau_dri.so
479 %ifnarch %arm %mips
480 %{_libdir}/dri/nouveau_vieux_dri.so
481 %endif
482
483 %files -n %{libglname}
484 %defattr(-,root,root)
485 %doc docs/COPYING
486 %{_libdir}/libGL.so.*
487 %dir %{_libdir}/mesa
488 %{_libdir}/mesa/libGL.so.%{glmajor}*
489
490 %files -n %{libgluname}
491 %defattr(-,root,root)
492 %doc docs/COPYING
493 %{_libdir}/libGLU.so.%{glumajor}*
494
495 %if %{with_mesaglut}
496 %files -n %{libglutname}
497 %defattr(-,root,root)
498 %doc docs/COPYING
499 %{_libdir}/libglut.so.%{glutmajor}*
500 %endif
501
502 %files -n %{libglwname}
503 %defattr(-,root,root)
504 %doc docs/COPYING
505 %{_libdir}/libGLw.so.%{glwmajor}*
506
507 %if %{enable_egl}
508 %files -n %{libeglname}
509 %defattr(-,root,root)
510 %{_libdir}/libEGL.so.%{eglmajor}*
511 %{_libdir}/libegldri.so.1*
512
513 %files -n %{libglname}-devel
514 %defattr(-,root,root)
515 %doc docs/COPYING
516 %{_includedir}/GL/gl.h
517 %{_includedir}/GL/glext.h
518 %{_includedir}/GL/gl_mangle.h
519 %{_includedir}/GL/osmesa.h
520 %{_includedir}/GL/wglext.h
521 %{_includedir}/GL/glx.h
522 %{_includedir}/GL/glxext.h
523 %{_includedir}/GL/glx_mangle.h
524 %{_libdir}/libGL.so
525 %{_libdir}/pkgconfig/gl.pc
526 %{_libdir}/pkgconfig/dri.pc
527
528 #FIXME: check those headers
529 %{_includedir}/GL/glfbdev.h
530 %{_includedir}/GL/vms_x_fix.h
531 %{_includedir}/GL/wmesa.h
532 %dir %{_includedir}/GL/internal
533 %{_includedir}/GL/internal/dri_interface.h
534
535 %files -n %{libgluname}-devel
536 %defattr(-,root,root)
537 %doc docs/COPYING
538 %{_includedir}/GL/glu.h
539 %{_includedir}/GL/glu_mangle.h
540 %{_includedir}/GL/mesa_wgl.h
541 %{_libdir}/libGLU.so
542 %{_libdir}/pkgconfig/glu.pc
543
544 %if %{with_mesaglut}
545 %files -n %{libglutname}-devel
546 %defattr(-,root,root)
547 %doc docs/COPYING
548 %{_includedir}/GL/glut.h
549 %{_includedir}/GL/glutf90.h
550 %{_libdir}/libglut.so
551 %{_libdir}/pkgconfig/glut.pc
552 %endif
553
554 %files common-devel
555 %defattr(-,root,root)
556
557 %files -n %{libglwname}-devel
558 %defattr(-,root,root)
559 %doc docs/COPYING
560 %{_includedir}/GL/GLwDrawA.h
561 %{_includedir}/GL/GLwDrawAP.h
562 %{_includedir}/GL/GLwMDrawA.h
563 %{_includedir}/GL/GLwMDrawAP.h
564 %{_libdir}/libGLw.so
565 %{_libdir}/pkgconfig/glw.pc
566
567 %files -n %{libeglname}-devel
568 %defattr(-,root,root)
569 %{_libdir}/libEGL.so
570 %{_libdir}/libegldri.so
571 %{_includedir}/gles/egl*.h
572 %{_libdir}/pkgconfig/egl.pc
573 %endif
574
575
576

  ViewVC Help
Powered by ViewVC 1.1.28