14 |
# (aco) Needed for the dri drivers |
# (aco) Needed for the dri drivers |
15 |
%define _disable_ld_no_undefined 1 |
%define _disable_ld_no_undefined 1 |
16 |
|
|
|
# freeglut has replaced mesaglut |
|
|
%define with_mesaglut 0 |
|
17 |
|
|
18 |
%define git 0 |
%define git 0 |
19 |
%define with_hardware 1 |
%define with_hardware 1 |
20 |
|
|
21 |
%define relc 0 |
%define relc 0 |
22 |
%define name mesa |
%define name mesa |
23 |
%define version 7.11.2 |
%define version 8.0 |
24 |
%define rel 5 |
%define rel 1 |
25 |
|
|
26 |
%define release %mkrel %{rel} |
%define release %mkrel %{rel} |
27 |
%define src_type tar.bz2 |
%define src_type tar.bz2 |
47 |
%define eglname mesaegl |
%define eglname mesaegl |
48 |
%define glname mesagl |
%define glname mesagl |
49 |
%define gluname mesaglu |
%define gluname mesaglu |
|
%define glutname mesaglut |
|
50 |
%define glwname mesaglw |
%define glwname mesaglw |
51 |
%define glesv1name mesaglesv1 |
%define glesv1name mesaglesv1 |
52 |
%define glesv2name mesaglesv2 |
%define glesv2name mesaglesv2 |
56 |
%define eglmajor 1 |
%define eglmajor 1 |
57 |
%define glmajor 1 |
%define glmajor 1 |
58 |
%define glumajor 1 |
%define glumajor 1 |
|
%define glutmajor 3 |
|
59 |
%define glwmajor 1 |
%define glwmajor 1 |
60 |
%define glesv1major 1 |
%define glesv1major 1 |
61 |
%define glesv2major 2 |
%define glesv2major 2 |
65 |
%define libeglname %mklibname %{eglname} %{eglmajor} |
%define libeglname %mklibname %{eglname} %{eglmajor} |
66 |
%define libglname %mklibname %{glname} %{glmajor} |
%define libglname %mklibname %{glname} %{glmajor} |
67 |
%define libgluname %mklibname %{gluname} %{glumajor} |
%define libgluname %mklibname %{gluname} %{glumajor} |
|
%define libglutname %mklibname %{glutname} %{glutmajor} |
|
68 |
%define libglwname %mklibname %{glwname} %{glwmajor} |
%define libglwname %mklibname %{glwname} %{glwmajor} |
69 |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
%define libglesv1name %mklibname %{glesv1name}_ %{glesv1major} |
70 |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
%define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} |
77 |
%define libeglname_virt lib%{eglname} |
%define libeglname_virt lib%{eglname} |
78 |
%define libglname_virt lib%{glname} |
%define libglname_virt lib%{glname} |
79 |
%define libgluname_virt lib%{gluname} |
%define libgluname_virt lib%{gluname} |
|
%define libglutname_virt lib%{glutname} |
|
80 |
%define libglwname_virt lib%{glwname} |
%define libglwname_virt lib%{glwname} |
81 |
%define libglesv1name_virt lib%{glesv1name} |
%define libglesv1name_virt lib%{glesv1name} |
82 |
%define libglesv2name_virt lib%{glesv2name} |
%define libglesv2name_virt lib%{glesv2name} |
85 |
|
|
86 |
%define oldlibglname %mklibname MesaGL 1 |
%define oldlibglname %mklibname MesaGL 1 |
87 |
%define oldlibgluname %mklibname MesaGLU 1 |
%define oldlibgluname %mklibname MesaGLU 1 |
|
%define oldlibglutname %mklibname Mesaglut 3 |
|
88 |
|
|
89 |
%define mesasrcdir %{_prefix}/src/Mesa/ |
%define mesasrcdir %{_prefix}/src/Mesa/ |
90 |
%define driver_dir %{_libdir}/dri |
%define driver_dir %{_libdir}/dri |
94 |
#FIXME: (for 386/485) unset SSE, MMX and 3dnow flags |
#FIXME: (for 386/485) unset SSE, MMX and 3dnow flags |
95 |
#FIXME: (for >=i586) disable sse |
#FIXME: (for >=i586) disable sse |
96 |
# SSE seems to have problem on some apps (gtulpas) for probing. |
# SSE seems to have problem on some apps (gtulpas) for probing. |
97 |
%define dri_drivers_i386 "i810,i915,i965,mga,mach64,nouveau,r128,r200,r300,r600,radeon,savage,sis,unichrome,tdfx,swrast" |
%define dri_drivers_i386 "i915,i965,nouveau,r200,radeon,swrast" |
98 |
%define dri_drivers_x86_64 %{dri_drivers_i386} |
%define dri_drivers_x86_64 %{dri_drivers_i386} |
99 |
%define dri_drivers_ppc "mach64,r128,r200,r300,radeon,tdfx,swrast" |
%define dri_drivers_ppc "r200,radeon,swrast" |
100 |
%define dri_drivers_ppc64 "" |
%define dri_drivers_ppc64 "" |
101 |
%define dri_drivers_ia64 "i810,i915,i965,mga,r128,r200,radeon,swrast" |
%define dri_drivers_ia64 "i915,i965,mga,r200,radeon,swrast" |
102 |
%define dri_drivers_alpha "mga,r128,r200,radeon,swrast" |
%define dri_drivers_alpha "r200,radeon,swrast" |
103 |
%define dri_drivers_sparc "ffb,mach64,mga,radeon,savage,swrast" |
%define dri_drivers_sparc "ffb,radeon,swrast" |
104 |
%define dri_drivers_mipsel "mach64,mga,r128,r200,radeon,savage,tdfx,swrast" |
%define dri_drivers_mipsel "r200,radeon,swrast" |
105 |
%define dri_drivers_arm "swrast" |
%define dri_drivers_arm "swrast" |
106 |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
%define dri_drivers %{expand:%{dri_drivers_%{_arch}}} |
107 |
|
|
137 |
Source0: %{name}-%{git}.tar.bz2 |
Source0: %{name}-%{git}.tar.bz2 |
138 |
%else |
%else |
139 |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{version}%{vsuffix}.%{src_type} |
Source0: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaLib-%{version}%{vsuffix}.%{src_type} |
|
Source2: ftp://ftp.freedesktop.org/pub/mesa/%version/MesaGLUT-%{version}%{vsuffix}.%{src_type} |
|
140 |
%endif |
%endif |
141 |
Source3: make-git-snapshot.sh |
Source3: make-git-snapshot.sh |
142 |
Source5: mesa-driver-install |
Source5: mesa-driver-install |
159 |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks |
160 |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch |
161 |
Patch202: 0202-fix-includes-for-latest-libdrm.patch |
Patch202: 0202-fix-includes-for-latest-libdrm.patch |
|
# (anssi) fixes gwenview segfault, from git master: |
|
|
Patch203: nv50-nvc0-use-screen-instead-of-context-for-flush-notifier.patch |
|
162 |
|
|
163 |
# Patches "liberated" from Fedora: |
# Patches "liberated" from Fedora: |
164 |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
# http://cvs.fedoraproject.org/viewvc/rpms/mesa/devel/ |
172 |
Patch904: Mesa-7.9-salome.patch |
Patch904: Mesa-7.9-salome.patch |
173 |
|
|
174 |
Patch2004: mesa_652_mips.patch |
Patch2004: mesa_652_mips.patch |
|
Patch2005: MesaLib-7.11.2-llvm3.0.patch |
|
175 |
|
|
176 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
177 |
|
|
239 |
# pkgconfig files moved from libgl-devel: |
# pkgconfig files moved from libgl-devel: |
240 |
Conflicts: %{libglname}-devel < 7.10.2-4 |
Conflicts: %{libglname}-devel < 7.10.2-4 |
241 |
|
|
|
%if %{with_mesaglut} |
|
|
%package -n %{libglutname} |
|
|
Summary: Files for Mesa (glut libs) |
|
|
Group: System/Libraries |
|
|
Requires: %{libgluname} = %{version}-%{release} |
|
|
Provides: Mesa-common = %{version}-%{release} hackMesa-common = %{version} |
|
|
Obsoletes: Mesa-common <= %{version} hackMesa-common <= %{version} |
|
|
Obsoletes: %{oldlibglutname} < 6.4 |
|
|
Provides: %{oldlibglutname} = %{version}-%{release} |
|
|
Provides: %{libglutname_virt} = %{version}-%{release} |
|
|
|
|
|
%package -n %{libglutname}-devel |
|
|
Summary: Development files for glut libs |
|
|
Group: Development/C |
|
|
Requires: %{libglutname} = %{version}-%{release} %{libgluname}-devel = %{version}-%{release} |
|
|
# (gc) /usr/lib/pkgconfig/glut.pc depends on /usr/lib/pkgconfig/{x11,xmu,xi}.pc (Requires.private) and pkg-config --list-all |
|
|
# goes wild without these deps |
|
|
Requires: libx11-devel libxmu-devel libxi-devel |
|
|
Provides: lib%{glutname}-devel = %{version}-%{release} |
|
|
Provides: %{glutname}-devel = %{version}-%{release} |
|
|
Obsoletes: %{oldlibglutname}-devel < 6.4 |
|
|
Provides: %{oldlibglutname}-devel = %{version}-%{release} |
|
|
Provides: libMesaGLUT-devel = %{version}-%{release} |
|
|
Provides: MesaGLUT-devel = %{version}-%{release} |
|
|
Provides: libglut-devel |
|
|
# pkgconfig files moved from libgl-devel: |
|
|
Conflicts: %{libglname}-devel < 7.10.2-4 |
|
|
%endif |
|
|
|
|
|
%package -n %{libglwname} |
|
|
Summary: Files for Mesa (glw libs) |
|
|
Group: System/Libraries |
|
|
Provides: Mesa-common = %{version}-%{release} hackMesa-common = %{version} |
|
|
Obsoletes: Mesa-common <= %{version} hackMesa-common <= %{version} |
|
|
Provides: %{libglwname_virt} = %{version}-%{release} |
|
|
|
|
|
%package -n %{libglwname}-devel |
|
|
Summary: Development files for glw libs |
|
|
Group: Development/C |
|
|
Requires: %{libglwname} = %{version}-%{release} |
|
|
Provides: lib%{glwname}-devel = %{version}-%{release} |
|
|
Provides: %{glwname}-devel = %{version}-%{release} |
|
|
Provides: libglw-devel |
|
|
# pkgconfig files moved from libgl-devel: |
|
|
Conflicts: %{libglname}-devel < 7.10.2-4 |
|
|
|
|
242 |
%if %{enable_egl} |
%if %{enable_egl} |
243 |
%package -n %{libeglname} |
%package -n %{libeglname} |
244 |
Summary: Files for Mesa (EGL libs) |
Summary: Files for Mesa (EGL libs) |
314 |
Obsoletes: Mesa-common-devel < %{version} |
Obsoletes: Mesa-common-devel < %{version} |
315 |
Obsoletes: hackMesa-common-devel < %{version} |
Obsoletes: hackMesa-common-devel < %{version} |
316 |
Requires: %{libglname}-devel = %{version} |
Requires: %{libglname}-devel = %{version} |
|
Requires: %{libglwname}-devel = %{version} |
|
317 |
Requires: %{libgluname}-devel = %{version} |
Requires: %{libgluname}-devel = %{version} |
|
%if %{with_mesaglut} |
|
|
Requires: %{libglutname}-devel = %{version} |
|
|
%else |
|
318 |
Requires: freeglut-devel |
Requires: freeglut-devel |
|
%endif |
|
319 |
Requires: %{libeglname}-devel = %{version} |
Requires: %{libeglname}-devel = %{version} |
320 |
Requires: %{libglesv1name}-devel = %{version} |
Requires: %{libglesv1name}-devel = %{version} |
321 |
Requires: %{libglesv2name}-devel = %{version} |
Requires: %{libglesv2name}-devel = %{version} |
370 |
%description -n %{libgluname}-devel |
%description -n %{libgluname}-devel |
371 |
This package contains the headers needed to compile programs with GLU. |
This package contains the headers needed to compile programs with GLU. |
372 |
|
|
|
%if %{with_mesaglut} |
|
|
%description -n %{libglutname} |
|
|
GLUT (OpenGL Utility Toolkit) is a addon library for OpenGL programs. It |
|
|
provides them utilities to define and control windows, input from the keyboard |
|
|
and the mouse, drawing some geometric primitives (cubes, spheres, ...). |
|
|
GLUT can even create pop-up windows. |
|
|
|
|
|
%description -n %{libglutname}-devel |
|
|
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
|
|
glut parts. |
|
|
|
|
|
This package contains the headers needed to compile Mesa programs. |
|
|
%endif |
|
|
|
|
|
%description -n %{libglwname} |
|
|
GLw adds Motif bindings to the OpenGL "canvas" (Xt/Motif/OpenGL widget code). |
|
|
|
|
|
%description -n %{libglwname}-devel |
|
|
Mesa is an OpenGL 2.1 compatible 3D graphics library. |
|
|
GLw parts. |
|
|
|
|
|
This package contains the headers needed to compile Mesa programs. |
|
|
|
|
373 |
%description -n %{libglesv1name} |
%description -n %{libglesv1name} |
374 |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using |
375 |
well-defined subset profiles of OpenGL. |
well-defined subset profiles of OpenGL. |
407 |
%if %{git} |
%if %{git} |
408 |
%setup -q -n mesa-%{git} |
%setup -q -n mesa-%{git} |
409 |
%else |
%else |
410 |
%setup -q -n Mesa-%{version}%{vsuffix} -b2 |
%setup -q -n Mesa-%{version}%{vsuffix} |
411 |
%endif |
%endif |
412 |
|
|
413 |
%patch201 -p1 |
%patch201 -p1 |
414 |
#%patch202 -p1 |
#%patch202 -p1 |
|
%patch203 -p1 |
|
415 |
|
|
416 |
#%patch300 -p1 |
#%patch300 -p1 |
417 |
|
|
420 |
#%patch904 -p1 |
#%patch904 -p1 |
421 |
|
|
422 |
#%patch2004 -p1 |
#%patch2004 -p1 |
|
%patch2005 -p1 |
|
423 |
|
|
424 |
chmod +x %{SOURCE5} |
chmod +x %{SOURCE5} |
425 |
|
|
455 |
%if %{build_plf} |
%if %{build_plf} |
456 |
--enable-texture-float \ |
--enable-texture-float \ |
457 |
%endif |
%endif |
|
%if %{with_mesaglut} |
|
|
--enable-glut |
|
|
%else |
|
458 |
--disable-glut |
--disable-glut |
|
%endif |
|
459 |
|
|
460 |
%make |
%make |
461 |
|
|
473 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/dri |
474 |
%endif |
%endif |
475 |
|
|
|
%if !%{with_mesaglut} |
|
476 |
rm -f %{buildroot}/%{_includedir}/GL/glut.h |
rm -f %{buildroot}/%{_includedir}/GL/glut.h |
477 |
rm -f %{buildroot}/%{_includedir}/GL/glutf90.h |
rm -f %{buildroot}/%{_includedir}/GL/glutf90.h |
|
%endif |
|
478 |
|
|
479 |
# use swrastg if built (Anssi 12/2011) |
# use swrastg if built (Anssi 12/2011) |
480 |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so |
507 |
%doc docs/COPYING |
%doc docs/COPYING |
508 |
%{_libdir}/libGLU.so.%{glumajor}* |
%{_libdir}/libGLU.so.%{glumajor}* |
509 |
|
|
|
%if %{with_mesaglut} |
|
|
%files -n %{libglutname} |
|
|
%defattr(-,root,root) |
|
|
%doc docs/COPYING |
|
|
%{_libdir}/libglut.so.%{glutmajor}* |
|
|
%endif |
|
|
|
|
|
%files -n %{libglwname} |
|
|
%defattr(-,root,root) |
|
|
%doc docs/COPYING |
|
|
%{_libdir}/libGLw.so.%{glwmajor}* |
|
|
|
|
510 |
%if %{enable_egl} |
%if %{enable_egl} |
511 |
%files -n %{libeglname} |
%files -n %{libeglname} |
512 |
%defattr(-,root,root) |
%defattr(-,root,root) |
553 |
%{_libdir}/pkgconfig/dri.pc |
%{_libdir}/pkgconfig/dri.pc |
554 |
|
|
555 |
#FIXME: check those headers |
#FIXME: check those headers |
|
%{_includedir}/GL/glfbdev.h |
|
556 |
%{_includedir}/GL/vms_x_fix.h |
%{_includedir}/GL/vms_x_fix.h |
557 |
%{_includedir}/GL/wmesa.h |
%{_includedir}/GL/wmesa.h |
558 |
%dir %{_includedir}/GL/internal |
%dir %{_includedir}/GL/internal |
563 |
%doc docs/COPYING |
%doc docs/COPYING |
564 |
%{_includedir}/GL/glu.h |
%{_includedir}/GL/glu.h |
565 |
%{_includedir}/GL/glu_mangle.h |
%{_includedir}/GL/glu_mangle.h |
|
%{_includedir}/GL/mesa_wgl.h |
|
566 |
%{_libdir}/libGLU.so |
%{_libdir}/libGLU.so |
567 |
%{_libdir}/pkgconfig/glu.pc |
%{_libdir}/pkgconfig/glu.pc |
568 |
|
|
|
%if %{with_mesaglut} |
|
|
%files -n %{libglutname}-devel |
|
|
%defattr(-,root,root) |
|
|
%doc docs/COPYING |
|
|
%{_includedir}/GL/glut.h |
|
|
%{_includedir}/GL/glutf90.h |
|
|
%{_libdir}/libglut.so |
|
|
%{_libdir}/pkgconfig/glut.pc |
|
|
%endif |
|
|
|
|
569 |
%files common-devel |
%files common-devel |
570 |
%defattr(-,root,root) |
%defattr(-,root,root) |
571 |
|
|
|
%files -n %{libglwname}-devel |
|
|
%defattr(-,root,root) |
|
|
%doc docs/COPYING |
|
|
%{_includedir}/GL/GLwDrawA.h |
|
|
%{_includedir}/GL/GLwDrawAP.h |
|
|
%{_includedir}/GL/GLwMDrawA.h |
|
|
%{_includedir}/GL/GLwMDrawAP.h |
|
|
%{_libdir}/libGLw.so |
|
|
%{_libdir}/pkgconfig/glw.pc |
|
|
|
|
572 |
%if %{enable_egl} |
%if %{enable_egl} |
573 |
%files -n %{libeglname}-devel |
%files -n %{libeglname}-devel |
574 |
%defattr(-,root,root) |
%defattr(-,root,root) |