gnu: libatasmart: Fix cross-compiling to riscv64-linux.

* gnu/packages/freedesktop.scm (libatasmart)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config phase.

Change-Id: I491c43a6ce2c3fc3aed43ecab9d4a2ab251038bb
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Zheng Junjie 2024-03-23 00:44:20 +08:00 committed by Christopher Baines
parent 9fa8c53625
commit d9e693df75
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -1525,7 +1525,25 @@ (define-public libatasmart
"138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31")))) "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
(list pkg-config)) (append (if (and (%current-target-system)
(target-riscv64?))
(list config)
'())
(list pkg-config)))
(arguments
(if (and (%current-target-system)
(target-riscv64?))
(list #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'update-config
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(for-each (lambda (file)
(install-file
(search-input-file
(or native-inputs inputs)
(string-append "/bin/" file)) "build-aux"))
'("config.guess" "config.sub"))))))
'()))
(inputs (inputs
(list eudev)) (list eudev))
(home-page "https://0pointer.de/blog/projects/being-smart.html") (home-page "https://0pointer.de/blog/projects/being-smart.html")