summaryrefslogtreecommitdiffstats
path: root/audacity/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-06-28 13:35:04 +0000
committer Eric Hameleers <alien@slackware.com>2020-06-28 13:35:04 +0000
commit5fee2a37415bd4f2a12de1c67aa38e69f4736617 (patch)
treef718a0b118dedb4e15dc3c4e29d033c5d910cd00 /audacity/build
parent3c11e927d3caf2e852cf4eb6830b2cc5725301f6 (diff)
downloadasb-5fee2a37415bd4f2a12de1c67aa38e69f4736617.tar.gz
asb-5fee2a37415bd4f2a12de1c67aa38e69f4736617.tar.xz
audacity: fix some 32bit compilation issues for libsoxr and sbsms
Diffstat (limited to 'audacity/build')
-rwxr-xr-xaudacity/build/audacity.SlackBuild33
1 files changed, 23 insertions, 10 deletions
diff --git a/audacity/build/audacity.SlackBuild b/audacity/build/audacity.SlackBuild
index 5b141563..dd1e086d 100755
--- a/audacity/build/audacity.SlackBuild
+++ b/audacity/build/audacity.SlackBuild
@@ -54,13 +54,20 @@
PRGNAM=audacity
VERSION=${VERSION:-2.4.2}
-WX=${WX:-$(date +%Y%m%d)} # We clone git without history
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
DOCS="*.txt"
+# On 32bit we need to revert to an external soxr library for now, since
+# the included copy refuses to compile (check again with later releases):
+if pkg-config --exists soxr 2>/dev/null ; then
+ SOXR_TYPE="system"
+else
+ SOXR_TYPE="local"
+fi
+
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -72,7 +79,7 @@ OUTPUT=${OUTPUT:-/tmp}
SOURCE[0]="$SRCDIR/${PRGNAM^}-${VERSION}.tar.gz"
SRCURL[0]="https://github.com/${PRGNAM}/${PRGNAM}/archive/${PRGNAM^}-${VERSION}.tar.gz"
-SOURCE[1]="$SRCDIR/wxWidgets-${WX}git.tar.xz"
+SOURCE[1]="$SRCDIR/wxWidgets_${PRGNAM}-${VERSION}.tar.xz"
SRCURL[1]=""
# Use the src_checkout() function if no downloadable tarball exists.
@@ -102,8 +109,6 @@ src_checkout() {
&& cd $CODIR/${PRGNAM}_temp_checkout_$$
mkdir ${PBASE} \
&& cd ${PBASE} \
- # Checkout code from a certain branch and/or date; this will take a
- # long time because we have to clone the complete git-repository first:
echo "Checking out from '$GITURI':"
git clone --depth 1 --single-branch --recurse-submodules ${GITURI} . \
&& chown -R root:root . \
@@ -124,7 +129,7 @@ src_checkout() {
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i586 ;;
+ i?86) ARCH=i686 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -214,21 +219,27 @@ echo "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE[0]}
-cd ${PRGNAM^}*-${VERSION} || cd ${PRGNAM}*-${VERSION}
+cd ${PRGNAM}*-${VERSION} || cd ${PRGNAM^}*-${VERSION}
+# Patches and fixes:
+touch $OUTPUT/patch-${PRGNAM}.log
# Fix vamp plugin search path on x86_64 - thanks to B. Watson
sed -e "s,lib/vamp,lib${LIBDIRSUFFIX}/vamp,g" \
-i lib-src/libvamp/src/vamp-hostsdk/PluginHostAdapter.cpp
# Fix crash on resize (see https://bugs.archlinux.org/task/66771):
cat $SRCDIR/patches/audacity-2.4.1_resize_crash.patch | patch -Np1 --verbose \
- 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
# Fix detection of local wx libraries:
sed -i src/CMakeLists.txt \
-e 's#${WXWIN}/lib#$ENV{MYBUILD}/lib#' \
-e 's#-t ${_LIBDIR}#-t $ENV{MYBUILD}/bin/Release/${_LIBDIR}#'
+# Revert a Windows-specific patch which breaks 32bit build:
+cat $SRCDIR/patches/audacity-2.4.2_32bit_sse.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+
chown -R root:root .
chmod -R u+w,go+r-w,a+rX-st .
@@ -238,10 +249,9 @@ cd build
# Put our git snapshot for wxwidgets in place:
mkdir -p cmake-proxies/wxWidgets
tar -xvf ${SOURCE[1]} -C cmake-proxies/wxWidgets/
- mv cmake-proxies/wxWidgets/{wxWidgets-${WX}git,wxwidgets}
+ mv cmake-proxies/wxWidgets/{wxWidgets_${PRGNAM}-${VERSION},wxwidgets}
export MYBUILD="$(pwd)"
- #WX_CONFIG="/usr/bin/wx-config-gtk3" \
LDFLAGS="$SLKLDFLAGS -Wl,-rpath,/usr/lib${LIBDIRSUFFIX}/${PRGNAM}" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
@@ -271,7 +281,7 @@ cd build
-Daudacity_use_pa_jack=linked \
-Daudacity_use_portaudio=local \
-Daudacity_use_sndfile=system \
- -Daudacity_use_soxr=local \
+ -Daudacity_use_soxr=${SOXR_TYPE} \
-Daudacity_use_soundtouch=local \
-Daudacity_use_twolame=system \
-Daudacity_use_vamp=system \
@@ -336,6 +346,9 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
cat $SRCDIR/slack-required > $PKG/install/slack-required
+if [ "SOXR_TYPE" == "system" ]; then
+ echo "soxr" >> $PKG/install/slack-required
+fi
# Build the package:
cd $PKG