unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: goodoldpaul@autistici.org
To: 40989@debbugs.gnu.org
Subject: [bug#40989] [PATCH] gnu: supercollider: Enable SCClassLibrary library lookup.
Date: Thu, 30 Apr 2020 22:39:06 +0000	[thread overview]
Message-ID: <5985840382a5ec1211b1882c9f07f16f@autistici.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

Hi,
This patch fixes the error that prevents SuperCollider from starting. On 
Guix 229f4fa9522fb56b014ee9c0d8111e8fb6da764d and after having followed 
instructions from [0], the behavior is the following:

orang3@frastanato ~/code/guix$ guix environment --ad-hoc jack 
supercollider qjackctl
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 
100.0%
The following derivation will be built:
    /gnu/store/zzrq8li1plk9ll7yx48lhf27ffk5fvy0-profile.drv
The following profile hooks will be built:
    /gnu/store/jr02fwv31b0a07fcfkalgjjv1bq7ayx8-manual-database.drv
    /gnu/store/m4zril057cr1m55g7d56q9wp2mrbhhxg-fonts-dir.drv
    /gnu/store/mrfrb81vzcjxnj321fzi8nqkpvx6s5zw-info-dir.drv
    /gnu/store/spp41dzc0bmpbr9wvif8r4r2fs02zgfv-ca-certificate-bundle.drv
building CA certificate bundle...
building fonts directory...
building directory of Info manuals...
building database for manual pages...
building profile with 3 packages...

orang3@frastanato ~/code/guix [env]$ sclang
SC FFT global init: cosTable initialised.
compiling class library...
         Found 718 primitives.
         Compiling directory 
'/gnu/store/rrmvq9gzlvijliwlm35xml65jjqq8s29-supercollider-3.10.4/share/SuperCollider/Extensions'
         Compiling directory 
'/home/orang3/.local/share/SuperCollider/Extensions'
ERROR: There is a discrepancy.
numClassDeps 0   gNumClasses 82
sc3> s.boot
Library has not been compiled successfully.

The implemented solution is to hardcode SCClassLibrary's path into 
SuperCollider.

[0]: 
https://guix.gnu.org/manual/en/html_node/Base-Services.html#index-realtime

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-supercollider-Enable-SCClassLibrary-library-look.patch --]
[-- Type: text/x-diff; name=0001-gnu-supercollider-Enable-SCClassLibrary-library-look.patch, Size: 3386 bytes --]

From f825d1872628eea6f29ee7a92b8bbc339935dbcf Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Fri, 1 May 2020 00:24:52 +0200
Subject: [PATCH] gnu: supercollider: Enable SCClassLibrary library lookup.

This hardcodes the path of SCClassLibrary to fix a lookup error that was
preventing SCServer's boot.

* gnu/packages/audio.scm (supercollider): [source]: Fetch via git.
[configure-flags]: Build Release target.
[phases]: ...hardcode path using substitute* in a new phase.
---
 gnu/packages/audio.scm | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index e2e276723b..badcf3d5f6 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2294,18 +2295,19 @@ background file post-processing.")
     (name "supercollider")
     (version "3.10.4")
     (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/supercollider/supercollider"
-                    "/releases/download/Version-" version
-                    "/SuperCollider-" version "-Source-linux.tar.bz2"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/supercollider/supercollider.git")
+                    (commit (string-append "Version-" version))
+                    (recursive? #t))) ;; for nova-simd, nova-tt, hidapi, TLSF, oscpack
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0x11g3pfw11m6v18qfpfl5w99dbmf73g4z7wvwhrj1a4qv2dn084"))))
+                "0xdg1dx0y0agircnkn4bg3jpw184xc5pn28k7rrzgjh1rdnyzz24"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DSYSTEM_BOOST=on" "-DSYSTEM_YAMLCPP=on"
-                           "-DSC_QT=off"
+                           "-DSC_QT=off" "-DCMAKE_BUILD_TYPE=Release"
                            "-DSC_EL=off") ;scel is packaged individually as
                                           ;emacs-scel
        #:modules ((guix build utils)
@@ -2343,7 +2345,17 @@ background file post-processing.")
                (("add_subdirectory\\(sclang\\)")
                 ""))
              (delete-file "testsuite/sclang/CMakeLists.txt")
-             #t)))))
+             #t))
+         (add-after 'disable-broken-tests '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 "\")")))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-- 
2.26.2


             reply	other threads:[~2020-04-30 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 22:39 goodoldpaul [this message]
2020-05-03  8:34 ` bug#40989: [PATCH] gnu: supercollider: Enable SCClassLibrary library lookup Mathieu Othacehe

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=5985840382a5ec1211b1882c9f07f16f@autistici.org \
    --to=goodoldpaul@autistici.org \
    --cc=40989@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).