summaryrefslogtreecommitdiff
path: root/source/ap/madplay
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/madplay')
-rw-r--r--source/ap/madplay/madplay-0.15.2b-fix-segfault.patch11
-rw-r--r--source/ap/madplay/madplay-0.15.2b.tar.gz.sign7
-rwxr-xr-xsource/ap/madplay/madplay.SlackBuild25
3 files changed, 31 insertions, 12 deletions
diff --git a/source/ap/madplay/madplay-0.15.2b-fix-segfault.patch b/source/ap/madplay/madplay-0.15.2b-fix-segfault.patch
new file mode 100644
index 00000000..cb9f3136
--- /dev/null
+++ b/source/ap/madplay/madplay-0.15.2b-fix-segfault.patch
@@ -0,0 +1,11 @@
+--- madplay-0.15.2b/audio_alsa.c.orig 2004-02-23 21:35:23.000000000 +0000
++++ madplay-0.15.2b/audio_alsa.c 2010-04-21 14:26:52.000000000 +0100
+@@ -241,7 +241,7 @@ int config(struct audio_config *config)
+ return -1;
+ }
+
+- buf = malloc(buffer_size);
++ buf = malloc(buffer_size*sample_size);
+ if (buf == NULL) {
+ audio_error="unable to allocate output buffer table";
+ return -1;
diff --git a/source/ap/madplay/madplay-0.15.2b.tar.gz.sign b/source/ap/madplay/madplay-0.15.2b.tar.gz.sign
deleted file mode 100644
index d8c15332..00000000
--- a/source/ap/madplay/madplay-0.15.2b.tar.gz.sign
+++ /dev/null
@@ -1,7 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: PGP 8.0.3
-
-iQA/AwUAQDp66/bzO6Ks1lsyEQLXKQCgnwZnv72//lWsJH+UY3D3xwfUImwAoPnD
-P15yJQ90MlTFmgFneRs8Kscq
-=Iwpu
------END PGP SIGNATURE-----
diff --git a/source/ap/madplay/madplay.SlackBuild b/source/ap/madplay/madplay.SlackBuild
index fb322c83..34d32340 100755
--- a/source/ap/madplay/madplay.SlackBuild
+++ b/source/ap/madplay/madplay.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,9 +22,19 @@
VERSION=0.15.2b
-ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-3}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-2}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -32,6 +42,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
CWD=$(pwd)
@@ -42,8 +54,11 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf madplay-$VERSION
-tar xvf $CWD/madplay-$VERSION.tar.gz || exit 1
+tar xvf $CWD/madplay-$VERSION.tar.?z* || exit 1
cd madplay-$VERSION || exit 1
+
+zcat $CWD/madplay-0.15.2b-fix-segfault.patch.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -68,7 +83,7 @@ gzip -9 $PKG/usr/man/man1/*
mkdir -p $PKG/usr/doc/madplay-$VERSION
cp -a \
- CHANGES COPYING COPYRIGHT CREDITS README TODO VERSION \
+ CHANGES COPYING* COPYRIGHT CREDITS README* TODO VERSION \
$PKG/usr/doc/madplay-$VERSION
mkdir -p $PKG/install