all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gabriel Wicki <gabriel@erlikon.ch>
To: 63075@debbugs.gnu.org
Subject: [bug#63075] [PATCH 2/2] gnu: supercollider: Apply guix style.
Date: Tue, 25 Apr 2023 22:39:21 +0200	[thread overview]
Message-ID: <20230425203921.lm32yffgshuakjm6@blackbox> (raw)
In-Reply-To: <20230425203323.j5emxz2ebvhs4ckt@blackbox>

From 5091d29a2765e550985c058657deb5771a24a1a1 Mon Sep 17 00:00:00 2001
Message-Id: <5091d29a2765e550985c058657deb5771a24a1a1.1682453413.git.gabriel@erlikon.ch>
In-Reply-To: <f67786eb958a65ba778f67a8f443fa3d24293438.1682453413.git.gabriel@erlikon.ch>
References: <f67786eb958a65ba778f67a8f443fa3d24293438.1682453413.git.gabriel@erlikon.ch>
From: Gabriel Wicki <gabriel@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





  parent reply	other threads:[~2023-04-25 21:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 20:33 [bug#63075] [PATCH] Fix supercollider Gabriel Wicki
     [not found] ` <handler.63075.B.16824548199053.ack@debbugs.gnu.org>
2023-04-25 20:35   ` [bug#63075] [PATCH 1/2] gnu: " Gabriel Wicki
2023-04-28 18:50     ` bug#63075: [PATCH] " Ludovic Courtès
2023-04-25 20:39 ` Gabriel Wicki [this message]
2023-04-28 18:51 ` [bug#63075] " Ludovic Courtès

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=20230425203921.lm32yffgshuakjm6@blackbox \
    --to=gabriel@erlikon.ch \
    --cc=63075@debbugs.gnu.org \
    /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.