GNU bug report logs - #62324
gnu: Add emu8051

Previous Next

Package: guix-patches;

Reported by: c4droid <c4droid <at> foxmail.com>

Date: Tue, 21 Mar 2023 07:30:01 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bruno Victal <mirai <at> makinata.eu>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324 <at> debbugs.gnu.org
Subject: [bug#62324] gnu: Add emu8051
Date: Tue, 21 Mar 2023 13:43:14 +0000
Hi,

On 2023-03-21 07:20, c4droid wrote:
> 
> +      (arguments
> +       `(#:tests? #f ;No test suite
> +         #:make-flags (list (string-append "CC="
> +                                           ,(cc-for-target)))
> +         #:phases (modify-phases %standard-phases
> +                    (delete 'configure) ;No ./configure script
> +                    (add-before 'build 'patch-ncurses
> +                      ;; Replace LDFLAGS -lcurses to -lncurses
> +                      (lambda* _
> +                        (substitute* "Makefile"
> +                          (("-lcurses")
> +                           "-lncurses"))))

How about turning this 'patch-ncurses phase into a patch snippet instead? i.e.

(source
  (origin
    (method ...)
    ...
    (modules '((guix build utils)))
    (snippet
     #~(begin
        ;; Replace LDFLAGS -lcurses to -lncurses
        (substitute* "Makefile"
          (("-lcurses") "-lncurses"))))))

[...]

> +                    (replace 'install
> +                      ;; No installation procedure
> +                      (lambda _
> +                        (install-file "emu"
> +                                      (string-append (assoc-ref %outputs "out")
> +                                                     "/bin")))))))

Use G-Expressions here, i.e.

(arguments
 (list
  #:tests? #f ;No test suite
  #:make-flags #~(list ...)
  #:phases
  #~(modify-phases ...
     ...
     (replace 'install
       (lambda _
        (install-file "emu" (string-append #$output "/bin")))))))


Cheers,
Bruno




This bug report was last modified 2 years and 50 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.