guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#52472] [PATCH] gnu: Add libtree


From: Julien Lepiller
Subject: [bug#52472] [PATCH] gnu: Add libtree
Date: Sun, 19 Dec 2021 07:50:52 -0500
User-agent: K-9 Mail for Android

Sorry if this is overwhelming, but also:

Le 19 décembre 2021 04:48:28 GMT-05:00, Mathieu Othacehe <othacehe@gnu.org> a 
écrit :
>
>Hey Artyom,
>
>>  ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
>> +;;; Copyright © 2021 Artyom V. Poptsov <poptsov.artyom@gmail.com>
>> +
>
>No need for an extra new-line here.
>
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (substitute* "Makefile"
>> +               (("\\$\\(DESTDIR\\)\\$\\(BINDIR\\)")
>> +                (format #f "~a/bin/" (assoc-ref outputs "out")))
>> +               (("\\$\\(DESTDIR\\)\\$\\(SHAREDIR\\)")
>> +                (format #f "~a/share/" (assoc-ref outputs "out"))))))
>
>You can now write:
>
>--8<---------------cut here---------------start------------->8---
>       ,#~(modify-phases %standard-phases
>            (delete 'check)
>            (delete 'configure)
>            (add-before 'build 'patch
>              (lambda* (#:key outputs #:allow-other-keys)
>                (substitute* "Makefile"
>                  (("\\$\\(DESTDIR\\)\\$\\(BINDIR\\)")
>                   (string-append #$output "/bin/"))
>                  (("\\$\\(DESTDIR\\)\\$\\(SHAREDIR\\)")
>                   (string-append #$output "/share/")))))
>--8<---------------cut here---------------end--------------->8---
>

Don't remove the check phase. Use #:tests? #f instead and add a comment 
explaining why. If the tests fail, we should fix them, not put them under the 
rug ;)

Maybe it would be easier to pass BINDIR, SHAREDIR and CC with #:make-flags?

>> +         (replace 'build
>> +           (lambda _
>> +             (setenv "CC" "gcc")
>
>That would break cross-compilation. You should use something like:
>
>--8<---------------cut here---------------start------------->8---
>(string-append "CC=" ,(cc-for-target)).
>--8<---------------cut here---------------end--------------->8---
>
>> +             (setenv "LDFLAGS" "-static")
>
>Why are we building a static version of the program?
>
>There's also this linter warning:
>
>gnu/packages/linux.scm:8649:14: libtree@3.0.1: synopsis should start with an 
>upper-case letter or digit
>
>Thanks,
>
>Mathieu
>

Could you send a new patch with these changes? Don't hesitate to ask if you're 
a bit lost or need help on some points :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]