X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=Mesa.spec;h=0c6a47ad2f1f067b637d50d463ce166ac683a525;hb=6299b3cd36a6c249e89eb54ce0408d64dc5b46aa;hp=9f5e99a26c339fdb8e1a3296e2c5e7a5dc8c42ca;hpb=2d166460fef5c1e4c3e7fe7908ac12a07c254c17;p=packages%2FMesa.git diff --git a/Mesa.spec b/Mesa.spec index 9f5e99a..0c6a47a 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -1,29 +1,42 @@ # -# _with_glide: with GLIDE +# 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: 5.0 +Version: 6.1 Release: 1 License: MIT (core), LGPL (MesaGLU), SGI (GLU,libGLw) and others - see COPYRIGHT file Group: X11/Libraries -Source0: ftp://ftp.sourceforge.net/pub/sourceforge/mesa3d/%{name}Lib-%{version}.tar.bz2 -Source1: ftp://ftp.sourceforge.net/pub/sourceforge/mesa3d/%{name}Demos-%{version}.tar.bz2 -Patch0: %{name}-am.patch -Patch1: %{name}-ac.patch -Patch2: %{name}-libGLw.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/ -BuildRequires: XFree86-devel -BuildRequires: autoconf -BuildRequires: motif-devel -BuildRequires: perl %ifarch %{ix86} alpha -%{?_with_glide:BuildRequires: Glide3-DRI-devel} -%{?_with_glide:Requires: Glide3-DRI} +%{?with_glide:BuildRequires: Glide3-DRI-devel} +%{?with_glide:Requires: Glide3-DRI} %endif -Provides: OpenGL -Obsoletes: XFree86-OpenGL-core XFree86-OpenGL-libs +%if %{with xlibs} +BuildRequires: libXmu-devel +BuildRequires: libXp-devel +%else +BuildRequires: XFree86-devel +%endif +BuildRequires: autoconf >= 2.50 +BuildRequires: automake +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) # avoid XFree86-OpenGL* dependency @@ -56,10 +69,18 @@ OpenGL(*). Summary: Development environment for Mesa Summary(pl): ¦rodowisko programistyczne biblioteki Mesa Group: Development/Libraries -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. @@ -71,8 +92,9 @@ Pliki nag Summary: Mesa static libraries Summary(pl): Biblioteki statyczne Mesy Group: Development/Libraries -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 @@ -96,86 +118,48 @@ Programy demonstracyjne dla bibliotek Mesa. %prep %setup -q -n Mesa-%{version} -b 1 %patch0 -p1 -%patch1 -p1 -%patch2 -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 -%configure \ - --enable-static \ - --enable-shared \ - --with-ggi="no" \ - --with-svga="no" \ - --disable-ggi-fbdev \ - --disable-ggi-genkgi \ - --enable-optimize \ - %{!?_with_glide:--without-glide} \ -%ifarch %{ix86} \ - --enable-x86 \ - %ifarch i586 i686 k6 athlon \ - --enable-mmx \ - --enable-3dnow \ - %ifarch i686 athlon \ - --enable-katmai \ - %else \ - --disable-katmai \ - %endif \ - %else \ - --disable-mmx \ - --disable-3dnow \ - %endif \ -%else \ -%ifarch sparc \ - --enable-sparc \ -%endif \ - --disable-x86 \ - --disable-mmx \ - --disable-3dnow +%ifarch %{ix86} +targ=linux-x86 +%else +targ=linux %endif -%{__make} - -cd widgets-mesa -%{__autoconf} -%configure \ - --with-motif -%{__make} || : -cd ../widgets-sgi -touch depend -%{__make} dep -%{__make} linux OPTFLAGS="%{rpmcflags}" -cd .. +%{__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 - -SPWD=`pwd` -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 -cd $SPWD - -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 +install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/GL,%{_mandir}/man3,%{_examplesdir}/Mesa} + +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* + +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}} -rm -f docs/*~ - %clean rm -rf $RPM_BUILD_ROOT @@ -184,24 +168,19 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc docs/{CONFORM,COPYRIGHT,README,README.{3DFX,GGI,MITS,QUAKE,THREADS,X11},RELNOTES*,VERSIONS} -%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mesa.conf -%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/{DEVINFO,*.spec} -%{_libdir}/libGL.la +%doc docs/*.spec %attr(755,root,root) %{_libdir}/libGLU.so -%{_libdir}/libGLU.la %attr(755,root,root) %{_libdir}/libOSMesa.so -%{_libdir}/libOSMesa.la %{_libdir}/libGLw.a -%{_libdir}/libMesaGLw*.a %dir %{_includedir}/GL -%{_includedir}/GL/Mesa-widgets %{_includedir}/GL/GLwDrawA.h %{_includedir}/GL/GLwDrawAP.h %{_includedir}/GL/GLwMDrawA.h @@ -218,7 +197,6 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/GL/xmesa.h %{_includedir}/GL/xmesa_x.h %{_includedir}/GL/xmesa_xf86.h -%{_mandir}/man3/* %files static %defattr(644,root,root,755)