summaryrefslogtreecommitdiffstats
path: root/audio/rubberband/rubberband.SlackBuild
diff options
context:
space:
mode:
author B. Watson2018-07-03 07:53:43 +0200
committer Willy Sudiarto Raharjo2018-07-07 01:54:21 +0200
commited6f276cf778e55eb558452caefbf928a0a1a004 (patch)
treec780665da016198cd83f382a7189ca16984c6258 /audio/rubberband/rubberband.SlackBuild
parentfefd3f96a8b0543b4459e7a91d421d098dce1de0 (diff)
downloadslackbuilds-ed6f276cf778e55eb558452caefbf928a0a1a004.tar.gz
audio/rubberband: Updated for version 1.8.2.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'audio/rubberband/rubberband.SlackBuild')
-rw-r--r--audio/rubberband/rubberband.SlackBuild34
1 files changed, 29 insertions, 5 deletions
diff --git a/audio/rubberband/rubberband.SlackBuild b/audio/rubberband/rubberband.SlackBuild
index 709220fd08..c4bcaa1658 100644
--- a/audio/rubberband/rubberband.SlackBuild
+++ b/audio/rubberband/rubberband.SlackBuild
@@ -2,9 +2,17 @@
# Slackware build script for rubberband
-# Written by Luis Henrique <lmello.009@gmail.com>
+# Written by Luis Henrique <email removed>
+
+# Modified by B. Watson <yalhcru@gmail.com>. Original had no license.
+# Modified version licensed under the WTFPL. See
+# http://www.wtfpl.net/txt/copying/ for details.
+
+# 20180702 bkw:
+# - update for v1.8.2
+# - add optional Java support.
+# - add license to script.
-# Modified by B. Watson <yalhcru@gmail.com>
# 20140915 bkw:
# - took over maintenance
# - get rid of static lib
@@ -13,8 +21,8 @@
# - add man page
PRGNAM=rubberband
-VERSION=${VERSION:-1.8.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.8.2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -62,6 +70,10 @@ find -L . \
# 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 \
@@ -70,6 +82,18 @@ CXXFLAGS="$SLKCFLAGS" \
--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
+fi
+
make install DESTDIR=$PKG
# We don't need the static lib
@@ -87,7 +111,7 @@ cp -a CHANGELOG COPYING README.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
+sed "s,@WITHJAVA@,$WITHJAVA," $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}