all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sughosha via Guix-patches via <guix-patches@gnu.org>
To: "63254@debbugs.gnu.org" <63254@debbugs.gnu.org>
Subject: [bug#63254] [PATCH 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.
Date: Wed, 03 May 2023 23:02:46 +0000	[thread overview]
Message-ID: <K5ymmkzIsFxl8K1vZ42ydALwt6yYxJjz67ffMZu-uVFHVQEtNRi5vix2mOgxajLy2Qoas4kJooxCIb0-6Fub_35ZyzCLCC7GTqTseeZs64E=@proton.me> (raw)
In-Reply-To: <xFwn-qV2bLvixSdTGGbORhvuP891xykYhD_AoAITAeE8IZ30TMVhpOthI979E6g9Lz58sV-jrnzgWICclGC2AXR0ZWvWbwGzvI3SxrKSREU=@proton.me>

From f454e2f8af61e9ab593fbf5cc3fdccf6d390ab7c Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Thu, 4 May 2023 00:49:01 +0200
Subject: [PATCH 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface.

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

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





  parent reply	other threads:[~2023-05-03 23:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 22:58 [bug#63254] [PATCH 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface Sughosha via Guix-patches via
2023-05-03 23:00 ` [bug#63254] [PATCH 1/5] gnu: Add pugl Sughosha via Guix-patches via
2023-05-03 23:01 ` [bug#63254] [PATCH 2/5] gnu: Add nanovg Sughosha via Guix-patches via
2023-05-03 23:01 ` [bug#63254] [PATCH 3/5] gnu: Add rtosc Sughosha via Guix-patches via
2023-05-03 23:02 ` [bug#63254] [PATCH 4/5] gnu: Add mruby-zest Sughosha via Guix-patches via
2023-05-03 23:02 ` Sughosha via Guix-patches via [this message]
2023-05-04  8:04 ` [bug#63254] [PATCH v2 0/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface Sughosha via Guix-patches via
2023-05-04  8:05 ` [bug#63254] [PATCH v2 1/5] gnu: Add pugl Sughosha via Guix-patches via
2023-05-04  8:06 ` [bug#63254] [PATCH v2 2/5] gnu: Add nanovg Sughosha via Guix-patches via
2023-05-04  8:07 ` [bug#63254] [PATCH v2 3/5] gnu: Add rtosc Sughosha via Guix-patches via
2023-05-04  8:07 ` [bug#63254] [PATCH v2 4/5] gnu: Add mruby-zest Sughosha via Guix-patches via
2023-05-04  8:08 ` [bug#63254] [PATCH v2 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface Sughosha via Guix-patches via
2023-05-04  8:35 ` [bug#63254] [PATCH v3 0/5] " Sughosha via Guix-patches via
2023-05-04  8:36 ` [bug#63254] [PATCH v3 1/5] gnu: Add pugl Sughosha via Guix-patches via
2023-05-04  8:37 ` [bug#63254] [PATCH v3 2/5] gnu: Add nanovg Sughosha via Guix-patches via
2023-05-04  8:37 ` [bug#63254] [PATCH v3 3/5] gnu: Add rtosc Sughosha via Guix-patches via
2023-05-04  8:37 ` [bug#63254] [PATCH v3 4/5] gnu: Add mruby-zest Sughosha via Guix-patches via
2023-05-04  8:38 ` [bug#63254] [PATCH v3 5/5] gnu: zynaddsubfx: Switch to Zyn-Fusion interface Sughosha via Guix-patches via
2023-06-16 18:59   ` [bug#63254] [PATCH v4 0/5] " Sughosha via Guix-patches via
2023-06-16 19:04     ` [bug#63254] [PATCH v4 5/5] " Sughosha via Guix-patches via
2023-06-16 19:02 ` [bug#63254] [PATCH v4 1/5] gnu: Add pugl Sughosha via Guix-patches via
2023-06-16 19:02 ` [bug#63254] [PATCH v4 2/5] gnu: Add nanovg Sughosha via Guix-patches via
2023-06-16 19:03 ` [bug#63254] [PATCH v4 3/5] gnu: Add rtosc Sughosha via Guix-patches via
2023-06-16 19:04 ` [bug#63254] [PATCH v4 4/5] gnu: Add mruby-zest Sughosha via Guix-patches via
2023-11-01  9:53 ` [bug#63254] [PATCH v5 1/4] gnu: Add nanovg Sughosha via Guix-patches via
2023-11-01  9:53   ` [bug#63254] [PATCH v5 2/4] gnu: Add rtosc Sughosha via Guix-patches via
2023-11-01  9:53   ` [bug#63254] [PATCH v5 3/4] gnu: Add mruby-zest Sughosha via Guix-patches via
2023-11-01  9:53   ` [bug#63254] [PATCH v5 4/4] gnu: zynaddsubfx: Switch to Zyn-Fusion interface Sughosha via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='K5ymmkzIsFxl8K1vZ42ydALwt6yYxJjz67ffMZu-uVFHVQEtNRi5vix2mOgxajLy2Qoas4kJooxCIb0-6Fub_35ZyzCLCC7GTqTseeZs64E=@proton.me' \
    --to=guix-patches@gnu.org \
    --cc=63254@debbugs.gnu.org \
    --cc=Sughosha@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.