diff options
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/mpgtx/mpgtx.SlackBuild | 32 | ||||
-rw-r--r-- | multimedia/mpgtx/patches/mpgtx-1.3.1-configure.patch | 69 | ||||
-rw-r--r-- | multimedia/mpgtx/patches/mpgtx-1.3.1-dont-ignore-cxx-flags.patch | 12 |
3 files changed, 98 insertions, 15 deletions
diff --git a/multimedia/mpgtx/mpgtx.SlackBuild b/multimedia/mpgtx/mpgtx.SlackBuild index 4f5ffaaf72fd7..a838ae5a4f2c7 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 diff --git a/multimedia/mpgtx/patches/mpgtx-1.3.1-configure.patch b/multimedia/mpgtx/patches/mpgtx-1.3.1-configure.patch new file mode 100644 index 0000000000000..ec36e76ba641c --- /dev/null +++ b/multimedia/mpgtx/patches/mpgtx-1.3.1-configure.patch @@ -0,0 +1,69 @@ +--- configure.old 2006-12-07 19:51:08.000000000 +0100 ++++ configure 2006-12-07 19:51:02.000000000 +0100 +@@ -9,7 +9,6 @@ + prefix="/usr/local" + manprefix='$(PREFIX)' + #compiler flags +-CC="g++" + common_cflags="-Wall" + devel_cflags="-g -Werror -fno-builtin" + optimization_cflags="-O3" +@@ -36,7 +35,6 @@ + + if [ "${HOSTNAME}" = "powerpc-apple-darwin6.0" ]; then + #compiler flags +-CC="c++" + common_cflags="-pedantic -Wall" + #devel_cflags="-g -Werror -fno-builtin" + devel_cflags="-g -fno-builtin" +@@ -153,8 +151,15 @@ + if test "$gcc_minor" = "0" -o "$gcc_minor" = "1"; then + optimization_cflags="-O2"; + fi ++ if test "$gcc_minor" -ge 4; then ++ optimization_cflags="$optimization_cflags -fno-unit-at-a-time" ++ fi ++elif test "$gcc_major" -ge "4"; then ++ optimization_cflags="$optimization_cflags -fno-unit-at-a-time" + fi + ++ ++ + # Now check if the system handles large file support + # unless user has specified not to do so + if test $LFS = "yes"; then +@@ -165,7 +170,7 @@ + return (int)(fseeko(stdin,0,SEEK_SET)); + } + EOF +- $CC __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror ++ ${CXX:-c++} __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror + if test -f __LFStestPASSED; then + echo "PASSED"; + cflags="$cflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"; +@@ -211,7 +211,6 @@ + fi + + if test $devel = "no" -a $debug = "no"; then +-lflags="$lflags -s"; + cflags="$cflags $optimization_cflags"; + fi + +@@ -293,15 +298,15 @@ + @echo "" + + mpgtx : commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o common.hh +- $CC \$(CFLAGS) \$(OFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS) ++ \$(CXX) \$(CFLAGS) \$(OFLAGS) \$(LDFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS) + mpegOut.o : mpegOut.cxx mpegOut.hh mpeg.hh common.hh +- $CC \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx ++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx + mpeg.o : mpeg.cxx mpeg.hh mpegOut.hh common.hh +- $CC \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx ++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx + chunkTab.o : chunkTab.cxx chunkTab.hh common.hh +- $CC \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx ++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx + id3command.o : id3command.cxx id3command.hh common.hh +- $CC \$(CFLAGS) \$(OFLAGS) -c id3command.cxx ++ \$(CXX) \$(CFLAGS) \$(OFLAGS) -c id3command.cxx diff --git a/multimedia/mpgtx/patches/mpgtx-1.3.1-dont-ignore-cxx-flags.patch b/multimedia/mpgtx/patches/mpgtx-1.3.1-dont-ignore-cxx-flags.patch new file mode 100644 index 0000000000000..dc53dfd7e6a54 --- /dev/null +++ b/multimedia/mpgtx/patches/mpgtx-1.3.1-dont-ignore-cxx-flags.patch @@ -0,0 +1,12 @@ +diff -Naur mpgtx-1.3.1.orig/configure mpgtx-1.3.1/configure +--- mpgtx-1.3.1.orig/configure 2010-11-28 11:58:58.000000000 +0100 ++++ mpgtx-1.3.1/configure 2010-11-28 12:00:00.000000000 +0100 +@@ -11,7 +11,7 @@ + #compiler flags + common_cflags="-Wall" + devel_cflags="-g -Werror -fno-builtin" +-optimization_cflags="-O3" ++optimization_cflags="${CXXFLAGS}" + release_cflags=$optimization_cflags + OFLAGS="-ansi" + cflags=$common_cflags |