From patchwork Wed Oct 26 12:04:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 44139 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3FB8F27BBEB; Wed, 26 Oct 2022 13:06:58 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8A49127BBEA for ; Wed, 26 Oct 2022 13:06:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onf9s-0001lg-Cb; Wed, 26 Oct 2022 08:05:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onf9b-0001Yj-RP for guix-patches@gnu.org; Wed, 26 Oct 2022 08:05:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onf9a-0007hL-LT for guix-patches@gnu.org; Wed, 26 Oct 2022 08:05:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onf9a-0004s8-BV for guix-patches@gnu.org; Wed, 26 Oct 2022 08:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Oct 2022 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57984@debbugs.gnu.org, Maxim Cournoyer , Sughosha Received: via spool by 57984-submit@debbugs.gnu.org id=B57984.166678586518681 (code B ref 57984); Wed, 26 Oct 2022 12:05:02 +0000 Received: (at 57984) by debbugs.gnu.org; 26 Oct 2022 12:04:25 +0000 Received: from localhost ([127.0.0.1]:53544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onf8x-0004rE-QP for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:04:24 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:50134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onf8u-0004r4-U3 for 57984@debbugs.gnu.org; Wed, 26 Oct 2022 08:04:23 -0400 Received: from [192.168.135.79] ([188.189.62.161]) by andre.telenet-ops.be with bizsmtp id cc4J2800K3UkGZ001c4JsE; Wed, 26 Oct 2022 14:04:19 +0200 Message-ID: <164b342a-f0ba-2e66-9b61-5e46c615a510@telenet.be> Date: Wed, 26 Oct 2022 14:04:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 References: <7sCHb5HxK6FIxg7kD6T0Fel6qnRoiecKy6WwKt-s0KAAKw9JQQzS3jd829nhYLIKfwytwHwQmI_IK3Zm4woqKmVqtQ0hBWkDzjpJlbspusg=@proton.me> Content-Language: en-US From: Maxime Devos In-Reply-To: <7sCHb5HxK6FIxg7kD6T0Fel6qnRoiecKy6WwKt-s0KAAKw9JQQzS3jd829nhYLIKfwytwHwQmI_IK3Zm4woqKmVqtQ0hBWkDzjpJlbspusg=@proton.me> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1666785859; bh=0UJEUiNy33vtJtYAqAQfaMnPlWAO3P7k8/bQWJnw9Oc=; h=Date:To:References:From:Subject:In-Reply-To; b=PITICJ2LAvnEM04fwSn6t8SIuKb/es5j91xeQhRGKpfUNZEnVHDedtCuWuMehyoGZ 6dzogsrcfKRCntJC9umf2ew7Ej23eC3XlDi7TKtfF7HYs0pQBJq+BE9fzw8WsqBYMo ud2olr+CuaN+m5MIZDMRXLhEspU1zK6bYghGBCmkaTIFsgcwyZjTCr0DBuHksSxAGu xkkmq2YzCqL5n7RYwvfqXWToY5sO4P0uuEAFi10Ke5raj6S+W3O/RxL7NLOJqrW8sB CiFh8psvEESMNuQbnWuqdxahzd/O5QGda2UUwlIoBw9JL7fuLGvXy4LTgN/97aseF+ UIB5R9tGAL0Gg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches > Regarding recursive clone, I packages the runtime dependencies > seperately but I left the mruby gems, since they seem to be needed > just as source (without needing to be compiled) as they are to be > configured by mruby for mruby-zest. [...] Bundling things that aren't compiled is still bundling. Also, now both mruby-zest and zynaddsubfx bundle rtosc, which is worse than a package bundling a dependent that isn't used anywhere else. I've looked at the latest patches and did some changes (see attached patches), though the bundling still remains. In nanovg, I changed the 'revision' to 0 -- its just a monotonically increasing number for each package update, it's not a 'how many commits have there been', see (guix)Version Numbers. I also changed "ar" to #$(ar-for-target) -- using the 'wrong' ar sometimes works, but not always, e.g. IIRC it failed when cross-compiling from some 64-bit arch to a 32-bit ach? Upstream appears to use 'premake4' as a build system, so I adjusted the package definition accordingly. I set the 'file-name' field for to be more informative. --- I corrected the revision in font-entypo as with nanovg. I expanded the description a little, and added a TODO on building the font from source (it seems to have been neglected for font packages because of node dependencies). The license combination seemed a bit odd to me so I added some more text there. --- mruby-zest: I changed 'TODO: package mruby gems separately' to 'TODO: unbundle mruby gems' as that seems easier to search for. Some things were actually packaged, so I removed those from 'deps' in a snippet. It turned out that the Makefile tried to build mruby, so I patched that out. As mruby isn't included anymore, you could give removing some of the bundled mruby gems a try, especially given that they aren't actually installed. I removed '#:tests? #false' because a test suite exists -- the makefile has a 'test' and 'rtest' target. I choose the 'rtest' target (because 'test' is for testing mruby, not mruby-zest). It turned out the test suite requires 'ruby-ruby-prof' so I added that as a native-input. You have done #$some-input in the 'install' phase -- package transformation don't know to adjust those, so I replaced it with a search-input-file equivalent. Putting the fonts in the output of mruby-zest doesn't lookk quite right to me, so I instead moved things to a post-unpack phase and used 'substitute*' instead of 'symlink'. I noticed that pcre was bundled (deps/mruby-regexp-pcre/pcre'), so I removed that. By looking at , I noticed it looks for libzest.so in /opt/zyn-fusion/libzest.so, which is incorrect in Guix (and other distros too). I removed the wrapping because: * no reason was listed for wrapping * presumably the incorrect reference was the thing that LD_LIBRARY_PATH was a work-around for, but that reference has now been corrected. * LD_LIBRARY_PATH is leaky and hence to be avoided (if zest spawns a subprocess, then that subprocess would get LD_LIBRARY_PATH too) As a bonus, this allowed removing 'bash-minimal' from the inputs. From , I noticed that apparently some references to schema/test.json and MainWindow.qml were incorrect. These are now patched. I simplified the unbundling substitutions a little. For example, it turned out that build_config.rb did not need any substitutions somehow. The makefile uses pkg-config instead of TARGET-pkg-config, which is incorrect when cross-compiling, so I patched that. On the fonts: I noticed that the fonts don't become part of the closure (with "guix gc --references"). As such, maybe the source files that use the fonts are actually unused. I propose to give installing the examples that use the fonts a try, or alternatively explicitly choose to not install the (font-using) examples. --- I changed the version of zynaddsubfx from (package-version mruby-zest) to "3.0.6", otherwise the package would break after a mruby-zest update. I re-added the comment of 'remove-sse-flags-from-generic-target' that was removed. I changed #$mruby-zest to a search-input-file equivalent, for the same reason as with previous patches. You forgot to mention the home page, so I adjusted the commit message. You are fixing a file name, not a path, so I adjusted the new phase name. By removing the 'ntk' input, zynaddsubfx now has one less interface, so I re-added it, with a comment. It appeared that doxygen documentation wasn't actually build (there is no .html in the output, and the configuraiton script complained about some missing component), so I removed the new doxygen (native-)input. bash completions weren't installed in the new version even though they were in the previous version, so I made some changes to support that. I adjusted the substitution of libzest.so to substitute all cases, in case somehow the first dlopen fails. I compared the diff between old and new source code, there doesn't appear to be anything 'suspicious' though its just a cursory look and it would be easy to hide things: guix shell diffoscope -- diffoscope /gnu/store/9j09zj472211nrrs5jmyxdsq2lpfd36q-zynaddsubfx-3.0.5.tar.bz2 /gnu/store/xyjiq3nmk372ap4vq7sl7n7f9rc5xshs-zynaddsubfx-3.0.6.tar.bz2 From 3feccc0f627a2bb44c5f03bd54fa9d08198c1702 Mon Sep 17 00:00:00 2001 From: Sughosha Date: Sat, 15 Oct 2022 15:59:55 +0200 Subject: [PATCH 4/4] gnu: zynaddsubfx: Update to 3.0.6. Upstream has switched from ntk to mruby-zest. * gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6. Update package style. [arguments]{#:phases}[fix-zyn-fusion-location]: New phase for new dependency. [inputs]: Add mruby-zest. [home-page]: Update home page. Modified-by: Maxime Devos --- gnu/packages/music.scm | 74 +++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 63c66b17d5..0f82c85bcb 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -3167,42 +3167,58 @@ (define-public mruby-zest (define-public zynaddsubfx (package (name "zynaddsubfx") - (version "3.0.5") + (version "3.0.6") (source (origin (method url-fetch) (uri (string-append - "mirror://sourceforge/zynaddsubfx/zynaddsubfx/" - version "/zynaddsubfx-" version ".tar.bz2")) + "mirror://sourceforge/zynaddsubfx/zynaddsubfx/" version + "/zynaddsubfx-" version ".tar.bz2")) (sha256 (base32 - "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl")))) + "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb")))) (build-system cmake-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - ;; Move SSE compiler optimization flags from generic target to - ;; athlon64 and core2 targets, because otherwise the build would fail - ;; on non-Intel machines. - (add-after 'unpack 'remove-sse-flags-from-generic-target - (lambda _ - (substitute* "src/CMakeLists.txt" - (("-msse -msse2 -mfpmath=sse") "") - (("-march=(athlon64|core2)" flag) - (string-append flag " -msse -msse2 -mfpmath=sse"))) - #t))))) - (inputs - (list liblo - ntk - mesa - alsa-lib - jack-1 - fftw - minixml - libxpm - zlib)) - (native-inputs - (list pkg-config)) - (home-page "http://zynaddsubfx.sf.net/") + (list #:configure-flags #~(list "-DGuiModule=zest" + (string-append "-DZYN_DATADIR=" + #$output + "/share/zynaddsubfx") + (string-append "-DBASHCOMP_PKG_PATH=" + #$output + "/share/bash-completion/completions")) + #:phases #~(modify-phases %standard-phases + ;; Move SSE compiler optimization flags from generic + ;; target to athlon64 and core2 targets, because + ;; otherwise the build would fail on non-Intel machines. + (add-after 'unpack 'remove-sse-flags-from-generic-target + (lambda _ + (substitute* "src/CMakeLists.txt" + (("-msse -msse2 -mfpmath=sse") + "") + (("-march=(athlon64|core2)" flag) + (string-append flag + " -msse -msse2 -mfpmath=sse"))))) + (add-after 'unpack 'fix-zyn-fusion-location + (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" + (("(\\./|/opt/zyn-fusion/|)libzest.so") + (search-input-file inputs + "lib/zyn-fusion/libzest.so")))))))) + (inputs (list alsa-lib + fftwf + jack-1 + liblo + libxpm + mesa + minixml + mruby-zest + ntk ; optional, alternative interface + zlib)) + (native-inputs (list pkg-config ruby)) + (home-page "https://zynaddsubfx.sourceforge.io/") (synopsis "Software synthesizer") (description "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers -- 2.38.0