summaryrefslogtreecommitdiffstats
path: root/development/portaudio/portaudio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/portaudio/portaudio.SlackBuild')
-rw-r--r--development/portaudio/portaudio.SlackBuild41
1 files changed, 27 insertions, 14 deletions
diff --git a/development/portaudio/portaudio.SlackBuild b/development/portaudio/portaudio.SlackBuild
index 3800cb46da..0c2b3109b1 100644
--- a/development/portaudio/portaudio.SlackBuild
+++ b/development/portaudio/portaudio.SlackBuild
@@ -1,16 +1,17 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for "PortAudio".
#
# Copyright 2009-2015 Marco Bonetti <sid77@slackware.it>
# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
+# Copyright 2022 Bill Kirkpatrick, Bay City, Texas, USA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
-# * Redistributions of source code must retain the above copyright
+# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -25,27 +26,36 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=portaudio
-SRCNAM=pa
-VERSION=${VERSION:-v190600_20161030}
+VERSION=${VERSION:-19.7.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,9 +73,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
-tar xvf $CWD/${SRCNAM}_stable_${VERSION}.tgz
-cd $PRGNAM
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -82,20 +92,23 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-cxx \
+ --disable-static \
--build=$ARCH-slackware-linux
-make
+make -j1
make install DESTDIR=$PKG
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.txt README.configure.txt README.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE.txt README.configure.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE