summaryrefslogtreecommitdiffstats
path: root/audio/musepack-tools
diff options
context:
space:
mode:
Diffstat (limited to 'audio/musepack-tools')
-rw-r--r--audio/musepack-tools/musepack-tools-465-fno-common.patch16
-rw-r--r--audio/musepack-tools/musepack-tools.SlackBuild18
2 files changed, 31 insertions, 3 deletions
diff --git a/audio/musepack-tools/musepack-tools-465-fno-common.patch b/audio/musepack-tools/musepack-tools-465-fno-common.patch
new file mode 100644
index 0000000000..0fb9f5e5eb
--- /dev/null
+++ b/audio/musepack-tools/musepack-tools-465-fno-common.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/706992
+--- a/libmpcdec/requant.h
++++ b/libmpcdec/requant.h
+@@ -47,9 +47,9 @@
+
+
+ /* C O N S T A N T S */
+-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
+-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
+-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
++extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
++extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
++extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
+
+ #define Cc (__Cc + 1)
+ #define Dc (__Dc + 1)
diff --git a/audio/musepack-tools/musepack-tools.SlackBuild b/audio/musepack-tools/musepack-tools.SlackBuild
index def1358310..f6b18ef0bb 100644
--- a/audio/musepack-tools/musepack-tools.SlackBuild
+++ b/audio/musepack-tools/musepack-tools.SlackBuild
@@ -1,13 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for musepack-tools
# Written by Šime Ramov <s@ramov.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=musepack-tools
SRCNAM=musepack_src
VERSION=${VERSION:-r475}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -17,7 +20,14 @@ if [ -z "$ARCH" ]; then
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}
@@ -53,6 +63,8 @@ find -L . \
# sane defaults (hints from Gentoo)
patch -p1 < $CWD/musepack-tools-475.patch
+# fix building with -fno-common
+patch -p1 < $CWD/musepack-tools-465-fno-common.patch
mkdir -p build
cd build
@@ -78,4 +90,4 @@ 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