From patchwork Tue Apr 25 09:30:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosha X-Patchwork-Id: 49490 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3CB9D27BBEA; Tue, 25 Apr 2023 10:32:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6118727BBE9 for ; Tue, 25 Apr 2023 10:32:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prF1q-0002g0-M0; Tue, 25 Apr 2023 05:32:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prF1m-0002fL-QO for guix-patches@gnu.org; Tue, 25 Apr 2023 05:32:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prF1l-0007Hy-QE for guix-patches@gnu.org; Tue, 25 Apr 2023 05:32:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prF1l-00060V-Ky for guix-patches@gnu.org; Tue, 25 Apr 2023 05:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63065] [PATCH 07/18] gnu: Add yabridge. References: In-Reply-To: Resent-From: Sughosha Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Apr 2023 09:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63065 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "63065@debbugs.gnu.org" <63065@debbugs.gnu.org> Received: via spool by 63065-submit@debbugs.gnu.org id=B63065.168241508023016 (code B ref 63065); Tue, 25 Apr 2023 09:32:01 +0000 Received: (at 63065) by debbugs.gnu.org; 25 Apr 2023 09:31:20 +0000 Received: from localhost ([127.0.0.1]:51338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prF11-0005z5-Qk for submit@debbugs.gnu.org; Tue, 25 Apr 2023 05:31:19 -0400 Received: from mail-4318.protonmail.ch ([185.70.43.18]:42923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prF0w-0005yk-H9 for 63065@debbugs.gnu.org; Tue, 25 Apr 2023 05:31:14 -0400 Date: Tue, 25 Apr 2023 09:30:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1682415064; x=1682674264; bh=ixetdyn2ioly3PI/jP7VXtvtF+qy4a6cpvFOmVeljZk=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=KlLIetXV4rPTy+9x08GE5pTMiL0dijiEDKWNQD3HWieWHoVHjargaTuwRIWwtYqTy yuT7tdZEac3mFzAGPeMjgnDvPUYrXsynIXdtZDGK66+U6ZmRQPeMlsdUZdUbfYrAKW nhSAWT+y3yLMne4yD4vtshiwSLYqcDI3aSJFsRF6/IluqgkVKQ794bKr7eWC2Yiba7 8K0zKOAQDW/t7nqnjYKp/3Aj5JvYBoNfcBUPCKprnnlFogZ/FdZ3r/fxpiSCXXYdhO cQh8dxXG6ODDu9OGBFIXzGpwjZuHsIStyj7b3y0MNgEYL9yoYWLm18xOTCpmooJISo HSa5zwvsBeo1Q== Message-ID: Feedback-ID: 45211691:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sughosha X-ACL-Warn: , Sughosha via Guix-patches X-Patchwork-Original-From: Sughosha via Guix-patches via From: Sughosha Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/audio.scm (yabridge): New variable. * gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch: New file. * gnu/local.mk: Register the patch file. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 114 ++++++++++++++++++ ...yabridge-5.0.4-fix-dependency-search.patch | 45 +++++++ 3 files changed, 160 insertions(+) create mode 100644 gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch diff --git a/gnu/local.mk b/gnu/local.mk index b53a04a0cd..2bafdc7f02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2038,6 +2038,7 @@ dist_patch_DATA = \ %D%/packages/patches/xsane-tighten-default-umask.patch \ %D%/packages/patches/xterm-370-explicit-xcursor.patch \ %D%/packages/patches/xygrib-fix-finding-data.patch \ + %D%/packages/patches/yabridge-5.0.4-fix-dependency-search.patch \ %D%/packages/patches/yggdrasil-extra-config.patch \ %D%/packages/patches/zig-use-system-paths.patch diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 9e111a3b9e..551c9193c6 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -70,7 +70,9 @@ (define-module (gnu packages audio) #:use-module (gnu packages boost) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages curl) #:use-module (gnu packages dbm) #:use-module (gnu packages documentation) @@ -129,6 +131,7 @@ (define-module (gnu packages audio) #:use-module (gnu packages vim) ;xxd #:use-module (gnu packages web) #:use-module (gnu packages webkit) + #:use-module (gnu packages wine) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) @@ -3449,6 +3452,117 @@ (define-public vst3sdk ;; and vstgui license:bsd-3)))) +(define-public yabridge + (package + (name "yabridge") + (version "5.0.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/robbert-vdh/yabridge") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08p92a2qx5k2531wr38mrksn7g16j0mz611rwla1m0igfc4r75fp")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "subprojects")) + (patches + (search-patches + "yabridge-5.0.4-fix-dependency-search.patch")))) + (build-system meson-build-system) + (arguments + (list #:configure-flags #~(list "-Dbitbridge=false" ;TODO: enable it + (string-append "--cross-file=" + #$source + "/cross-wine.conf")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'link-vst3sdk + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "subprojects") + (symlink (assoc-ref inputs "vst3sdk") + "subprojects/vst3"))) + (replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin")) + (lib (string-append #$output "/lib"))) + (for-each + (lambda (file) + (install-file file bin)) + (find-files "." "-host(|-32)\\.exe(|\\.so)$")) + (for-each + (lambda (file) + (install-file file lib)) + (find-files "." "libyabridge"))))) + (add-after 'unpack 'fix-loading-wine-libs + (lambda* (#:key inputs #:allow-other-keys) + (let ((wine #$(match (%current-system) + ((or "x86_64-linux" "aarch64-linux") + "wine64") + (_ "wine32"))) + (arch #$(match (%current-system) + ((or "x86_64-linux" "aarch64-linux") + "x86_64-unix") + (_ "i386-unix")))) + (substitute* "meson.build" + (("-lole32") + (search-input-file inputs + (string-append "/lib/" + wine "/wine/" arch + "/libole32.a"))) + (("-lshell32") + (search-input-file inputs + (string-append "/lib/" + wine "/wine/" arch + "/libshell32.a"))) + (("-luuid") + (search-input-file inputs + (string-append "/lib/" + wine "/wine/" arch + "/libuuid.a")))))))))) + (native-inputs + `(("clap" ,clap) + ("cmake-minimal" ,cmake-minimal) + ("function2" ,function2) + ("gulrak-filesystem" ,gulrak-filesystem) + ("pkg-config" ,pkg-config) + ("tomlplusplus" ,tomlplusplus) + ;; This is VST3 SDK v3.7.7_build_19 with the documentation and VSTGUI + ;; submodules removed and a dummy `meson.build` file that just lists all + ;; source files. + ("vst3sdk" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/robbert-vdh/vst3sdk") + (commit (string-append "v3.7.7_build_19-patched")) + ;; Required for vst3_base, vst3_pluginterfaces, + ;; and vst3_public_sdk. + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "09axvpshwbf5061kcbl26v74dcmwxmgmlxb15b75bnqbh0zcghrf")) + (patches + (search-patches + "vst3sdk-3.7.7-allow-winelib-compilation.patch")))))) + (inputs (list asio bitsery dbus libxcb + (match (%current-system) + ((or "x86_64-linux" "aarch64") wine64) + (_ wine)))) + ;; Platforms supported by wine and wine64 should support. + (supported-systems + (list "i686-linux" "x86_64-linux" "armhf-linux" "aarch64-linux")) + (home-page "https://github.com/robbert-vdh/yabridge") + (synopsis "Implementation of Windows VST2, VST3 and CLAP plugin APIs") + (description + "@code{yabridge} is Yet Another way to use Windows audio plugins. It +supports using both 32-bit and 64-bit Windows VST2, VST3, and CLAP plugins in +64-bit Linux plugin hosts as if they were native plugins, with optional support +for plugin groups to enable inter-plugin communication for VST2 plugins and +quick startup times.") + (license license:gpl3+))) + (define-public patchage (package (name "patchage") diff --git a/gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch b/gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch new file mode 100644 index 0000000000..a9e1ed1c62 --- /dev/null +++ b/gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch @@ -0,0 +1,45 @@ +Meson fails to detect bitsery, function2 and gulrak-filesystem. +https://github.com/robbert-vdh/yabridge/issues/18 + +From c3cb50cff354c585afc3c94e676ac50a420e871b Mon Sep 17 00:00:00 2001 +From: Sughosha +Date: Sun, 23 Apr 2023 08:44:50 +0200 +Subject: [PATCH] Fix dependency search + +--- + meson.build | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/meson.build b/meson.build +index f76f5acf..ca85af68 100644 +--- a/meson.build ++++ b/meson.build +@@ -248,22 +248,13 @@ else + asio_dep = dependency('asio', version : '>=1.22.0') + endif + +-if meson.version().version_compare('>=0.60') +- # Bitsery's CMake build definition is capitalized for some reason +- bitsery_dep = dependency('bitsery', 'Bitsery', version : '>=5.2.0') +-else +- # Mmeson <=0.6.0 didn't support multiple names for a dependency, and since at +- # the moment this is only relevant for packing on Arch btw, it's probably +- # better to remove this conditional later than it is to bump the minimum Meson +- # version now. +- bitsery_dep = dependency('bitsery', version : '>=5.2.0') +-endif ++bitsery_dep = declare_dependency() + + # The D-Bus headers are also only accessed through the include path. We don't + # link to libdbus-1 to make soname changes don't completely break yabridge. + dbus_dep = dependency('dbus-1').partial_dependency(compile_args : true, includes : true) +-function2_dep = dependency('function2', version : '>=4.0.0') +-ghc_filesystem_dep = dependency('ghc_filesystem', modules : 'ghcFilesystem::ghc_filesystem', version : '>=1.5.0') ++function2_dep = declare_dependency() ++ghc_filesystem_dep = declare_dependency() + threads_dep = dependency('threads') + # Tomlplusplus recently added a shraed library version. We don't want to link to that. + tomlplusplus_dep = dependency('tomlplusplus', version : '>=3.3.0', default_options : ['compile_library=false']).partial_dependency(compile_args : true, includes : true) +-- +2.39.2 +