Package: guix-patches;
Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Tue, 25 Apr 2023 20:34:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: Gabriel Wicki <gabriel <at> erlikon.ch> To: 63075 <at> debbugs.gnu.org Subject: [bug#63075] [PATCH 2/2] gnu: supercollider: Apply guix style. Date: Tue, 25 Apr 2023 22:39:21 +0200
From 5091d29a2765e550985c058657deb5771a24a1a1 Mon Sep 17 00:00:00 2001 Message-Id: <5091d29a2765e550985c058657deb5771a24a1a1.1682453413.git.gabriel <at> erlikon.ch> In-Reply-To: <f67786eb958a65ba778f67a8f443fa3d24293438.1682453413.git.gabriel <at> erlikon.ch> References: <f67786eb958a65ba778f67a8f443fa3d24293438.1682453413.git.gabriel <at> erlikon.ch> From: Gabriel Wicki <gabriel <at> erlikon.ch> 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. -- 2.39.2
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.