summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Martin Bångens2022-07-20 04:29:08 +0200
committer Willy Sudiarto Raharjo2022-07-23 06:13:11 +0200
commit0831a35a34b50afcc5bf353dff125a7029363c82 (patch)
tree3ed62f62d8fbdc9913a02069bfbe729729e74992
parent0a124b43c3d3a3d6b48fb6040e757377db5e3323 (diff)
downloadslackbuilds-0831a35a34b50afcc5bf353dff125a7029363c82.tar.gz
audio/yabridge: Added (Yet Another way to use Windows VST plugins)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--audio/yabridge/README28
-rw-r--r--audio/yabridge/slack-desc19
-rw-r--r--audio/yabridge/yabridge.SlackBuild183
-rw-r--r--audio/yabridge/yabridge.info10
4 files changed, 240 insertions, 0 deletions
diff --git a/audio/yabridge/README b/audio/yabridge/README
new file mode 100644
index 0000000000..55537fdb9e
--- /dev/null
+++ b/audio/yabridge/README
@@ -0,0 +1,28 @@
+Yet Another way to use Windows VST plugins on Linux. Yabridge seamlessly
+supports using both 32-bit and 64-bit Windows VST2 and VST3 plugins in a
+64-bit Linux VST host as if they were native VST2 and VST3 plugins, with
+optional support for plugin groups to enable inter-plugin communication
+for VST2 plugins and quick startup times. Its modern concurrent
+architecture and focus on transparency allows yabridge to be both fast
+and highly compatible, while also staying easy to debug and maintain.
+
+This script will build yabridge bitbridge both 64bit and 32bit
+on Slackware64 and only 32bit plugin host on Slackware32 with
+yabridgectl helper tool for all versions of Slackware.
+This program depends on any 64+32 (Slackware64) or 32 (Slackware32)
+version of wine with esync and/or fsync. No ARM support yet.
+
+Make sure you have configured you're system with real-time priority.
+visit https://docs.slackware.com and search: minimizing_latency
+Don't forget WINEESYNC=1 or WINEFSYNC=1 environment variables or
+you will have problems with performance and xruns.
+You can set them in /etc/profile like this:
+export WINEFSYNC=1
+export WINEESYNC=1
+
+Read the documentation in /usr/doc/yabridge-*
+
+OPTIONAL DEPENDENCIES NOT NEEDED FOR COMPILING
+
+winetricks: For correct fonts displayed by plugins
+rtirq: For better latency of audio peripherals
diff --git a/audio/yabridge/slack-desc b/audio/yabridge/slack-desc
new file mode 100644
index 0000000000..4d6fe7fbd3
--- /dev/null
+++ b/audio/yabridge/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+yabridge: yabridge (Yet Another way to use Windows VST plugins on Linux)
+yabridge:
+yabridge: Yabridge seamlessly supports using both 32-bit and 64-bit Windows VST2
+yabridge: and VST3 plugins in a 64-bit Linux VST host as if they were
+yabridge: native VST2 and VST3 plugins, with optional support for plugin groups
+yabridge: to enable inter-plugin communication for VST2 plugins and quick
+yabridge: startup times. Its modern concurrent architecture and focus on
+yabridge: transparency allows yabridge to be both fast and highly compatible,
+yabridge: while also staying easy to debug and maintain.
+yabridge:
+yabridge:
diff --git a/audio/yabridge/yabridge.SlackBuild b/audio/yabridge/yabridge.SlackBuild
new file mode 100644
index 0000000000..0bac943b96
--- /dev/null
+++ b/audio/yabridge/yabridge.SlackBuild
@@ -0,0 +1,183 @@
+#!/bin/bash
+
+# Slackware build script for yabridge
+
+# Copyright 2022 Martin Bångens Sweden
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=yabridge
+VERSION=${VERSION:-4.0.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ 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
+fi
+
+if [ $ARCH = "arm" ]; then
+ echo "This script only supports x86 for now but Slackware ARM and ARM64 is happening FIXME"
+ exit 1
+fi
+
+which wine &>/dev/null
+WINE_IN_PATH=$?
+which wine64 &>/dev/null
+WINE64_IN_PATH=$?
+
+if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
+ if (($WINE_IN_PATH)); then
+ echo "This script look for wine in PATH and needs it for compiling and using yabridge on i586"
+ exit 1
+ fi
+elif [ $ARCH = "x86_64" ]; then
+ if (($WINE_IN_PATH)) || (($WINE64_IN_PATH)); then
+ echo "This script look for wine and wine64 in PATH and needs them both for compiling and using yabridge on x86_64"
+ exit 1
+ fi
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+echo -e "\Unpacking documentation, cargo dependencies and vstsdk meson.build"
+tar xvf $CWD/yabridge-html-docs-plus-build-files-$VERSION.tar.gz
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+#Build only capitalized
+sed -i "s|bitsery_dep = dependency('bitsery', version : '>=5.2.0')|bitsery_dep = dependency('Bitsery', version : '>=5.2.0')|g" meson.build
+sed -i "s|bitsery_dep = dependency('bitsery', 'Bitsery', version : '>=5.2.0')|bitsery_dep = dependency('Bitsery', version : '>=5.2.0')|g" meson.build
+
+mkdir subprojects/vst3
+cp -a /usr/include/vst3sdk/* subprojects/vst3/
+cp yabridge-html-docs-plus-build-files-$VERSION/meson.build subprojects/vst3
+
+if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
+ meson setup \
+ build \
+ --cross-file=cross-wine.conf \
+ --buildtype=release \
+ --unity=on \
+ --unity-size=1000 \
+ --wrap-mode=nodownload \
+ -Dbitbridge=true \
+ -Dsystem-asio=true \
+ -Dbuild.cpp_args='-m32' \
+ -Dbuild.cpp_link_args='-m32'
+elif [ "$ARCH" = "x86_64" ]; then
+ meson setup \
+ build \
+ --cross-file=cross-wine.conf \
+ --buildtype=release \
+ --unity=on \
+ --unity-size=1000 \
+ --wrap-mode=nodownload \
+ -Dbitbridge=true \
+ -Dsystem-asio=true
+else
+ echo "Unsupported architecture"
+fi
+
+# Build yabridge
+# The unity build takes can take up to 2 GB of RAM per target, so if the
+# system does not have enough RAM to build everything at once we'll limit the
+# number of concurrent jobs
+# NOTE: The `LANG=C` is needed because apparently the `pt_BR.UTF-8` locale
+# changes `Mem:` to `Mem.:`, so who knows what other locales might do
+total_memory=$(env LANG=C free --gibi --si | awk '/^Mem:/ { print $2 }')
+num_jobs=$((total_memory / 4))
+echo -e "\n$total_memory gigabytes of RAM detected, limiting the number of build jobs to $num_jobs\n"
+ninja -C build -j"$num_jobs"
+
+cd ./tools/yabridgectl
+
+# Offline build
+# This makes cargo target the locale identical copy of reflink in vendor source directory
+sed -i 's|{ git = "https://github.com/nicokoch/reflink", rev = "e8d93b465f5d9ad340cd052b64bbc77b8ee107e2" }|"0.1.3"|g' Cargo.toml
+sed -i 's|git+https://github.com/nicokoch/reflink?rev=e8d93b465f5d9ad340cd052b64bbc77b8ee107e2#e8d93b465f5d9ad340cd052b64bbc77b8ee107e2|registry+https://github.com/rust-lang/crates.io-index|g' Cargo.lock
+CARGO_HOME=../../yabridge-html-docs-plus-build-files-$VERSION/cargo/CARGO_HOME cargo build --release --locked --all-features --offline --target-dir=target
+
+cd ../../build
+
+install -dm755 "$PKG/usr/bin"
+if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
+ install yabridge-host-32.exe{,.so} "$PKG/usr/bin"
+ install -dm755 "$PKG/usr/lib"
+ install libyabridge-{vst2,vst3}.so "$PKG/usr/lib"
+ install libyabridge-chainloader-{vst2,vst3}.so "$PKG/usr/lib"
+elif [ "$ARCH" = "x86_64" ]; then
+ install yabridge-host.exe{,.so} "$PKG/usr/bin"
+ install yabridge-host-32.exe{,.so} "$PKG/usr/bin"
+ install -dm755 "$PKG/usr/lib64"
+ install libyabridge-{vst2,vst3}.so "$PKG/usr/lib64"
+ install libyabridge-chainloader-{vst2,vst3}.so "$PKG/usr/lib64"
+fi
+
+install ../tools/yabridgectl/target/release/yabridgectl "$PKG/usr/bin"
+
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+ cp -a \
+ README.md \
+ docs/architecture.md \
+ COPYING \
+ CHANGELOG.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp tools/yabridgectl/README.md $PKG/usr/doc/$PRGNAM-$VERSION/README-yabridgectl.md
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a yabridge-html-docs-plus-build-files-$VERSION/html/* $PKG/usr/doc/$PRGNAM-$VERSION
+
+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
diff --git a/audio/yabridge/yabridge.info b/audio/yabridge/yabridge.info
new file mode 100644
index 0000000000..406d0fdad6
--- /dev/null
+++ b/audio/yabridge/yabridge.info
@@ -0,0 +1,10 @@
+PRGNAM="yabridge"
+VERSION="4.0.2"
+HOMEPAGE="https://github.com/robbert-vdh/yabridge"
+DOWNLOAD="https://github.com/robbert-vdh/yabridge/archive/4.0.2/yabridge-4.0.2.tar.gz https://github.com/noisecode3/yabridge-html-docs-plus-build-files/archive/v4.0.2/yabridge-html-docs-plus-build-files-4.0.2.tar.gz"
+MD5SUM="c451b04aaf7b477587cb01ace84473a5 67996abb539d6c2b9da329de44f4bf7f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="%README% asio bitsery function2 ghc_filesystem tomlplusplus vst3sdk wine-staging"
+MAINTAINER="Martin Bångens"
+EMAIL="marbangens@gmail.com"