~ruther/guix-local

8d39268b5f42d2fad8063724da0857a303b9702f — Zheng Junjie 1 year, 1 month ago b8c464a
gnu: xorriso: Fix cross-compiling to riscv64-linux.

Fixes: guix/guix#740

* gnu/packages/cdrom.scm (xorriso)[native-inputs]: When target riscv64-linux,
add config.
[arguments]: When native-inputs have CONFIG, add update-config-scripts phase.

Change-Id: I1943c88abf5e6aeee4fb24b171c8732f5e9a58f0
1 files changed, 18 insertions(+), 1 deletions(-)

M gnu/packages/cdrom.scm
M gnu/packages/cdrom.scm => gnu/packages/cdrom.scm +18 -1
@@ 14,7 14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023, 2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2024 Julian Flake <flake@uni-koblenz.de>
;;; Copyright © 2025 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2025 André Batista <nandre@riseup.net>


@@ 180,6 180,17 @@ libcdio.")
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         ,@(if (this-package-native-input "config")
               `((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.guess" "config.sub")))))
               '())
         (add-after 'install 'install-frontends
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))


@@ 199,6 210,12 @@ libcdio.")
                       "/share/man/man1/xorriso-tcltk.1"))
               (wrap-program (string-append gui "/bin/xorriso-tcltk")
                 `("PATH" ":" prefix (,(string-append out "/bin"))))))))))
    (native-inputs
     (append (if (and (%current-target-system)
                      (target-riscv64?))
                 (list config)
                 '())
             (list)))
    (inputs
     (list acl bash-minimal readline tk zlib))
    (home-page "https://www.gnu.org/software/xorriso/")