GNU bug report logs - #38687
[PATCH] gnu: Add libtcod.

Previous Next

Package: guix-patches;

Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>

Date: Fri, 20 Dec 2019 12:39:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marius Bakke <mbakke <at> fastmail.com>
To: Giacomo Leidi <goodoldpaul <at> autistici.org>, 38687 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [bug#38687] [PATCH 1/2] gnu: Add lodepng.
Date: Mon, 10 Feb 2020 22:14:48 +0100
[Message part 1 (text/plain, inline)]
Giacomo Leidi <goodoldpaul <at> autistici.org> writes:

> * gnu/packages/image.scm (lodepng): New variable.

[...]

> +(define-public lodepng
> +  ;; The project doesn't seem to use any
> +  ;; kind of meaningful versioning scheme.
> +  (let ((commit "5a0dba103893e6b8084be13945a826663917d00a")
> +        (revision "1")
> +        (version "0.0.0"))

There is a LODEPNG_VERSION_STRING in lodepng.cpp, can you set the
"version" variable here to that?

> +    (package
> +      (name "lodepng")
> +      (version (git-version version revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/lvandeve/lodepng")
> +                      (commit commit)))
> +                (sha256
> +                 (base32
> +                  "0nvlba82mf4n7xfc3rz2g9wwgnrxpjw64p5dsjmj2r06g5m4l38a"))
> +                (file-name (git-file-name name version))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       '(#:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (replace 'build
> +             (lambda _
> +               (setenv "CXXFLAGS" "-fPIC")
> +               (invoke "make" "lodepng.o")
> +               (invoke "make" "lodepng_util.o")
> +               (invoke "ar" "rv" "liblodepng.a" "lodepng.o" "lodepng_util.o")
> +               (invoke "g++" "-fPIC" "-O3"
> +                       "-o" "liblodepng.so"
> +                       "-shared" "lodepng.o" "lodepng_util.o")
> +               #t))
> +           (replace 'check
> +             (lambda _
> +               (invoke "make" "unittest")
> +               (invoke "./unittest")
> +               #t))
> +           (replace 'install
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let* ((out (assoc-ref outputs "out"))
> +                      (doc (string-append out "/share/doc"))
> +                      (lib (string-append out "/lib"))
> +                      (include (string-append out "/include")))
> +                 (install-file "lodepng.h" include)
> +                 (install-file "lodepng_util.h" include)
> +                 (install-file "liblodepng.a" lib)

We try to avoid static libraries in Guix, so no need to install this
file.

Otherwise LGTM.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 5 years and 147 days ago.

Previous Next


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