[PATCH 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.

  • Open
  • quality assurance status badge
Details
2 participants
  • Sughosha
  • Sughosha
Owner
unassigned
Submitted by
Sughosha
Severity
normal
Merged with
S
S
Sughosha wrote on 4 May 2023 00:58
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
xFwn-qV2bLvixSdTGGbORhvuP891xykYhD_AoAITAeE8IZ30TMVhpOthI979E6g9Lz58sV-jrnzgWICclGC2AXR0ZWvWbwGzvI3SxrKSREU=@proton.me
These are the patches to switch to Zyn-Fusion interface provided by
"mruby-zest" and using the system provided "rtosc".
S
S
Sughosha wrote on 4 May 2023 01:00
[PATCH 1/5] gnu: Add pugl.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
yam_D4n4lLdVjffGQoRhvsJCQNzWNePJspf8iI1YbvpUrL9zrqXJHzj2t1g4UMUkwTwTUcH0mzuXcwd2e3rp_c1oroSKn2iV2YEORepR1xY=@proton.me
* gnu/packages/gl.scm (pugl): New variable.
---
gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3a63d70c7a..e59d051f2e 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -44,6 +44,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
@@ -922,6 +923,40 @@ (define-public nanovg-for-extempore
and visualizations.")
(license license:zlib))))
+(define-public pugl
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "9b5a0871c1a8771dbe204e60f437653a67abd42a"))
+ (package
+ (name "pugl")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/lv2/pugl")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16gcjz44d27j9ck7frpksy0jqscask2fvln9pb23k6xpq2lky3ar"))
+ (modules '((guix build utils)))
+ ;; Unbundle "sphinxygen".
+ (snippet
+ '(delete-file-recursively "subprojects"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:tests? #f ;tests contain manual tests
+ #:configure-flags
+ #~(list "-Ddocs=disabled"))) ;requires "sphinxygen"
+ (native-inputs (list pkg-config))
+ (inputs (list cairo glu libx11 libxrandr libxcursor libxext mesa))
+ (home-page "http://drobilla.net/software/pugl.html")
+ (synopsis "API for embeddable GUIs")
+ (description
+ "Pugl (PlUgin Graphics Library) is a portability layer for GUIs which is
+suitable for use in plugins and applications.")
+ (license license:bsd-0))))
+
(define-public gl2ps
(package
(name "gl2ps")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 01:01
[PATCH 2/5] gnu: Add nanovg.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
gdYJrz3z_pMNYxrs5tLWWep-1NOw_9UvNX3R8JudPhOtdie5TJFpSaQLGS3JJioQCxxAruojjo31AAVo1BRUMR_iTUhUXxmAzAquJyNyHmU=@proton.me
* gnu/packages/gl.scm (nanovg): New variable.
---
gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index e59d051f2e..b67215b406 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -893,6 +893,52 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public nanovg
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "7544c114e83db7cf67bd1c9e012349b70caacc2f"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0n29rxdp20xnvnpsjcmg3v5n6z7ya5ji4qirp18qcyls5xdxdxkc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target)
+ "../source/src/nanovg.c" "-c" "-fPIC")
+ (invoke #$(cc-for-target)
+ "-shared" "-olibnanovg.so" "nanovg.o")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (include (string-append #$output
+ "/include")))
+ (install-file "libnanovg.so" lib)
+ (with-directory-excursion "../source"
+ (for-each
+ (lambda (file)
+ (install-file file include))
+ (find-files "src" "nanovg.*\\.h$")))))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "2D vector drawing library on top of OpenGL")
+ (description
+ "NanoVG is an antialiased vector graphics rendering library for OpenGL.
+It is aimed for building scalable user interfaces and visualizations.")
+ (license license:zlib))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 01:01
[PATCH 3/5] gnu: Add rtosc.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
C_c9gAFzyKhe_8_8-GectLNWOMV8-D8YV2Ld2rmLZu6NWT0lZ_7WnBW3J7NwF1WRfE_mmDRdTXjH-WKjpFeKCHcln2p1wCBmGEO9MyaxMzo=@proton.me
* gnu/packages/audio.scm (rtosc): New variable.
* gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparision-operator.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 45 +++++++++++++++++++
....3.1-fix-invalid-comparison-operator.patch | 14 ++++++
3 files changed, 60 insertions(+)
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 68a02d10b5..aa50fc0465 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1842,6 +1842,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
+ %D%/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/racket-zuo-bin-sh.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 109133ba8e..236fc84077 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2806,6 +2806,51 @@ (define-public liblo
implementation of the Open Sound Control (@dfn{OSC}) protocol.")
(license license:lgpl2.1+)))
+(define-public rtosc
+ (package
+ (name "rtosc")
+ (version "0.3.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fundamental/rtosc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1djvyq53cjwd0szkvhpk45zcmdgrlirjwr02nqq9hzdmh0n26pk2"))
+ (patches
+ (search-patches
+ "rtosc-0.3.1-fix-invalid-comparison-operator.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DPERF_TEST=ON"
+ "-DRTOSC_BUILD_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-documentation
+ (lambda _
+ (invoke "make" "rtosc-doc")))
+ (add-after 'install 'install-documentation
+ (lambda _
+ (copy-recursively "html"
+ (string-append #$output:doc
+ "/share/doc/rtosc/html")))))))
+ (native-inputs
+ (list doxygen pkg-config ruby))
+ (inputs
+ (list jack-1
+ liblo
+ libx11
+ mesa))
+ (outputs (list "out" "doc"))
+ (home-page "https://fundamental-code.com/wiki/rtosc/")
+ (synopsis "Realtime Safe OSC packet serialization and dispatch")
+ (description
+ "RtOsc is a realtime safe library for handling OSC messages.")
+ (license license:expat)))
+
(define-public rtaudio
(package
(name "rtaudio")
diff --git a/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
new file mode 100644
index 0000000000..925e39e9a1
--- /dev/null
+++ b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
@@ -0,0 +1,14 @@
+This patch fixes the unknown version comparison operator
+
+diff --git a/librtosc-cpp.pc.cmake b/librtosc-cpp.pc.cmake
+index 0d8fda2..edbcb3a 100644
+--- a/librtosc-cpp.pc.cmake
++++ b/librtosc-cpp.pc.cmake
+@@ -9,6 +9,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ Name: rtosc_cpp
+ Description: rtosc_cpp - a realtime safe open sound control serialization and dispatch system for C++
+ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+-Requires: librtosc == @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
++Requires: librtosc = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+ Libs: -L${libdir} -lrtosc -lrtosc-cpp
+ Cflags: -I${includedir}
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 01:02
[PATCH 4/5] gnu: Add mruby-zest.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
c3UHmKur36skF0fC6mQ2JdD12u_SbDIdMufOEA1eMJNAqE0_O5xdaa9T-Oxe6uiTwIlmxSyoNtWThVPT95jNvQGm2pwc2DSFCNsiSm-_3XQ=@proton.me
* gnu/packages/mruby-xyz.scm: New file.
* gnu/packages/local.mk: Register the file.
---
gnu/local.mk | 1 +
gnu/packages/mruby-xyz.scm | 176 +++++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+)
create mode 100644 gnu/packages/mruby-xyz.scm

Toggle diff (196 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index aa50fc0465..6f213b2e7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -436,6 +436,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
+ %D%/packages/mruby-xyz.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/musl.scm \
diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm
new file mode 100644
index 0000000000..08e7268f14
--- /dev/null
+++ b/gnu/packages/mruby-xyz.scm
@@ -0,0 +1,176 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 <sughosha@proton.me>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mruby-xyz)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xorg))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; Cloning recursively for the required mruby gems and also
+ ;; for these packages:
+ ;; "mruby": for building "mruby" with the provided
+ ;; "build_config.rb".
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This packages contains a custom "pugl". Replacing it with the
+ ;; system "pugl" fails to build.
+ ;; Delete bundled "nanovg" and "rtosc".
+ '(with-directory-excursion "deps"
+ (for-each delete-file-recursively
+ (list "libuv" "nanovg" "rtosc"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Do not compile "nanovg" again and use system "nanovg".
+ (substitute* "Makefile"
+ (("cd deps/nanovg") "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#$(AR) rc deps/libnanovg.a")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("cd deps/libuv") "#cd deps/libuv")
+ (("\\./deps/libuv/\\.libs/libuv\\.a")
+ "-luv")
+ (("\\./deps/libuv/\\.libs/libuv-win\\.a")
+ "-luv-win"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a")
+ "-luv")
+ (("cc\\.include_paths.*\\./deps/nanovg/.*$")
+ "#")
+ (("cc\\.include_paths.*\\./deps/libuv/.*$")
+ "#"))
+ (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c"
+ (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h")
+ (search-input-file inputs "/example/stb_image_write.h")))
+ ;; Use system "rtosc" headers.
+ (substitute* "src/mruby-widget-lib/src/gem.c"
+ (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"")
+ "<rtosc/rtosc.h>"))
+ ;; Fix missing fonts.
+ (substitute*
+ "src/mruby-widget-lib/mrblib/script.rb"
+ (("sans = \\[")
+ (string-append
+ "sans = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Regular.ttf")
+ "\", "))
+ (("bold = \\[")
+ (string-append
+ "bold = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Bold.ttf")
+ "\", ")))
+ ;; Fix paths for zyn-fusion files.
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("fopen\\(\\\"schema/")
+ (string-append
+ "fopen(\"" #$output "/share/zyn-fusion/schema/")))
+ (substitute* "test-libversion.c"
+ (("./libzest.so")
+ (string-append #$output "/lib/libzest.so")))
+ (substitute* "src/mruby-widget-lib/src/api.c"
+ ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/")
+ (("\\./qml/")
+ (string-append #$output "/share/zyn-fusion/qml")))))
+ (replace 'install
+ (lambda _
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" (string-append #$output "/bin"))
+ (install-file "libzest.so" (string-append #$output "/lib"))
+ (for-each
+ (lambda (folder)
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append #$output "/share/zyn-fusion/qml")))
+ (find-files folder "\\.qml$")))
+ '("src/mruby-zest/qml" "src/mruby-zest/example"))
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append #$output "/share/zyn-fusion/schema"))
+ (install-file "completions/zyn-fusion"
+ (string-append
+ #$output "/share/bash-completion/completions")))))))
+ (native-inputs
+ (list (package-source nanovg) ;for "stb_image_write.h"
+ pkg-config
+ ruby))
+ (inputs
+ (list font-google-roboto
+ libuv
+ libx11
+ mesa
+ ;; With the latest version of "nanovg" the contents are not
+ ;; displayed properly.
+ (let ((revision "0")
+ (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28"))
+ (package (inherit nanovg)
+ (version (git-version (package-version nanovg) revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))))
+ rtosc))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Zyn-Fusion user interface")
+ (description
+ "This package provides user interface for Zyn-Fusion.")
+ (license
+ (list license:lgpl2.1))))
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 01:02
[PATCH 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
K5ymmkzIsFxl8K1vZ42ydALwt6yYxJjz67ffMZu-uVFHVQEtNRi5vix2mOgxajLy2Qoas4kJooxCIb0-6Fub_35ZyzCLCC7GTqTseeZs64E=@proton.me
From f454e2f8af61e9ab593fbf5cc3fdccf6d390ab7c Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Thu, 4 May 2023 00:49:01 +0200
Subject: [PATCH 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.

* gnu/packages/music.scm (zynaddsubfx)[source]: Add a patches.
[arguments]: Add configure flags and patch-paths phase.
[inputs]: Remove ntk and add rtosc and mruby-zest.
[home-page]: Change home-page.
* gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/music.scm | 28 ++++-
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 ++++++++++++++++++
3 files changed, 130 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch

Toggle diff (190 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6f213b2e7f..8a20f54e9f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2072,6 +2072,7 @@ dist_patch_DATA = \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-system-paths.patch \
+ %D%/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch \
%D%/packages/patches/zsh-egrep-failing-test.patch
MISC_DISTRO_FILES = \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 446580dc52..ec19318b6f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -157,6 +157,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages mpd)
+ #:use-module (gnu packages mruby-xyz)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages pcre)
@@ -3175,10 +3176,18 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))
+ (patches
+ (search-patches
+ "zynaddsubfx-3.0.6-system-rtosc.patch"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest"
+ ,(string-append "-DZYN_DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/zynaddsubfx")
+ "-DZYN_SYSTEM_RTOSC=ON")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3188,10 +3197,19 @@ (define-public zynaddsubfx
(substitute* "src/CMakeLists.txt"
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
- (string-append flag " -msse -msse2 -mfpmath=sse"))))))))
+ (string-append flag " -msse -msse2 -mfpmath=sse")))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "/bin/zyn-fusion")))
+ (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (search-input-file inputs "/lib/libzest.so"))))))))
(inputs
(list liblo
- ntk
+ rtosc
+ mruby-zest
mesa
alsa-lib
jack-1
@@ -3203,7 +3221,7 @@ (define-public zynaddsubfx
(native-inputs
(list pkg-config
ruby))
- (home-page "https://zynaddsubfx.sf.net/")
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
diff --git a/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
new file mode 100644
index 0000000000..edf22c389b
--- /dev/null
+++ b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
@@ -0,0 +1,106 @@
+Adding the option ZYN_SYSTEM_RTOSC to let the use of the system provided RtOsc
+instead of using the bundled one.
+
+--- a/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -10,24 +10,34 @@
+ add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
+ endif()
+
++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
++
+ #Include RTOSC
+-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(STATUS "RTOSC NOT FOUND")
+- message(STATUS "Attempting to checkout submodule")
+- find_package(Git REQUIRED)
+- execute_process(COMMAND git submodule update --init --recursive)
++if(ZYN_SYSTEM_RTOSC)
++ include(FindPkgConfig)
++ pkg_check_modules(RTOSC REQUIRED librtosc)
++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
++ include_directories(${RTOSC_INCLUDE_DIR})
++ message(STATUS "Found system provided librtosc and librtosc-cpp...")
++else()
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ message(STATUS "RTOSC NOT FOUND")
++ message(STATUS "Attempting to checkout submodule")
++ find_package(Git REQUIRED)
++ execute_process(COMMAND git submodule update --init --recursive)
++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
++ "please check file permissions and your network")
++ endif()
++ else()
++ message(STATUS "Found Rtosc Submodule...")
+ endif()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+--- a/src/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -575,13 +575,27 @@
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")
+
+
+When ZYN_SYSTEM_RTOSC is ON, port-checker file is not available and the test
+fails.
+
+--- a/src/Tests/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/Tests/CMakeLists.txt 2023-05-04 00:19:01.635383149 +0200
+@@ -65,7 +65,6 @@
+
+ if(LIBLO_FOUND)
+ cp_script(check-ports.rb)
+- add_test(PortChecker check-ports.rb)
+ endif()
+ add_executable(save-osc SaveOSC.cpp)
+ target_link_libraries(save-osc
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:04
[PATCH v2 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
FSTBbaQOzaWYWU9f-wNmbxp-9FLyhMVIMwVQ0l2P1sfXbfUfBFLseYQwaLEjzgp2HS093RnmkwOxV9F-afDZouigS38mjoVDCNJzt-r-Kuw=@proton.me
These V2 patches contain no changes but improved comments in the
package definitions.
S
S
Sughosha wrote on 4 May 2023 10:05
[PATCH v2 1/5] gnu: Add pugl.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
cqH3Q5w4uNBwReMUHzANQ3jkEGL8QAqMm1LYmvjtqfPriyv5xay0o4w4P86KY5VTXacR-QS45gNgT1yxbqDUC4D16KXt8A3Reg9GztYvKtE=@proton.me
* gnu/packages/gl.scm (pugl): New variable.
---
gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3a63d70c7a..e59d051f2e 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -44,6 +44,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
@@ -922,6 +923,40 @@ (define-public nanovg-for-extempore
and visualizations.")
(license license:zlib))))
+(define-public pugl
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "9b5a0871c1a8771dbe204e60f437653a67abd42a"))
+ (package
+ (name "pugl")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/lv2/pugl")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16gcjz44d27j9ck7frpksy0jqscask2fvln9pb23k6xpq2lky3ar"))
+ (modules '((guix build utils)))
+ ;; Unbundle "sphinxygen".
+ (snippet
+ '(delete-file-recursively "subprojects"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:tests? #f ;tests contain manual tests
+ #:configure-flags
+ #~(list "-Ddocs=disabled"))) ;requires "sphinxygen"
+ (native-inputs (list pkg-config))
+ (inputs (list cairo glu libx11 libxrandr libxcursor libxext mesa))
+ (home-page "http://drobilla.net/software/pugl.html")
+ (synopsis "API for embeddable GUIs")
+ (description
+ "Pugl (PlUgin Graphics Library) is a portability layer for GUIs which is
+suitable for use in plugins and applications.")
+ (license license:bsd-0))))
+
(define-public gl2ps
(package
(name "gl2ps")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:06
[PATCH v2 2/5] gnu: Add nanovg.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
d7xMkbjrb0oDxBl7bXpGj7MNBaiExYKODbLt1SIrPKrduk_A_anU7ccCI2J3K8PAO8Hs0EHhy_DvS85L1HJb8Y98X61byD5whPwIJNMFpjc=@proton.me
* gnu/packages/gl.scm (nanovg): New variable.
---
gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index e59d051f2e..b67215b406 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -893,6 +893,52 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public nanovg
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "7544c114e83db7cf67bd1c9e012349b70caacc2f"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0n29rxdp20xnvnpsjcmg3v5n6z7ya5ji4qirp18qcyls5xdxdxkc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target)
+ "../source/src/nanovg.c" "-c" "-fPIC")
+ (invoke #$(cc-for-target)
+ "-shared" "-olibnanovg.so" "nanovg.o")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (include (string-append #$output
+ "/include")))
+ (install-file "libnanovg.so" lib)
+ (with-directory-excursion "../source"
+ (for-each
+ (lambda (file)
+ (install-file file include))
+ (find-files "src" "nanovg.*\\.h$")))))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "2D vector drawing library on top of OpenGL")
+ (description
+ "NanoVG is an antialiased vector graphics rendering library for OpenGL.
+It is aimed for building scalable user interfaces and visualizations.")
+ (license license:zlib))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:07
[PATCH v2 3/5] gnu: Add rtosc.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
Kj2DEVEDXzPCEgC2vAZGdEZI_n02lauL1fhNeg0CUuSI5IsYtWfHK3L1AyqNVJ-TBl2JfLAqvRZPksVpeu4xU17MeykH_d97S4JxFByIk5c=@proton.me
* gnu/packages/audio.scm (rtosc): New variable.
* gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparision-operator.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 45 +++++++++++++++++++
....3.1-fix-invalid-comparison-operator.patch | 14 ++++++
3 files changed, 60 insertions(+)
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 68a02d10b5..aa50fc0465 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1842,6 +1842,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
+ %D%/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/racket-zuo-bin-sh.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 109133ba8e..236fc84077 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2806,6 +2806,51 @@ (define-public liblo
implementation of the Open Sound Control (@dfn{OSC}) protocol.")
(license license:lgpl2.1+)))
+(define-public rtosc
+ (package
+ (name "rtosc")
+ (version "0.3.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fundamental/rtosc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1djvyq53cjwd0szkvhpk45zcmdgrlirjwr02nqq9hzdmh0n26pk2"))
+ (patches
+ (search-patches
+ "rtosc-0.3.1-fix-invalid-comparison-operator.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DPERF_TEST=ON"
+ "-DRTOSC_BUILD_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-documentation
+ (lambda _
+ (invoke "make" "rtosc-doc")))
+ (add-after 'install 'install-documentation
+ (lambda _
+ (copy-recursively "html"
+ (string-append #$output:doc
+ "/share/doc/rtosc/html")))))))
+ (native-inputs
+ (list doxygen pkg-config ruby))
+ (inputs
+ (list jack-1
+ liblo
+ libx11
+ mesa))
+ (outputs (list "out" "doc"))
+ (home-page "https://fundamental-code.com/wiki/rtosc/")
+ (synopsis "Realtime Safe OSC packet serialization and dispatch")
+ (description
+ "RtOsc is a realtime safe library for handling OSC messages.")
+ (license license:expat)))
+
(define-public rtaudio
(package
(name "rtaudio")
diff --git a/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
new file mode 100644
index 0000000000..925e39e9a1
--- /dev/null
+++ b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
@@ -0,0 +1,14 @@
+This patch fixes the unknown version comparison operator
+
+diff --git a/librtosc-cpp.pc.cmake b/librtosc-cpp.pc.cmake
+index 0d8fda2..edbcb3a 100644
+--- a/librtosc-cpp.pc.cmake
++++ b/librtosc-cpp.pc.cmake
+@@ -9,6 +9,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ Name: rtosc_cpp
+ Description: rtosc_cpp - a realtime safe open sound control serialization and dispatch system for C++
+ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+-Requires: librtosc == @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
++Requires: librtosc = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+ Libs: -L${libdir} -lrtosc -lrtosc-cpp
+ Cflags: -I${includedir}
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:07
[PATCH v2 4/5] gnu: Add mruby-zest.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
JNKsik-iBd80vl-f1Y5XQsXUC4lRwQ7XlCpK0KZ4u_Orkd0oMm5DG-EJBBArDue3vTRfL5dxihkZbHq72aft5tKXaI_hI1BK1UeG6MVUbrI=@proton.me
* gnu/packages/mruby-xyz.scm: New file.
* gnu/local.mk: Register the file.
---
gnu/local.mk | 1 +
gnu/packages/mruby-xyz.scm | 175 +++++++++++++++++++++++++++++++++++++
2 files changed, 176 insertions(+)
create mode 100644 gnu/packages/mruby-xyz.scm

Toggle diff (195 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index aa50fc0465..6f213b2e7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -436,6 +436,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
+ %D%/packages/mruby-xyz.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/musl.scm \
diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm
new file mode 100644
index 0000000000..9c4a1746f3
--- /dev/null
+++ b/gnu/packages/mruby-xyz.scm
@@ -0,0 +1,175 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 <sughosha@proton.me>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mruby-xyz)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xorg))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; Cloning recursively for and the required mruby sources
+ ;; and gems.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This packages contains a custom "pugl". Replacing it with the
+ ;; system "pugl" fails to build.
+ ;; Delete the bundled "libuv", "nanovg" and "rtosc".
+ '(with-directory-excursion "deps"
+ (for-each delete-file-recursively
+ (list "libuv" "nanovg" "rtosc"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Do not compile "nanovg" and "libuv" and use the system
+ ;; provided versions of them.
+ (substitute* "Makefile"
+ (("cd deps/nanovg") "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#$(AR) rc deps/libnanovg.a")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("cd deps/libuv") "#cd deps/libuv")
+ (("\\./deps/libuv/\\.libs/libuv\\.a")
+ "-luv")
+ (("\\./deps/libuv/\\.libs/libuv-win\\.a")
+ "-luv-win"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a")
+ "-luv")
+ (("cc\\.include_paths.*\\./deps/nanovg/.*$")
+ "#")
+ (("cc\\.include_paths.*\\./deps/libuv/.*$")
+ "#"))
+ (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c"
+ (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h")
+ (search-input-file inputs "/example/stb_image_write.h")))
+ ;; Use the system provided "rtosc" headers.
+ (substitute* "src/mruby-widget-lib/src/gem.c"
+ (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"")
+ "<rtosc/rtosc.h>"))
+ ;; Fix missing fonts.
+ (substitute*
+ "src/mruby-widget-lib/mrblib/script.rb"
+ (("sans = \\[")
+ (string-append
+ "sans = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Regular.ttf")
+ "\", "))
+ (("bold = \\[")
+ (string-append
+ "bold = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Bold.ttf")
+ "\", ")))
+ ;; Fix paths for zyn-fusion files.
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("fopen\\(\\\"schema/")
+ (string-append
+ "fopen(\"" #$output "/share/zyn-fusion/schema/")))
+ (substitute* "test-libversion.c"
+ (("./libzest.so")
+ (string-append #$output "/lib/libzest.so")))
+ (substitute* "src/mruby-widget-lib/src/api.c"
+ ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/")
+ (("\\./qml/")
+ (string-append #$output "/share/zyn-fusion/qml")))))
+ (replace 'install
+ (lambda _
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" (string-append #$output "/bin"))
+ (install-file "libzest.so" (string-append #$output "/lib"))
+ (for-each
+ (lambda (folder)
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append #$output "/share/zyn-fusion/qml")))
+ (find-files folder "\\.qml$")))
+ '("src/mruby-zest/qml" "src/mruby-zest/example"))
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append #$output "/share/zyn-fusion/schema"))
+ (install-file "completions/zyn-fusion"
+ (string-append
+ #$output "/share/bash-completion/completions")))))))
+ (native-inputs
+ (list (package-source nanovg) ;for "stb_image_write.h"
+ pkg-config
+ ruby))
+ (inputs
+ (list font-google-roboto
+ libuv
+ libx11
+ mesa
+ ;; With the latest version of "nanovg" the contents are not
+ ;; displayed properly.
+ (let ((revision "0")
+ (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28"))
+ (package (inherit nanovg)
+ (version (git-version (package-version nanovg) revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))))
+ rtosc))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Zyn-Fusion user interface")
+ (description
+ "This package provides user interface for Zyn-Fusion.")
+ (license
+ (list license:lgpl2.1))))
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:08
[PATCH v2 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
-2siIY5xXyaTI0gYpFtMUsLXMaoxvyvIsF1dJnSezYdvH455hqiujH284uNEX17tHD3mHoMGwoGNiov6DJjVZF83T_QBzBVzqHoDORqAt-E=@proton.me
* gnu/packages/music.scm (zynaddsubfx)[source]: Add a patches.
[arguments]: Add configure flags and patch-paths phase.
[inputs]: Remove ntk and add rtosc and mruby-zest.
[home-page]: Change home-page.
* gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/music.scm | 28 ++++-
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 ++++++++++++++++++
3 files changed, 130 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch

Toggle diff (190 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6f213b2e7f..8a20f54e9f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2072,6 +2072,7 @@ dist_patch_DATA = \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-system-paths.patch \
+ %D%/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch \
%D%/packages/patches/zsh-egrep-failing-test.patch
MISC_DISTRO_FILES = \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 446580dc52..ec19318b6f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -157,6 +157,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages mpd)
+ #:use-module (gnu packages mruby-xyz)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages pcre)
@@ -3175,10 +3176,18 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))
+ (patches
+ (search-patches
+ "zynaddsubfx-3.0.6-system-rtosc.patch"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest"
+ ,(string-append "-DZYN_DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/zynaddsubfx")
+ "-DZYN_SYSTEM_RTOSC=ON")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3188,10 +3197,19 @@ (define-public zynaddsubfx
(substitute* "src/CMakeLists.txt"
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
- (string-append flag " -msse -msse2 -mfpmath=sse"))))))))
+ (string-append flag " -msse -msse2 -mfpmath=sse")))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "/bin/zyn-fusion")))
+ (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (search-input-file inputs "/lib/libzest.so"))))))))
(inputs
(list liblo
- ntk
+ rtosc
+ mruby-zest
mesa
alsa-lib
jack-1
@@ -3203,7 +3221,7 @@ (define-public zynaddsubfx
(native-inputs
(list pkg-config
ruby))
- (home-page "https://zynaddsubfx.sf.net/")
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
diff --git a/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
new file mode 100644
index 0000000000..edf22c389b
--- /dev/null
+++ b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
@@ -0,0 +1,106 @@
+Adding the option ZYN_SYSTEM_RTOSC to let the use of the system provided RtOsc
+instead of using the bundled one.
+
+--- a/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -10,24 +10,34 @@
+ add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
+ endif()
+
++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
++
+ #Include RTOSC
+-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(STATUS "RTOSC NOT FOUND")
+- message(STATUS "Attempting to checkout submodule")
+- find_package(Git REQUIRED)
+- execute_process(COMMAND git submodule update --init --recursive)
++if(ZYN_SYSTEM_RTOSC)
++ include(FindPkgConfig)
++ pkg_check_modules(RTOSC REQUIRED librtosc)
++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
++ include_directories(${RTOSC_INCLUDE_DIR})
++ message(STATUS "Found system provided librtosc and librtosc-cpp...")
++else()
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ message(STATUS "RTOSC NOT FOUND")
++ message(STATUS "Attempting to checkout submodule")
++ find_package(Git REQUIRED)
++ execute_process(COMMAND git submodule update --init --recursive)
++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
++ "please check file permissions and your network")
++ endif()
++ else()
++ message(STATUS "Found Rtosc Submodule...")
+ endif()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+--- a/src/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -575,13 +575,27 @@
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")
+
+
+When ZYN_SYSTEM_RTOSC is ON, port-checker file is not available and the test
+fails.
+
+--- a/src/Tests/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/Tests/CMakeLists.txt 2023-05-04 00:19:01.635383149 +0200
+@@ -65,7 +65,6 @@
+
+ if(LIBLO_FOUND)
+ cp_script(check-ports.rb)
+- add_test(PortChecker check-ports.rb)
+ endif()
+ add_executable(save-osc SaveOSC.cpp)
+ target_link_libraries(save-osc
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:35
[PATCH v3 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
yTpMocBdVzTVrNrJ_iRNvISoSnCwxz9bFsI5kr47_C1-wNEq2KE4lcbeBKLEM787jxRvmVohbv5lsfxzONejxhxt7zQqPxVldEqLRs5DIDk=@proton.me
In "version" of "nanovg" in the inputs of "mruby-zest",
"(package-version nanovg)" is changed to the independent "version" which
is "0".
S
S
Sughosha wrote on 4 May 2023 10:36
[PATCH v3 1/5] gnu: Add pugl.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
nEzlggnbkyGoaghPo7t2ok_3D1gYAiLh3n8L2khjGTecVXvhCnE8h3bji1EptoRx19KHduP6YhmaAfPGwsEJzwXHgsGUyoFliM0vLSrvCR0=@proton.me
* gnu/packages/gl.scm (pugl): New variable.
---
gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 3a63d70c7a..e59d051f2e 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -44,6 +44,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
@@ -922,6 +923,40 @@ (define-public nanovg-for-extempore
and visualizations.")
(license license:zlib))))
+(define-public pugl
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "9b5a0871c1a8771dbe204e60f437653a67abd42a"))
+ (package
+ (name "pugl")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/lv2/pugl")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16gcjz44d27j9ck7frpksy0jqscask2fvln9pb23k6xpq2lky3ar"))
+ (modules '((guix build utils)))
+ ;; Unbundle "sphinxygen".
+ (snippet
+ '(delete-file-recursively "subprojects"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:tests? #f ;tests contain manual tests
+ #:configure-flags
+ #~(list "-Ddocs=disabled"))) ;requires "sphinxygen"
+ (native-inputs (list pkg-config))
+ (inputs (list cairo glu libx11 libxrandr libxcursor libxext mesa))
+ (home-page "http://drobilla.net/software/pugl.html")
+ (synopsis "API for embeddable GUIs")
+ (description
+ "Pugl (PlUgin Graphics Library) is a portability layer for GUIs which is
+suitable for use in plugins and applications.")
+ (license license:bsd-0))))
+
(define-public gl2ps
(package
(name "gl2ps")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:37
[PATCH v3 2/5] gnu: Add nanovg.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
l9rzpOJnonEbGnFJpBYowIbkuqIeYUVjKhhI2OR59TjU0AootGvIB8zrST-1w4sPhCXjks0j0M07hiOoastXeLiEN0iZAwdyyiMbLtjfcxU=@proton.me
* gnu/packages/gl.scm (nanovg): New variable.
---
gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index e59d051f2e..b67215b406 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -893,6 +893,52 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public nanovg
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "7544c114e83db7cf67bd1c9e012349b70caacc2f"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0n29rxdp20xnvnpsjcmg3v5n6z7ya5ji4qirp18qcyls5xdxdxkc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target)
+ "../source/src/nanovg.c" "-c" "-fPIC")
+ (invoke #$(cc-for-target)
+ "-shared" "-olibnanovg.so" "nanovg.o")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (include (string-append #$output
+ "/include")))
+ (install-file "libnanovg.so" lib)
+ (with-directory-excursion "../source"
+ (for-each
+ (lambda (file)
+ (install-file file include))
+ (find-files "src" "nanovg.*\\.h$")))))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "2D vector drawing library on top of OpenGL")
+ (description
+ "NanoVG is an antialiased vector graphics rendering library for OpenGL.
+It is aimed for building scalable user interfaces and visualizations.")
+ (license license:zlib))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:37
[PATCH v3 3/5] gnu: Add rtosc.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
Pg6QY-F4_2N7-qf_fWyOi6ZJgAMFrDCd4Eu3VMSndMZSpOZ7RhDaIW7wfbdjJ2zxNtGq_FrHypVHbwWfNsNZYfFeb9o-yq9cDiPljxiJEZo=@proton.me
* gnu/packages/audio.scm (rtosc): New variable.
* gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparision-operator.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 45 +++++++++++++++++++
....3.1-fix-invalid-comparison-operator.patch | 14 ++++++
3 files changed, 60 insertions(+)
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 68a02d10b5..aa50fc0465 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1842,6 +1842,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
+ %D%/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/racket-zuo-bin-sh.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 109133ba8e..236fc84077 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2806,6 +2806,51 @@ (define-public liblo
implementation of the Open Sound Control (@dfn{OSC}) protocol.")
(license license:lgpl2.1+)))
+(define-public rtosc
+ (package
+ (name "rtosc")
+ (version "0.3.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fundamental/rtosc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1djvyq53cjwd0szkvhpk45zcmdgrlirjwr02nqq9hzdmh0n26pk2"))
+ (patches
+ (search-patches
+ "rtosc-0.3.1-fix-invalid-comparison-operator.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DPERF_TEST=ON"
+ "-DRTOSC_BUILD_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-documentation
+ (lambda _
+ (invoke "make" "rtosc-doc")))
+ (add-after 'install 'install-documentation
+ (lambda _
+ (copy-recursively "html"
+ (string-append #$output:doc
+ "/share/doc/rtosc/html")))))))
+ (native-inputs
+ (list doxygen pkg-config ruby))
+ (inputs
+ (list jack-1
+ liblo
+ libx11
+ mesa))
+ (outputs (list "out" "doc"))
+ (home-page "https://fundamental-code.com/wiki/rtosc/")
+ (synopsis "Realtime Safe OSC packet serialization and dispatch")
+ (description
+ "RtOsc is a realtime safe library for handling OSC messages.")
+ (license license:expat)))
+
(define-public rtaudio
(package
(name "rtaudio")
diff --git a/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
new file mode 100644
index 0000000000..925e39e9a1
--- /dev/null
+++ b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
@@ -0,0 +1,14 @@
+This patch fixes the unknown version comparison operator
+
+diff --git a/librtosc-cpp.pc.cmake b/librtosc-cpp.pc.cmake
+index 0d8fda2..edbcb3a 100644
+--- a/librtosc-cpp.pc.cmake
++++ b/librtosc-cpp.pc.cmake
+@@ -9,6 +9,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ Name: rtosc_cpp
+ Description: rtosc_cpp - a realtime safe open sound control serialization and dispatch system for C++
+ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+-Requires: librtosc == @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
++Requires: librtosc = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+ Libs: -L${libdir} -lrtosc -lrtosc-cpp
+ Cflags: -I${includedir}
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:37
[PATCH v3 4/5] gnu: Add mruby-zest.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
4UQSmfkT8PD3IZFQBYvYwM_cjtjE7zZZ3pvjsbRTsOBm25G-XvEHHZrKG1Z46Ew_dfuhzEl3fvi3kYBnV4U-STg6mwezJv88PkPtIk3fdTc=@proton.me
* gnu/packages/mruby-xyz.scm: New file.
* gnu/local.mk: Register the file.
---
gnu/local.mk | 1 +
gnu/packages/mruby-xyz.scm | 176 +++++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+)
create mode 100644 gnu/packages/mruby-xyz.scm

Toggle diff (196 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index aa50fc0465..6f213b2e7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -436,6 +436,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
+ %D%/packages/mruby-xyz.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/musl.scm \
diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm
new file mode 100644
index 0000000000..5524976dec
--- /dev/null
+++ b/gnu/packages/mruby-xyz.scm
@@ -0,0 +1,176 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 <sughosha@proton.me>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mruby-xyz)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xorg))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; Cloning recursively for and the required mruby sources
+ ;; and gems.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This packages contains a custom "pugl". Replacing it with the
+ ;; system "pugl" fails to build.
+ ;; Delete the bundled "libuv", "nanovg" and "rtosc".
+ '(with-directory-excursion "deps"
+ (for-each delete-file-recursively
+ (list "libuv" "nanovg" "rtosc"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Do not compile "nanovg" and "libuv" and use the system
+ ;; provided versions of them.
+ (substitute* "Makefile"
+ (("cd deps/nanovg") "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#$(AR) rc deps/libnanovg.a")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("cd deps/libuv") "#cd deps/libuv")
+ (("\\./deps/libuv/\\.libs/libuv\\.a")
+ "-luv")
+ (("\\./deps/libuv/\\.libs/libuv-win\\.a")
+ "-luv-win"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a")
+ "-luv")
+ (("cc\\.include_paths.*\\./deps/nanovg/.*$")
+ "#")
+ (("cc\\.include_paths.*\\./deps/libuv/.*$")
+ "#"))
+ (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c"
+ (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h")
+ (search-input-file inputs "/example/stb_image_write.h")))
+ ;; Use the system provided "rtosc" headers.
+ (substitute* "src/mruby-widget-lib/src/gem.c"
+ (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"")
+ "<rtosc/rtosc.h>"))
+ ;; Fix missing fonts.
+ (substitute*
+ "src/mruby-widget-lib/mrblib/script.rb"
+ (("sans = \\[")
+ (string-append
+ "sans = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Regular.ttf")
+ "\", "))
+ (("bold = \\[")
+ (string-append
+ "bold = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Bold.ttf")
+ "\", ")))
+ ;; Fix paths for zyn-fusion files.
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("fopen\\(\\\"schema/")
+ (string-append
+ "fopen(\"" #$output "/share/zyn-fusion/schema/")))
+ (substitute* "test-libversion.c"
+ (("./libzest.so")
+ (string-append #$output "/lib/libzest.so")))
+ (substitute* "src/mruby-widget-lib/src/api.c"
+ ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/")
+ (("\\./qml/")
+ (string-append #$output "/share/zyn-fusion/qml")))))
+ (replace 'install
+ (lambda _
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" (string-append #$output "/bin"))
+ (install-file "libzest.so" (string-append #$output "/lib"))
+ (for-each
+ (lambda (folder)
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append #$output "/share/zyn-fusion/qml")))
+ (find-files folder "\\.qml$")))
+ '("src/mruby-zest/qml" "src/mruby-zest/example"))
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append #$output "/share/zyn-fusion/schema"))
+ (install-file "completions/zyn-fusion"
+ (string-append
+ #$output "/share/bash-completion/completions")))))))
+ (native-inputs
+ (list (package-source nanovg) ;for "stb_image_write.h"
+ pkg-config
+ ruby))
+ (inputs
+ (list font-google-roboto
+ libuv
+ libx11
+ mesa
+ ;; With the latest version of "nanovg" the contents are not
+ ;; displayed properly.
+ (let ((version "0")
+ (revision "0")
+ (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28"))
+ (package (inherit nanovg)
+ (version (git-version version revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))))
+ rtosc))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Zyn-Fusion user interface")
+ (description
+ "This package provides user interface for Zyn-Fusion.")
+ (license
+ (list license:lgpl2.1))))
--
2.39.2
S
S
Sughosha wrote on 4 May 2023 10:38
[PATCH v3 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
abeUfDh1ukeBZV7Nb3XctwqENL8IkxNa0TTIW_7ZuEc6WKuifLpWO_fmm_SF-rftIZ9M0JkqxPqQagOkCfD5kCaTMcBizZZhhmZsoJPQol4=@proton.me
* gnu/packages/music.scm (zynaddsubfx)[source]: Add a patches.
[arguments]: Add configure flags and patch-paths phase.
[inputs]: Remove ntk and add rtosc and mruby-zest.
[home-page]: Change home-page.
* gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/music.scm | 28 ++++-
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 ++++++++++++++++++
3 files changed, 130 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch

Toggle diff (190 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6f213b2e7f..8a20f54e9f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2072,6 +2072,7 @@ dist_patch_DATA = \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-system-paths.patch \
+ %D%/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch \
%D%/packages/patches/zsh-egrep-failing-test.patch
MISC_DISTRO_FILES = \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 446580dc52..ec19318b6f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -157,6 +157,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages mpd)
+ #:use-module (gnu packages mruby-xyz)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages pcre)
@@ -3175,10 +3176,18 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))
+ (patches
+ (search-patches
+ "zynaddsubfx-3.0.6-system-rtosc.patch"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest"
+ ,(string-append "-DZYN_DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/zynaddsubfx")
+ "-DZYN_SYSTEM_RTOSC=ON")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3188,10 +3197,19 @@ (define-public zynaddsubfx
(substitute* "src/CMakeLists.txt"
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
- (string-append flag " -msse -msse2 -mfpmath=sse"))))))))
+ (string-append flag " -msse -msse2 -mfpmath=sse")))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "/bin/zyn-fusion")))
+ (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (search-input-file inputs "/lib/libzest.so"))))))))
(inputs
(list liblo
- ntk
+ rtosc
+ mruby-zest
mesa
alsa-lib
jack-1
@@ -3203,7 +3221,7 @@ (define-public zynaddsubfx
(native-inputs
(list pkg-config
ruby))
- (home-page "https://zynaddsubfx.sf.net/")
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
diff --git a/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
new file mode 100644
index 0000000000..edf22c389b
--- /dev/null
+++ b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
@@ -0,0 +1,106 @@
+Adding the option ZYN_SYSTEM_RTOSC to let the use of the system provided RtOsc
+instead of using the bundled one.
+
+--- a/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -10,24 +10,34 @@
+ add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
+ endif()
+
++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
++
+ #Include RTOSC
+-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(STATUS "RTOSC NOT FOUND")
+- message(STATUS "Attempting to checkout submodule")
+- find_package(Git REQUIRED)
+- execute_process(COMMAND git submodule update --init --recursive)
++if(ZYN_SYSTEM_RTOSC)
++ include(FindPkgConfig)
++ pkg_check_modules(RTOSC REQUIRED librtosc)
++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
++ include_directories(${RTOSC_INCLUDE_DIR})
++ message(STATUS "Found system provided librtosc and librtosc-cpp...")
++else()
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ message(STATUS "RTOSC NOT FOUND")
++ message(STATUS "Attempting to checkout submodule")
++ find_package(Git REQUIRED)
++ execute_process(COMMAND git submodule update --init --recursive)
++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
++ "please check file permissions and your network")
++ endif()
++ else()
++ message(STATUS "Found Rtosc Submodule...")
+ endif()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+--- a/src/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -575,13 +575,27 @@
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")
+
+
+When ZYN_SYSTEM_RTOSC is ON, port-checker file is not available and the test
+fails.
+
+--- a/src/Tests/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/Tests/CMakeLists.txt 2023-05-04 00:19:01.635383149 +0200
+@@ -65,7 +65,6 @@
+
+ if(LIBLO_FOUND)
+ cp_script(check-ports.rb)
+- add_test(PortChecker check-ports.rb)
+ endif()
+ add_executable(save-osc SaveOSC.cpp)
+ target_link_libraries(save-osc
--
2.39.2
S
S
Sughosha wrote on 16 Jun 2023 20:59
[PATCH v4 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
pzsSb_wv2_bA8UacIkmlqyy-r5vGQl0NcslYaVN7CeXCisCJkBW6OpX64eiPUu9Bwx2-xp4QKwjEaIHkVslQYomi-PChS51hgyko0btvPYU=@proton.me
This series of patches are to switch ZynAddSubFX from NTK interface Zyn-Fusion,
add native search paths for "LV2_PATH" and "VST2_PATH" variables and fix home
page.

Sughosha (5):
gnu: Add pugl.
gnu: Add nanovg.
gnu: Add rtosc.
gnu: Add mruby-zest.
gnu: zynaddsubfx: Switch to Zyn-Fusion interface.

gnu/local.mk | 5 +-
gnu/packages/audio.scm | 45 +++++
gnu/packages/gl.scm | 81 ++++++++
gnu/packages/mruby-xyz.scm | 176 ++++++++++++++++++
gnu/packages/music.scm | 34 +++-
....3.1-fix-invalid-comparison-operator.patch | 14 ++
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 +++++++++++
7 files changed, 456 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/mruby-xyz.scm
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch


base-commit: 8f0698dde351790e0bc9e905e4cd71902fd55d5f
--
2.40.1
S
S
Sughosha wrote on 16 Jun 2023 21:02
[PATCH v4 1/5] gnu: Add pugl.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
yVBvSoJMN711u4WBWrHyczyKJUQCxQi38KGjXYlcOLuxSQ6V6D-YYIGeX9jjxXz2rDetPMdw-Ip-3_LjLF5Jxx3hA0gw1uDXPEWBXv3fkPo=@proton.me
* gnu/packages/gl.scm (pugl): New variable.
---
gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 9885bde712..d0d48e9fc3 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -45,6 +45,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
@@ -933,6 +934,40 @@ (define-public nanovg-for-extempore
and visualizations.")
(license license:zlib))))
+(define-public pugl
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "9b5a0871c1a8771dbe204e60f437653a67abd42a"))
+ (package
+ (name "pugl")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/lv2/pugl")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16gcjz44d27j9ck7frpksy0jqscask2fvln9pb23k6xpq2lky3ar"))
+ (modules '((guix build utils)))
+ ;; Unbundle "sphinxygen".
+ (snippet
+ '(delete-file-recursively "subprojects"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:tests? #f ;tests contain manual tests
+ #:configure-flags
+ #~(list "-Ddocs=disabled"))) ;requires "sphinxygen"
+ (native-inputs (list pkg-config))
+ (inputs (list cairo glu libx11 libxrandr libxcursor libxext mesa))
+ (home-page "http://drobilla.net/software/pugl.html")
+ (synopsis "API for embeddable GUIs")
+ (description
+ "Pugl (PlUgin Graphics Library) is a portability layer for GUIs which is
+suitable for use in plugins and applications.")
+ (license license:bsd-0))))
+
(define-public gl2ps
(package
(name "gl2ps")
--
2.40.1
S
S
Sughosha wrote on 16 Jun 2023 21:02
[PATCH v4 2/5] gnu: Add nanovg.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
m-Yujlupi8uWApI9VwLpsTtxDJr_M9UoBCxlAZwbUGHRcA6qyoL0r34dYg9migAh5pBelMOCTYT42CqITNeeoRlVbDm94DDmY3IBiAcw7pA=@proton.me
* gnu/packages/gl.scm (nanovg): New variable.
---
gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index d0d48e9fc3..8abe79ed24 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -904,6 +904,52 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public nanovg
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "7544c114e83db7cf67bd1c9e012349b70caacc2f"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0n29rxdp20xnvnpsjcmg3v5n6z7ya5ji4qirp18qcyls5xdxdxkc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target)
+ "../source/src/nanovg.c" "-c" "-fPIC")
+ (invoke #$(cc-for-target)
+ "-shared" "-olibnanovg.so" "nanovg.o")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (include (string-append #$output
+ "/include")))
+ (install-file "libnanovg.so" lib)
+ (with-directory-excursion "../source"
+ (for-each
+ (lambda (file)
+ (install-file file include))
+ (find-files "src" "nanovg.*\\.h$")))))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "2D vector drawing library on top of OpenGL")
+ (description
+ "NanoVG is an antialiased vector graphics rendering library for OpenGL.
+It is aimed for building scalable user interfaces and visualizations.")
+ (license license:zlib))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.40.1
S
S
Sughosha wrote on 16 Jun 2023 21:03
[PATCH v4 3/5] gnu: Add rtosc.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
Y2Fd1d3lqhtS0pqLbhOdnAFA5Y6pzjd52tlVz4_FP_Q00NuSnWB3oU_oF6DXrrOaGbAbBxTg3VbjSPUN0jRZwvZ4Vg5CpVgNmy8KsMvuNQY=@proton.me
* gnu/packages/audio.scm (rtosc): New variable.
* gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparision-operator.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 45 +++++++++++++++++++
....3.1-fix-invalid-comparison-operator.patch | 14 ++++++
3 files changed, 60 insertions(+)
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3d3e54406b..3f516d395a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1867,6 +1867,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
+ %D%/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/racket-zuo-bin-sh.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 58a981b2fe..c4c8e702b5 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2806,6 +2806,51 @@ (define-public liblo
implementation of the Open Sound Control (@dfn{OSC}) protocol.")
(license license:lgpl2.1+)))
+(define-public rtosc
+ (package
+ (name "rtosc")
+ (version "0.3.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fundamental/rtosc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1djvyq53cjwd0szkvhpk45zcmdgrlirjwr02nqq9hzdmh0n26pk2"))
+ (patches
+ (search-patches
+ "rtosc-0.3.1-fix-invalid-comparison-operator.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DPERF_TEST=ON"
+ "-DRTOSC_BUILD_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-documentation
+ (lambda _
+ (invoke "make" "rtosc-doc")))
+ (add-after 'install 'install-documentation
+ (lambda _
+ (copy-recursively "html"
+ (string-append #$output:doc
+ "/share/doc/rtosc/html")))))))
+ (native-inputs
+ (list doxygen pkg-config ruby))
+ (inputs
+ (list jack-1
+ liblo
+ libx11
+ mesa))
+ (outputs (list "out" "doc"))
+ (home-page "https://fundamental-code.com/wiki/rtosc/")
+ (synopsis "Realtime Safe OSC packet serialization and dispatch")
+ (description
+ "RtOsc is a realtime safe library for handling OSC messages.")
+ (license license:expat)))
+
(define-public rtaudio
(package
(name "rtaudio")
diff --git a/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
new file mode 100644
index 0000000000..925e39e9a1
--- /dev/null
+++ b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
@@ -0,0 +1,14 @@
+This patch fixes the unknown version comparison operator
+
+diff --git a/librtosc-cpp.pc.cmake b/librtosc-cpp.pc.cmake
+index 0d8fda2..edbcb3a 100644
+--- a/librtosc-cpp.pc.cmake
++++ b/librtosc-cpp.pc.cmake
+@@ -9,6 +9,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ Name: rtosc_cpp
+ Description: rtosc_cpp - a realtime safe open sound control serialization and dispatch system for C++
+ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+-Requires: librtosc == @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
++Requires: librtosc = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+ Libs: -L${libdir} -lrtosc -lrtosc-cpp
+ Cflags: -I${includedir}
--
2.40.1
S
S
Sughosha wrote on 16 Jun 2023 21:04
[PATCH v4 4/5] gnu: Add mruby-zest.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
PdMsezxBS6CK8Bj5_rHfvuvIWpgqydjoczbGv3Gf0V-fanwifw5QR7I_9zIrIIQUiN3RXvO_wc3nB6_W4eRsnc9eQxxOyyBQXPehkulzZSI=@proton.me
* gnu/packages/mruby-xyz.scm: New file.
* gnu/local.mk: Register the file.
---
gnu/local.mk | 1 +
gnu/packages/mruby-xyz.scm | 176 +++++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+)
create mode 100644 gnu/packages/mruby-xyz.scm

Toggle diff (196 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3f516d395a..1649398f59 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -440,6 +440,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
+ %D%/packages/mruby-xyz.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/musl.scm \
diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm
new file mode 100644
index 0000000000..5524976dec
--- /dev/null
+++ b/gnu/packages/mruby-xyz.scm
@@ -0,0 +1,176 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 <sughosha@proton.me>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mruby-xyz)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xorg))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; Cloning recursively for and the required mruby sources
+ ;; and gems.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This packages contains a custom "pugl". Replacing it with the
+ ;; system "pugl" fails to build.
+ ;; Delete the bundled "libuv", "nanovg" and "rtosc".
+ '(with-directory-excursion "deps"
+ (for-each delete-file-recursively
+ (list "libuv" "nanovg" "rtosc"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Do not compile "nanovg" and "libuv" and use the system
+ ;; provided versions of them.
+ (substitute* "Makefile"
+ (("cd deps/nanovg") "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#$(AR) rc deps/libnanovg.a")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("cd deps/libuv") "#cd deps/libuv")
+ (("\\./deps/libuv/\\.libs/libuv\\.a")
+ "-luv")
+ (("\\./deps/libuv/\\.libs/libuv-win\\.a")
+ "-luv-win"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a")
+ "-luv")
+ (("cc\\.include_paths.*\\./deps/nanovg/.*$")
+ "#")
+ (("cc\\.include_paths.*\\./deps/libuv/.*$")
+ "#"))
+ (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c"
+ (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h")
+ (search-input-file inputs "/example/stb_image_write.h")))
+ ;; Use the system provided "rtosc" headers.
+ (substitute* "src/mruby-widget-lib/src/gem.c"
+ (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"")
+ "<rtosc/rtosc.h>"))
+ ;; Fix missing fonts.
+ (substitute*
+ "src/mruby-widget-lib/mrblib/script.rb"
+ (("sans = \\[")
+ (string-append
+ "sans = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Regular.ttf")
+ "\", "))
+ (("bold = \\[")
+ (string-append
+ "bold = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Bold.ttf")
+ "\", ")))
+ ;; Fix paths for zyn-fusion files.
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("fopen\\(\\\"schema/")
+ (string-append
+ "fopen(\"" #$output "/share/zyn-fusion/schema/")))
+ (substitute* "test-libversion.c"
+ (("./libzest.so")
+ (string-append #$output "/lib/libzest.so")))
+ (substitute* "src/mruby-widget-lib/src/api.c"
+ ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/")
+ (("\\./qml/")
+ (string-append #$output "/share/zyn-fusion/qml")))))
+ (replace 'install
+ (lambda _
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" (string-append #$output "/bin"))
+ (install-file "libzest.so" (string-append #$output "/lib"))
+ (for-each
+ (lambda (folder)
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append #$output "/share/zyn-fusion/qml")))
+ (find-files folder "\\.qml$")))
+ '("src/mruby-zest/qml" "src/mruby-zest/example"))
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append #$output "/share/zyn-fusion/schema"))
+ (install-file "completions/zyn-fusion"
+ (string-append
+ #$output "/share/bash-completion/completions")))))))
+ (native-inputs
+ (list (package-source nanovg) ;for "stb_image_write.h"
+ pkg-config
+ ruby))
+ (inputs
+ (list font-google-roboto
+ libuv
+ libx11
+ mesa
+ ;; With the latest version of "nanovg" the contents are not
+ ;; displayed properly.
+ (let ((version "0")
+ (revision "0")
+ (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28"))
+ (package (inherit nanovg)
+ (version (git-version version revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))))
+ rtosc))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Zyn-Fusion user interface")
+ (description
+ "This package provides user interface for Zyn-Fusion.")
+ (license
+ (list license:lgpl2.1))))
--
2.40.1
S
S
Sughosha wrote on 16 Jun 2023 21:04
[PATCH v4 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(name . 63254@debbugs.gnu.org)(address . 63254@debbugs.gnu.org)
eBJsLbu4dA-v0LiyuTmTvIUphWJ9pI5PsyyZjRw_08GJLRHvAmQz7Cu_6N17j4IaTCaBmJPhnzujB6Lls_X__XWBU5yLEuqLFNib-DkLlXo=@proton.me
* gnu/packages/music.scm (zynaddsubfx)[source]: Add a patches.
[arguments]: Add configure flags and patch-paths phase.
[inputs]: Remove ntk and add rtosc and mruby-zest.
[native-search-paths]: Add search paths for "LV2_PATH" and "VST2_PATH".
[home-page]: Change home-page.
* gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch: New file.
* gnu/local.mk: Register the patch file.
---
gnu/local.mk | 3 +-
gnu/packages/music.scm | 34 +++++-
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 ++++++++++++++++++
3 files changed, 138 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch

Toggle diff (199 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 1649398f59..e244f3174c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2098,7 +2098,8 @@ dist_patch_DATA = \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-system-paths.patch \
- %D%/packages/patches/zsh-egrep-failing-test.patch
+ %D%/packages/patches/zsh-egrep-failing-test.patch \
+ %D%/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
MISC_DISTRO_FILES = \
%D%/packages/ld-wrapper.in
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 2e7eddafb0..cea2905bec 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -157,6 +157,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages mpd)
+ #:use-module (gnu packages mruby-xyz)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages networking)
@@ -3177,10 +3178,18 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))
+ (patches
+ (search-patches
+ "zynaddsubfx-3.0.6-system-rtosc.patch"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest"
+ ,(string-append "-DZYN_DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/zynaddsubfx")
+ "-DZYN_SYSTEM_RTOSC=ON")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3190,10 +3199,20 @@ (define-public zynaddsubfx
(substitute* "src/CMakeLists.txt"
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
- (string-append flag " -msse -msse2 -mfpmath=sse"))))))))
+ (string-append flag " -msse -msse2 -mfpmath=sse")))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "/bin/zyn-fusion")))
+ (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (search-input-file inputs "/lib/libzest.so"))))))))
(inputs
(list liblo
ntk
+ rtosc
+ mruby-zest
mesa
alsa-lib
jack-1
@@ -3205,7 +3224,14 @@ (define-public zynaddsubfx
(native-inputs
(list pkg-config
ruby))
- (home-page "https://zynaddsubfx.sf.net/")
+ (native-search-paths
+ (list (search-path-specification
+ (variable "LV2_PATH")
+ (files '("lib/lv2")))
+ (search-path-specification
+ (variable "VST2_PATH")
+ (files '("lib/vst")))))
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
diff --git a/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
new file mode 100644
index 0000000000..edf22c389b
--- /dev/null
+++ b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
@@ -0,0 +1,106 @@
+Adding the option ZYN_SYSTEM_RTOSC to let the use of the system provided RtOsc
+instead of using the bundled one.
+
+--- a/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -10,24 +10,34 @@
+ add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
+ endif()
+
++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
++
+ #Include RTOSC
+-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(STATUS "RTOSC NOT FOUND")
+- message(STATUS "Attempting to checkout submodule")
+- find_package(Git REQUIRED)
+- execute_process(COMMAND git submodule update --init --recursive)
++if(ZYN_SYSTEM_RTOSC)
++ include(FindPkgConfig)
++ pkg_check_modules(RTOSC REQUIRED librtosc)
++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
++ include_directories(${RTOSC_INCLUDE_DIR})
++ message(STATUS "Found system provided librtosc and librtosc-cpp...")
++else()
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ message(STATUS "RTOSC NOT FOUND")
++ message(STATUS "Attempting to checkout submodule")
++ find_package(Git REQUIRED)
++ execute_process(COMMAND git submodule update --init --recursive)
++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
++ "please check file permissions and your network")
++ endif()
++ else()
++ message(STATUS "Found Rtosc Submodule...")
+ endif()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+--- a/src/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -575,13 +575,27 @@
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")
+
+
+When ZYN_SYSTEM_RTOSC is ON, port-checker file is not available and the test
+fails.
+
+--- a/src/Tests/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/Tests/CMakeLists.txt 2023-05-04 00:19:01.635383149 +0200
+@@ -65,7 +65,6 @@
+
+ if(LIBLO_FOUND)
+ cp_script(check-ports.rb)
+- add_test(PortChecker check-ports.rb)
+ endif()
+ add_executable(save-osc SaveOSC.cpp)
+ target_link_libraries(save-osc
--
2.40.1
S
S
Sughosha wrote on 1 Nov 2023 07:58
(address . control@debbugs.gnu.org)
085260A0-149F-477E-8698-C9B783547C30@disroot.org
merge 57984 63254
quit
Attachment: file
S
S
Sughosha wrote on 1 Nov 2023 10:53
(address . 63254@debbugs.gnu.org)(name . Sughosha)(address . sughosha@proton.me)
20b60d0db41c1db38e20b3ad8e0bd7834f78b56c.1698832359.git.sughosha@disroot.org
From: Sughosha <sughosha@proton.me>

* gnu/packages/audio.scm (rtosc): New variable.
* gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparision-operator.patch: New file.
* gnu/local.mk: Register the patch file.

Change-Id: I741459d9a6e9986912cff998d2da097485021417
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 45 +++++++++++++++++++
....3.1-fix-invalid-comparison-operator.patch | 14 ++++++
3 files changed, 60 insertions(+)
create mode 100644 gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch

Toggle diff (90 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 27e57302ae..680975da9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1931,6 +1931,7 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
+ %D%/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
%D%/packages/patches/racket-backport-8.10-rktboot.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7c49ba1841..366d33a559 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2830,6 +2830,51 @@ (define-public liblo
implementation of the Open Sound Control (@dfn{OSC}) protocol.")
(license license:lgpl2.1+)))
+(define-public rtosc
+ (package
+ (name "rtosc")
+ (version "0.3.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fundamental/rtosc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1djvyq53cjwd0szkvhpk45zcmdgrlirjwr02nqq9hzdmh0n26pk2"))
+ (patches
+ (search-patches
+ "rtosc-0.3.1-fix-invalid-comparison-operator.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DPERF_TEST=ON"
+ "-DRTOSC_BUILD_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-documentation
+ (lambda _
+ (invoke "make" "rtosc-doc")))
+ (add-after 'install 'install-documentation
+ (lambda _
+ (copy-recursively "html"
+ (string-append #$output:doc
+ "/share/doc/rtosc/html")))))))
+ (native-inputs
+ (list doxygen pkg-config ruby))
+ (inputs
+ (list jack-1
+ liblo
+ libx11
+ mesa))
+ (outputs (list "out" "doc"))
+ (home-page "https://fundamental-code.com/wiki/rtosc/")
+ (synopsis "Realtime Safe OSC packet serialization and dispatch")
+ (description
+ "RtOsc is a realtime safe library for handling OSC messages.")
+ (license license:expat)))
+
(define-public rtaudio
(package
(name "rtaudio")
diff --git a/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
new file mode 100644
index 0000000000..925e39e9a1
--- /dev/null
+++ b/gnu/packages/patches/rtosc-0.3.1-fix-invalid-comparison-operator.patch
@@ -0,0 +1,14 @@
+This patch fixes the unknown version comparison operator
+
+diff --git a/librtosc-cpp.pc.cmake b/librtosc-cpp.pc.cmake
+index 0d8fda2..edbcb3a 100644
+--- a/librtosc-cpp.pc.cmake
++++ b/librtosc-cpp.pc.cmake
+@@ -9,6 +9,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ Name: rtosc_cpp
+ Description: rtosc_cpp - a realtime safe open sound control serialization and dispatch system for C++
+ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+-Requires: librtosc == @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
++Requires: librtosc = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
+ Libs: -L${libdir} -lrtosc -lrtosc-cpp
+ Cflags: -I${includedir}
--
2.41.0
S
S
Sughosha wrote on 1 Nov 2023 10:53
[PATCH v5 1/4] gnu: Add nanovg.
(address . 63254@debbugs.gnu.org)(name . Sughosha)(address . sughosha@proton.me)
d6237e3c05f2068b3635035afd39ab392c2d58dc.1698832359.git.sughosha@disroot.org
From: Sughosha <sughosha@proton.me>

* gnu/packages/gl.scm (nanovg): New variable.
---
gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6472158abc..9c5c2e32a3 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -954,6 +954,52 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public nanovg
+ ;; No tags are available.
+ (let ((revision "0")
+ (commit "7544c114e83db7cf67bd1c9e012349b70caacc2f"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0n29rxdp20xnvnpsjcmg3v5n6z7ya5ji4qirp18qcyls5xdxdxkc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target)
+ "../source/src/nanovg.c" "-c" "-fPIC")
+ (invoke #$(cc-for-target)
+ "-shared" "-olibnanovg.so" "nanovg.o")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib"))
+ (include (string-append #$output
+ "/include")))
+ (install-file "libnanovg.so" lib)
+ (with-directory-excursion "../source"
+ (for-each
+ (lambda (file)
+ (install-file file include))
+ (find-files "src" "nanovg.*\\.h$")))))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "2D vector drawing library on top of OpenGL")
+ (description
+ "NanoVG is an antialiased vector graphics rendering library for OpenGL.
+It is aimed for building scalable user interfaces and visualizations.")
+ (license license:zlib))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")

base-commit: c0895371c5759c7d9edb330774e90f192cc4cf2c
--
2.41.0
S
S
Sughosha wrote on 1 Nov 2023 10:53
[PATCH v5 3/4] gnu: Add mruby-zest.
(address . 63254@debbugs.gnu.org)(name . Sughosha)(address . sughosha@proton.me)
5512f81bc945ad2452c370eaf441a2519c17cb28.1698832359.git.sughosha@disroot.org
From: Sughosha <sughosha@proton.me>

* gnu/packages/mruby-xyz.scm: New file.
* gnu/local.mk: Register the file.
---
gnu/local.mk | 1 +
gnu/packages/mruby-xyz.scm | 176 +++++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+)
create mode 100644 gnu/packages/mruby-xyz.scm

Toggle diff (196 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 680975da9e..3a16aeb887 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -448,6 +448,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
+ %D%/packages/mruby-xyz.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/musl.scm \
diff --git a/gnu/packages/mruby-xyz.scm b/gnu/packages/mruby-xyz.scm
new file mode 100644
index 0000000000..5524976dec
--- /dev/null
+++ b/gnu/packages/mruby-xyz.scm
@@ -0,0 +1,176 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 <sughosha@proton.me>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mruby-xyz)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages fonts)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages xorg))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; Cloning recursively for and the required mruby sources
+ ;; and gems.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; This packages contains a custom "pugl". Replacing it with the
+ ;; system "pugl" fails to build.
+ ;; Delete the bundled "libuv", "nanovg" and "rtosc".
+ '(with-directory-excursion "deps"
+ (for-each delete-file-recursively
+ (list "libuv" "nanovg" "rtosc"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Do not compile "nanovg" and "libuv" and use the system
+ ;; provided versions of them.
+ (substitute* "Makefile"
+ (("cd deps/nanovg") "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#$(AR) rc deps/libnanovg.a")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("cd deps/libuv") "#cd deps/libuv")
+ (("\\./deps/libuv/\\.libs/libuv\\.a")
+ "-luv")
+ (("\\./deps/libuv/\\.libs/libuv-win\\.a")
+ "-luv-win"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ "-lnanovg")
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libuv\\.a")
+ "-luv")
+ (("cc\\.include_paths.*\\./deps/nanovg/.*$")
+ "#")
+ (("cc\\.include_paths.*\\./deps/libuv/.*$")
+ "#"))
+ (substitute* "deps/mruby-nanovg/src/nvg_screenshot.c"
+ (("\\.\\./\\.\\./nanovg/.*/stb_image_write\\.h")
+ (search-input-file inputs "/example/stb_image_write.h")))
+ ;; Use the system provided "rtosc" headers.
+ (substitute* "src/mruby-widget-lib/src/gem.c"
+ (("\"\\.\\./\\.\\./\\.\\./deps/.*/rtosc\\.h\"")
+ "<rtosc/rtosc.h>"))
+ ;; Fix missing fonts.
+ (substitute*
+ "src/mruby-widget-lib/mrblib/script.rb"
+ (("sans = \\[")
+ (string-append
+ "sans = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Regular.ttf")
+ "\", "))
+ (("bold = \\[")
+ (string-append
+ "bold = [\""
+ (search-input-file inputs
+ "/share/fonts/truetype/Roboto-Bold.ttf")
+ "\", ")))
+ ;; Fix paths for zyn-fusion files.
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("fopen\\(\\\"schema/")
+ (string-append
+ "fopen(\"" #$output "/share/zyn-fusion/schema/")))
+ (substitute* "test-libversion.c"
+ (("./libzest.so")
+ (string-append #$output "/lib/libzest.so")))
+ (substitute* "src/mruby-widget-lib/src/api.c"
+ ((", \\\"\\./qml/") ", \"../share/zyn-fusion/qml/")
+ (("\\./qml/")
+ (string-append #$output "/share/zyn-fusion/qml")))))
+ (replace 'install
+ (lambda _
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" (string-append #$output "/bin"))
+ (install-file "libzest.so" (string-append #$output "/lib"))
+ (for-each
+ (lambda (folder)
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append #$output "/share/zyn-fusion/qml")))
+ (find-files folder "\\.qml$")))
+ '("src/mruby-zest/qml" "src/mruby-zest/example"))
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append #$output "/share/zyn-fusion/schema"))
+ (install-file "completions/zyn-fusion"
+ (string-append
+ #$output "/share/bash-completion/completions")))))))
+ (native-inputs
+ (list (package-source nanovg) ;for "stb_image_write.h"
+ pkg-config
+ ruby))
+ (inputs
+ (list font-google-roboto
+ libuv
+ libx11
+ mesa
+ ;; With the latest version of "nanovg" the contents are not
+ ;; displayed properly.
+ (let ((version "0")
+ (revision "0")
+ (commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28"))
+ (package (inherit nanovg)
+ (version (git-version version revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))))
+ rtosc))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Zyn-Fusion user interface")
+ (description
+ "This package provides user interface for Zyn-Fusion.")
+ (license
+ (list license:lgpl2.1))))
--
2.41.0
S
S
Sughosha wrote on 1 Nov 2023 10:53
[PATCH v5 4/4] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
(address . 63254@debbugs.gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
938936ccd742bd61229b5675174ac1673965b925.1698832359.git.sughosha@disroot.org
* gnu/packages/music.scm (zynaddsubfx)[source]: Add a patches.
[arguments]: Add configure flags and patch-paths phase.
[inputs]: Remove ntk and add rtosc and mruby-zest.
[native-search-paths]: Add search paths for "LV2_PATH" and "VST2_PATH".
[home-page]: Change home-page.
* gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch: New file.
* gnu/local.mk: Register the patch file.

Change-Id: I21ca035aae3e17379995c7edd377ced31f60de73
---
gnu/local.mk | 3 +-
gnu/packages/music.scm | 34 +++++-
.../zynaddsubfx-3.0.6-system-rtosc.patch | 106 ++++++++++++++++++
3 files changed, 138 insertions(+), 5 deletions(-)
create mode 100644 gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch

Toggle diff (199 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3a16aeb887..2682c04897 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2171,7 +2171,8 @@ dist_patch_DATA = \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-system-paths.patch \
- %D%/packages/patches/zsh-egrep-failing-test.patch
+ %D%/packages/patches/zsh-egrep-failing-test.patch \
+ %D%/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
MISC_DISTRO_FILES = \
%D%/packages/ld-wrapper.in
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b181c86b45..828b11a458 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -157,6 +157,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages man)
#:use-module (gnu packages mp3)
#:use-module (gnu packages mpd)
+ #:use-module (gnu packages mruby-xyz)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages networking)
@@ -3178,10 +3179,18 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))
+ (patches
+ (search-patches
+ "zynaddsubfx-3.0.6-system-rtosc.patch"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest"
+ ,(string-append "-DZYN_DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/zynaddsubfx")
+ "-DZYN_SYSTEM_RTOSC=ON")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3191,10 +3200,20 @@ (define-public zynaddsubfx
(substitute* "src/CMakeLists.txt"
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
- (string-append flag " -msse -msse2 -mfpmath=sse"))))))))
+ (string-append flag " -msse -msse2 -mfpmath=sse")))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "/bin/zyn-fusion")))
+ (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (search-input-file inputs "/lib/libzest.so"))))))))
(inputs
(list liblo
ntk
+ rtosc
+ mruby-zest
mesa
alsa-lib
jack-1
@@ -3206,7 +3225,14 @@ (define-public zynaddsubfx
(native-inputs
(list pkg-config
ruby))
- (home-page "https://zynaddsubfx.sf.net/")
+ (native-search-paths
+ (list (search-path-specification
+ (variable "LV2_PATH")
+ (files '("lib/lv2")))
+ (search-path-specification
+ (variable "VST2_PATH")
+ (files '("lib/vst")))))
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
diff --git a/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
new file mode 100644
index 0000000000..edf22c389b
--- /dev/null
+++ b/gnu/packages/patches/zynaddsubfx-3.0.6-system-rtosc.patch
@@ -0,0 +1,106 @@
+Adding the option ZYN_SYSTEM_RTOSC to let the use of the system provided RtOsc
+instead of using the bundled one.
+
+--- a/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -10,24 +10,34 @@
+ add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
+ endif()
+
++option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
++
+ #Include RTOSC
+-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(STATUS "RTOSC NOT FOUND")
+- message(STATUS "Attempting to checkout submodule")
+- find_package(Git REQUIRED)
+- execute_process(COMMAND git submodule update --init --recursive)
++if(ZYN_SYSTEM_RTOSC)
++ include(FindPkgConfig)
++ pkg_check_modules(RTOSC REQUIRED librtosc)
++ pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
++ include_directories(${RTOSC_INCLUDE_DIR})
++ message(STATUS "Found system provided librtosc and librtosc-cpp...")
++else()
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
+- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ message(STATUS "RTOSC NOT FOUND")
++ message(STATUS "Attempting to checkout submodule")
++ find_package(Git REQUIRED)
++ execute_process(COMMAND git submodule update --init --recursive)
++ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
++ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
++ "please check file permissions and your network")
++ endif()
++ else()
++ message(STATUS "Found Rtosc Submodule...")
+ endif()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+--- a/src/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/CMakeLists.txt 2023-05-03 23:17:58.411667901 +0200
+@@ -575,13 +575,27 @@
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")
+
+
+When ZYN_SYSTEM_RTOSC is ON, port-checker file is not available and the test
+fails.
+
+--- a/src/Tests/CMakeLists.txt 2022-01-22 02:46:21.000000000 +0100
++++ b/src/Tests/CMakeLists.txt 2023-05-04 00:19:01.635383149 +0200
+@@ -65,7 +65,6 @@
+
+ if(LIBLO_FOUND)
+ cp_script(check-ports.rb)
+- add_test(PortChecker check-ports.rb)
+ endif()
+ add_executable(save-osc SaveOSC.cpp)
+ target_link_libraries(save-osc
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 63254@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63254
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch