#
-# _without_glide: without GLIDE
-#
-# _with_dri: add GLX/DRI support (taken from rawhide)
-# (does it make any sense? we have XFree86-OpenGL-* packages...)
+# Conditional build:
+%bcond_with glide # with GLIDE (broken now)
+%bcond_with xlibs # use xlibs deps
#
Summary: Free OpenGL implementation
Summary(pl): Bezp³atna implementacja standardu OpenGL
Name: Mesa
-Version: 3.4.2
-Release: 2
-License: MIT (core), LGPL (libGLU), SGI (libGLw) and others - see COPYRIGHT file
+Version: 6.1
+Release: 1
+License: MIT (core), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file
Group: X11/Libraries
-Group(de): X11/Libraries
-Group(es): X11/Bibliotecas
-Group(pl): X11/Biblioteki
-Source0: ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Lib-%{version}.tar.bz2
-Source1: ftp://download.sourceforge.net/pub/sourceforge/mesa3d/%{name}Demos-%{version}.tar.bz2
-%{?_with_dri:Source2: XFree86-4.0.2-GLonly.tar.gz}
-Patch0: %{name}-paths.patch
-Patch1: %{name}-badlibtool.patch
-Patch2: %{name}-glibc-2.2.patch
-Patch3: %{name}-am.patch
-Patch4: %{name}-libGLw.patch
-%{?_with_dri:Patch5: %{name}-XF86DRI-4.0.2.patch}
-#Patch6: %{name}-3.3-glXcontext.patch
+Source0: http://dl.sourceforge.net/mesa3d/%{name}Lib-%{version}.tar.bz2
+# Source0-md5: 5de1f53ec0709f60fc68fdfed57351f3
+Source1: http://dl.sourceforge.net/mesa3d/%{name}Demos-%{version}.tar.bz2
+# Source1-md5: 89bfe0f6c69b39fd0ebd9fff481a4e9b
+Patch0: %{name}-opt.patch
URL: http://www.mesa3d.org/
+%ifarch %{ix86} alpha
+%{?with_glide:BuildRequires: Glide3-DRI-devel}
+%{?with_glide:Requires: Glide3-DRI}
+%endif
+%if %{with xlibs}
+BuildRequires: libXmu-devel
+BuildRequires: libXp-devel
+%else
BuildRequires: XFree86-devel
-BuildRequires: motif-devel
-%{!?_without_glide:BuildRequires: Glide_V3-DRI-devel}
-BuildRequires: perl
-BuildRequires: autoconf
+%endif
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
-Provides: OpenGL
-Obsoletes: XFree86-OpenGL-core XFree86-OpenGL-libs
+BuildRequires: libtool >= 2:1.4d
+BuildRequires: motif-devel
+BuildRequires: perl-devel
+Provides: OpenGL = 1.5
+Provides: OpenGL-GLU = 1.3
+# reports version 1.3, but supports glXGetProcAddress() from 1.4
+Provides: OpenGL-GLX = 1.4
+Obsoletes: XFree86-OpenGL-libGL
+Obsoletes: XFree86-OpenGL-libs
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _prefix /usr/X11R6
-%define _mandir %{_prefix}/man
+# avoid XFree86-OpenGL* dependency
+# Glide3 can be provided by Glide_V3-DRI or Glide_V5-DRI
+%define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.4 libglide3.so.3
+
+%define _sysconfdir /etc/X11
%description
Mesa is a 3-D graphics library with an API which is very similar to
Summary: Development environment for Mesa
Summary(pl): ¦rodowisko programistyczne biblioteki Mesa
Group: Development/Libraries
-Group(de): Entwicklung/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
+%if %{with xlibs}
+Requires: libX11-devel
+Requires: libXp-devel
+%else
Requires: XFree86-devel
-Provides: OpenGL-devel
+%endif
+Provides: OpenGL-devel = 1.5
+Provides: OpenGL-GLU-devel = 1.3
+Provides: OpenGL-GLX-devel = 1.4
Obsoletes: XFree86-OpenGL-devel
+Obsoletes: XFree86-OpenGL-devel-base
%description devel
Header files and documentation needed for development.
-%description -l pl devel
+%description devel -l pl
Pliki nag³ówkowe i dokumentacja do Mesy.
%package static
Summary: Mesa static libraries
Summary(pl): Biblioteki statyczne Mesy
Group: Development/Libraries
-Group(de): Entwicklung/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
-Requires: %{name}-devel = %{version}
-Provides: OpenGL-static
+Requires: %{name}-devel = %{version}-%{release}
+Provides: OpenGL-static = 1.5
+Provides: OpenGL-GLU-static = 1.3
Obsoletes: XFree86-OpenGL-static
%description static
The static version of the Mesa libraries.
-%description -l pl static
+%description static -l pl
Biblioteki statyczne Mesy.
%package demos
Summary: Mesa Demos
Summary(pl): Demonstracje mo¿liwo¶ci bibliotek Mesa
Group: Development/Libraries
-Group(de): Entwicklung/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
-Requires: %{name} = %{version}
+Requires: OpenGL-devel
%description demos
Demonstration programs for the Mesa libraries.
-%description -l pl demos
+%description demos -l pl
Programy demonstracyjne dla bibliotek Mesa.
%prep
%setup -q -n Mesa-%{version} -b 1
-
-%if %{?_with_dri:1}%{!?_with_dri:0}
- mkdir -p src/DRI/GL
- tar xzf %{SOURCE2}
- ln -f `find xc -type f` src/DRI
- mv -f src/DRI/glxmd.h src/DRI/GL/glxmd.h
-%endif
-
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%{?_with_dri:%patch5 -p1}
-#%patch6 -p1
+
# fix demos
-perl -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" demos/*
+%{__perl} -pi -e "s,\.\./images/,%{_examplesdir}/Mesa/images/,g" progs/demos/*
%build
-aclocal -I .
-autoheader
-automake -a -c
-autoconf
-%configure \
- --enable-static \
- --enable-shared \
- --with-ggi="no" \
- --with-svga="no" \
- --disable-ggi-fbdev \
- --disable-ggi-genkgi \
- --enable-optimize \
- %{?_without_glide:--without-glide} \
-%ifarch %{ix86} \
- --enable-x86 \
- %ifarch i586 i686 \
- --enable-mmx \
- --enable-3dnow \
- %ifarch i686 \
- --enable-katmai \
- %else \
- --disable-katmai \
- %endif \
- %else \
- %ifarch k6 \
- --enable-mmx \
- --enable-3dnow \
- %else \
- --disable-mmx \
- --disable-3dnow \
- %endif \
- %endif \
-%else \
- --disable-x86 \
- --disable-mmx \
- --disable-3dnow
+%ifarch %{ix86}
+targ=linux-x86
+%else
+targ=linux
%endif
-%{__make}
-
-(cd widgets-mesa
-%configure \
- --with-motif
-%{__make}
-)
-
-(cd widgets-sgi
-touch depend
-%{__make} dep
-%{__make} linux OPTFLAGS="%{rpmcflags}"
-)
+%{__make} ${targ}-static \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ OPT="%{rpmcflags}" \
+ XLIB_DIR=/usr/X11R6/%{_lib} \
+ GLW_SOURCES="GLwDrawA.c GLwMDrawA.c"
+mv -f lib lib-static
+%{__make} clean
+%{__make} ${targ} \
+ CC="%{__cc}" \
+ CXX="%{__cxx}" \
+ OPT="%{rpmcflags}" \
+ XLIB_DIR=/usr/X11R6/%{_lib}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT%{_mandir}/man3
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/GL,%{_mandir}/man3,%{_examplesdir}/Mesa}
-(cd widgets-mesa
-%{__make} install \
- prefix=$RPM_BUILD_ROOT%{_prefix} \
- mandir=$RPM_BUILD_ROOT%{_mandir}/man3
-# Mesa widgets are not binary compatible with SGI ones
-cd $RPM_BUILD_ROOT%{_includedir}/GL
-mkdir Mesa-widgets
-mv -f GLw*.h Mesa*.h Mesa-widgets
-)
+cp -df lib-static/lib[GO]* $RPM_BUILD_ROOT%{_libdir}
+cp -df lib/lib[GO]* $RPM_BUILD_ROOT%{_libdir}
+cp -rf include/GL/{gl*,osmesa.h,xmesa*} src/glw/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
+rm -f $RPM_BUILD_ROOT%{_includedir}/GL/glut*
-install widgets-sgi/libGLw* $RPM_BUILD_ROOT%{_libdir}
-install widgets-sgi/GLw*.h $RPM_BUILD_ROOT%{_includedir}/GL
-
-install -d $RPM_BUILD_ROOT/usr/src/examples/Mesa
-for l in book demos samples xdemos images ; do
- cp -Rf $l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
+for l in demos redbook samples xdemos ; do
+ %{__make} -C progs/$l clean
+done
+for l in demos redbook samples util xdemos images ; do
+ cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/Mesa/$l
done
+rm -rf $RPM_BUILD_ROOT%{_examplesdir}/Mesa/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
-gzip -9nf docs/*
+%clean
+rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%clean
-rm -fr $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
-%doc docs/CONFIG.gz
-%attr(755,root,root) %{_libdir}/libGL*.so.*.*
+%doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS}
+%attr(755,root,root) %{_libdir}/libGL.so.*.*
+%attr(755,root,root) %{_libdir}/libGL.so
+%attr(755,root,root) %{_libdir}/libGLU.so.*.*
+%attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
%files devel
%defattr(644,root,root,755)
-%doc docs/{IAFA-PACKAGE,README,RELNOTES-*,VERSIONS,CONFORM,COPYRIGHT,DEVINFO,*.spec}.gz
-%doc docs/README.{3DFX,GGI,MITS,QUAKE,X11,THREADS}.gz
-%attr(755,root,root) %{_libdir}/libGL*.so
-%{_libdir}/libMesaGLw*.a
+%doc docs/*.spec
+%attr(755,root,root) %{_libdir}/libGLU.so
+%attr(755,root,root) %{_libdir}/libOSMesa.so
%{_libdir}/libGLw.a
%dir %{_includedir}/GL
-%{_includedir}/GL/Mesa-widgets
%{_includedir}/GL/GLwDrawA.h
%{_includedir}/GL/GLwDrawAP.h
%{_includedir}/GL/GLwMDrawA.h
%{_includedir}/GL/glu.h
%{_includedir}/GL/glu_mangle.h
%{_includedir}/GL/glx.h
+%{_includedir}/GL/glxext.h
%{_includedir}/GL/glx_mangle.h
%{_includedir}/GL/osmesa.h
%{_includedir}/GL/xmesa.h
%{_includedir}/GL/xmesa_x.h
%{_includedir}/GL/xmesa_xf86.h
-%{_mandir}/man3/*
%files static
%defattr(644,root,root,755)
%{_libdir}/libGL.a
%{_libdir}/libGLU.a
+%{_libdir}/libOSMesa.a
%files demos
%defattr(644,root,root,755)
-%dir /usr/src/examples/Mesa
-%dir /usr/src/examples/Mesa/book
-%dir /usr/src/examples/Mesa/demos
-%dir /usr/src/examples/Mesa/samples
-%dir /usr/src/examples/Mesa/xdemos
-
-%doc /usr/src/examples/Mesa/book/*
-%doc /usr/src/examples/Mesa/demos/*
-%doc /usr/src/examples/Mesa/samples/*
-%doc /usr/src/examples/Mesa/xdemos/*
+%{_examplesdir}/Mesa