aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-11-26 11:25:45 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-12-04 10:09:00 +0700
commit1c00df53fae0ac63d25b90d3d7e1a07465edf176 (patch)
tree8f36df09d010d9a45776285cf5633df82a0b7b23
parent87225a2c089f7073d90c35b1e4bed386e3eb32d5 (diff)
audio/rubberband: Updated for version 2.0.0.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--audio/rubberband/README14
-rw-r--r--audio/rubberband/rubberband.SlackBuild101
-rw-r--r--audio/rubberband/rubberband.info8
3 files changed, 78 insertions, 45 deletions
diff --git a/audio/rubberband/README b/audio/rubberband/README
index 75bc642786c3c..87c692329d395 100644
--- a/audio/rubberband/README
+++ b/audio/rubberband/README
@@ -1,9 +1,11 @@
rubberband (audio time-stretching and pitch-shifting)
-Rubber Band is a library and utility program that permits you to change
-the tempo and pitch of an audio recording independently of one another.
+Rubber Band is a library and utility program that permits you to
+change the tempo and pitch of an audio recording independently of one
+another.
-Starting with version 1.8.2, rubberband can be built with optional Java
-JNI support. To do this, install jdk or openjdk, make sure its profile
-script has been sourced (normally by logging out & back in), and build
-rubberband with JAVA=yes set in the environment.
+Rubberband can be built with optional Java JNI support. To do this,
+install one (and only one) of the jdk or openjdk packages, make
+sure its profile script has been sourced (normally by logging out &
+back in), and build rubberband with JAVA=yes set in the environment.
+Currently, this has only been tested with openjdk8.
diff --git a/audio/rubberband/rubberband.SlackBuild b/audio/rubberband/rubberband.SlackBuild
index 25607a6cad0eb..349b10f5ce453 100644
--- a/audio/rubberband/rubberband.SlackBuild
+++ b/audio/rubberband/rubberband.SlackBuild
@@ -8,6 +8,7 @@
# Modified version licensed under the WTFPL. See
# http://www.wtfpl.net/txt/copying/ for details.
+# 20211125 bkw: update for v2.0.0
# 20201103 bkw: update for v1.9.0
# 20180702 bkw:
# - update for v1.8.2
@@ -24,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rubberband
-VERSION=${VERSION:-1.9.0}
+VERSION=${VERSION:-2.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -37,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -75,40 +73,73 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# Fixup libdir on x86_64
-sed -i "s,\<lib\>,lib$LIBDIRSUFFIX,g" Makefile.in *.pc.in
-
-# For 1.8.2, the Makefile tries to install the JNI stuff even if
-# we don't build it.
-sed -i '/cp *-f .*JNI_TARGET/s,$, || true,' Makefile.in
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --build=$ARCH-slackware-linux
-
-make
-
-# 20180703 bkw: build java JNI stuff if we have javac in $PATH and
-# the user says JAVA=yes. Disabled by default because we have too many
-# choices for java compilers, and I can't be bothered to test them all
-# (jdk, openjdk 6 through 8, zulu-openjdk 6 thru 8). Plain "make"
-# doesn't build this...
-WITHJAVA=without
-if [ "${JAVA:-no}" = "yes" ] && which javac &>/dev/null; then
- make lib$LIBDIRSUFFIX/librubberband-jni.so
- WITHJAVA=with
+JAVA="${JAVA:-no}"
+
+if [ "$JAVA" = "yes" ]; then
+ if [ -z "$JAVA_HOME" ]; then
+ # if JAVA_HOME isn't set, try to set it by sourcing the profile script
+ for i in /etc/profile.d/*jdk*.sh; do
+ if [ -x $i ]; then
+ source $i
+ break
+ fi
+ done
+ fi
+
+ if [ -z "$JAVA_HOME" ]; then
+ cat <<EOF
+!!! Java support requested, but JAVA_HOME is unset and I can't find
+!!! a /etc/profile.d script that sets it. Are you sure you have a JDK
+!!! package installed?
+EOF
+ exit 1
+ fi
+
+ echo "=== JAVA_HOME='$JAVA_HOME'"
+ if [ -z "$JAVA_HOME" -o ! -e $JAVA_HOME/include/jni.h ]; then
+ cat <<EOF
+!!! Java support requested, but JAVA_HOME doesn't have the jni.h header.
+EOF
+ exit 1
+ fi
+
+ EXTRA="-Dextra_include_dirs=$JAVA_HOME/include,$JAVA_HOME/include/linux"
+ echo "=== EXTRA='$EXTRA'"
fi
-make install DESTDIR=$PKG
-
-# We don't need the static lib
-rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.a
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ $EXTRA \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+# I don't see a way to disable the static lib at build time, so:
+rm -f $PKG/usr/lib*/lib$PRGNAM.a
+
+JNILIB=$PKG/usr/lib$LIBDIRSUFFIX/lib$PRGNAM-jni.so
+
+if [ "$JAVA" = "yes" -a ! -e $JNILIB ]; then
+ cat <<EOF
+!!! Java support requested, but failed to build. Check the above output
+!!! from Meson and Ninja, and adjust JAVA_HOME if needed.
+EOF
+ exit 1
+fi
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+WITHJAVA=WITHOUT
+[ -e $JNILIB ] && WITHJAVA=WITH
# man page borrowed from Debian
mkdir -p $PKG/usr/man/man1
diff --git a/audio/rubberband/rubberband.info b/audio/rubberband/rubberband.info
index 0065f91d967f6..81805bb9aedc3 100644
--- a/audio/rubberband/rubberband.info
+++ b/audio/rubberband/rubberband.info
@@ -1,8 +1,8 @@
PRGNAM="rubberband"
-VERSION="1.9.0"
-HOMEPAGE="http://www.breakfastquay.com/rubberband"
-DOWNLOAD="https://breakfastquay.com/files/releases/rubberband-1.9.0.tar.bz2"
-MD5SUM="a203a53ef14f23bd4344f4b32514ed62"
+VERSION="2.0.0"
+HOMEPAGE="https://www.breakfastquay.com/rubberband"
+DOWNLOAD="https://breakfastquay.com/files/releases/rubberband-2.0.0.tar.bz2"
+MD5SUM="505d10a6817e5edffd3b1fc8a21b35c2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ladspa_sdk vamp-plugin-sdk"