summaryrefslogtreecommitdiffstats
path: root/soundtouch
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-09-08 17:52:01 +0000
committer Eric Hameleers <alien@slackware.com>2020-09-08 17:52:01 +0000
commit9a3fc68ad6072eb8e2106597e4f72b3e7e8e9a38 (patch)
treee4d6f38135c385c20f43d98f3027289077dc25d8 /soundtouch
parent835df2f721006f288f958955bea6b0220f1dcf27 (diff)
downloadasb-9a3fc68ad6072eb8e2106597e4f72b3e7e8e9a38.tar.gz
asb-9a3fc68ad6072eb8e2106597e4f72b3e7e8e9a38.tar.xz
soundtouch: updated to 2.1.2
Diffstat (limited to 'soundtouch')
-rwxr-xr-xsoundtouch/build/soundtouch.SlackBuild96
1 files changed, 43 insertions, 53 deletions
diff --git a/soundtouch/build/soundtouch.SlackBuild b/soundtouch/build/soundtouch.SlackBuild
index c4e102e6..6484bcd9 100755
--- a/soundtouch/build/soundtouch.SlackBuild
+++ b/soundtouch/build/soundtouch.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2007, 2010 Eric Hameleers, Eindhoven, NL
+# Copyright 2007, 2010, 2020 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -38,6 +38,8 @@
# * Update.
# 1.5.0-2: 12/apr/2010 by Eric Hameleers <alien@slackware.com>
# * Rebuild for Slackware 13.1.
+# 2.1.2-1: 08/sep/2020 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh soundtouch.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -48,12 +50,12 @@
# Set initial variables:
PRGNAM=soundtouch
-VERSION=${VERSION:-1.5.0}
-BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j4 "}
+VERSION=${VERSION:-2.1.2}
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
-DOCS="COPYING.TXT README.html"
+DOCS="COPYING.TXT README.html readme.md"
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -64,7 +66,7 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL="http://www.surina.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
+SRCURL="https://gitlab.com/${PRGNAM}/${PRGNAM}/-/archive/${VERSION}/${PRGNAM}-${VERSION}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -72,31 +74,33 @@ SRCURL="http://www.surina.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
# 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 ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-
-# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
- MOPT=tune
-else
- MOPT=cpu
-fi
-
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686 -fomit-frame-pointer"
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
- *) SLKCFLAGS="-O2"
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
esac
# Exit the script on errors:
@@ -111,20 +115,22 @@ _UMASK_=$(umask)
umask 0022
# Create working directories:
+mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
-rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build
mkdir -p $PKG # place for the package to be built
-rm -rf $PKG/* # We always erase old package's contents:
-mkdir -p $OUTPUT # place for the package to be saved
+rm -rf $PKG/* # always erase old package's contents
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+rm -rf $OUTPUT/{bootstrap,checkout,configure,make,install,error,makepkg,patch}-$PRGNAM.log # remove old log files
# Source file availability:
if ! [ -f ${SOURCE} ]; then
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
- echo "Source '$(basename ${SOURCE})' not available yet..."
echo "Will download file to $(dirname $SOURCE)"
- wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
+ wget --no-check-certificate -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
@@ -149,32 +155,18 @@ echo "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
-tar -xzvf ${SOURCE}
-cd ${PRGNAM}
+tar -xvf ${SOURCE}
+cd ${PRGNAM}-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
-
-# More breakage to follow:
-ln -sf /usr/share/libtool/ltmain.sh config/ltmain.sh
-rm -f config/m4/lt*
-autoreconf -vif
-
-# Set correct version for .so build
-LTVERSION=$(echo ${VERSION} | tr '.' ':')
-sed -i -e "s/-rpath \$(libdir)/-rpath \$(libdir) -version-number ${LTVERSION}/" source/SoundTouch/Makefile.in
-
-# Patch Makefiles to force use of SLKCFLAGS
-if [ "$ARCH" == "i486" ]; then
- sed -i -e 's/-O3 -msse/$(CFLAGS) -msse/' source/SoundTouch/Makefile.*
-else
- sed -i -e 's/-O3 -msse[^ ]*/$(CFLAGS)/' source/SoundTouch/Makefile.*
-fi
+chmod -R u+w,go+r-w,a+rX-st .
echo Building ...
+[ ! -x configure ] && ./bootstrap \
+ 2>&1 | tee $OUTPUT/bootstrap-${PRGNAM}.log
+
export LDFLAGS="$SLKLDFLAGS"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
-export AUTOMAKE="automake --add-missing --foreign"
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -185,17 +177,15 @@ export AUTOMAKE="automake --add-missing --foreign"
--enable-shared \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux \
+ --build=$TARGET \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
# Wired does not like '--enable-integer-samples'
make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
-# Install all the needed stuff to the package dir:
-make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-
-# This does not hurt - there is API compatibility with the older release:
-ln -s soundtouch-1.4.pc $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/soundtouch-1.0.pc
+# Don't package .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION