all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Giacomo Leidi <goodoldpaul@autistici.org>, 38687@debbugs.gnu.org
Subject: [bug#38687] [PATCH 1/2] gnu: Add lodepng.
Date: Mon, 10 Feb 2020 22:14:48 +0100	[thread overview]
Message-ID: <87k14u2lh3.fsf@devup.no> (raw)
In-Reply-To: <20200206201713.8535-1-goodoldpaul@autistici.org>

[-- Attachment #1: Type: text/plain, Size: 2341 bytes --]

Giacomo Leidi <goodoldpaul@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

      parent reply	other threads:[~2020-02-10 21:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 12:37 [bug#38687] [PATCH] gnu: Add libtcod Giacomo Leidi
2019-12-23 18:37 ` Ludovic Courtès
2020-01-22 11:11   ` goodoldpaul
2020-01-22 18:57     ` Marius Bakke
2020-02-06 20:16       ` goodoldpaul
2020-02-10 21:10         ` Marius Bakke
2020-02-06 20:17 ` [bug#38687] [PATCH 1/2] gnu: Add lodepng Giacomo Leidi
2020-02-06 20:17   ` [bug#38687] [PATCH 2/2] gnu: Add libtcod Giacomo Leidi
2020-02-10 21:19     ` Marius Bakke
2020-02-16 21:53       ` [bug#38687] " goodoldpaul
2020-02-24 20:56         ` bug#38687: " Marius Bakke
2020-02-10 21:14   ` Marius Bakke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k14u2lh3.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=38687@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.