From a563848347d77e984881e62624fb99d6b77fda7a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 17 Jun 2020 11:42:18 -0400 Subject: gnu: supercollider: Move the unbundling phase to a snippet. * gnu/packages/audio.scm (supercollider)[phases]{rm-bundled-libs}: Move to... [origin]{snippet}: ...here. --- gnu/packages/audio.scm | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index a9f34599bc..4a6798c854 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2344,7 +2344,29 @@ (define-public supercollider (file-name (git-file-name name version)) (sha256 (base32 - "02v911w2kdbg3kfl593lb2ig4sjbfxzv20a0vbcymhfzpvp1x6xp")))) + "02v911w2kdbg3kfl593lb2ig4sjbfxzv20a0vbcymhfzpvp1x6xp")) + (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)")) + #t)))) (build-system cmake-build-system) (outputs '("out" ;core language @@ -2355,28 +2377,8 @@ (define-public supercollider "-DFORTIFY=ON" "-DLIBSCSYNTH=ON" "-DSC_EL=off") ;scel is packaged individually as ;emacs-scel - #:modules ((guix build utils) - (guix build cmake-build-system) - (ice-9 ftw)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'rm-bundled-libs - (lambda _ - ;; The build system doesn't allow us to unbundle the following - ;; libraries. hidapi is also heavily patched. - (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)))))))) - (substitute* "lang/CMakeLists.txt" - (("include\\(\\.\\./external_libraries/link/AbletonLinkConfig\\.cmake\\)") - "find_package(AbletonLink NAMES AbletonLink ableton-link link REQUIRED)")) - #t)) ;; Some tests are broken (see: ;; https://github.com/supercollider/supercollider/issues/3555 and ;; https://github.com/supercollider/supercollider/issues/1736 -- cgit v1.2.3