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>
This commit is contained in:
B. Watson 2021-11-26 11:25:45 -05:00 committed by Willy Sudiarto Raharjo
parent 87225a2c08
commit 1c00df53fa
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 73 additions and 40 deletions

View File

@ -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.

View File

@ -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
JAVA="${JAVA:-no}"
# 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
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
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux
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
make
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
# 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
EXTRA="-Dextra_include_dirs=$JAVA_HOME/include,$JAVA_HOME/include/linux"
echo "=== EXTRA='$EXTRA'"
fi
make install DESTDIR=$PKG
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 ..
# We don't need the static lib
rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.a
# I don't see a way to disable the static lib at build time, so:
rm -f $PKG/usr/lib*/lib$PRGNAM.a
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
WITHJAVA=WITHOUT
[ -e $JNILIB ] && WITHJAVA=WITH
# man page borrowed from Debian
mkdir -p $PKG/usr/man/man1

View File

@ -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"