# Meson subprojects, pinned to the revisions in vstbridge/subprojects/*.wrap. # Copr builds have no network access, so they are shipped as extra sources. %global asio_commit 7609450f71434bdc9fbd9491a9505b423c2a8496 %global bitsery_commit d1a47e06e2104b195a19c73b61f1d5c1dceaa228 %global clap_commit 094bb76c85366a13cc6c49292226d8608d6ae50c %global function2_commit 9e303865d14f1204f09379e37bbeb30c4375139a %global ghc_filesystem_commit 8a2edd6d92ed820521d42c94d179462bf06b5ed3 %global tomlplusplus_commit 30172438cee64926dc41fdd9c11fb3ba5b2ba9de # Tag v3.7.7_build_19-patched of robbert-vdh/vst3sdk, and its three submodules %global vst3sdk_commit 3ff02a8fb91f8e14f61c4e26130841b51d601575 %global vst3_base_commit ea2bac9a109cce69ced21833fa6ff873dd6e368a %global vst3_pluginterfaces_commit bc5ff0f87aaa3cd28c114810f4f03c384421ad2c %global vst3_public_sdk_commit bbb0538535b171e805c8a8b612c2cd8a5f95738b # The 32-bit plugin host (a PE program plus its unixlibs), for 32-bit Windows # plugins. Build with `--without bitbridge` to leave it out. # # Upstream builds it with llvm-mingw (clang, libc++ and Win32 threads); it does # not build with Fedora's GCC-based mingw32 toolchain, and Fedora has no libc++ # for MinGW. So the build uses llvm-mingw's prebuilt toolchain, the version # upstream pins in aarch64/versions.sh. Nothing from it is installed, but its # libc++, libunwind and mingw-w64 runtime are linked into vstbridge-host-32.exe. %bcond bitbridge 1 %global llvm_mingw_version 20260922 %global llvm_mingw llvm-mingw-%{llvm_mingw_version}-ucrt-ubuntu-22.04-x86_64 # Upstream: LTO does not support Winelibs and breaks libvstbridge-vst2.so in # some hosts. The chainloaders enable it themselves through Meson. %global _lto_cflags %{nil} # The i386 unixlib is only loaded by a Wine with a 32-bit Unix side, which # brings the i386 libc, libstdc++ and libxcb with it. Don't make everyone # install those. %global __requires_exclude_from ^%{_libdir}/vstbridge-host-32-unixlib-i386\\.so$ Name: vstbridge Version: 0.0.5 Release: 1%{?dist} Summary: Use Windows VST2, VST3 and CLAP plugins in Linux DAWs through Wine # vstbridge itself is GPL-3.0-or-later. Bundled header-only libraries and SDKs: # asio, function2: BSL-1.0 # bitsery, clap, ghc_filesystem, toml++: MIT # VST3 SDK 3.7.7: GPL-3.0-only # Linked into the 32-bit host from llvm-mingw: # libc++, libunwind, compiler-rt: Apache-2.0 WITH LLVM-exception # mingw-w64 runtime: ZPL-2.1 License: GPL-3.0-or-later AND GPL-3.0-only AND BSL-1.0 AND MIT AND Apache-2.0 WITH LLVM-exception AND ZPL-2.1 URL: https://github.com/rations/vstbridge Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/chriskohlhoff/asio/archive/%{asio_commit}/asio-%{asio_commit}.tar.gz Source2: https://github.com/fraillt/bitsery/archive/%{bitsery_commit}/bitsery-%{bitsery_commit}.tar.gz Source3: https://github.com/free-audio/clap/archive/%{clap_commit}/clap-%{clap_commit}.tar.gz Source4: https://github.com/Naios/function2/archive/%{function2_commit}/function2-%{function2_commit}.tar.gz Source5: https://github.com/gulrak/filesystem/archive/%{ghc_filesystem_commit}/ghc_filesystem-%{ghc_filesystem_commit}.tar.gz Source6: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz Source7: https://github.com/robbert-vdh/vst3sdk/archive/%{vst3sdk_commit}/vst3sdk-%{vst3sdk_commit}.tar.gz Source8: https://github.com/steinbergmedia/vst3_base/archive/%{vst3_base_commit}/vst3_base-%{vst3_base_commit}.tar.gz Source9: https://github.com/steinbergmedia/vst3_pluginterfaces/archive/%{vst3_pluginterfaces_commit}/vst3_pluginterfaces-%{vst3_pluginterfaces_commit}.tar.gz Source10: https://github.com/steinbergmedia/vst3_public_sdk/archive/%{vst3_public_sdk_commit}/vst3_public_sdk-%{vst3_public_sdk_commit}.tar.gz Source11: https://github.com/mstorsjo/llvm-mingw/releases/download/%{llvm_mingw_version}/%{llvm_mingw}.tar.xz # The 64-bit plugin host is a Winelib program ExclusiveArch: x86_64 BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ # gcc's own dependencies on these carry no architecture, so in a clean # buildroot the i386 packages below would satisfy them and leave the x86_64 # compiler unable to link BuildRequires: glibc-devel%{?_isa} BuildRequires: libatomic%{?_isa} BuildRequires: libstdc++-devel%{?_isa} BuildRequires: make BuildRequires: meson BuildRequires: ninja-build BuildRequires: patch BuildRequires: pkgconf-pkg-config BuildRequires: wine-core BuildRequires: wine-devel BuildRequires: dbus-devel%{?_isa} # Not pkgconfig(xcb): the i386 libxcb-devel below would satisfy that too BuildRequires: libxcb-devel%{?_isa} # vstbridgectl BuildRequires: cli11-devel BuildRequires: json-devel BuildRequires: pkgconfig(gtk+-3.0) %if %{with bitbridge} # The 32-bit host's i386 unixlib BuildRequires: glibc-devel(x86-32) # GCC links libatomic as needed by default BuildRequires: libatomic(x86-32) BuildRequires: libstdc++-devel(x86-32) BuildRequires: libxcb-devel(x86-32) %endif # Any Wine works at runtime (Fedora's, WineHQ's wine-staging, ...), as long as # `wine` is on the PATH or WINELOADER points at it, so this is not a hard # dependency. Upstream tests with Wine Staging. Suggests: wine Provides: bundled(asio) = 1.28.2 Provides: bundled(bitsery) = 5.2.3 Provides: bundled(clap) = 1.1.9 Provides: bundled(function2) = 4.2.3 Provides: bundled(gulrak-filesystem) = 1.5.14 Provides: bundled(tomlplusplus) = 3.4.0 Provides: bundled(vst3sdk) = 3.7.7 %description vstbridge is a fork of yabridge, a Wine-based bridge that lets Linux DAWs load Windows VST2, VST3 and CLAP plugins as if they were native plugins. It adds a fix for non-interactive plugin GUIs with Wine 9.21 and later, per-plugin Wine environment variables, and vstbridgectl-gtk, a GTK 3 front end for managing plugin directories and syncing the bridge files. The plugin libraries and the Wine plugin hosts are installed system-wide in %{_libdir}, where vstbridgectl finds them without further configuration. %prep %autosetup -n %{name}-%{version} cd vstbridge # Unpack a GitHub archive into a directory of our choosing unpack() { mkdir -p "$2" tar -xf "$1" -C "$2" --strip-components=1 } unpack %{SOURCE1} subprojects/asio unpack %{SOURCE2} subprojects/bitsery unpack %{SOURCE3} subprojects/clap unpack %{SOURCE4} subprojects/function2 unpack %{SOURCE5} subprojects/ghc_filesystem unpack %{SOURCE6} subprojects/tomlplusplus unpack %{SOURCE7} subprojects/vst3 unpack %{SOURCE8} subprojects/vst3/base unpack %{SOURCE9} subprojects/vst3/pluginterfaces unpack %{SOURCE10} subprojects/vst3/public.sdk # What `patch_directory` in the wrap files would have done for sub in asio bitsery clap function2 ghc_filesystem; do cp -a subprojects/packagefiles/$sub/. subprojects/$sub/ done # Fedora's wine-devel has no -stable suffix on its compilers sed -i -e 's/winegcc-stable/winegcc/' -e 's/wineg++-stable/wineg++/' cross-wine.conf # There is no git checkout for `git describe`, and Meson would fall back to the # project version, which is still yabridge's sed -i 's/@VCS_VERSION@/v%{version}/' src/common/config/version.h.in # vstbridgectl clones its dependencies in `make deps`. Use the bundled toml++ # and the system's CLI11 and nlohmann-json instead. mkdir -p tools/vstbridgectl/deps/{cli11,nlohmann}/.git ln -s ../../../subprojects/tomlplusplus tools/vstbridgectl/deps/tomlplusplus mkdir -p subprojects/tomlplusplus/.git %if %{with bitbridge} unpack %{SOURCE11} llvm-mingw %endif %build cd vstbridge # The bridge is built the way upstream builds its releases: a plain Meson # release build, without the distribution's compiler flags. Those are meant # for the native compiler only (their -m64 would break the i386 unixlib, and # Meson hands them to winegcc too), and the hardening flags add checks to code # that runs in the DAW's realtime audio threads. rpm exports its flags to # every build scriptlet, where Meson would pick them up from the environment. unset CFLAGS CXXFLAGS FFLAGS FCFLAGS VALAFLAGS RUSTFLAGS LDFLAGS meson setup build \ --buildtype=release \ --wrap-mode=nodownload \ --cross-file=cross-wine.conf \ %{?with_bitbridge:-Dpe-bitbridge=true} %ninja_build -C build %if %{with bitbridge} ( # Only this build gets to see llvm-mingw export PATH="$PWD/llvm-mingw/bin:$PATH" meson setup build-32 \ --buildtype=release \ --wrap-mode=nodownload \ --cross-file=cross-mingw-i686.conf \ -Dwine-host=pe %ninja_build -C build-32 ) %endif # The Makefile appends the environment's flags to its own CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" \ %make_build -C tools/vstbridgectl %install cd vstbridge # Everything the plugins load goes in one directory: they look for the hosts # next to the plugin libraries, and vstbridgectl looks for both in the # library directory. install -d %{buildroot}%{_libdir} %{buildroot}%{_bindir} install -pm 0755 -t %{buildroot}%{_libdir} \ build/libvstbridge-vst2.so \ build/libvstbridge-vst3.so \ build/libvstbridge-clap.so \ build/libvstbridge-chainloader-vst2.so \ build/libvstbridge-chainloader-vst3.so \ build/libvstbridge-chainloader-clap.so \ build/vstbridge-host.exe \ build/vstbridge-host.exe.so %if %{with bitbridge} install -pm 0755 -t %{buildroot}%{_libdir} \ build-32/vstbridge-host-32.exe \ build-32/vstbridge-host-32-unixlib.so \ build-32/vstbridge-host-32-unixlib-i386.so %endif install -pm 0755 -t %{buildroot}%{_bindir} \ tools/vstbridgectl/build/vstbridgectl \ tools/vstbridgectl/build/vstbridgectl-gtk # "Multimedia" is not a registered category desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ --remove-category=Multimedia \ tools/vstbridgectl/vstbridgectl-gtk.desktop %check cd vstbridge desktop-file-validate %{buildroot}%{_datadir}/applications/vstbridgectl-gtk.desktop %{buildroot}%{_bindir}/vstbridgectl --help > /dev/null %files %license LICENSE %doc README.md readme-fixes.md vstbridge/CHANGELOG.md %{_bindir}/vstbridgectl %{_bindir}/vstbridgectl-gtk %{_datadir}/applications/vstbridgectl-gtk.desktop %{_libdir}/libvstbridge-vst2.so %{_libdir}/libvstbridge-vst3.so %{_libdir}/libvstbridge-clap.so %{_libdir}/libvstbridge-chainloader-vst2.so %{_libdir}/libvstbridge-chainloader-vst3.so %{_libdir}/libvstbridge-chainloader-clap.so %{_libdir}/vstbridge-host.exe %{_libdir}/vstbridge-host.exe.so %if %{with bitbridge} %{_libdir}/vstbridge-host-32.exe %{_libdir}/vstbridge-host-32-unixlib.so %{_libdir}/vstbridge-host-32-unixlib-i386.so %endif %changelog * Wed Nov 11 2026 vstbridge Copr packager - 0.0.5-1 - Initial package