From patchwork Tue Apr 25 20:35:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gabriel Wicki X-Patchwork-Id: 49513 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 90FDB27BBEA; Tue, 25 Apr 2023 21:37:27 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 B199F27BBE2 for ; Tue, 25 Apr 2023 21:37:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prPPM-0000lH-Vt; Tue, 25 Apr 2023 16:37:05 -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 1prPPK-0000cY-CK for guix-patches@gnu.org; Tue, 25 Apr 2023 16:37:02 -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 1prPPK-00031o-4J for guix-patches@gnu.org; Tue, 25 Apr 2023 16:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prPPJ-0002RP-Lx for guix-patches@gnu.org; Tue, 25 Apr 2023 16:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63075] [PATCH 1/2] gnu: Fix supercollider. Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Apr 2023 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63075@debbugs.gnu.org Received: via spool by 63075-submit@debbugs.gnu.org id=B63075.16824549919343 (code B ref 63075); Tue, 25 Apr 2023 20:37:01 +0000 Received: (at 63075) by debbugs.gnu.org; 25 Apr 2023 20:36:31 +0000 Received: from localhost ([127.0.0.1]:53672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prPOb-0002QK-VT for submit@debbugs.gnu.org; Tue, 25 Apr 2023 16:36:31 -0400 Received: from chimborazo.ee.ethz.ch ([129.132.2.15]:55259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prPOV-0002Q1-3x for 63075@debbugs.gnu.org; Tue, 25 Apr 2023 16:36:15 -0400 Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by chimborazo.ee.ethz.ch (Postfix) with ESMTPSA id 96E4040093 for <63075@debbugs.gnu.org>; Tue, 25 Apr 2023 22:36:03 +0200 (CEST) Date: Tue, 25 Apr 2023 22:35:59 +0200 From: Gabriel Wicki Message-ID: <20230425203559.uzhf3mwdqcc4imvv@blackbox> References: <20230425203323.j5emxz2ebvhs4ckt@blackbox> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From f67786eb958a65ba778f67a8f443fa3d24293438 Mon Sep 17 00:00:00 2001 Message-Id: From: Gabriel Wicki Date: Tue, 25 Apr 2023 22:03:03 +0200 Subject: [PATCH 1/2] gnu: Fix supercollider. * gnu/packages/audio.scm (supercollider): Fix the build. [configure-flags] Re-enable DLIBSCSYNTH. [phases] New phase fix-struct-SOUNDFILE-tag. [inputs] Add ruby and python to appease the build process. --- gnu/packages/audio.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index dca5e516a1..109133ba8e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -43,6 +43,7 @@ ;;; Copyright © 2023 Sergiu Ivanov ;;; Copyright © 2023 David Thompson ;;; Copyright © 2023 Sharlatan Hellseher +;;; Copyright © 2023 Gabriel Wicki ;;; ;;; This file is part of GNU Guix. ;;; @@ -119,6 +120,7 @@ (define-module (gnu packages audio) #:use-module (gnu packages qt) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) + #:use-module (gnu packages ruby) #:use-module (gnu packages samba) #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) @@ -3485,7 +3487,7 @@ (define-public supercollider "-DSC_QT=ON" "-DCMAKE_BUILD_TYPE=Release" "-DFORTIFY=ON" - ;; "-DLIBSCSYNTH=ON" ; TODO: Re-enable? + "-DLIBSCSYNTH=ON" "-DSC_EL=OFF") ;scel is packaged individually as emacs-scel #:phases (modify-phases %standard-phases @@ -3506,6 +3508,12 @@ (define-public supercollider "SC_Filesystem::instance\\(\\)\\.getDirectory" "\\(DirName::Resource\\) / CLASS_LIB_DIR_NAME")) (string-append "Path(\"" scclass-dir "\")")))))) + (add-after 'patch-scclass-dir 'fix-struct-SOUNDFILE-tag + (lambda* _ + (display (getcwd)) (newline) + (substitute* "include/plugin_interface/SC_SndBuf.h" + (("SNDFILE_tag") + "sf_private_tag")))) (add-before 'build 'prepare-x (lambda _ (system "Xvfb &") @@ -3532,6 +3540,8 @@ (define-public supercollider boost boost-sync yaml-cpp + python-wrapper ;there were warnings in the build process + ruby ;there were warnings in the build process qtbase-5 qtdeclarative-5 qtsvg-5 From patchwork Tue Apr 25 20:39:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Wicki X-Patchwork-Id: 49514 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 3791327BBEA; Tue, 25 Apr 2023 21:40:11 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 152B327BBE2 for ; Tue, 25 Apr 2023 21:40:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prPSG-0000Xv-Lv; Tue, 25 Apr 2023 16:40:04 -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 1prPSE-0000TC-PU for guix-patches@gnu.org; Tue, 25 Apr 2023 16:40:02 -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 1prPSE-0003aH-Er for guix-patches@gnu.org; Tue, 25 Apr 2023 16:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prPSD-0002Vu-Rn for guix-patches@gnu.org; Tue, 25 Apr 2023 16:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63075] [PATCH 2/2] gnu: supercollider: Apply guix style. References: <20230425203323.j5emxz2ebvhs4ckt@blackbox> In-Reply-To: <20230425203323.j5emxz2ebvhs4ckt@blackbox> Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Apr 2023 20:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63075@debbugs.gnu.org Received: via spool by 63075-submit@debbugs.gnu.org id=B63075.16824551749620 (code B ref 63075); Tue, 25 Apr 2023 20:40:01 +0000 Received: (at 63075) by debbugs.gnu.org; 25 Apr 2023 20:39:34 +0000 Received: from localhost ([127.0.0.1]:53676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prPRl-0002V6-Bz for submit@debbugs.gnu.org; Tue, 25 Apr 2023 16:39:33 -0400 Received: from chimborazo.ee.ethz.ch ([129.132.2.15]:35659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prPRj-0002Un-FN for 63075@debbugs.gnu.org; Tue, 25 Apr 2023 16:39:32 -0400 Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by chimborazo.ee.ethz.ch (Postfix) with ESMTPSA id 964C540093 for <63075@debbugs.gnu.org>; Tue, 25 Apr 2023 22:39:24 +0200 (CEST) Date: Tue, 25 Apr 2023 22:39:21 +0200 From: Gabriel Wicki Message-ID: <20230425203921.lm32yffgshuakjm6@blackbox> MIME-Version: 1.0 Content-Disposition: inline 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 5091d29a2765e550985c058657deb5771a24a1a1 Mon Sep 17 00:00:00 2001 Message-Id: <5091d29a2765e550985c058657deb5771a24a1a1.1682453413.git.gabriel@erlikon.ch> In-Reply-To: References: From: Gabriel Wicki Date: Tue, 25 Apr 2023 22:06:18 +0200 Subject: [PATCH 2/2] gnu: supercollider: Apply 'guix style'. * gnu/packages/audio.scm: Apply guix style. --- gnu/packages/audio.scm | 173 +++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 86 deletions(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 109133ba8e..f07b7a6069 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -3444,114 +3444,115 @@ (define-public supercollider (package (name "supercollider") (version "3.12.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/supercollider/supercollider") - (commit (string-append "Version-" version)) - ;; for nova-simd, nova-tt, hidapi, TLSF, oscpack - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0id522338a464j1slcspajwc7klypbc9qpigw5mqjhrw970wij5z")) - (modules '((guix build utils) - (ice-9 ftw))) - (snippet - ;; The build system doesn't allow us to unbundle the following - ;; libraries. hidapi is also heavily patched and upstream not - ;; actively maintained. - '(let ((keep-dirs '("nova-simd" "nova-tt" "hidapi" - "TLSF-2.4.6" "oscpack_1_1_0" "." ".."))) - (with-directory-excursion "./external_libraries" - (for-each - delete-file-recursively - (scandir "." - (lambda (x) - (and (eq? (stat:type (stat x)) 'directory) - (not (member (basename x) keep-dirs))))))) - ;; To find the Guix provided ableton-link library. - (substitute* "lang/CMakeLists.txt" - (("include\\(\\.\\./external_libraries/link/\ -AbletonLinkConfig\\.cmake\\)") - "find_package(AbletonLink NAMES AbletonLink ableton-link \ -link REQUIRED)")))))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/supercollider/supercollider") + (commit (string-append "Version-" version)) + ;; for nova-simd, nova-tt, hidapi, TLSF, oscpack + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0id522338a464j1slcspajwc7klypbc9qpigw5mqjhrw970wij5z")) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + ;; The build system doesn't allow us to unbundle the following + ;; libraries. hidapi is also heavily patched and upstream not + ;; actively maintained. + '(let ((keep-dirs '("nova-simd" "nova-tt" + "hidapi" + "TLSF-2.4.6" + "oscpack_1_1_0" + "." + ".."))) + (with-directory-excursion "./external_libraries" + (for-each delete-file-recursively + (scandir "." + (lambda (x) + (and (eq? (stat:type (stat x)) + 'directory) + (not (member (basename x) + keep-dirs))))))) + ;; To find the Guix provided ableton-link library. + (substitute* "lang/CMakeLists.txt" + (("include\\(\\.\\./external_libraries/link/AbletonLinkConfig\\.cmake\\)") + "find_package(AbletonLink NAMES AbletonLink ableton-link link REQUIRED)")))))) (build-system cmake-build-system) - (outputs - '("out" ;core language - "ide")) ;qt ide + (outputs '("out" ;core language + "ide")) ;qt ide (arguments - `(#:configure-flags '("-DSYSTEM_BOOST=ON" - "-DSYSTEM_YAMLCPP=ON" + `(#:configure-flags '("-DSYSTEM_BOOST=ON" "-DSYSTEM_YAMLCPP=ON" "-DSC_QT=ON" "-DCMAKE_BUILD_TYPE=Release" "-DFORTIFY=ON" "-DLIBSCSYNTH=ON" "-DSC_EL=OFF") ;scel is packaged individually as emacs-scel - #:phases - (modify-phases %standard-phases - ;; HOME must be defined otherwise supercollider throws a "ERROR: - ;; Primitive '_FileMkDir' failed." error when generating the doc. - ;; The graphical tests also hang without it. - (add-after 'unpack 'set-home-directory - (lambda _ - (setenv "HOME" (getcwd)))) - (add-after 'unpack 'patch-scclass-dir - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (scclass-dir - (string-append out - "/share/SuperCollider/SCClassLibrary"))) - (substitute* "lang/LangSource/SC_LanguageConfig.cpp" - (((string-append - "SC_Filesystem::instance\\(\\)\\.getDirectory" - "\\(DirName::Resource\\) / CLASS_LIB_DIR_NAME")) - (string-append "Path(\"" scclass-dir "\")")))))) - (add-after 'patch-scclass-dir 'fix-struct-SOUNDFILE-tag - (lambda* _ - (display (getcwd)) (newline) - (substitute* "include/plugin_interface/SC_SndBuf.h" - (("SNDFILE_tag") - "sf_private_tag")))) - (add-before 'build 'prepare-x - (lambda _ - (system "Xvfb &") - (setenv "DISPLAY" ":0"))) - (add-before 'install 'install-ide - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (ide (assoc-ref outputs "ide")) - (scide "editors/sc-ide/scide")) - (install-file scide - (string-append ide "/bin")) - (delete-file scide))))))) - (native-inputs - (list ableton-link pkg-config qttools-5 xorg-server-for-tests)) + #:phases (modify-phases %standard-phases + ;; HOME must be defined otherwise supercollider throws a "ERROR: + ;; Primitive '_FileMkDir' failed." error when generating the doc. + ;; The graphical tests also hang without it. + (add-after 'unpack 'set-home-directory + (lambda _ + (setenv "HOME" + (getcwd)))) + (add-after 'unpack 'patch-scclass-dir + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (scclass-dir (string-append out + "/share/SuperCollider/SCClassLibrary"))) + (substitute* "lang/LangSource/SC_LanguageConfig.cpp" + (((string-append + "SC_Filesystem::instance\\(\\)\\.getDirectory" + "\\(DirName::Resource\\) / CLASS_LIB_DIR_NAME")) + (string-append "Path(\"" scclass-dir "\")")))))) + (add-after 'patch-scclass-dir 'fix-struct-SOUNDFILE-tag + (lambda* _ + (display (getcwd)) + (newline) + (substitute* "include/plugin_interface/SC_SndBuf.h" + (("SNDFILE_tag") + "sf_private_tag")))) + (add-before 'build 'prepare-x + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0"))) + (add-before 'install 'install-ide + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (ide (assoc-ref outputs "ide")) + (scide "editors/sc-ide/scide")) + (install-file scide + (string-append ide "/bin")) + (delete-file scide))))))) + (native-inputs (list ableton-link pkg-config qttools-5 + xorg-server-for-tests)) (inputs (list jack-1 libsndfile fftw libxt - readline ;readline support for sclang's CLI - alsa-lib ;for sclang's MIDI interface - eudev ;for user interactions with devices - avahi ;zeroconf service discovery support + readline ;readline support for sclang's CLI + alsa-lib ;for sclang's MIDI interface + eudev ;for user interactions with devices + avahi ;zeroconf service discovery support icu4c boost boost-sync yaml-cpp - python-wrapper ;there were warnings in the build process - ruby ;there were warnings in the build process + python-wrapper ;there were warnings in the build process + ruby ;there were warnings in the build process qtbase-5 qtdeclarative-5 qtsvg-5 qtwebchannel-5 qtwebsockets-5)) - (propagated-inputs ;to get native-search-path - (list qtwebengine-5)) + (propagated-inputs ;to get native-search-path + (list qtwebengine-5)) (home-page "https://github.com/supercollider/supercollider") (synopsis "Synthesis engine and programming language") - (description "SuperCollider is a synthesis engine (@code{scsynth} or + (description + "SuperCollider is a synthesis engine (@code{scsynth} or @code{supernova}) and programming language (@code{sclang}). It can be used for experimenting with sound synthesis and algorithmic composition.