* [bug#66870] [PATCH 0/6] gnu: Add yabridge.
@ 2023-11-01 9:07 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (9 more replies)
0 siblings, 10 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:07 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
This series of patches adds yabridge.
Sughosha (6):
gnu: asio: Update to 1.28.0.
gnu: Add bitsery.
gnu: Add function2.
gnu: Add tomlplusplus.
gnu: Add clap.
gnu: Add yabridge.
gnu/local.mk | 2 +
gnu/packages/audio.scm | 151 ++++++++++++++
gnu/packages/cpp.scm | 79 ++++++++
gnu/packages/networking.scm | 6 +-
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
6 files changed, 462 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
base-commit: c0895371c5759c7d9edb330774e90f192cc4cf2c
--
2.41.0
^ permalink raw reply [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 2/6] gnu: Add bitsery Sughosha via Guix-patches via
` (8 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@proton.me>
* gnu/packages/networking.scm (asio): Update to 1.28.0.
---
gnu/packages/networking.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 86309e4ab3..1d50025d83 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -3412,14 +3412,14 @@ (define-public can-utils
(define-public asio
(package
(name "asio")
- (version "1.22.2")
+ (version "1.28.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/asio/asio/"
- version " (Stable)/asio-" version ".tar.bz2"))
+ version " (Stable)/asio-" version ".tar.gz"))
(sha256
- (base32 "0v5w9j4a02j2rkc7mrdj3ms0kfpqbgq2ipkixlz2l0p8xs0vfsvp"))))
+ (base32 "15yavn07m6fasf0lrxljx3p79zi23mzn0g0fhggrnngyqqyaam78"))))
(build-system gnu-build-system)
(inputs
(list boost openssl))
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 2/6] gnu: Add bitsery.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 3/6] gnu: Add function2 Sughosha via Guix-patches via
` (7 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (bitsery): New variable.
---
gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 0ce60c49de..7d91c72489 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2278,6 +2278,30 @@ (define-public gulrak-filesystem
(home-page "https://github.com/gulrak/filesystem")
(license license:expat)))
+(define-public bitsery
+ (package
+ (name "bitsery")
+ (version "5.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fraillt/bitsery")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hv2fya7w53bfhlk79b1qnjg1qy076s8kvg22sfdq05bh0hxqrxf"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DBITSERY_BUILD_TESTS=ON")))
+ (native-inputs (list googletest))
+ (synopsis "Header only C++ binary serialization library")
+ (description "This package provides header only C++ binary serialization
+library. It is designed around the networking requirements for real-time data
+delivery, especially for games.")
+ (home-page "https://github.com/fraillt/bitsery")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 3/6] gnu: Add function2.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 2/6] gnu: Add bitsery Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 4/6] gnu: Add tomlplusplus Sughosha via Guix-patches via
` (6 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (function2): New variable.
Change-Id: I29eb928aa943fa6b796d699271ca523075d44d38
---
gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7d91c72489..6c99f39639 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2302,6 +2302,39 @@ (define-public bitsery
(home-page "https://github.com/fraillt/bitsery")
(license license:expat)))
+(define-public function2
+ (package
+ (name "function2")
+ (version "4.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Naios/function2")
+ (commit version)
+ ;; Tests require to compile googletest with custom
+ ;; features.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zdi6jk3srjkx82kbmd9rfmj9c1rr2xlsz2hbdcjvcjp63vzzxd1"))))
+ (build-system cmake-build-system)
+ ;; The test size_match_layout fails on i586/i686. For more info:
+ ;; https://github.com/Naios/function2/issues/57
+ (arguments
+ (list #:tests? #f))
+ (synopsis "Improved implementations of std::function")
+ (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+ (home-page "https://naios.github.io/function2/")
+ (license license:boost1.0)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 4/6] gnu: Add tomlplusplus.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (2 preceding siblings ...)
2023-11-01 9:09 ` [bug#66870] [PATCH 3/6] gnu: Add function2 Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 5/6] gnu: Add clap Sughosha via Guix-patches via
` (5 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
* gnu/packages/cpp.scm (tomlplusplus): New variable.
Change-Id: I7c12b76fe135cd22b54a56560aac699e452009bb
---
gnu/packages/cpp.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 6c99f39639..450c4b3dc1 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages cpp)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages c)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
@@ -2335,6 +2336,27 @@ (define-public function2
(home-page "https://naios.github.io/function2/")
(license license:boost1.0)))
+(define-public tomlplusplus
+ (package
+ (name "tomlplusplus")
+ (version "3.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marzer/tomlplusplus")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
+ (build-system meson-build-system)
+ (native-inputs (list cmake-minimal))
+ (synopsis "Header-only TOML config file parser and serializer for C++17")
+ (description "This package provides Header-only TOML config file parser and
+serializer for C++17.")
+ (home-page "https://marzer.github.io/tomlplusplus/")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 5/6] gnu: Add clap.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (3 preceding siblings ...)
2023-11-01 9:09 ` [bug#66870] [PATCH 4/6] gnu: Add tomlplusplus Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 6/6] gnu: Add yabridge Sughosha via Guix-patches via
` (4 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (clap): New variable.
Change-Id: I595adff236eacaf2934f4649e2f27a367f33d0ae
---
gnu/packages/audio.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7c49ba1841..3a99131d1b 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2715,6 +2715,28 @@ (define-public jalv
plugin function as a JACK application.")
(license license:isc)))
+(define-public clap
+ (package
+ (name "clap")
+ (version "1.1.9")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0z1van2wj68qv5rcvf19rc4xg57ywycdzmc0wrzss334cd9z8qyg"))))
+ (build-system cmake-build-system)
+ (synopsis "Audio Plugin API")
+ (description
+ "CLAP stands for CLever Audio Plugin. It is an audio plugin ABI which
+defines a standard for Digital Audio Workstations and audio plugins to work
+together.")
+ (home-page "https://cleveraudio.org/")
+ (license license:expat)))
+
(define-public ladspa
(package
(name "ladspa")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH 6/6] gnu: Add yabridge.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (4 preceding siblings ...)
2023-11-01 9:09 ` [bug#66870] [PATCH 5/6] gnu: Add clap Sughosha via Guix-patches via
@ 2023-11-01 9:09 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
` (3 subsequent siblings)
9 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-01 9:09 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (yabridge): New variable.
* gnu/packages/patches/yabridge-5.0.4-fix-dependency-search.patch:
New file.
* gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch:
New file.
* gnu/local.mk: Register the patch files.
Change-Id: I10331fbc9827bf1665a03afafe44a6c45c2c4c76
---
gnu/local.mk | 2 +
gnu/packages/audio.scm | 129 ++++++++++++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
4 files changed, 358 insertions(+)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 27e57302ae..d0867724e1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2114,6 +2114,7 @@ dist_patch_DATA = \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \
+ %D%/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
@@ -2165,6 +2166,7 @@ dist_patch_DATA = \
%D%/packages/patches/xterm-370-explicit-xcursor.patch \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
+ %D%/packages/patches/yabridge-5.0.4-fix-dependency-search.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 3a99131d1b..aae97d4169 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -73,7 +73,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)
@@ -136,6 +138,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)
@@ -5927,6 +5930,132 @@ (define-public mbelib
(license (list license:bsd-3 ; test/ framework
license:isc))))) ; the rest
+(define-public yabridge
+ (package
+ (name "yabridge")
+ (version "5.0.5")
+ (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
+ "0ayl706nv67jkixbrh9z7225gdwg2s4rzndx77761x33mk6by7a8"))
+ (patches
+ (search-patches
+ "yabridge-5.0.4-dependencies.patch"))
+ (modules '((guix build utils)))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "--cross-file=" #$source "/cross-wine.conf"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-vst3-subproject
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (assoc-ref inputs "vst3sdk") "subprojects/vst3")))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/chainloader/utils.cpp"
+ (("\"/usr/local/lib64\",")
+ (string-append "\"/usr/local/lib64\",\n\""
+ #$output "/lib\",")))
+ (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")))))))
+ (replace 'install
+ (lambda _
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/bin")))
+ (find-files "." "-host\\.exe(|\\.so)$"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/lib")))
+ (find-files "." "libyabridge")))))))
+ (native-inputs
+ ;; NOTE: Use the default clap version with the next update of yabrigde.
+ ;; https://github.com/robbert-vdh/yabridge/commit/f67a170a882266d30e76977653272471498eab68
+ `(("clap"
+ ,(let ((version "1.1.7"))
+ (package/inherit clap
+ (version version)
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name "clap" version))
+ (sha256
+ (base32
+ "1afjvllmzf2xmrpy8mcxk7zhii93b447ciaqw9lkj2wh9z217hsr")))))))
+ ("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))))
+ ;; Support the platforms that are supported by wine and wine64.
+ (supported-systems
+ (package-supported-systems wine64))
+ (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 ableton-link
(package
(name "ableton-link")
diff --git a/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
new file mode 100644
index 0000000000..43639f978f
--- /dev/null
+++ b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
@@ -0,0 +1,191 @@
+This patch is taken from yabridge project:
+https://github.com/robbert-vdh/yabridge.
+
+Submodule base contains modified content
+diff --git a/base/source/fdebug.cpp b/base/source/fdebug.cpp
+index b1d1dcc..9093022 100644
+--- a/base/source/fdebug.cpp
++++ b/base/source/fdebug.cpp
+@@ -117,8 +117,6 @@ bool AmIBeingDebugged ()
+ #if _MSC_VER
+ #include <intrin.h>
+ #endif
+-#define vsnprintf _vsnprintf
+-#define snprintf _snprintf
+
+ #elif SMTG_OS_MACOS
+ #include <errno.h>
+Submodule pluginterfaces contains modified content
+diff --git a/pluginterfaces/base/fstrdefs.h b/pluginterfaces/base/fstrdefs.h
+index 848e8ee..8846d31 100644
+--- a/pluginterfaces/base/fstrdefs.h
++++ b/pluginterfaces/base/fstrdefs.h
+@@ -22,6 +22,16 @@
+ /** string methods defines unicode / ASCII */
+ //----------------------------------------------------------------------------
+
++// We can use most of the VST3 SDK's Windows UTF-16 functionality by just
++// creating aliases for equivalent Linux functions
++#if __WINE__
++#define wcsicmp wcscasecmp
++#define wcsnicmp wcsncasecmp
++#define _vsnwprintf vswprintf
++#define stricmp strcasecmp
++#define strnicmp strncasecmp
++#endif
++
+ // 16 bit string operations
+ #if SMTG_CPP11 // if c++11 unicode string literals
+ #define SMTG_CPP11_CAT_PRIVATE_DONT_USE(a,b) a ## b
+diff --git a/pluginterfaces/base/ftypes.h b/pluginterfaces/base/ftypes.h
+index 133dbba..33ecae3 100644
+--- a/pluginterfaces/base/ftypes.h
++++ b/pluginterfaces/base/ftypes.h
+@@ -154,7 +154,7 @@ namespace Steinberg
+ // always inline macros (only when RELEASE is 1)
+ //----------------------------------------------------------------------------
+ #if RELEASE
+- #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__MINGW32__)
++ #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__WINE__)
+ #define SMTG_ALWAYS_INLINE __inline__ __attribute__((__always_inline__))
+ #define SMTG_NEVER_INLINE __attribute__((noinline))
+ #elif SMTG_OS_WINDOWS
+diff --git a/pluginterfaces/base/ustring.cpp b/pluginterfaces/base/ustring.cpp
+index 24a412f..8e631c9 100644
+--- a/pluginterfaces/base/ustring.cpp
++++ b/pluginterfaces/base/ustring.cpp
+@@ -38,6 +38,10 @@
+
+ #endif
+
++#ifdef __WINE__
++#include <wchar.h>
++#endif
++
+ //------------------------------------------------------------------------
+ namespace Steinberg {
+
+@@ -173,7 +177,7 @@ bool UString::scanFloat (double& value) const
+ bool UString::printFloat (double value, int32 precision)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%.*lf", precision, value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%.*lf", precision, value) != -1;
+ #elif SMTG_OS_MACOS
+ bool result = false;
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%.*lf"), precision, value);
+@@ -238,7 +242,7 @@ bool UString::scanInt (int64& value) const
+ bool UString::printInt (int64 value)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%I64d", value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%I64d", value) != -1;
+
+ #elif SMTG_OS_MACOS
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%lld"), value);
+Submodule public.sdk contains modified content
+diff --git a/public.sdk/source/common/systemclipboard_win32.cpp b/public.sdk/source/common/systemclipboard_win32.cpp
+index c5cb2b8..2ee3d65 100644
+--- a/public.sdk/source/common/systemclipboard_win32.cpp
++++ b/public.sdk/source/common/systemclipboard_win32.cpp
+@@ -111,7 +111,7 @@ bool copyTextToClipboard (const std::string& text)
+ {
+ if (auto* data = static_cast<WCHAR*> (GlobalLock (memory)))
+ {
+-#if defined(__MINGW32__)
++#if defined(__WINE__)
+ memcpy (data, wideStr.data (), byteSize);
+ #else
+ memcpy_s (data, byteSize, wideStr.data (), byteSize);
+diff --git a/public.sdk/source/vst/hosting/module_win32.cpp b/public.sdk/source/vst/hosting/module_win32.cpp
+index 2ba9319..ab6d72a 100644
+--- a/public.sdk/source/vst/hosting/module_win32.cpp
++++ b/public.sdk/source/vst/hosting/module_win32.cpp
+@@ -44,35 +44,10 @@
+ #include <algorithm>
+ #include <iostream>
+
+-#if SMTG_CPP17
+-
+-#if __has_include(<filesystem>)
+-#define USE_FILESYSTEM 1
+-#elif __has_include(<experimental/filesystem>)
+-#define USE_FILESYSTEM 0
+-#endif
+-
+-#else // !SMTG_CPP17
+-
+-#define USE_FILESYSTEM 0
+-
+-#endif // SMTG_CPP17
+-
+-#if USE_FILESYSTEM == 1
+-
+-#include <filesystem>
+-namespace filesystem = std::filesystem;
+-
+-#else // USE_FILESYSTEM == 0
+-
+-// The <experimental/filesystem> header is deprecated. It is superseded by the C++17 <filesystem>
+-// header. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to silence the
+-// warning, otherwise the build will fail in VS2019 16.3.0
+-#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+-#include <experimental/filesystem>
+-namespace filesystem = std::experimental::filesystem;
+-
+-#endif // USE_FILESYSTEM
++// `std::filesystem` doesn't work correctly with wineg++, resulting in weird
++// memory errors. This library is a drop-in replacement.
++#include <ghc/filesystem.hpp>
++namespace filesystem = ghc::filesystem;
+
+ #pragma comment(lib, "Shell32")
+
+@@ -320,7 +295,7 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
+ #elif USE_OLE
+ Ole::instance ();
+
+- IShellLink* shellLink = nullptr;
++ IShellLinkW* shellLink = nullptr;
+ if (!SUCCEEDED (CoCreateInstance (CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, reinterpret_cast<LPVOID*> (&shellLink))))
+ return {};
+@@ -405,13 +380,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (p, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (cp, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (cp.generic_u8string ());
++ pathList.push_back (cp.generic_string ());
+ }
+ else if (recursive)
+ {
+@@ -431,18 +406,18 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (*resolvedLink, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (resolvedLink->generic_u8string ());
++ pathList.push_back (resolvedLink->generic_string ());
+ }
+ else if (filesystem::is_directory (*resolvedLink))
+ {
+- const auto& str = resolvedLink->generic_u8string ();
+- if (cp.generic_u8string ().compare (0, str.size (), str.data (),
++ const auto& str = resolvedLink->generic_string ();
++ if (cp.generic_string ().compare (0, str.size (), str.data (),
+ str.size ()) != 0)
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
diff --git a/gnu/packages/patches/yabridge-5.0.4-dependencies.patch b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
new file mode 100644
index 0000000000..77db050e91
--- /dev/null
+++ b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
@@ -0,0 +1,36 @@
+Meson fails to detect bitsery, function2 and gulrak-filesystem.
+https://github.com/robbert-vdh/yabridge/issues/18
+
+This patch removes these dependencies in "meson.build".
+
+
+diff --git a/meson.build b/meson.build
+index d8d9135b..b35ebfcd 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.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 0/7] gnu: Add yabridge.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (5 preceding siblings ...)
2023-11-01 9:09 ` [bug#66870] [PATCH 6/6] gnu: Add yabridge Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (6 more replies)
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (2 subsequent siblings)
9 siblings, 7 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
This v2 series contains updates and fixes mistakes in v1.
Sughosha (7):
gnu: asio: Update to 1.28.0.
gnu: Add bitsery.
gnu: Add function2.
gnu: Add tomlplusplus.
gnu: Add clap.
gnu: Add clap-1.1.7.
gnu: Add yabridge.
gnu/local.mk | 2 +
gnu/packages/audio.scm | 125 ++++++++++++
gnu/packages/cpp.scm | 76 +++++++
gnu/packages/networking.scm | 8 +-
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
6 files changed, 434 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
base-commit: bdbb9dc27a590b08651d058f06a42caa26e04abb
--
2.41.0
^ permalink raw reply [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 2/7] gnu: Add bitsery Sughosha via Guix-patches via
` (5 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/networking.scm (asio): Update to 1.28.0.
[home-page]: Fix homepage.
Change-Id: I7c21512a60a2621911d856d53cef14638e4d2afb
---
gnu/packages/networking.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 6b415076e8..bfd53e0a3f 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -3381,14 +3381,14 @@ (define-public can-utils
(define-public asio
(package
(name "asio")
- (version "1.22.2")
+ (version "1.28.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/asio/asio/"
- version " (Stable)/asio-" version ".tar.bz2"))
+ version " (Stable)/asio-" version ".tar.gz"))
(sha256
- (base32 "0v5w9j4a02j2rkc7mrdj3ms0kfpqbgq2ipkixlz2l0p8xs0vfsvp"))))
+ (base32 "15yavn07m6fasf0lrxljx3p79zi23mzn0g0fhggrnngyqqyaam78"))))
(build-system gnu-build-system)
(inputs
(list boost openssl))
@@ -3397,7 +3397,7 @@ (define-public asio
(list
(string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
(string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
- (home-page "https://think-async.com/Asio")
+ (home-page "https://think-async.com/Asio/")
(synopsis "C++ library for ASynchronous network I/O")
(description "Asio is a cross-platform C++ library for network and
low-level I/O programming that provides developers with a consistent
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 2/7] gnu: Add bitsery.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 3/7] gnu: Add function2 Sughosha via Guix-patches via
` (4 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (bitsery): New variable.
---
gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5e35a03254..16fd5bcec5 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2319,6 +2319,30 @@ (define-public gulrak-filesystem
(home-page "https://github.com/gulrak/filesystem")
(license license:expat)))
+(define-public bitsery
+ (package
+ (name "bitsery")
+ (version "5.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fraillt/bitsery")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hv2fya7w53bfhlk79b1qnjg1qy076s8kvg22sfdq05bh0hxqrxf"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DBITSERY_BUILD_TESTS=ON")))
+ (native-inputs (list googletest))
+ (synopsis "Header only C++ binary serialization library")
+ (description "This package provides header only C++ binary serialization
+library. It is designed around the networking requirements for real-time data
+delivery, especially for games.")
+ (home-page "https://github.com/fraillt/bitsery")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 3/7] gnu: Add function2.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 2/7] gnu: Add bitsery Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
` (3 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (function2): New variable.
Change-Id: I29eb928aa943fa6b796d699271ca523075d44d38
---
gnu/packages/cpp.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 16fd5bcec5..24e519b10b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2343,6 +2343,36 @@ (define-public bitsery
(home-page "https://github.com/fraillt/bitsery")
(license license:expat)))
+(define-public function2
+ (package
+ (name "function2")
+ (version "4.2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Naios/function2")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "15k8i872s2jpwbpxfq42lr96q9wplvr8gjs2msf5i4ylyp846dgf"))))
+ (build-system cmake-build-system)
+ ;; The test size_match_layout fails on i586/i686. For more info:
+ ;; https://github.com/Naios/function2/issues/57
+ (arguments
+ (list #:tests? #f))
+ (synopsis "Improved implementations of std::function")
+ (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+ (home-page "https://naios.github.io/function2/")
+ (license license:boost1.0)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 4/7] gnu: Add tomlplusplus.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
` (2 preceding siblings ...)
2023-11-30 9:02 ` [bug#66870] [PATCH v2 3/7] gnu: Add function2 Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 5/7] gnu: Add clap Sughosha via Guix-patches via
` (2 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha
* gnu/packages/cpp.scm (tomlplusplus): New variable.
Change-Id: I7c12b76fe135cd22b54a56560aac699e452009bb
---
gnu/packages/cpp.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 24e519b10b..272127737b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages cpp)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages c)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
@@ -2373,6 +2374,27 @@ (define-public function2
(home-page "https://naios.github.io/function2/")
(license license:boost1.0)))
+(define-public tomlplusplus
+ (package
+ (name "tomlplusplus")
+ (version "3.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marzer/tomlplusplus")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
+ (build-system meson-build-system)
+ (native-inputs (list cmake-minimal))
+ (synopsis "Header-only TOML config file parser and serializer for C++17")
+ (description "This package provides Header-only TOML config file parser and
+serializer for C++17.")
+ (home-page "https://marzer.github.io/tomlplusplus/")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 5/7] gnu: Add clap.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
` (3 preceding siblings ...)
2023-11-30 9:02 ` [bug#66870] [PATCH v2 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 7/7] gnu: Add yabridge Sughosha via Guix-patches via
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (clap): New variable.
Change-Id: I595adff236eacaf2934f4649e2f27a367f33d0ae
---
gnu/packages/audio.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e4fe4c2da7..e964c74438 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2715,6 +2715,28 @@ (define-public jalv
plugin function as a JACK application.")
(license license:isc)))
+(define-public clap
+ (package
+ (name "clap")
+ (version "1.1.10")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0skn3cvh7zs173v3i6ywdmddqzrhxvivwdisvmqc6hvq594f8z80"))))
+ (build-system cmake-build-system)
+ (synopsis "Audio Plugin API")
+ (description
+ "CLAP stands for CLever Audio Plugin. It is an audio plugin ABI which
+defines a standard for Digital Audio Workstations and audio plugins to work
+together.")
+ (home-page "https://cleveraudio.org/")
+ (license license:expat)))
+
(define-public ladspa
(package
(name "ladspa")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 6/7] gnu: Add clap-1.1.7.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
` (4 preceding siblings ...)
2023-11-30 9:02 ` [bug#66870] [PATCH v2 5/7] gnu: Add clap Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 7/7] gnu: Add yabridge Sughosha via Guix-patches via
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (clap-1.1.7): New variable.
Change-Id: Iae9f11784279fc7a73087d2009a6d7e280fe80b8
---
gnu/packages/audio.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e964c74438..6e1da4c288 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2737,6 +2737,20 @@ (define-public clap
(home-page "https://cleveraudio.org/")
(license license:expat)))
+(define-public clap-1.1.7
+ (let ((version "1.1.7"))
+ (package/inherit clap
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name "clap" version))
+ (sha256
+ (base32
+ "1afjvllmzf2xmrpy8mcxk7zhii93b447ciaqw9lkj2wh9z217hsr")))))))
+
(define-public ladspa
(package
(name "ladspa")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v2 7/7] gnu: Add yabridge.
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
` (5 preceding siblings ...)
2023-11-30 9:02 ` [bug#66870] [PATCH v2 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
@ 2023-11-30 9:02 ` Sughosha via Guix-patches via
6 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 9:02 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (yabridge): New variable.
* gnu/packages/patches/yabridge-5.0.4-dependencies.patch:
New file.
* gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch:
New file.
* gnu/local.mk: Register the patch files.
Change-Id: Ic7e5fdc3b24349a01ed9b301d0a353e55c4479b8
---
gnu/local.mk | 2 +
gnu/packages/audio.scm | 89 ++++++++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
4 files changed, 318 insertions(+)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a8142bb0f2..c93a7b3659 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2119,6 +2119,7 @@ dist_patch_DATA = \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \
+ %D%/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
@@ -2170,6 +2171,7 @@ dist_patch_DATA = \
%D%/packages/patches/xterm-370-explicit-xcursor.patch \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
+ %D%/packages/patches/yabridge-5.0.4-dependencies.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 6e1da4c288..36b673104d 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -73,7 +73,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)
@@ -136,6 +138,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)
@@ -5941,6 +5944,92 @@ (define-public mbelib
(license (list license:bsd-3 ; test/ framework
license:isc))))) ; the rest
+(define-public yabridge
+ (package
+ (name "yabridge")
+ (version "5.0.5")
+ (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
+ "0ayl706nv67jkixbrh9z7225gdwg2s4rzndx77761x33mk6by7a8"))
+ (patches
+ (search-patches
+ "yabridge-5.0.4-dependencies.patch"))
+ (modules '((guix build utils)))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "--cross-file=" #$source "/cross-wine.conf"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-vst3-subproject
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (assoc-ref inputs "vst3sdk") "subprojects/vst3")))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/chainloader/utils.cpp"
+ (("\"/usr/local/lib64\",")
+ (string-append "\"/usr/local/lib64\",\n\""
+ #$output "/lib\",")))))
+ (replace 'install
+ (lambda _
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/bin")))
+ (find-files "." "-host\\.exe(|\\.so)$"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/lib")))
+ (find-files "." "libyabridge")))))))
+ (native-inputs
+ ;; NOTE: Use the latest clap version with the next update of yabrigde.
+ `(("clap" ,clap-1.1.7)
+ ("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
+ wine64))
+ (supported-systems
+ (package-supported-systems wine64))
+ (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 Windows VST2, VST3, and CLAP plugins in 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 ableton-link
(package
(name "ableton-link")
diff --git a/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
new file mode 100644
index 0000000000..43639f978f
--- /dev/null
+++ b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
@@ -0,0 +1,191 @@
+This patch is taken from yabridge project:
+https://github.com/robbert-vdh/yabridge.
+
+Submodule base contains modified content
+diff --git a/base/source/fdebug.cpp b/base/source/fdebug.cpp
+index b1d1dcc..9093022 100644
+--- a/base/source/fdebug.cpp
++++ b/base/source/fdebug.cpp
+@@ -117,8 +117,6 @@ bool AmIBeingDebugged ()
+ #if _MSC_VER
+ #include <intrin.h>
+ #endif
+-#define vsnprintf _vsnprintf
+-#define snprintf _snprintf
+
+ #elif SMTG_OS_MACOS
+ #include <errno.h>
+Submodule pluginterfaces contains modified content
+diff --git a/pluginterfaces/base/fstrdefs.h b/pluginterfaces/base/fstrdefs.h
+index 848e8ee..8846d31 100644
+--- a/pluginterfaces/base/fstrdefs.h
++++ b/pluginterfaces/base/fstrdefs.h
+@@ -22,6 +22,16 @@
+ /** string methods defines unicode / ASCII */
+ //----------------------------------------------------------------------------
+
++// We can use most of the VST3 SDK's Windows UTF-16 functionality by just
++// creating aliases for equivalent Linux functions
++#if __WINE__
++#define wcsicmp wcscasecmp
++#define wcsnicmp wcsncasecmp
++#define _vsnwprintf vswprintf
++#define stricmp strcasecmp
++#define strnicmp strncasecmp
++#endif
++
+ // 16 bit string operations
+ #if SMTG_CPP11 // if c++11 unicode string literals
+ #define SMTG_CPP11_CAT_PRIVATE_DONT_USE(a,b) a ## b
+diff --git a/pluginterfaces/base/ftypes.h b/pluginterfaces/base/ftypes.h
+index 133dbba..33ecae3 100644
+--- a/pluginterfaces/base/ftypes.h
++++ b/pluginterfaces/base/ftypes.h
+@@ -154,7 +154,7 @@ namespace Steinberg
+ // always inline macros (only when RELEASE is 1)
+ //----------------------------------------------------------------------------
+ #if RELEASE
+- #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__MINGW32__)
++ #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__WINE__)
+ #define SMTG_ALWAYS_INLINE __inline__ __attribute__((__always_inline__))
+ #define SMTG_NEVER_INLINE __attribute__((noinline))
+ #elif SMTG_OS_WINDOWS
+diff --git a/pluginterfaces/base/ustring.cpp b/pluginterfaces/base/ustring.cpp
+index 24a412f..8e631c9 100644
+--- a/pluginterfaces/base/ustring.cpp
++++ b/pluginterfaces/base/ustring.cpp
+@@ -38,6 +38,10 @@
+
+ #endif
+
++#ifdef __WINE__
++#include <wchar.h>
++#endif
++
+ //------------------------------------------------------------------------
+ namespace Steinberg {
+
+@@ -173,7 +177,7 @@ bool UString::scanFloat (double& value) const
+ bool UString::printFloat (double value, int32 precision)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%.*lf", precision, value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%.*lf", precision, value) != -1;
+ #elif SMTG_OS_MACOS
+ bool result = false;
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%.*lf"), precision, value);
+@@ -238,7 +242,7 @@ bool UString::scanInt (int64& value) const
+ bool UString::printInt (int64 value)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%I64d", value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%I64d", value) != -1;
+
+ #elif SMTG_OS_MACOS
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%lld"), value);
+Submodule public.sdk contains modified content
+diff --git a/public.sdk/source/common/systemclipboard_win32.cpp b/public.sdk/source/common/systemclipboard_win32.cpp
+index c5cb2b8..2ee3d65 100644
+--- a/public.sdk/source/common/systemclipboard_win32.cpp
++++ b/public.sdk/source/common/systemclipboard_win32.cpp
+@@ -111,7 +111,7 @@ bool copyTextToClipboard (const std::string& text)
+ {
+ if (auto* data = static_cast<WCHAR*> (GlobalLock (memory)))
+ {
+-#if defined(__MINGW32__)
++#if defined(__WINE__)
+ memcpy (data, wideStr.data (), byteSize);
+ #else
+ memcpy_s (data, byteSize, wideStr.data (), byteSize);
+diff --git a/public.sdk/source/vst/hosting/module_win32.cpp b/public.sdk/source/vst/hosting/module_win32.cpp
+index 2ba9319..ab6d72a 100644
+--- a/public.sdk/source/vst/hosting/module_win32.cpp
++++ b/public.sdk/source/vst/hosting/module_win32.cpp
+@@ -44,35 +44,10 @@
+ #include <algorithm>
+ #include <iostream>
+
+-#if SMTG_CPP17
+-
+-#if __has_include(<filesystem>)
+-#define USE_FILESYSTEM 1
+-#elif __has_include(<experimental/filesystem>)
+-#define USE_FILESYSTEM 0
+-#endif
+-
+-#else // !SMTG_CPP17
+-
+-#define USE_FILESYSTEM 0
+-
+-#endif // SMTG_CPP17
+-
+-#if USE_FILESYSTEM == 1
+-
+-#include <filesystem>
+-namespace filesystem = std::filesystem;
+-
+-#else // USE_FILESYSTEM == 0
+-
+-// The <experimental/filesystem> header is deprecated. It is superseded by the C++17 <filesystem>
+-// header. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to silence the
+-// warning, otherwise the build will fail in VS2019 16.3.0
+-#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+-#include <experimental/filesystem>
+-namespace filesystem = std::experimental::filesystem;
+-
+-#endif // USE_FILESYSTEM
++// `std::filesystem` doesn't work correctly with wineg++, resulting in weird
++// memory errors. This library is a drop-in replacement.
++#include <ghc/filesystem.hpp>
++namespace filesystem = ghc::filesystem;
+
+ #pragma comment(lib, "Shell32")
+
+@@ -320,7 +295,7 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
+ #elif USE_OLE
+ Ole::instance ();
+
+- IShellLink* shellLink = nullptr;
++ IShellLinkW* shellLink = nullptr;
+ if (!SUCCEEDED (CoCreateInstance (CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, reinterpret_cast<LPVOID*> (&shellLink))))
+ return {};
+@@ -405,13 +380,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (p, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (cp, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (cp.generic_u8string ());
++ pathList.push_back (cp.generic_string ());
+ }
+ else if (recursive)
+ {
+@@ -431,18 +406,18 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (*resolvedLink, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (resolvedLink->generic_u8string ());
++ pathList.push_back (resolvedLink->generic_string ());
+ }
+ else if (filesystem::is_directory (*resolvedLink))
+ {
+- const auto& str = resolvedLink->generic_u8string ();
+- if (cp.generic_u8string ().compare (0, str.size (), str.data (),
++ const auto& str = resolvedLink->generic_string ();
++ if (cp.generic_string ().compare (0, str.size (), str.data (),
+ str.size ()) != 0)
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
diff --git a/gnu/packages/patches/yabridge-5.0.4-dependencies.patch b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
new file mode 100644
index 0000000000..77db050e91
--- /dev/null
+++ b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
@@ -0,0 +1,36 @@
+Meson fails to detect bitsery, function2 and gulrak-filesystem.
+https://github.com/robbert-vdh/yabridge/issues/18
+
+This patch removes these dependencies in "meson.build".
+
+
+diff --git a/meson.build b/meson.build
+index d8d9135b..b35ebfcd 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.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (6 preceding siblings ...)
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 2/7] gnu: Add bitsery Sughosha via Guix-patches via
` (5 more replies)
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
9 siblings, 6 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/networking.scm (asio): Update to 1.28.0.
[home-page]: Fix homepage.
Change-Id: I7c21512a60a2621911d856d53cef14638e4d2afb
---
gnu/packages/networking.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 6b415076e8..bfd53e0a3f 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -3381,14 +3381,14 @@ (define-public can-utils
(define-public asio
(package
(name "asio")
- (version "1.22.2")
+ (version "1.28.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/asio/asio/"
- version " (Stable)/asio-" version ".tar.bz2"))
+ version " (Stable)/asio-" version ".tar.gz"))
(sha256
- (base32 "0v5w9j4a02j2rkc7mrdj3ms0kfpqbgq2ipkixlz2l0p8xs0vfsvp"))))
+ (base32 "15yavn07m6fasf0lrxljx3p79zi23mzn0g0fhggrnngyqqyaam78"))))
(build-system gnu-build-system)
(inputs
(list boost openssl))
@@ -3397,7 +3397,7 @@ (define-public asio
(list
(string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
(string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
- (home-page "https://think-async.com/Asio")
+ (home-page "https://think-async.com/Asio/")
(synopsis "C++ library for ASynchronous network I/O")
(description "Asio is a cross-platform C++ library for network and
low-level I/O programming that provides developers with a consistent
base-commit: bdbb9dc27a590b08651d058f06a42caa26e04abb
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 2/7] gnu: Add bitsery.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 3/7] gnu: Add function2 Sughosha via Guix-patches via
` (4 subsequent siblings)
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (bitsery): New variable.
---
gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5e35a03254..16fd5bcec5 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2319,6 +2319,30 @@ (define-public gulrak-filesystem
(home-page "https://github.com/gulrak/filesystem")
(license license:expat)))
+(define-public bitsery
+ (package
+ (name "bitsery")
+ (version "5.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fraillt/bitsery")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hv2fya7w53bfhlk79b1qnjg1qy076s8kvg22sfdq05bh0hxqrxf"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DBITSERY_BUILD_TESTS=ON")))
+ (native-inputs (list googletest))
+ (synopsis "Header only C++ binary serialization library")
+ (description "This package provides header only C++ binary serialization
+library. It is designed around the networking requirements for real-time data
+delivery, especially for games.")
+ (home-page "https://github.com/fraillt/bitsery")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 3/7] gnu: Add function2.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 2/7] gnu: Add bitsery Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
` (3 subsequent siblings)
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Sughosha, Gabriel Wicki
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (function2): New variable.
Change-Id: I29eb928aa943fa6b796d699271ca523075d44d38
---
gnu/packages/cpp.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 16fd5bcec5..24e519b10b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2343,6 +2343,36 @@ (define-public bitsery
(home-page "https://github.com/fraillt/bitsery")
(license license:expat)))
+(define-public function2
+ (package
+ (name "function2")
+ (version "4.2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Naios/function2")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "15k8i872s2jpwbpxfq42lr96q9wplvr8gjs2msf5i4ylyp846dgf"))))
+ (build-system cmake-build-system)
+ ;; The test size_match_layout fails on i586/i686. For more info:
+ ;; https://github.com/Naios/function2/issues/57
+ (arguments
+ (list #:tests? #f))
+ (synopsis "Improved implementations of std::function")
+ (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+ (home-page "https://naios.github.io/function2/")
+ (license license:boost1.0)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 4/7] gnu: Add tomlplusplus.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 2/7] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 3/7] gnu: Add function2 Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 5/7] gnu: Add clap Sughosha via Guix-patches via
` (2 subsequent siblings)
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha
* gnu/packages/cpp.scm (tomlplusplus): New variable.
Change-Id: I7c12b76fe135cd22b54a56560aac699e452009bb
---
gnu/packages/cpp.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 24e519b10b..272127737b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages cpp)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages c)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
@@ -2373,6 +2374,27 @@ (define-public function2
(home-page "https://naios.github.io/function2/")
(license license:boost1.0)))
+(define-public tomlplusplus
+ (package
+ (name "tomlplusplus")
+ (version "3.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marzer/tomlplusplus")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
+ (build-system meson-build-system)
+ (native-inputs (list cmake-minimal))
+ (synopsis "Header-only TOML config file parser and serializer for C++17")
+ (description "This package provides Header-only TOML config file parser and
+serializer for C++17.")
+ (home-page "https://marzer.github.io/tomlplusplus/")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 5/7] gnu: Add clap.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (2 preceding siblings ...)
2023-11-30 10:32 ` [bug#66870] [PATCH v3 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 7/7] gnu: Add yabridge Sughosha via Guix-patches via
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (clap): New variable.
Change-Id: I595adff236eacaf2934f4649e2f27a367f33d0ae
---
gnu/packages/audio.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e4fe4c2da7..e964c74438 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2715,6 +2715,28 @@ (define-public jalv
plugin function as a JACK application.")
(license license:isc)))
+(define-public clap
+ (package
+ (name "clap")
+ (version "1.1.10")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0skn3cvh7zs173v3i6ywdmddqzrhxvivwdisvmqc6hvq594f8z80"))))
+ (build-system cmake-build-system)
+ (synopsis "Audio Plugin API")
+ (description
+ "CLAP stands for CLever Audio Plugin. It is an audio plugin ABI which
+defines a standard for Digital Audio Workstations and audio plugins to work
+together.")
+ (home-page "https://cleveraudio.org/")
+ (license license:expat)))
+
(define-public ladspa
(package
(name "ladspa")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 6/7] gnu: Add clap-1.1.7.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (3 preceding siblings ...)
2023-11-30 10:32 ` [bug#66870] [PATCH v3 5/7] gnu: Add clap Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 7/7] gnu: Add yabridge Sughosha via Guix-patches via
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (clap-1.1.7): New variable.
Change-Id: Iae9f11784279fc7a73087d2009a6d7e280fe80b8
---
gnu/packages/audio.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e964c74438..6e1da4c288 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2737,6 +2737,20 @@ (define-public clap
(home-page "https://cleveraudio.org/")
(license license:expat)))
+(define-public clap-1.1.7
+ (let ((version "1.1.7"))
+ (package/inherit clap
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name "clap" version))
+ (sha256
+ (base32
+ "1afjvllmzf2xmrpy8mcxk7zhii93b447ciaqw9lkj2wh9z217hsr")))))))
+
(define-public ladspa
(package
(name "ladspa")
--
2.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v3 7/7] gnu: Add yabridge.
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
` (4 preceding siblings ...)
2023-11-30 10:32 ` [bug#66870] [PATCH v3 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
@ 2023-11-30 10:32 ` Sughosha via Guix-patches via
5 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2023-11-30 10:32 UTC (permalink / raw)
To: 66870; +Cc: Gabriel Wicki, Sughosha, Gabriel Wicki
* gnu/packages/audio.scm (yabridge): New variable.
* gnu/packages/patches/yabridge-5.0.4-dependencies.patch:
New file.
* gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch:
New file.
* gnu/local.mk: Register the patch files.
Change-Id: Ic7e5fdc3b24349a01ed9b301d0a353e55c4479b8
---
gnu/local.mk | 2 +
gnu/packages/audio.scm | 88 ++++++++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
4 files changed, 317 insertions(+)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a8142bb0f2..c93a7b3659 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2119,6 +2119,7 @@ dist_patch_DATA = \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \
+ %D%/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
@@ -2170,6 +2171,7 @@ dist_patch_DATA = \
%D%/packages/patches/xterm-370-explicit-xcursor.patch \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
+ %D%/packages/patches/yabridge-5.0.4-dependencies.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 6e1da4c288..f842548c93 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -73,7 +73,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)
@@ -136,6 +138,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)
@@ -5941,6 +5944,91 @@ (define-public mbelib
(license (list license:bsd-3 ; test/ framework
license:isc))))) ; the rest
+(define-public yabridge
+ (package
+ (name "yabridge")
+ (version "5.0.5")
+ (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
+ "0ayl706nv67jkixbrh9z7225gdwg2s4rzndx77761x33mk6by7a8"))
+ (patches
+ (search-patches
+ "yabridge-5.0.4-dependencies.patch"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "--cross-file=" #$source "/cross-wine.conf"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-vst3-subproject
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (assoc-ref inputs "vst3sdk") "subprojects/vst3")))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/chainloader/utils.cpp"
+ (("\"/usr/local/lib64\",")
+ (string-append "\"/usr/local/lib64\",\n\""
+ #$output "/lib\",")))))
+ (replace 'install
+ (lambda _
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/bin")))
+ (find-files "." "-host\\.exe(|\\.so)$"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/lib")))
+ (find-files "." "libyabridge")))))))
+ (native-inputs
+ ;; NOTE: Use the latest clap version with the next update of yabrigde.
+ `(("clap" ,clap-1.1.7)
+ ("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
+ wine64))
+ (supported-systems
+ (package-supported-systems wine64))
+ (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 Windows VST2, VST3, and CLAP plugins in 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 ableton-link
(package
(name "ableton-link")
diff --git a/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
new file mode 100644
index 0000000000..43639f978f
--- /dev/null
+++ b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
@@ -0,0 +1,191 @@
+This patch is taken from yabridge project:
+https://github.com/robbert-vdh/yabridge.
+
+Submodule base contains modified content
+diff --git a/base/source/fdebug.cpp b/base/source/fdebug.cpp
+index b1d1dcc..9093022 100644
+--- a/base/source/fdebug.cpp
++++ b/base/source/fdebug.cpp
+@@ -117,8 +117,6 @@ bool AmIBeingDebugged ()
+ #if _MSC_VER
+ #include <intrin.h>
+ #endif
+-#define vsnprintf _vsnprintf
+-#define snprintf _snprintf
+
+ #elif SMTG_OS_MACOS
+ #include <errno.h>
+Submodule pluginterfaces contains modified content
+diff --git a/pluginterfaces/base/fstrdefs.h b/pluginterfaces/base/fstrdefs.h
+index 848e8ee..8846d31 100644
+--- a/pluginterfaces/base/fstrdefs.h
++++ b/pluginterfaces/base/fstrdefs.h
+@@ -22,6 +22,16 @@
+ /** string methods defines unicode / ASCII */
+ //----------------------------------------------------------------------------
+
++// We can use most of the VST3 SDK's Windows UTF-16 functionality by just
++// creating aliases for equivalent Linux functions
++#if __WINE__
++#define wcsicmp wcscasecmp
++#define wcsnicmp wcsncasecmp
++#define _vsnwprintf vswprintf
++#define stricmp strcasecmp
++#define strnicmp strncasecmp
++#endif
++
+ // 16 bit string operations
+ #if SMTG_CPP11 // if c++11 unicode string literals
+ #define SMTG_CPP11_CAT_PRIVATE_DONT_USE(a,b) a ## b
+diff --git a/pluginterfaces/base/ftypes.h b/pluginterfaces/base/ftypes.h
+index 133dbba..33ecae3 100644
+--- a/pluginterfaces/base/ftypes.h
++++ b/pluginterfaces/base/ftypes.h
+@@ -154,7 +154,7 @@ namespace Steinberg
+ // always inline macros (only when RELEASE is 1)
+ //----------------------------------------------------------------------------
+ #if RELEASE
+- #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__MINGW32__)
++ #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__WINE__)
+ #define SMTG_ALWAYS_INLINE __inline__ __attribute__((__always_inline__))
+ #define SMTG_NEVER_INLINE __attribute__((noinline))
+ #elif SMTG_OS_WINDOWS
+diff --git a/pluginterfaces/base/ustring.cpp b/pluginterfaces/base/ustring.cpp
+index 24a412f..8e631c9 100644
+--- a/pluginterfaces/base/ustring.cpp
++++ b/pluginterfaces/base/ustring.cpp
+@@ -38,6 +38,10 @@
+
+ #endif
+
++#ifdef __WINE__
++#include <wchar.h>
++#endif
++
+ //------------------------------------------------------------------------
+ namespace Steinberg {
+
+@@ -173,7 +177,7 @@ bool UString::scanFloat (double& value) const
+ bool UString::printFloat (double value, int32 precision)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%.*lf", precision, value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%.*lf", precision, value) != -1;
+ #elif SMTG_OS_MACOS
+ bool result = false;
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%.*lf"), precision, value);
+@@ -238,7 +242,7 @@ bool UString::scanInt (int64& value) const
+ bool UString::printInt (int64 value)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%I64d", value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%I64d", value) != -1;
+
+ #elif SMTG_OS_MACOS
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%lld"), value);
+Submodule public.sdk contains modified content
+diff --git a/public.sdk/source/common/systemclipboard_win32.cpp b/public.sdk/source/common/systemclipboard_win32.cpp
+index c5cb2b8..2ee3d65 100644
+--- a/public.sdk/source/common/systemclipboard_win32.cpp
++++ b/public.sdk/source/common/systemclipboard_win32.cpp
+@@ -111,7 +111,7 @@ bool copyTextToClipboard (const std::string& text)
+ {
+ if (auto* data = static_cast<WCHAR*> (GlobalLock (memory)))
+ {
+-#if defined(__MINGW32__)
++#if defined(__WINE__)
+ memcpy (data, wideStr.data (), byteSize);
+ #else
+ memcpy_s (data, byteSize, wideStr.data (), byteSize);
+diff --git a/public.sdk/source/vst/hosting/module_win32.cpp b/public.sdk/source/vst/hosting/module_win32.cpp
+index 2ba9319..ab6d72a 100644
+--- a/public.sdk/source/vst/hosting/module_win32.cpp
++++ b/public.sdk/source/vst/hosting/module_win32.cpp
+@@ -44,35 +44,10 @@
+ #include <algorithm>
+ #include <iostream>
+
+-#if SMTG_CPP17
+-
+-#if __has_include(<filesystem>)
+-#define USE_FILESYSTEM 1
+-#elif __has_include(<experimental/filesystem>)
+-#define USE_FILESYSTEM 0
+-#endif
+-
+-#else // !SMTG_CPP17
+-
+-#define USE_FILESYSTEM 0
+-
+-#endif // SMTG_CPP17
+-
+-#if USE_FILESYSTEM == 1
+-
+-#include <filesystem>
+-namespace filesystem = std::filesystem;
+-
+-#else // USE_FILESYSTEM == 0
+-
+-// The <experimental/filesystem> header is deprecated. It is superseded by the C++17 <filesystem>
+-// header. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to silence the
+-// warning, otherwise the build will fail in VS2019 16.3.0
+-#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+-#include <experimental/filesystem>
+-namespace filesystem = std::experimental::filesystem;
+-
+-#endif // USE_FILESYSTEM
++// `std::filesystem` doesn't work correctly with wineg++, resulting in weird
++// memory errors. This library is a drop-in replacement.
++#include <ghc/filesystem.hpp>
++namespace filesystem = ghc::filesystem;
+
+ #pragma comment(lib, "Shell32")
+
+@@ -320,7 +295,7 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
+ #elif USE_OLE
+ Ole::instance ();
+
+- IShellLink* shellLink = nullptr;
++ IShellLinkW* shellLink = nullptr;
+ if (!SUCCEEDED (CoCreateInstance (CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, reinterpret_cast<LPVOID*> (&shellLink))))
+ return {};
+@@ -405,13 +380,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (p, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (cp, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (cp.generic_u8string ());
++ pathList.push_back (cp.generic_string ());
+ }
+ else if (recursive)
+ {
+@@ -431,18 +406,18 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (*resolvedLink, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (resolvedLink->generic_u8string ());
++ pathList.push_back (resolvedLink->generic_string ());
+ }
+ else if (filesystem::is_directory (*resolvedLink))
+ {
+- const auto& str = resolvedLink->generic_u8string ();
+- if (cp.generic_u8string ().compare (0, str.size (), str.data (),
++ const auto& str = resolvedLink->generic_string ();
++ if (cp.generic_string ().compare (0, str.size (), str.data (),
+ str.size ()) != 0)
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
diff --git a/gnu/packages/patches/yabridge-5.0.4-dependencies.patch b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
new file mode 100644
index 0000000000..77db050e91
--- /dev/null
+++ b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
@@ -0,0 +1,36 @@
+Meson fails to detect bitsery, function2 and gulrak-filesystem.
+https://github.com/robbert-vdh/yabridge/issues/18
+
+This patch removes these dependencies in "meson.build".
+
+
+diff --git a/meson.build b/meson.build
+index d8d9135b..b35ebfcd 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.41.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v4 1/5] gnu: Add bitsery.
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (7 preceding siblings ...)
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
@ 2024-10-28 9:46 ` Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 2/5] gnu: Add function2 Nicolas Graves via Guix-patches via
` (3 more replies)
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
9 siblings, 4 replies; 40+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 9:46 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (bitsery): New variable.
---
gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 26fc169154..8cc7cfb1b0 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2571,6 +2571,30 @@ (define-public gulrak-filesystem
(home-page "https://github.com/gulrak/filesystem")
(license license:expat)))
+(define-public bitsery
+ (package
+ (name "bitsery")
+ (version "5.2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fraillt/bitsery")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hv2fya7w53bfhlk79b1qnjg1qy076s8kvg22sfdq05bh0hxqrxf"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DBITSERY_BUILD_TESTS=ON")))
+ (native-inputs (list googletest))
+ (synopsis "Header only C++ binary serialization library")
+ (description "This package provides header only C++ binary serialization
+library. It is designed around the networking requirements for real-time data
+delivery, especially for games.")
+ (home-page "https://github.com/fraillt/bitsery")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v4 2/5] gnu: Add function2.
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
@ 2024-10-28 9:46 ` Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 3/5] gnu: Add clap Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 40+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 9:46 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@proton.me>
* gnu/packages/cpp.scm (function2): New variable.
Change-Id: I29eb928aa943fa6b796d699271ca523075d44d38
---
gnu/packages/cpp.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 8cc7cfb1b0..9899fc595d 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2595,6 +2595,36 @@ (define-public bitsery
(home-page "https://github.com/fraillt/bitsery")
(license license:expat)))
+(define-public function2
+ (package
+ (name "function2")
+ (version "4.2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Naios/function2")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "15k8i872s2jpwbpxfq42lr96q9wplvr8gjs2msf5i4ylyp846dgf"))))
+ (build-system cmake-build-system)
+ ;; The test size_match_layout fails on i586/i686. For more info:
+ ;; https://github.com/Naios/function2/issues/57
+ (arguments
+ (list #:tests? #f))
+ (synopsis "Improved implementations of std::function")
+ (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+ (home-page "https://naios.github.io/function2/")
+ (license license:boost1.0)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v4 3/5] gnu: Add clap.
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 2/5] gnu: Add function2 Nicolas Graves via Guix-patches via
@ 2024-10-28 9:46 ` Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 4/5] gnu: Add clap-1.1.7 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 5/5] gnu: Add yabridge Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 40+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 9:46 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@disroot.org>
* gnu/packages/audio.scm (clap): New variable.
Change-Id: I595adff236eacaf2934f4649e2f27a367f33d0ae
---
gnu/packages/audio.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 1ab0cbdd05..e69dcc5d8c 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2762,6 +2762,28 @@ (define-public jalv
plugin function as a JACK application.")
(license license:isc)))
+(define-public clap
+ (package
+ (name "clap")
+ (version "1.1.10")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0skn3cvh7zs173v3i6ywdmddqzrhxvivwdisvmqc6hvq594f8z80"))))
+ (build-system cmake-build-system)
+ (synopsis "Audio Plugin API")
+ (description
+ "CLAP stands for CLever Audio Plugin. It is an audio plugin ABI which
+defines a standard for Digital Audio Workstations and audio plugins to work
+together.")
+ (home-page "https://cleveraudio.org/")
+ (license license:expat)))
+
(define-public ladspa
(package
(name "ladspa")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v4 4/5] gnu: Add clap-1.1.7.
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 2/5] gnu: Add function2 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 3/5] gnu: Add clap Nicolas Graves via Guix-patches via
@ 2024-10-28 9:46 ` Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 5/5] gnu: Add yabridge Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 40+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 9:46 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@disroot.org>
* gnu/packages/audio.scm (clap-1.1.7): New variable.
Change-Id: Iae9f11784279fc7a73087d2009a6d7e280fe80b8
---
gnu/packages/audio.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e69dcc5d8c..c3bcf6a13c 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2784,6 +2784,20 @@ (define-public clap
(home-page "https://cleveraudio.org/")
(license license:expat)))
+(define-public clap-1.1.7
+ (let ((version "1.1.7"))
+ (package/inherit clap
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name "clap" version))
+ (sha256
+ (base32
+ "1afjvllmzf2xmrpy8mcxk7zhii93b447ciaqw9lkj2wh9z217hsr")))))))
+
(define-public ladspa
(package
(name "ladspa")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v4 5/5] gnu: Add yabridge.
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2024-10-28 9:46 ` [bug#66870] [PATCH v4 4/5] gnu: Add clap-1.1.7 Nicolas Graves via Guix-patches via
@ 2024-10-28 9:46 ` Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 40+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-10-28 9:46 UTC (permalink / raw)
To: 66870; +Cc: Sughosha
From: Sughosha <sughosha@disroot.org>
* gnu/packages/audio.scm (yabridge): New variable.
* gnu/packages/patches/yabridge-5.0.4-dependencies.patch:
New file.
* gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch:
New file.
* gnu/local.mk: Register the patch files.
Change-Id: Ic7e5fdc3b24349a01ed9b301d0a353e55c4479b8
---
gnu/local.mk | 2 +
gnu/packages/audio.scm | 87 ++++++++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
4 files changed, 316 insertions(+)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 6bd7c75090..2bf577e2a7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2293,6 +2293,7 @@ dist_patch_DATA = \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch \
%D%/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \
+ %D%/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
@@ -2347,6 +2348,7 @@ dist_patch_DATA = \
%D%/packages/patches/xterm-370-explicit-xcursor.patch \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
+ %D%/packages/patches/yabridge-5.0.4-dependencies.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-use-baseline-cpu-by-default.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index c3bcf6a13c..8f95fed26e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cdrom)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
@@ -146,6 +147,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)
@@ -6661,3 +6663,88 @@ (define-public easyeffects
@item Stereo tools
@end itemize")
(license license:gpl3+)))
+
+(define-public yabridge
+ (package
+ (name "yabridge")
+ (version "5.0.5")
+ (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
+ "0ayl706nv67jkixbrh9z7225gdwg2s4rzndx77761x33mk6by7a8"))
+ (patches
+ (search-patches
+ "yabridge-5.0.4-dependencies.patch"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "--cross-file=" #$source "/cross-wine.conf"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-vst3-subproject
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (assoc-ref inputs "vst3sdk") "subprojects/vst3")))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/chainloader/utils.cpp"
+ (("\"/usr/local/lib64\",")
+ (string-append "\"/usr/local/lib64\",\n\""
+ #$output "/lib\",")))))
+ (replace 'install
+ (lambda _
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/bin")))
+ (find-files "." "-host\\.exe(|\\.so)$"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/lib")))
+ (find-files "." "libyabridge")))))))
+ (native-inputs
+ ;; NOTE: Use the latest clap version with the next update of yabrigde.
+ `(("clap" ,clap-1.1.7)
+ ("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
+ wine64))
+ (supported-systems
+ (package-supported-systems wine64))
+ (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 Windows VST2, VST3, and CLAP plugins in 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+)))
diff --git a/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
new file mode 100644
index 0000000000..43639f978f
--- /dev/null
+++ b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
@@ -0,0 +1,191 @@
+This patch is taken from yabridge project:
+https://github.com/robbert-vdh/yabridge.
+
+Submodule base contains modified content
+diff --git a/base/source/fdebug.cpp b/base/source/fdebug.cpp
+index b1d1dcc..9093022 100644
+--- a/base/source/fdebug.cpp
++++ b/base/source/fdebug.cpp
+@@ -117,8 +117,6 @@ bool AmIBeingDebugged ()
+ #if _MSC_VER
+ #include <intrin.h>
+ #endif
+-#define vsnprintf _vsnprintf
+-#define snprintf _snprintf
+
+ #elif SMTG_OS_MACOS
+ #include <errno.h>
+Submodule pluginterfaces contains modified content
+diff --git a/pluginterfaces/base/fstrdefs.h b/pluginterfaces/base/fstrdefs.h
+index 848e8ee..8846d31 100644
+--- a/pluginterfaces/base/fstrdefs.h
++++ b/pluginterfaces/base/fstrdefs.h
+@@ -22,6 +22,16 @@
+ /** string methods defines unicode / ASCII */
+ //----------------------------------------------------------------------------
+
++// We can use most of the VST3 SDK's Windows UTF-16 functionality by just
++// creating aliases for equivalent Linux functions
++#if __WINE__
++#define wcsicmp wcscasecmp
++#define wcsnicmp wcsncasecmp
++#define _vsnwprintf vswprintf
++#define stricmp strcasecmp
++#define strnicmp strncasecmp
++#endif
++
+ // 16 bit string operations
+ #if SMTG_CPP11 // if c++11 unicode string literals
+ #define SMTG_CPP11_CAT_PRIVATE_DONT_USE(a,b) a ## b
+diff --git a/pluginterfaces/base/ftypes.h b/pluginterfaces/base/ftypes.h
+index 133dbba..33ecae3 100644
+--- a/pluginterfaces/base/ftypes.h
++++ b/pluginterfaces/base/ftypes.h
+@@ -154,7 +154,7 @@ namespace Steinberg
+ // always inline macros (only when RELEASE is 1)
+ //----------------------------------------------------------------------------
+ #if RELEASE
+- #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__MINGW32__)
++ #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__WINE__)
+ #define SMTG_ALWAYS_INLINE __inline__ __attribute__((__always_inline__))
+ #define SMTG_NEVER_INLINE __attribute__((noinline))
+ #elif SMTG_OS_WINDOWS
+diff --git a/pluginterfaces/base/ustring.cpp b/pluginterfaces/base/ustring.cpp
+index 24a412f..8e631c9 100644
+--- a/pluginterfaces/base/ustring.cpp
++++ b/pluginterfaces/base/ustring.cpp
+@@ -38,6 +38,10 @@
+
+ #endif
+
++#ifdef __WINE__
++#include <wchar.h>
++#endif
++
+ //------------------------------------------------------------------------
+ namespace Steinberg {
+
+@@ -173,7 +177,7 @@ bool UString::scanFloat (double& value) const
+ bool UString::printFloat (double value, int32 precision)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%.*lf", precision, value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%.*lf", precision, value) != -1;
+ #elif SMTG_OS_MACOS
+ bool result = false;
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%.*lf"), precision, value);
+@@ -238,7 +242,7 @@ bool UString::scanInt (int64& value) const
+ bool UString::printInt (int64 value)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%I64d", value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%I64d", value) != -1;
+
+ #elif SMTG_OS_MACOS
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%lld"), value);
+Submodule public.sdk contains modified content
+diff --git a/public.sdk/source/common/systemclipboard_win32.cpp b/public.sdk/source/common/systemclipboard_win32.cpp
+index c5cb2b8..2ee3d65 100644
+--- a/public.sdk/source/common/systemclipboard_win32.cpp
++++ b/public.sdk/source/common/systemclipboard_win32.cpp
+@@ -111,7 +111,7 @@ bool copyTextToClipboard (const std::string& text)
+ {
+ if (auto* data = static_cast<WCHAR*> (GlobalLock (memory)))
+ {
+-#if defined(__MINGW32__)
++#if defined(__WINE__)
+ memcpy (data, wideStr.data (), byteSize);
+ #else
+ memcpy_s (data, byteSize, wideStr.data (), byteSize);
+diff --git a/public.sdk/source/vst/hosting/module_win32.cpp b/public.sdk/source/vst/hosting/module_win32.cpp
+index 2ba9319..ab6d72a 100644
+--- a/public.sdk/source/vst/hosting/module_win32.cpp
++++ b/public.sdk/source/vst/hosting/module_win32.cpp
+@@ -44,35 +44,10 @@
+ #include <algorithm>
+ #include <iostream>
+
+-#if SMTG_CPP17
+-
+-#if __has_include(<filesystem>)
+-#define USE_FILESYSTEM 1
+-#elif __has_include(<experimental/filesystem>)
+-#define USE_FILESYSTEM 0
+-#endif
+-
+-#else // !SMTG_CPP17
+-
+-#define USE_FILESYSTEM 0
+-
+-#endif // SMTG_CPP17
+-
+-#if USE_FILESYSTEM == 1
+-
+-#include <filesystem>
+-namespace filesystem = std::filesystem;
+-
+-#else // USE_FILESYSTEM == 0
+-
+-// The <experimental/filesystem> header is deprecated. It is superseded by the C++17 <filesystem>
+-// header. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to silence the
+-// warning, otherwise the build will fail in VS2019 16.3.0
+-#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+-#include <experimental/filesystem>
+-namespace filesystem = std::experimental::filesystem;
+-
+-#endif // USE_FILESYSTEM
++// `std::filesystem` doesn't work correctly with wineg++, resulting in weird
++// memory errors. This library is a drop-in replacement.
++#include <ghc/filesystem.hpp>
++namespace filesystem = ghc::filesystem;
+
+ #pragma comment(lib, "Shell32")
+
+@@ -320,7 +295,7 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
+ #elif USE_OLE
+ Ole::instance ();
+
+- IShellLink* shellLink = nullptr;
++ IShellLinkW* shellLink = nullptr;
+ if (!SUCCEEDED (CoCreateInstance (CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, reinterpret_cast<LPVOID*> (&shellLink))))
+ return {};
+@@ -405,13 +380,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (p, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (cp, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (cp.generic_u8string ());
++ pathList.push_back (cp.generic_string ());
+ }
+ else if (recursive)
+ {
+@@ -431,18 +406,18 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (*resolvedLink, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (resolvedLink->generic_u8string ());
++ pathList.push_back (resolvedLink->generic_string ());
+ }
+ else if (filesystem::is_directory (*resolvedLink))
+ {
+- const auto& str = resolvedLink->generic_u8string ();
+- if (cp.generic_u8string ().compare (0, str.size (), str.data (),
++ const auto& str = resolvedLink->generic_string ();
++ if (cp.generic_string ().compare (0, str.size (), str.data (),
+ str.size ()) != 0)
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
diff --git a/gnu/packages/patches/yabridge-5.0.4-dependencies.patch b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
new file mode 100644
index 0000000000..77db050e91
--- /dev/null
+++ b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
@@ -0,0 +1,36 @@
+Meson fails to detect bitsery, function2 and gulrak-filesystem.
+https://github.com/robbert-vdh/yabridge/issues/18
+
+This patch removes these dependencies in "meson.build".
+
+
+diff --git a/meson.build b/meson.build
+index d8d9135b..b35ebfcd 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.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] Patchset review
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
` (8 preceding siblings ...)
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
@ 2024-11-25 16:32 ` Gabriel Wicki
2024-11-28 17:15 ` [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl Sughosha via Guix-patches via
` (11 more replies)
9 siblings, 12 replies; 40+ messages in thread
From: Gabriel Wicki @ 2024-11-25 16:32 UTC (permalink / raw)
To: 66870; +Cc: ngraves, Sughosha
There hasn't been any activity in quite some time so I use my
(perceived) responsability of being the only member of the audio team to
bump this issue/patch-request.
I guess this all (still) looks fine. Giving it a quick and dirty (I
tried mumi for the first time) attempt to build and test the products I
failed. Maybe re-basing the patch-series and re-submitting a
**complete** series would streamline merging? I will try to figure out
how I can help with that - given my team-membership and the lack of
merging-power (:
^ permalink raw reply [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 01/11] gnu: Add bitsery Sughosha via Guix-patches via
` (10 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Gabriel Wicki
This patch series adds yabridge and yabridgectl.
Sughosha (11):
gnu: Add bitsery.
gnu: Add function2.
gnu: Add clap.
gnu: Add clap-1.1.
gnu: Add yabridge.
gnu: rust-rustyline-9: Update to 9.1.2.
gnu: Add rust-promptly-0.3.
gnu: Add rust-reflink-0.1.
gnu: Add rust-ryu-0.2.
gnu: Add rust-serde-jsonrc-0.1.
gnu: Add yabridgectl.
gnu/local.mk | 3 +
gnu/packages/audio.scm | 180 +++++++++++++++++
gnu/packages/cpp.scm | 62 ++++++
gnu/packages/crates-io.scm | 94 ++++++++-
...k-0.1-fix-64bit-toolchain-assumption.patch | 24 +++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
7 files changed, 587 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
base-commit: 369d2698b0bfc3726f8e6d232d43d0dda832225f
--
2.46.0
^ permalink raw reply [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 01/11] gnu: Add bitsery.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
2024-11-28 17:15 ` [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 02/11] gnu: Add function2 Sughosha via Guix-patches via
` (9 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870
* gnu/packages/cpp.scm (bitsery): New variable.
Change-Id: I9118c5341ef473fbc8394fbad0f533f9e8c8e490
---
gnu/packages/cpp.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index eacc6e46ab..48fb323cd5 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2582,6 +2582,31 @@ (define-public gulrak-filesystem
(home-page "https://github.com/gulrak/filesystem")
(license license:expat)))
+(define-public bitsery
+ (package
+ (name "bitsery")
+ (version "5.2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fraillt/bitsery")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0s628p6qayajan4v8arsmbvzsml8zhc56k01zhmnlakbl7v0vwip"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:cmake cmake ;needs cmake minimum version 3.25
+ #:configure-flags #~(list "-DBITSERY_BUILD_TESTS=ON")))
+ (native-inputs (list googletest))
+ (synopsis "Header only C++ binary serialization library")
+ (description "This package provides header only C++ binary serialization
+library. It is designed around the networking requirements for real-time data
+delivery, especially for games.")
+ (home-page "https://github.com/fraillt/bitsery")
+ (license license:expat)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 02/11] gnu: Add function2.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
2024-11-28 17:15 ` [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 01/11] gnu: Add bitsery Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 03/11] gnu: Add clap Sughosha via Guix-patches via
` (8 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870
* gnu/packages/cpp.scm (function2): New variable.
Change-Id: Ida408b7746b3cb8828285b05fcc0abee4b1863ba
---
gnu/packages/cpp.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 48fb323cd5..9f56779a40 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2607,6 +2607,43 @@ (define-public bitsery
(home-page "https://github.com/fraillt/bitsery")
(license license:expat)))
+(define-public function2
+ (package
+ (name "function2")
+ (version "4.2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Naios/function2")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0l4kn81lfi687mv2d2mkrrqgjp9v186jlfshrgcr5717lwqw39xg"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Unbundle googletest.
+ '(begin
+ (delete-file-recursively "test")
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(test\\)") ""))))))
+ (build-system cmake-build-system)
+ ;; The test size_match_layout fails on i586/i686. For more info:
+ ;; https://github.com/Naios/function2/issues/57
+ (arguments
+ (list #:tests? #f))
+ (synopsis "Improved implementations of std::function")
+ (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+ (home-page "https://naios.github.io/function2/")
+ (license license:boost1.0)))
+
(define-public cpp-mustache
(package
(name "cpp-mustache")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 03/11] gnu: Add clap.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (2 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 02/11] gnu: Add function2 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 04/11] gnu: Add clap-1.1 Sughosha via Guix-patches via
` (7 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Gabriel Wicki
* gnu/packages/audio.scm (clap): New variable.
Change-Id: Ia0f634b363f36a3f4c1dbb3a2a793f17b5a56c43
---
gnu/packages/audio.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index f842d77031..2e6e36a608 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2871,6 +2871,28 @@ (define-public jalv
plugin function as a JACK application.")
(license license:isc)))
+(define-public clap
+ (package
+ (name "clap")
+ (version "1.2.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1azyxb5nby9bd3xd2sfib18m8a0lhlmkbw9y3brfqxvbs012yxsv"))))
+ (build-system cmake-build-system)
+ (synopsis "Audio Plugin API")
+ (description
+ "CLAP stands for CLever Audio Plugin. It is an audio plugin ABI which
+defines a standard for Digital Audio Workstations and audio plugins to work
+together.")
+ (home-page "https://cleveraudio.org/")
+ (license license:expat)))
+
(define-public ladspa
(package
(name "ladspa")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 04/11] gnu: Add clap-1.1.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (3 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 03/11] gnu: Add clap Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 05/11] gnu: Add yabridge Sughosha via Guix-patches via
` (6 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Gabriel Wicki
* gnu/packages/audio.scm (clap-1.1): New variable.
Change-Id: I17bcba1818a1b3ffa4318e4a3a7afe1242388cd4
---
gnu/packages/audio.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 2e6e36a608..98245dd05e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2893,6 +2893,19 @@ (define-public clap
(home-page "https://cleveraudio.org/")
(license license:expat)))
+(define-public clap-1.1
+ (package/inherit clap
+ (version "1.1.10")
+ (source (origin
+ (inherit (package-source clap))
+ (uri (git-reference
+ (url "https://github.com/free-audio/clap")
+ (commit version)))
+ (file-name (git-file-name (package-name clap) version))
+ (sha256
+ (base32
+ "0skn3cvh7zs173v3i6ywdmddqzrhxvivwdisvmqc6hvq594f8z80"))))))
+
(define-public ladspa
(package
(name "ladspa")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 05/11] gnu: Add yabridge.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (4 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 04/11] gnu: Add clap-1.1 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 06/11] gnu: rust-rustyline-9: Update to 9.1.2 Sughosha via Guix-patches via
` (5 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Gabriel Wicki
* gnu/packages/audio.scm (yabridge): New variable.
* gnu/packages/patches/yabridge-5.0.4-dependencies.patch: New file.
* gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch: New file.
* gnu/local.mk: Register the patch files.
Change-Id: Ib514f80e9e060326ba9a34b2e1f3d40245fba1c7
---
gnu/local.mk | 2 +
gnu/packages/audio.scm | 82 ++++++++
...3sdk-3.7.7-allow-winelib-compilation.patch | 191 ++++++++++++++++++
.../patches/yabridge-5.0.4-dependencies.patch | 36 ++++
4 files changed, 311 insertions(+)
create mode 100644 gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
create mode 100644 gnu/packages/patches/yabridge-5.0.4-dependencies.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c89fd88282..bc93477fa3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2309,6 +2309,7 @@ dist_patch_DATA = \
%D%/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch \
%D%/packages/patches/virt-manager-fix-gtk-cursor-theme-backtace.patch \
%D%/packages/patches/vsearch-unbundle-cityhash.patch \
+ %D%/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
@@ -2362,6 +2363,7 @@ dist_patch_DATA = \
%D%/packages/patches/xterm-370-explicit-xcursor.patch \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
+ %D%/packages/patches/yabridge-5.0.4-dependencies.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-use-baseline-cpu-by-default.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 98245dd05e..444c0d0659 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -78,6 +78,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cdrom)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
@@ -147,6 +148,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)
@@ -6769,3 +6771,83 @@ (define-public easyeffects
@item Stereo tools
@end itemize")
(license license:gpl3+)))
+
+(define-public yabridge
+ (package
+ (name "yabridge")
+ (version "5.1.1")
+ (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
+ "0r7q72jmd44wynxphwhgm17wkfgm6zfdrpfnhsj8b53406ykgq71"))
+ (patches
+ (search-patches "yabridge-5.0.4-dependencies.patch"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-Dsystem-asio=true"
+ (string-append "--cross-file=" #$source
+ "/cross-wine.conf"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'add-vst3-subproject
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink (assoc-ref inputs "vst3sdk") "subprojects/vst3")))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/chainloader/utils.cpp"
+ (("\"/usr/local/lib64\",")
+ (string-append "\"/usr/local/lib64\",\n\""
+ #$output "/lib\",")))))
+ (replace 'install
+ (lambda _
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/bin")))
+ (find-files "." "-host\\.exe(|\\.so)$"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append #$output "/lib")))
+ (find-files "." "libyabridge")))))))
+ (native-inputs
+ (list cmake-minimal gulrak-filesystem pkg-config))
+ (inputs
+ `(("asio" ,asio)
+ ("bitsery" ,bitsery)
+ ("clap" ,clap-1.1)
+ ("dbus" ,dbus)
+ ("function2" ,function2)
+ ("libxcb" ,libxcb)
+ ("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"))))
+ ("wine64" ,wine64)))
+ (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 Windows VST2, VST3, and CLAP plugins in 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+)))
diff --git a/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
new file mode 100644
index 0000000000..c35a2c3795
--- /dev/null
+++ b/gnu/packages/patches/vst3sdk-3.7.7-allow-winelib-compilation.patch
@@ -0,0 +1,191 @@
+This patch is taken from yabridge project:
+https://github.com/robbert-vdh/yabridge.
+
+Submodule base contains modified content
+diff --git a/base/source/fdebug.cpp b/base/source/fdebug.cpp
+index b1d1dcc..9093022 100644
+--- a/base/source/fdebug.cpp
++++ b/base/source/fdebug.cpp
+@@ -117,8 +117,6 @@ bool AmIBeingDebugged ()
+ #if _MSC_VER
+ #include <intrin.h>
+ #endif
+-#define vsnprintf _vsnprintf
+-#define snprintf _snprintf
+
+ #elif SMTG_OS_MACOS
+ #include <errno.h>
+Submodule pluginterfaces contains modified content
+diff --git a/pluginterfaces/base/fstrdefs.h b/pluginterfaces/base/fstrdefs.h
+index 848e8ee..8846d31 100644
+--- a/pluginterfaces/base/fstrdefs.h
++++ b/pluginterfaces/base/fstrdefs.h
+@@ -22,6 +22,16 @@
+ /** string methods defines unicode / ASCII */
+ //----------------------------------------------------------------------------
+
++// We can use most of the VST3 SDK's Windows UTF-16 functionality by just
++// creating aliases for equivalent Linux functions
++#if __WINE__
++#define wcsicmp wcscasecmp
++#define wcsnicmp wcsncasecmp
++#define _vsnwprintf vswprintf
++#define stricmp strcasecmp
++#define strnicmp strncasecmp
++#endif
++
+ // 16 bit string operations
+ #if SMTG_CPP11 // if c++11 unicode string literals
+ #define SMTG_CPP11_CAT_PRIVATE_DONT_USE(a,b) a ## b
+diff --git a/pluginterfaces/base/ftypes.h b/pluginterfaces/base/ftypes.h
+index 133dbba..33ecae3 100644
+--- a/pluginterfaces/base/ftypes.h
++++ b/pluginterfaces/base/ftypes.h
+@@ -154,7 +154,7 @@ namespace Steinberg
+ // always inline macros (only when RELEASE is 1)
+ //----------------------------------------------------------------------------
+ #if RELEASE
+- #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__MINGW32__)
++ #if SMTG_OS_MACOS || SMTG_OS_LINUX || defined(__WINE__)
+ #define SMTG_ALWAYS_INLINE __inline__ __attribute__((__always_inline__))
+ #define SMTG_NEVER_INLINE __attribute__((noinline))
+ #elif SMTG_OS_WINDOWS
+diff --git a/pluginterfaces/base/ustring.cpp b/pluginterfaces/base/ustring.cpp
+index 24a412f..8e631c9 100644
+--- a/pluginterfaces/base/ustring.cpp
++++ b/pluginterfaces/base/ustring.cpp
+@@ -38,6 +38,10 @@
+
+ #endif
+
++#ifdef __WINE__
++#include <wchar.h>
++#endif
++
+ //------------------------------------------------------------------------
+ namespace Steinberg {
+
+@@ -173,7 +177,7 @@ bool UString::scanFloat (double& value) const
+ bool UString::printFloat (double value, int32 precision)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%.*lf", precision, value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%.*lf", precision, value) != -1;
+ #elif SMTG_OS_MACOS
+ bool result = false;
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%.*lf"), precision, value);
+@@ -238,7 +242,7 @@ bool UString::scanInt (int64& value) const
+ bool UString::printInt (int64 value)
+ {
+ #if SMTG_OS_WINDOWS
+- return swprintf ((wchar_t*)thisBuffer, L"%I64d", value) != -1;
++ return swprintf ((wchar_t*)thisBuffer, thisSize, L"%I64d", value) != -1;
+
+ #elif SMTG_OS_MACOS
+ CFStringRef cfStr = CFStringCreateWithFormat (0, 0, CFSTR("%lld"), value);
+Submodule public.sdk contains modified content
+diff --git a/public.sdk/source/common/systemclipboard_win32.cpp b/public.sdk/source/common/systemclipboard_win32.cpp
+index c5cb2b8..2ee3d65 100644
+--- a/public.sdk/source/common/systemclipboard_win32.cpp
++++ b/public.sdk/source/common/systemclipboard_win32.cpp
+@@ -111,7 +111,7 @@ bool copyTextToClipboard (const std::string& text)
+ {
+ if (auto* data = static_cast<WCHAR*> (GlobalLock (memory)))
+ {
+-#if defined(__MINGW32__)
++#if defined(__WINE__)
+ memcpy (data, wideStr.data (), byteSize);
+ #else
+ memcpy_s (data, byteSize, wideStr.data (), byteSize);
+diff --git a/public.sdk/source/vst/hosting/module_win32.cpp b/public.sdk/source/vst/hosting/module_win32.cpp
+index 2ba9319..ab6d72a 100644
+--- a/public.sdk/source/vst/hosting/module_win32.cpp
++++ b/public.sdk/source/vst/hosting/module_win32.cpp
+@@ -44,35 +44,10 @@
+ #include <algorithm>
+ #include <iostream>
+
+-#if SMTG_CPP17
+-
+-#if __has_include(<filesystem>)
+-#define USE_FILESYSTEM 1
+-#elif __has_include(<experimental/filesystem>)
+-#define USE_FILESYSTEM 0
+-#endif
+-
+-#else // !SMTG_CPP17
+-
+-#define USE_FILESYSTEM 0
+-
+-#endif // SMTG_CPP17
+-
+-#if USE_FILESYSTEM == 1
+-
+-#include <filesystem>
+-namespace filesystem = std::filesystem;
+-
+-#else // USE_FILESYSTEM == 0
+-
+-// The <experimental/filesystem> header is deprecated. It is superseded by the C++17 <filesystem>
+-// header. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to silence the
+-// warning, otherwise the build will fail in VS2019 16.3.0
+-#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+-#include <experimental/filesystem>
+-namespace filesystem = std::experimental::filesystem;
+-
+-#endif // USE_FILESYSTEM
++// `std::filesystem` doesn't work correctly with wineg++, resulting in weird
++// memory errors. This library is a drop-in replacement.
++#include <ghc/filesystem.hpp>
++namespace filesystem = ghc::filesystem;
+
+ #pragma comment(lib, "Shell32")
+
+@@ -320,7 +295,7 @@ VST3::Optional<filesystem::path> resolveShellLink (const filesystem::path& p)
+ #elif USE_OLE
+ Ole::instance ();
+
+- IShellLink* shellLink = nullptr;
++ IShellLinkW* shellLink = nullptr;
+ if (!SUCCEEDED (CoCreateInstance (CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER,
+ IID_IShellLink, reinterpret_cast<LPVOID*> (&shellLink))))
+ return {};
+@@ -405,13 +380,13 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (p, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (cp, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (cp.generic_u8string ());
++ pathList.push_back (cp.generic_string ());
+ }
+ else if (recursive)
+ {
+@@ -431,18 +406,18 @@ void findFilesWithExt (const filesystem::path& path, const std::string& ext,
+ filesystem::path result;
+ if (checkVST3Package (*resolvedLink, &result))
+ {
+- pathList.push_back (result.generic_u8string ());
++ pathList.push_back (result.generic_string ());
+ continue;
+ }
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
+ else
+- pathList.push_back (resolvedLink->generic_u8string ());
++ pathList.push_back (resolvedLink->generic_string ());
+ }
+ else if (filesystem::is_directory (*resolvedLink))
+ {
+- const auto& str = resolvedLink->generic_u8string ();
+- if (cp.generic_u8string ().compare (0, str.size (), str.data (),
++ const auto& str = resolvedLink->generic_string ();
++ if (cp.generic_string ().compare (0, str.size (), str.data (),
+ str.size ()) != 0)
+ findFilesWithExt (*resolvedLink, ext, pathList, recursive);
+ }
\ No newline at end of file
diff --git a/gnu/packages/patches/yabridge-5.0.4-dependencies.patch b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
new file mode 100644
index 0000000000..ca06da050d
--- /dev/null
+++ b/gnu/packages/patches/yabridge-5.0.4-dependencies.patch
@@ -0,0 +1,36 @@
+Meson fails to detect bitsery, function2 and gulrak-filesystem.
+https://github.com/robbert-vdh/yabridge/issues/18
+
+This patch removes these dependencies in "meson.build".
+
+
+diff --git a/meson.build b/meson.build
+index d8d9135b..b35ebfcd 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)
\ No newline at end of file
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 06/11] gnu: rust-rustyline-9: Update to 9.1.2.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (5 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 05/11] gnu: Add yabridge Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 07/11] gnu: Add rust-promptly-0.3 Sughosha via Guix-patches via
` (4 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Efraim Flashner
* gnu/packages/crates-io.scm (rust-rustyline-9): Update to 9.1.2.
Change-Id: I326c5bd19cd2bed27929a7e538496bac1116672b
---
gnu/packages/crates-io.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 16f7a0a389..b68aae9b45 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -66711,14 +66711,14 @@ (define-public rust-rustyline-9
(package
(inherit rust-rustyline-12)
(name "rust-rustyline")
- (version "9.0.0")
+ (version "9.1.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "rustyline" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
- (base32 "1mj0cgdyw6gaadsg7yxsnb9n4bdl91qga9kiwyd4hqqsi31qf13r"))))
+ (base32 "0f8069ljhiv9nf97y975wvv9yvx82w3lm9g50d5n298fkiw2cy6v"))))
(arguments
`(#:skip-build? #t
#:cargo-inputs
@@ -66730,7 +66730,7 @@ (define-public rust-rustyline-9
("rust-libc" ,rust-libc-0.2)
("rust-log" ,rust-log-0.4)
("rust-memchr" ,rust-memchr-2)
- ("rust-nix" ,rust-nix-0.22)
+ ("rust-nix" ,rust-nix-0.23)
("rust-radix-trie" ,rust-radix-trie-0.2)
("rust-regex" ,rust-regex-1)
("rust-scopeguard" ,rust-scopeguard-1)
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 07/11] gnu: Add rust-promptly-0.3.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (6 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 06/11] gnu: rust-rustyline-9: Update to 9.1.2 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 08/11] gnu: Add rust-reflink-0.1 Sughosha via Guix-patches via
` (3 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Efraim Flashner
* gnu/packages/crates-io.scm (rust-promptly-0.3): New variable.
Change-Id: I96fb7eceab48fbcbd7c43a25affea38dfb9b1a8e
---
gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b68aae9b45..ce339eb3d6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -57272,6 +57272,27 @@ (define-public rust-project-origins-1
(description "Resolve project origins and kinds from a path.")
(license license:asl2.0)))
+(define-public rust-promptly-0.3
+ (package
+ (name "rust-promptly")
+ (version "0.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "promptly" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1fl0548ww11gpja8hlsfc8jgxk00rdd48n1g6icgwadhlp2wdjws"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-rustyline" ,rust-rustyline-9)
+ ("rust-url" ,rust-url-2))))
+ (home-page "https://github.com/anowell/promptly")
+ (synopsis "Opinionated CLI prompting helper")
+ (description "This package provides opinionated CLI prompting helper.")
+ (license license:expat)))
+
(define-public rust-propfuzz-0.0.1
(package
(name "rust-propfuzz")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 08/11] gnu: Add rust-reflink-0.1.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (7 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 07/11] gnu: Add rust-promptly-0.3 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 09/11] gnu: Add rust-ryu-0.2 Sughosha via Guix-patches via
` (2 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Efraim Flashner
* gnu/packages/crates-io.scm (rust-reflink-0.1): New variable.
* gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch:
New file.
* gnu/local.mk: Register the patch file.
Change-Id: I193db0f4e51a133b8791ca9461032655da20137f
---
gnu/local.mk | 1 +
gnu/packages/crates-io.scm | 25 +++++++++++++++++++
...k-0.1-fix-64bit-toolchain-assumption.patch | 24 ++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index bc93477fa3..bfe80f3ebe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2133,6 +2133,7 @@ dist_patch_DATA = \
%D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-1.70-fix-rustix-build.patch \
%D%/packages/patches/rust-cargo-edit-remove-ureq.patch \
+ %D%/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch \
%D%/packages/patches/rust-ring-0.17-ring-core.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
%D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ce339eb3d6..bf41835bf7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -62339,6 +62339,31 @@ (define-public rust-reference-counted-singleton-0.1
can be recreated as needed.")
(license license:expat)))
+(define-public rust-reflink-0.1
+ (package
+ (name "rust-reflink")
+ (version "0.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "reflink" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1glcyqvryv2zj6kjbfji0cldrkincqx3ds3wjwl4qnsnig15wn5w"))
+ (patches
+ (search-patches
+ "rust-reflink-0.1-fix-64bit-toolchain-assumption.patch"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-libc" ,rust-libc-0.2)
+ ("rust-winapi" ,rust-winapi-0.3))))
+ (home-page "https://github.com/nicokoch/reflink")
+ (synopsis "Copy-on-write mechanism on supported file systems")
+ (description "This package provides copy-on-write mechanism on supported
+file systems.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-refpool-0.4
(package
(name "rust-refpool")
diff --git a/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch b/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
new file mode 100644
index 0000000000..1fc877815f
--- /dev/null
+++ b/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
@@ -0,0 +1,24 @@
+This patch fixes assuming a 64-bit toolchain.
+https://github.com/nicokoch/reflink/pull/5
+
+
+--- reflink-0.1.3/src/sys/unix.rs 2019-04-02 16:13:06.000000000 +0200
++++ "reflink-0.1.3 (Kopie)/src/sys/unix.rs" 2023-06-29 09:47:26.867681403 +0200
+@@ -7,7 +7,7 @@
+ use std::os::unix::io::AsRawFd;
+
+ // TODO is this equal on all archs? Just tested on x86_64 and x86.
+- const IOCTL_FICLONE: u64 = 0x40049409;
++ macro_rules! IOCTL_FICLONE { () => (0x40049409) };
+
+ let src = fs::File::open(&from)?;
+
+@@ -18,7 +18,7 @@
+ .open(&to)?;
+ let ret = unsafe {
+ // http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html
+- libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE, src.as_raw_fd())
++ libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE!(), src.as_raw_fd())
+ };
+
+ if ret == -1 {
\ No newline at end of file
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 09/11] gnu: Add rust-ryu-0.2.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (8 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 08/11] gnu: Add rust-reflink-0.1 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 10/11] gnu: Add rust-serde-jsonrc-0.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 11/11] gnu: Add yabridgectl Sughosha via Guix-patches via
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Efraim Flashner
* gnu/packages/crates-io.scm (rust-ryu-0.2): New variable.
Change-Id: I76208b6f4563be43628a87c8a0bc5e3f1bb8f826
---
gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index bf41835bf7..dca087e09d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -67147,6 +67147,19 @@ (define-public rust-ryu-1
quickly convert floating point numbers to decimal strings.")
(license (list license:asl2.0 license:boost1.0))))
+(define-public rust-ryu-0.2
+ (package
+ (inherit rust-ryu-1)
+ (name "rust-ryu")
+ (version "0.2.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "ryu" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "13wsi4408qxi9w44pdf5zfds4ym7np2070wkhg1g4j4dvi4rasmr"))))))
+
(define-public rust-s3handler-0.7
(package
(name "rust-s3handler")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 10/11] gnu: Add rust-serde-jsonrc-0.1.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (9 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 09/11] gnu: Add rust-ryu-0.2 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 11/11] gnu: Add yabridgectl Sughosha via Guix-patches via
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Efraim Flashner
* gnu/packages/crates-io.scm (rust-serde-jsonrc-0.1): New variable.
Change-Id: If18e89af220b7b93874c4fc04a18530f76a9c4ea
---
gnu/packages/crates-io.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index dca087e09d..a1da138795 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -69625,6 +69625,35 @@ (define-public rust-serde-json-core-0.4
("rust-serde" ,rust-serde-1))
#:cargo-development-inputs (("rust-serde-derive" ,rust-serde-derive-1))))))
+(define-public rust-serde-jsonrc-0.1
+ (package
+ (name "rust-serde-jsonrc")
+ (version "0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "serde_jsonrc" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1a5q0ba7jhgfl63l16plgl7sx1k58l2caxf7z2j5l677rh5yk4dm"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f ;`Deserialize` and `Serialize` are defined multiple times
+ #:cargo-inputs
+ (("rust-indexmap" ,rust-indexmap-1)
+ ("rust-itoa" ,rust-itoa-0.4)
+ ("rust-ryu" ,rust-ryu-0.2)
+ ("rust-serde" ,rust-serde-1))
+ #:cargo-development-inputs
+ (("rust-compiletest-rs" ,rust-compiletest-rs-0.3)
+ ("rust-serde-bytes" ,rust-serde-bytes-0.10)
+ ("rust-serde-derive" ,rust-serde-derive-1))))
+ (home-page "https://github.com/serde-rs/json")
+ (synopsis "JSON serialization file format")
+ (description
+ "This package provides a JSON serialization file format.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-serde-path-to-error-0.1
(package
(name "rust-serde-path-to-error")
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [bug#66870] [PATCH v6 11/11] gnu: Add yabridgectl.
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
` (10 preceding siblings ...)
2024-11-28 17:15 ` [bug#66870] [PATCH v6 10/11] gnu: Add rust-serde-jsonrc-0.1 Sughosha via Guix-patches via
@ 2024-11-28 17:15 ` Sughosha via Guix-patches via
11 siblings, 0 replies; 40+ messages in thread
From: Sughosha via Guix-patches via @ 2024-11-28 17:15 UTC (permalink / raw)
To: Gabriel Wicki; +Cc: Sughosha, 66870, Gabriel Wicki
* gnu/packages/audio.scm (yabridgectl): New variable.
Change-Id: Ide287422cff7d6641a2d732de0e4f4b3ae784f76
---
gnu/packages/audio.scm | 63 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 444c0d0659..517334198d 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -81,6 +81,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages curl)
#:use-module (gnu packages dbm)
#:use-module (gnu packages documentation)
@@ -154,6 +155,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
@@ -6851,3 +6853,64 @@ (define-public yabridge
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 yabridgectl
+ (package/inherit yabridge
+ (name "yabridgectl")
+ (source (origin
+ (inherit (package-source yabridge))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Use reflink from the system istead of git.
+ `(substitute* "tools/yabridgectl/Cargo.toml"
+ (("reflink = .*$")
+ (string-append "reflink = \""
+ ,(package-version rust-reflink-0.1)
+ "\"\n"))))))
+ (build-system cargo-build-system)
+ (arguments
+ (list #:cargo-inputs
+ `(("rust-anyhow" ,rust-anyhow-1)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-colored" ,rust-colored-2)
+ ("rust-is-executable" ,rust-is-executable-1)
+ ("rust-goblin" ,rust-goblin-0.6)
+ ("rust-libloading" ,rust-libloading-0.7)
+ ("rust-promptly" ,rust-promptly-0.3)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-reflink" ,rust-reflink-0.1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-serde-jsonrc" ,rust-serde-jsonrc-0.1)
+ ("rust-textwrap" ,rust-textwrap-0.16)
+ ("rust-toml" ,rust-toml-0.5)
+ ("rust-walkdir" ,rust-walkdir-2)
+ ("rust-which" ,rust-which-4)
+ ("rust-xdg" ,rust-xdg-2))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "tools/yabridgectl")))
+ (add-after 'change-directory 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "src"
+ (substitute* '("config.rs" "main.rs")
+ (("/usr") (assoc-ref inputs "yabridge"))))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs #:allow-other-keys)
+ (wrap-program (string-append #$output "/bin/yabridgectl")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append (assoc-ref inputs "yabridge") "/lib")
+ ,(string-append (assoc-ref inputs "dbus") "/lib")))
+ `("PATH" ":" prefix
+ (,(string-append (assoc-ref inputs "yabridge")
+ "/bin")))))))))
+ (native-inputs '())
+ (inputs
+ (list bash-minimal dbus))
+ (propagated-inputs
+ (list yabridge))
+ (synopsis "Utility to set up and update yabridge")
+ (description
+ "@command{yabridgectl} is a tool to setup and update @code{yabridge}.")))
--
2.46.0
^ permalink raw reply related [flat|nested] 40+ messages in thread
end of thread, other threads:[~2024-11-28 17:21 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 9:07 [bug#66870] [PATCH 0/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 1/6] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 2/6] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 3/6] gnu: Add function2 Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 4/6] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 5/6] gnu: Add clap Sughosha via Guix-patches via
2023-11-01 9:09 ` [bug#66870] [PATCH 6/6] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 0/7] " Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 2/7] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 3/7] gnu: Add function2 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 5/7] gnu: Add clap Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 9:02 ` [bug#66870] [PATCH v2 7/7] gnu: Add yabridge Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 1/7] gnu: asio: Update to 1.28.0 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 2/7] gnu: Add bitsery Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 3/7] gnu: Add function2 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 4/7] gnu: Add tomlplusplus Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 5/7] gnu: Add clap Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 6/7] gnu: Add clap-1.1.7 Sughosha via Guix-patches via
2023-11-30 10:32 ` [bug#66870] [PATCH v3 7/7] gnu: Add yabridge Sughosha via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 1/5] gnu: Add bitsery Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 2/5] gnu: Add function2 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 3/5] gnu: Add clap Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 4/5] gnu: Add clap-1.1.7 Nicolas Graves via Guix-patches via
2024-10-28 9:46 ` [bug#66870] [PATCH v4 5/5] gnu: Add yabridge Nicolas Graves via Guix-patches via
2024-11-25 16:32 ` [bug#66870] Patchset review Gabriel Wicki
2024-11-28 17:15 ` [bug#66870] [PATCH v6 00/11] gnu: Add yabridge and yabridgectl Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 01/11] gnu: Add bitsery Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 02/11] gnu: Add function2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 03/11] gnu: Add clap Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 04/11] gnu: Add clap-1.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 05/11] gnu: Add yabridge Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 06/11] gnu: rust-rustyline-9: Update to 9.1.2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 07/11] gnu: Add rust-promptly-0.3 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 08/11] gnu: Add rust-reflink-0.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 09/11] gnu: Add rust-ryu-0.2 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 10/11] gnu: Add rust-serde-jsonrc-0.1 Sughosha via Guix-patches via
2024-11-28 17:15 ` [bug#66870] [PATCH v6 11/11] gnu: Add yabridgectl Sughosha via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).