Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: David Runge <[email protected]>
- pkgbase=yabridge
- pkgname=(
- yabridge
- yabridgectl
- )
- # NOTE: currently only compatible with vst3sdk 3.7.7: https://github.com/robbert-vdh/yabridge/issues/312
- _vst3sdk_commit=3ff02a8fb91f8e14f61c4e26130841b51d601575 # refs/tags/v3.7.7_build_19-patched
- _bundled_vst3sdk=1 # whether to use bundled vst3sdk (1) or not (0)
- pkgver=5.1.1.r7.gca534308
- pkgrel=1
- pkgdesc="A modern and transparent way to use Windows VST2 and VST3 plugins on Linux"
- arch=(x86_64)
- url="https://github.com/robbert-vdh/yabridge"
- license=(GPL-3.0-or-later)
- makedepends=(
- asio
- bitsery
- clap
- cmake
- function2
- ghc-filesystem
- git
- lib32-libxcb
- libxcb
- meson
- rust
- tomlplusplus
- vst3sdk
- wine
- )
- # if LTO is enabled the cmake detection will explode because of wine
- options=(!lto)
- source=(
- git+$url
- $pkgbase-vst3sdk::git+https://github.com/robbert-vdh/vst3sdk.git#commit=$_vst3sdk_commit
- $pkgbase-vst3_base::git+https://github.com/steinbergmedia/vst3_base.git
- $pkgbase-vst3_pluginterfaces::git+https://github.com/steinbergmedia/vst3_pluginterfaces.git
- $pkgbase-vst3_public_sdk::git+https://github.com/steinbergmedia/vst3_public_sdk.git
- "405.patch"
- )
- sha512sums=('SKIP'
- '39d8b7188aa5b07442e9bf998644bce5d54e3c30000dbf3922cee76c4864e859ff850abe6699d178399948d3d73f3b4a639738429320aa2ebc4b1e0c85d63792'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP')
- b2sums=('SKIP'
- '3f09ff6929db53a5387661be68a363726edbd966346605444191e791565cf596503e9f88138b7921d15366d1aa1688a41730e3d4163bdc694448269855d982a9'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP')
- pkgver() {
- cd "$pkgbase"
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
- }
- prepare() {
- echo "Patching with pull 405"
- patch -d $pkgbase -Np1 -i ../405.patch
- echo "Done patching pull 405"
- # remove version pinning
- sed -e "s/'==/'>=/" -i $pkgbase/meson.build
- # remove version pinning for clap
- sed -e "s/, '<1.2'//" -i $pkgbase/meson.build
- # remove all wraps as they are ignored anyways
- rm -rv $pkgbase/subprojects/*
- # add a subproject dir for vst3sdk
- mkdir -vp $pkgbase/subprojects/vst3
- if (( _bundled_vst3sdk > 0 )); then
- # use upstream's specific version of vst3sdk to get around compilation errors
- (
- cd $pkgbase-vst3sdk
- git submodule init
- git config submodule.base.url "$srcdir/$pkgbase-vst3_base"
- git config submodule.pluginterfaces.url "$srcdir/$pkgbase-vst3_pluginterfaces"
- git config submodule.publik.sdk.url "$srcdir/$pkgbase-vst3_public_sdk"
- git -c protocol.file.allow=always submodule update
- )
- # build using bundled vst3sdk
- cp -av $pkgbase-vst3sdk/* $pkgbase/subprojects/vst3/
- else
- # put system-installed vst3sdk in place and add upstream meson.build file
- cp -av /usr/src/vst3sdk/* $pkgbase/subprojects/vst3/
- cp -v $pkgbase-vst3sdk/meson.build $pkgbase/subprojects/vst3/meson.build
- fi
- cd $pkgbase/tools/yabridgectl
- cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
- }
- build() {
- # NOTE: we need to add -mwindows to cpp_link_args as we are otherwise overriding it
- local meson_options=(
- --cross-file=$pkgname/cross-wine.conf
- -D bitbridge=true
- -D system-asio=true
- -D b_lto=false
- -D b_pie=false
- -D build.cpp_link_args="$LDFLAGS"
- -D cpp_link_args="$LDFLAGS -mwindows"
- )
- arch-meson $pkgbase build "${meson_options[@]}"
- ninja -C build
- cd $pkgname/tools/yabridgectl
- cargo build --frozen --release --all-features
- }
- package_yabridge() {
- groups=(pro-audio)
- depends=(
- gcc-libs
- glibc
- lib32-gcc-libs
- lib32-glibc
- lib32-libxcb
- libxcb
- sh
- wine
- )
- optdepends=(
- 'libnotify: for notification integration'
- 'yabridgectl: for optional setup and management utility'
- )
- # project has no install target
- install -vDm 755 build/$pkgname-host{,-32}.exe{,.so} -t "$pkgdir/usr/bin"
- install -vDm 755 build/lib$pkgname-{,chainloader-}{clap,vst2,vst3}.so -t "$pkgdir/usr/lib/"
- }
- package_yabridgectl() {
- depends=(
- gcc-libs
- glibc
- )
- pkgdesc="Optional utility to help set up and manage yabridge"
- install -vDm 755 $pkgbase/tools/$pkgname/target/release/$pkgname -t "$pkgdir/usr/bin"
- }
Advertisement
Add Comment
Please, Sign In to add comment