GNU bug report logs - #27992
[PATCH] gnu: Add ogre.

Previous Next

Package: guix-patches;

Reported by: manolis837 <at> gmail.com

Date: Sun, 6 Aug 2017 19:49:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Manolis Ragkousis <manolis837 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alex Kost <alezost <at> gmail.com>
To: manolis837 <at> gmail.com
Cc: 27992 <at> debbugs.gnu.org
Subject: [bug#27992] [PATCH] gnu: Add ogre.
Date: Sat, 12 Aug 2017 23:44:58 +0300
manolis837 <at> gmail.com (2017-08-06 22:48 +0300) wrote:

[...]
> +(define-public ogre
> +  (package
> +    (name "ogre")
> +    (version "1.10.7")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/OGRECave/" name
> +                           "/archive/v" version ".tar.gz"))

Please add 'file-name' to avoid "/gnu/store/…-v1.10.7.tar.gz" name:

          (file-name (string-append name "-" version ".tar.gz"))

This is reported by "guix lint ogre".

> +       (sha256
> +        (base32
> +         "1ab354bmwwryxr4zgxchfkm6h4z38mjgif8yn89x640rsrgw5ipj"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'pre-configure
> +           (lambda* (#:key inputs #:allow-other-keys)

'inputs' are not used here, so just: (lambda _ ...)

> +             ;; It expects googletest source to be downloaded and
> +             ;; be in a specific place.
> +             (substitute* "Tests/CMakeLists.txt"
> +               (("URL(.*)$" _ suffix) (string-append "URL " suffix
> +"\t\tURL_HASH MD5=16877098823401d1bf2ed7891d7dce36\n")))

This string shouldn't start from the beginning of the line.  I see the
problem is that a properly indented line would be too long.  I would
write it like this:

             (substitute* "Tests/CMakeLists.txt"
               (("URL(.*)$" _ suffix)
                (string-append "URL " suffix
                               "\t\tURL_HASH "
                               "MD5=16877098823401d1bf2ed7891d7dce36\n")))

> +             #t))
> +         (add-before 'build 'pre-build
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (copy-file (assoc-ref inputs "googletest-source")
> +              (string-append (getcwd)
> +               "/Tests/googletest-prefix/src/release-1.8.0.tar.gz"))
                  ^^^^
same here: (string-append ...) and the next line are not indented
properly.  I would write:

             (copy-file (assoc-ref inputs "googletest-source")
                        (string-append (getcwd)
                                       "/Tests/googletest-prefix/src"
                                       "/release-1.8.0.tar.gz"))

The rest looks good to me, thanks!

-- 
Alex




This bug report was last modified 7 years and 284 days ago.

Previous Next


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