summaryrefslogtreecommitdiff
path: root/libraries/id3lib/id3lib.SlackBuild
diff options
context:
space:
mode:
authorYalla-One <yallaone@gmail.com>2010-05-13 00:29:54 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:29:54 +0200
commit70c2e6cd3d22273ed4a27235791ac085ce7fbc1b (patch)
treeb2dac27e5a70ee6aaed732c3ac65beccc5be3864 /libraries/id3lib/id3lib.SlackBuild
parent999ac6f32f40e0ad36cfdf923cd24bbd3508b4d6 (diff)
downloadslackbuilds-70c2e6cd3d22273ed4a27235791ac085ce7fbc1b.tar.gz
libraries/id3lib: Updated for version 3.8.3
Diffstat (limited to 'libraries/id3lib/id3lib.SlackBuild')
-rw-r--r--libraries/id3lib/id3lib.SlackBuild72
1 files changed, 37 insertions, 35 deletions
diff --git a/libraries/id3lib/id3lib.SlackBuild b/libraries/id3lib/id3lib.SlackBuild
index 12639e2cdb..536598656f 100644
--- a/libraries/id3lib/id3lib.SlackBuild
+++ b/libraries/id3lib/id3lib.SlackBuild
@@ -27,60 +27,64 @@
PRGNAM=id3lib
VERSION=3.8.3
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO doc/*"
-
-case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- ;;
- i686) SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- ;;
- s390) SLKCFLAGS="-O2"
- ;;
- powerpc) SLKCFLAGS="-O2"
- ;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
- ;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- ;;
-esac
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-zcat $CWD/id3lib_3.8.3_UTF16_writing_bug.patch.gz | patch -p1 || exit 1
-( cd doc ; zcat $CWD/id3lib_Doxyfile.patch.gz | patch -p0 || exit 1 ) || exit 1
+patch -p1 < $CWD/patches/id3lib_3.8.3_UTF16_writing_bug.patch
+patch -p1 < $CWD/patches/id3lib-3.8.3-GCC43FIX-1.patch
+patch -p1 -d doc < $CWD/patches/id3lib_Doxyfile.patch
+
+# iomanip.h is obsolete; use the standard c++ header
+sed -i "s%iomanip.h%iomanip%g" configure
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--sysconfdir=/etc \
--enable-static=no \
--enable-debug=no \
- || exit 1
+ --build=$ARCH-slackware-linux
-make || exit 1
-make docs 2>/dev/null
-make install DESTDIR=$PKG || exit 1
+make
+make docs 2>/dev/null || true
+make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
# Strip down the doc and examples directories so we can copy w/impunity
@@ -90,18 +94,16 @@ for i in doc/ examples/; do \
\) -exec rm {} \; ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO doc/* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
# Remove the massive amount of API docs
rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/api
-if [ -d $PKG/usr/man ]; then
- find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
-fi
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
chmod -R o-w $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}