summaryrefslogtreecommitdiff
path: root/multimedia/mpgtx/mpgtx.SlackBuild
diff options
context:
space:
mode:
authorponce <matteo.bernardini@gmail.com>2012-08-21 17:27:23 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-08-21 15:36:50 -0500
commit48264f82812465dd9ee149eb6d9bf6145864c323 (patch)
treea80a1f9d7806bfdfc8b9752b8f3186d1cfd77648 /multimedia/mpgtx/mpgtx.SlackBuild
parent2a67646695cf8d3f81087ca426836cd035f23244 (diff)
downloadslackbuilds-48264f82812465dd9ee149eb6d9bf6145864c323.tar.gz
multimedia/mpgtx: Included some patches from gentoo + small cleanups
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'multimedia/mpgtx/mpgtx.SlackBuild')
-rw-r--r--multimedia/mpgtx/mpgtx.SlackBuild32
1 files changed, 17 insertions, 15 deletions
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 <drizzt@gentoo.org>
+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