From 48264f82812465dd9ee149eb6d9bf6145864c323 Mon Sep 17 00:00:00 2001 From: ponce Date: Tue, 21 Aug 2012 17:27:23 +0200 Subject: multimedia/mpgtx: Included some patches from gentoo + small cleanups Signed-off-by: Robby Workman --- multimedia/mpgtx/mpgtx.SlackBuild | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'multimedia/mpgtx/mpgtx.SlackBuild') diff --git a/multimedia/mpgtx/mpgtx.SlackBuild b/multimedia/mpgtx/mpgtx.SlackBuild index 4f5ffaaf72..a838ae5a4f 100644 --- a/multimedia/mpgtx/mpgtx.SlackBuild +++ b/multimedia/mpgtx/mpgtx.SlackBuild @@ -7,15 +7,13 @@ PRGNAM=mpgtx VERSION=${VERSION:-1.3.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -25,6 +23,16 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + set -e rm -rf $PKG @@ -40,15 +48,11 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -if [ "$ARCH" = "i486" ]; then - sed -i "s|-O3|-O2 -march=i486 -mtune=i686|g" configure -elif [ "$ARCH" = "i686" ]; then - sed -i "s|-O3|-O2 -march=i686 -mtune=i686|g" configure -elif [ "$ARCH" = "x86_64" ]; then - sed -i "s|-O3|-O2 -fPIC|g" configure -fi +# Various fixes from Timothy Redaelli +patch -p0 < $CWD/patches/mpgtx-1.3.1-configure.patch +patch -p1 < $CWD/patches/mpgtx-1.3.1-dont-ignore-cxx-flags.patch -./configure --prefix=/usr +CXXFLAGS=$SLKCFLAGS ./configure --prefix=/usr make cd man @@ -69,10 +73,8 @@ mkdir -p $PKG/usr/man/de/man1 cp -a man/*.1 $PKG/usr/man/man1 cp -a man/de/*.1 $PKG/usr/man/de/man1 -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING README TODO $PKG/usr/doc/$PRGNAM-$VERSION -- cgit v1.2.3