# HG changeset patch # User Michael Schloh von Bennewitz # Date 1328725110 -7200 # Node ID 1cbb056650450251f17d1cce0d69ccb450fff17e # Parent b36c2198026156c93f1338390380164b2ddff0b7 Blindly commit with version update, but it seems these changes weren't tested. diff -r b36c21980261 -r 1cbb05665045 mesa/mesa.spec --- a/mesa/mesa.spec Wed Feb 08 20:18:10 2012 +0200 +++ b/mesa/mesa.spec Wed Feb 08 20:18:30 2012 +0200 @@ -1,6 +1,6 @@ ## ## mesa.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## Copyright (c) 2000-2009 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -31,26 +31,19 @@ Class: EVAL Group: XWindow License: LGPL -Version: 7.2 -Release: 20090106 - -# package options -%option with_demos no +Version: 7.4.4 +Release: 20101008 # list of sources Source0: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-%{version}.tar.bz2 Source1: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaGLUT-%{version}.tar.bz2 -Source2: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-%{version}.tar.bz2 Patch0: mesa.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130 -PreReq: OpenPKG, openpkg >= 20040130 -BuildPreReq: make, gcc, gcc::with_cxx = yes, autoconf, binutils -BuildPreReq: X11 -PreReq: X11 +BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, make, autoconf +PreReq: OpenPKG, openpkg >= 20040130, X11 AutoReq: no AutoReqProv: no @@ -64,54 +57,25 @@ %track prog mesa:MesaLib = { version = %{version} - url = http://prdownloads.sourceforge.net/mesa3d/ + url = http://sourceforge.net/projects/mesa3d/files/ regex = MesaLib-(7\.\d+(?:\.\d+)?)\.tar\.bz2 } prog mesa:MesaGLUT = { version = %{version} - url = http://prdownloads.sourceforge.net/mesa3d/ + url = http://sourceforge.net/projects/mesa3d/files/ regex = MesaGLUT-(7\.\d+(?:\.\d+)?)\.tar\.bz2 } - prog mesa:MesaDemos = { - version = %{version} - url = http://prdownloads.sourceforge.net/mesa3d/ - regex = MesaDemos-(7\.\d+(?:\.\d+)?)\.tar\.bz2 - } %prep - # announce exceptional build requirements - ( echo "This package has exceptional storage requirements:" - echo " mesa-%{version}-root (500 Mo)" - echo " Mesa-%{version} (3,5 Go)" - echo " mesa-%{version}-.--.rpm (200 Mo)" - ) | %{l_rpmtool} msg -b -t notice - %setup -q -n Mesa-%{version} %setup -q -n Mesa-%{version} -T -D -b 1 %patch -p0 -%if "%{with_demos}" == "yes" - %setup -q -n Mesa-%{version} -T -D -b 2 -%endif %{l_shtool} subst \ -e "s;@l_x11bindir@;`%{l_rc} --query x11_bindir`;g" \ configs/default %{l_shtool} subst \ - -e "s;^\(CC\ \ *=\).*;\1 %{l_cc};" \ - -e "s;^\(CXX\ \ *=\).*;\1 %{l_cxx};" \ - -e "s;^\(CFLAGS\ \ *=\)\(.*\);\1 %{l_cflags -O}\2;" \ - -e "s;^\(CXXFLAGS\ \ *=\)\(.*\);\1 %{l_cxxflags -O}\2;" \ - -e "s;^\(CPPFLAGS\ \ *=\)\(.*\);\1 %{l_cppflags}\2;" \ - -e "s;^\(LDFLAGS\ \ *=\)\(.*\);\1 %{l_ldflags}\2;" \ - configs/* - %{l_shtool} subst \ - -e 's;^\(EXTRA_LIB_PATH\ *=.*\);\1 -L$(X11LIB_DIR);' \ - configs/* - %{l_shtool} subst \ - -e "s;\.\./images/;%{l_prefix}/lib/mesa/images/;" \ - `find . -name '*.c' -o -name '*.cxx'` - %{l_shtool} subst \ - -e 's;\(APP_LIB_DEPS *=.*-l\$(GL_LIB)\);\1 -lstdc++;' \ - configs/* + -e 's;\(PIC_FLAGS =\).*;\1 -fPIC;' \ + configs/linux-* %build case "%{l_platform -t}" in @@ -123,44 +87,16 @@ *-sunos* ) plat="sunos5-gcc" ;; * ) echo "platform %{l_platform -t} not supported" 2>&1; exit 1; ;; esac - - # begin building broken mesa build logic - ( cd configs && rm -f current && ln -s $plat current ) - ( cd src - CC="%{l_cc}" \ - CXX="%{l_cxx}" \ - CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - X11LIB_DIR="`%{l_rc} --query x11_libdir`" \ - %{l_make} %{l_mflags -O} \ - SHELL="%{l_bash}" - ) || exit $? - - # correct broken mesa archive logic - %{l_shtool} mkdir -f -p -m 755 temphack - ( cd temphack - %{l_prefix}/bin/ar -x ../src/mesa/libglapi.a - %{l_prefix}/bin/ar -x ../src/mesa/libmesa.a - %{l_prefix}/bin/ar -d ../lib/libGL.a libglapi.a libmesa.a - %{l_prefix}/bin/ar -ru ../lib/libGL.a *.o - ) || exit $? - -%if "%{with_demos}" == "yes" - # continue building with corrected mesa library - ( cd progs - CC="%{l_cc}" \ - CXX="%{l_cxx}" \ - CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - X11LIB_DIR="`%{l_rc} --query x11_libdir`" \ - %{l_make} %{l_mflags -O} \ - SHELL="%{l_bash}" - ) || exit $? -%endif + CC="%{l_cc}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + X11LIB_DIR="`%{l_rc} --query x11_libdir`" \ + %{l_make} %{l_mflags} \ + SHELL="%{l_bash}" \ + $plat %install rm -rf $RPM_BUILD_ROOT @@ -171,19 +107,6 @@ lib/* $RPM_BUILD_ROOT%{l_prefix}/lib/ %{l_shtool} install -c -m 644 \ include/GL/*.h $RPM_BUILD_ROOT%{l_prefix}/include/GL/ -%if "%{with_demos}" == "yes" - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/demos \ - $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/images - %{l_shtool} install -s -c -m 755 \ - `find progs/demos/ -type f -prune -perm 755 -print` \ - `find progs/redbook/ -type f -prune -perm 755 -print` \ - `find progs/samples/ -type f -prune -perm 755 -print` \ - `find progs/xdemos/ -type f -prune -perm 755 -print` \ - $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/demos/ - %{l_shtool} install -c -m 644 \ - progs/images/* $RPM_BUILD_ROOT%{l_prefix}/lib/mesa/images/ -%endif %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files