From 9b381235e0f16fe72d92c5c47668114f2146070f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 24 Apr 2023 08:25:23 +0200 Subject: gnu: libfive: Update to 0-5.b1ea998. * gnu/packages/engineering.scm (libfive): Update to 0-5.b1ea998. [arguments]: Set HOME variable to fix autocompilation; set GUILE_CCACHE_DIR to override default target directory for compiled Guile files; add phases 'fix-library-location and 'install-scm-files. --- gnu/packages/engineering.scm | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 3191674139..8b68330ac6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -891,8 +891,8 @@ fonts to gEDA.") (license license:gpl2+)))) (define-public libfive - (let ((commit "8ca1b8685ef3fac7b64e66b10459b8421a3020c6") - (revision "4")) + (let ((commit "b1ea998d8adb3884ab52798f7388f4354145f452") + (revision "5")) (package (name "libfive") (version (git-version "0" revision commit)) @@ -903,17 +903,38 @@ fonts to gEDA.") (commit commit))) (sha256 (base32 - "1c762cd70iv2b9av0l9lq0py9138y98wk3dirhdmil7jncdhvq98")) + "0j91qq9d7949d2zs5wxyqd0ly644nb5690s8xnr6pchjl9z6pqxv")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments - `(#:test-target "libfive-test" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'remove-native-compilation - (lambda _ - (substitute* "CMakeLists.txt" (("-march=native") "")) - #t))))) + (list + #:test-target "libfive-test" + #:configure-flags + #~(list (string-append "-DGUILE_CCACHE_DIR=" + #$output "/lib/guile/3.0/site-ccache")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-autocompilation + (lambda _ (setenv "HOME" "/tmp"))) + (add-after 'unpack 'remove-native-compilation + (lambda _ + (substitute* "CMakeLists.txt" (("-march=native") "")))) + (add-after 'unpack 'fix-library-location + (lambda _ + (substitute* "libfive/bind/guile/libfive/lib.scm" + (("\\(get-environment-variable \"LIBFIVE_FRAMEWORK_DIR\"\\)" m) + (string-append m "\n\"" #$output "/lib/\"")) + (("\\(get-environment-variable \"LIBFIVE_STDLIB_DIR\"\\)" m) + (string-append m "\n\"" #$output "/lib/\""))))) + (add-after 'install 'install-scm-files + (lambda _ + (for-each + (lambda (file) + (install-file file + (string-append #$output + "/share/guile/site/3.0/libfive"))) + (find-files "../source/libfive/bind/guile/libfive" + "\\.scm$"))))))) (native-inputs (list pkg-config)) (inputs -- cgit 1.4.1