Message ID | tencent_A089532DFC26692A4696DF9FA64E52B95106@qq.com |
---|---|
State | New |
Headers | show |
Series | [bug#64845] gnu: fcode-utils: Fix cross-compilation. | expand |
On 2023-07-25, Zheng Junjie wrote: > * gnu/packages/firmware.scm (fcode-utils) > [arguments]: add remove-makefile-strip phase. > --- > gnu/packages/firmware.scm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > index 35d3100ac6..01565ed18a 100644 > --- a/gnu/packages/firmware.scm > +++ b/gnu/packages/firmware.scm > @@ -9,6 +9,7 @@ > ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org> > ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com> > ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> > +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -387,7 +388,14 @@ (define-public fcode-utils > (string-append "DESTDIR=" #$output)) > #:phases > #~(modify-phases %standard-phases > - (delete 'configure)))) ; No configure script. > + (delete 'configure) ; No configure script. > + (add-after 'unpack 'remove-makefile-strip > + (lambda _ > + (substitute* '("detok/Makefile" > + "romheaders/Makefile" > + "toke/Makefile") > + (("\\$\\(STRIP\\).*") > + ""))))))) Can you include a brief comment? That is a bit easier than rummaging around through git history commit messages... :) > (native-inputs > (list tcsh)) > (home-page "https://www.openfirmware.info/FCODE_suite") > > base-commit: 76e041f9eef85bb039c5251d3350c62ee2066883 > -- > 2.41.0 live well, vagrant
I happened upon this patch ... setting STRIP to (strip-for-target) in #:make-flags (like done for CC) would fix this in a simpler way. Also, that (string-append "DESTDIR=" #$output)) is bogus; it's a bug (*) in the Makefiles that it used $(DESTIDIR) instead of $(DESTDIR)$(PREFIX). install: mkdir -p $(DESTDIR)/bin cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM) (*) https://people.freebsd.org/~rodrigc/doc/data/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 35d3100ac6..01565ed18a 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -387,7 +388,14 @@ (define-public fcode-utils (string-append "DESTDIR=" #$output)) #:phases #~(modify-phases %standard-phases - (delete 'configure)))) ; No configure script. + (delete 'configure) ; No configure script. + (add-after 'unpack 'remove-makefile-strip + (lambda _ + (substitute* '("detok/Makefile" + "romheaders/Makefile" + "toke/Makefile") + (("\\$\\(STRIP\\).*") + ""))))))) (native-inputs (list tcsh)) (home-page "https://www.openfirmware.info/FCODE_suite")