Package: guix-patches;
Reported by: Sughosha <Sughosha <at> proton.me>
Date: Wed, 3 May 2023 22:59:02 UTC
Severity: normal
Tags: patch
Merged with 57984
To reply to this bug, email your comments to 63254 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 22:59:02 GMT) Full text and rfc822 format available.Sughosha <Sughosha <at> proton.me>
:guix-patches <at> gnu.org
.
(Wed, 03 May 2023 22:59:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org> Subject: [PATCH 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Wed, 03 May 2023 22:58:13 +0000
These are the patches to switch to Zyn-Fusion interface provided by "mruby-zest" and using the system provided "rtosc".
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 23:01:02 GMT) Full text and rfc822 format available.Message #8 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH 1/5] gnu: Add pugl. Date: Wed, 03 May 2023 23:00:36 +0000
* gnu/packages/gl.scm (pugl): New variable. --- gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 23:02:02 GMT) Full text and rfc822 format available.Message #11 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH 2/5] gnu: Add nanovg. Date: Wed, 03 May 2023 23:01:08 +0000
* gnu/packages/gl.scm (nanovg): New variable. --- gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 23:02:02 GMT) Full text and rfc822 format available.Message #14 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH 3/5] gnu: Add rtosc. Date: Wed, 03 May 2023 23:01:34 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 23:03:02 GMT) Full text and rfc822 format available.Message #17 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH 4/5] gnu: Add mruby-zest. Date: Wed, 03 May 2023 23:02:09 +0000
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 03 May 2023 23:04:01 GMT) Full text and rfc822 format available.Message #20 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Wed, 03 May 2023 23:02:46 +0000
From f454e2f8af61e9ab593fbf5cc3fdccf6d390ab7c Mon Sep 17 00:00:00 2001 From: Sughosha <sughosha <at> 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:06:04 GMT) Full text and rfc822 format available.Message #23 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Thu, 04 May 2023 08:04:42 +0000
These V2 patches contain no changes but improved comments in the package definitions.
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:07:02 GMT) Full text and rfc822 format available.Message #26 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 1/5] gnu: Add pugl. Date: Thu, 04 May 2023 08:05:55 +0000
* gnu/packages/gl.scm (pugl): New variable. --- gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:08:01 GMT) Full text and rfc822 format available.Message #29 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 2/5] gnu: Add nanovg. Date: Thu, 04 May 2023 08:06:36 +0000
* gnu/packages/gl.scm (nanovg): New variable. --- gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:08:02 GMT) Full text and rfc822 format available.Message #32 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 3/5] gnu: Add rtosc. Date: Thu, 04 May 2023 08:07:15 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:09:01 GMT) Full text and rfc822 format available.Message #35 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 4/5] gnu: Add mruby-zest. Date: Thu, 04 May 2023 08:07:54 +0000
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:10:02 GMT) Full text and rfc822 format available.Message #38 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v2 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Thu, 04 May 2023 08:08:40 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:37:02 GMT) Full text and rfc822 format available.Message #41 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Thu, 04 May 2023 08:35:47 +0000
In "version" of "nanovg" in the inputs of "mruby-zest", "(package-version nanovg)" is changed to the independent "version" which is "0".
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:37:02 GMT) Full text and rfc822 format available.Message #44 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 1/5] gnu: Add pugl. Date: Thu, 04 May 2023 08:36:13 +0000
* gnu/packages/gl.scm (pugl): New variable. --- gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:38:02 GMT) Full text and rfc822 format available.Message #47 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 2/5] gnu: Add nanovg. Date: Thu, 04 May 2023 08:37:01 +0000
* gnu/packages/gl.scm (nanovg): New variable. --- gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:38:02 GMT) Full text and rfc822 format available.Message #50 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 3/5] gnu: Add rtosc. Date: Thu, 04 May 2023 08:37:21 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:39:02 GMT) Full text and rfc822 format available.Message #53 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 4/5] gnu: Add mruby-zest. Date: Thu, 04 May 2023 08:37:50 +0000
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Thu, 04 May 2023 08:39:02 GMT) Full text and rfc822 format available.Message #56 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v3 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Thu, 04 May 2023 08:38:28 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:00:01 GMT) Full text and rfc822 format available.Message #59 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Fri, 16 Jun 2023 18:59:19 +0000
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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:03:02 GMT) Full text and rfc822 format available.Message #62 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 1/5] gnu: Add pugl. Date: Fri, 16 Jun 2023 19:02:07 +0000
* gnu/packages/gl.scm (pugl): New variable. --- gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:04:02 GMT) Full text and rfc822 format available.Message #65 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 2/5] gnu: Add nanovg. Date: Fri, 16 Jun 2023 19:02:40 +0000
* gnu/packages/gl.scm (nanovg): New variable. --- gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:04:02 GMT) Full text and rfc822 format available.Message #68 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 3/5] gnu: Add rtosc. Date: Fri, 16 Jun 2023 19:03:43 +0000
* 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:05:02 GMT) Full text and rfc822 format available.Message #71 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 4/5] gnu: Add mruby-zest. Date: Fri, 16 Jun 2023 19:04:08 +0000
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Fri, 16 Jun 2023 19:05:02 GMT) Full text and rfc822 format available.Message #74 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <Sughosha <at> proton.me> To: "63254 <at> debbugs.gnu.org" <63254 <at> debbugs.gnu.org> Subject: [PATCH v4 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Fri, 16 Jun 2023 19:04:43 +0000
* 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 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
Sughosha <sughosha <at> disroot.org>
to control <at> debbugs.gnu.org
.
(Wed, 01 Nov 2023 07:00:01 GMT) Full text and rfc822 format available.gabriel <at> erlikon.ch, guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 01 Nov 2023 09:55:01 GMT) Full text and rfc822 format available.Message #79 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <sughosha <at> disroot.org> To: 63254 <at> debbugs.gnu.org Cc: Sughosha <sughosha <at> proton.me> Subject: [PATCH v5 2/4] gnu: Add rtosc. Date: Wed, 1 Nov 2023 10:53:03 +0100
From: Sughosha <sughosha <at> 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 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 01 Nov 2023 09:55:02 GMT) Full text and rfc822 format available.Message #82 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <sughosha <at> disroot.org> To: 63254 <at> debbugs.gnu.org Cc: Sughosha <sughosha <at> proton.me> Subject: [PATCH v5 1/4] gnu: Add nanovg. Date: Wed, 1 Nov 2023 10:53:02 +0100
From: Sughosha <sughosha <at> proton.me> * gnu/packages/gl.scm (nanovg): New variable. --- gnu/packages/gl.scm | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 01 Nov 2023 09:55:02 GMT) Full text and rfc822 format available.Message #85 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <sughosha <at> disroot.org> To: 63254 <at> debbugs.gnu.org Cc: Sughosha <sughosha <at> proton.me> Subject: [PATCH v5 3/4] gnu: Add mruby-zest. Date: Wed, 1 Nov 2023 10:53:04 +0100
From: Sughosha <sughosha <at> 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 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 <at> 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
guix-patches <at> gnu.org
:bug#63254
; Package guix-patches
.
(Wed, 01 Nov 2023 09:55:03 GMT) Full text and rfc822 format available.Message #88 received at 63254 <at> debbugs.gnu.org (full text, mbox):
From: Sughosha <sughosha <at> disroot.org> To: 63254 <at> debbugs.gnu.org Cc: Sughosha <sughosha <at> disroot.org> Subject: [PATCH v5 4/4] gnu: zynaddsubfx: Switch to Zyn-Fusion interface. Date: Wed, 1 Nov 2023 10:53:05 +0100
* 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 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
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.