diff options
author | Zheng Junjie <zhengjunjie@iscas.ac.cn> | 2024-09-09 18:00:11 +0800 |
---|---|---|
committer | Zheng Junjie <zhengjunjie@iscas.ac.cn> | 2024-09-09 18:05:01 +0800 |
commit | 18646591894aac4a33ba6ebe761cd06038f3fc8b (patch) | |
tree | 42f434aa1bc07bf445f40a1134cfc1d3c00067a1 | |
parent | b9c466276c6af1c5f1626271fe733e2198cbb27d (diff) | |
download | guix-18646591894aac4a33ba6ebe761cd06038f3fc8b.tar.gz guix-18646591894aac4a33ba6ebe761cd06038f3fc8b.zip |
gnu: freeipmi: Fix cross-compilation to riscv64-linux-gnu.
* gnu/packages/freeipmi.scm (freeipmi)[arguments]: When cross-compilation to
riscv64-linux-gnu, add update-config-scripts phase.
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
Change-Id: I0059d2048524b476703514ddbe111870257f4ac6
-rw-r--r-- | gnu/packages/freeipmi.scm | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/gnu/packages/freeipmi.scm b/gnu/packages/freeipmi.scm index 55ffa6a53b..d5fdae13ab 100644 --- a/gnu/packages/freeipmi.scm +++ b/gnu/packages/freeipmi.scm @@ -20,9 +20,12 @@ (define-module (gnu packages freeipmi) #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (gnu packages autotools) #:use-module (gnu packages gnupg)) (define-public freeipmi @@ -38,13 +41,32 @@ "1dgd2izbp6mqk7l0bgw9fkpvl4mjz672p8baz3ac9k5pfrfaqg8s")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--disable-static" - ,@(if (%current-target-system) - ;; We cannot check for these devices - ;; when cross compiling. - `("ac_cv_file__dev_random=yes" - "ac_cv_file__dev_urandom=yes") - '())))) + (append (if (and (%current-target-system) + (target-riscv64?)) + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'update-config-scripts + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.guess and config.sub. + (for-each (lambda (file) + (install-file + (search-input-file + (or native-inputs inputs) + (string-append "/bin/" file)) "config")) + '("config.guess" "config.sub")))))) + '()) + `(#:configure-flags '("--disable-static" + ,@(if (%current-target-system) + ;; We cannot check for these devices + ;; when cross compiling. + `("ac_cv_file__dev_random=yes" + "ac_cv_file__dev_urandom=yes") + '()))))) + (native-inputs + (if (and (%current-target-system) + (target-riscv64?)) + (list config) + '())) (inputs (list libgcrypt)) (home-page "https://www.gnu.org/software/freeipmi/") |