[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add freeimage.
From: |
David Thompson |
Subject: |
Re: [PATCH] gnu: Add freeimage. |
Date: |
Sat, 01 Nov 2014 13:21:55 -0400 |
User-agent: |
Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) |
Andreas Enge <address@hidden> writes:
> Hello!
>
> On Sat, Nov 01, 2014 at 11:48:46AM -0400, David Thompson wrote:
>> + (uri (string-append
>> "mirror://sourceforge/freeimage/Source%20Distribution/"
>> + version "/FreeImage"
>> + (string-join (string-split version #\.) "")
>> + ".zip"))
>
> This looks a bit longer than the 80 characters limit.
The first argument to string append goes over, but that's okay IMO
because it is a single atom. In any case, I just added a newline after
string-append and the issue goes away.
>
>> + 'unpack
>> + (lambda* (#:key source #:allow-other-keys)
>> + (and (zero? (system* "unzip" source))
>> + (chdir "FreeImage")))
>
> I wonder if this should not be moved to the standard unpack phase. Can we
> determine the file format and use the appropriate tool, unzip or tar,
> automatically? (Assuming that there are no .tar.zip out there, of
> course.)
I've been thinking about this, too. I don't think I would like the GNU
build system to depend on unzip since very few packages require it and
it's not a format that GNU uses, but maybe a procedure that replaced the
standard unpack phase with one that uses unzip would be nice. I think
that work could/should be saved for a future patch.
Updated patch attached. Thanks for the review!
>From 2972e6e41d7c13dd619f0dd7fbda7b2a4ec0c6cc Mon Sep 17 00:00:00 2001
From: David Thompson <address@hidden>
Date: Wed, 25 Jun 2014 19:50:30 -0400
Subject: [PATCH] gnu: Add freeimage.
* gnu/packages/image.scm (freeimage): New variable.
---
gnu/packages/image.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 38e3ddd..f4f4c78 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages ghostscript) ;lcms
#:use-module (gnu packages xorg)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages zip)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -341,3 +342,44 @@ supplies a generic doubly-linked list and some string
functions.")
;; X11 license.
(license (license:x11-style "file://COPYING"
"See 'COPYING' in the distribution."))))
+
+(define-public freeimage
+ (package
+ (name "freeimage")
+ (version "3.16.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/freeimage/Source%20Distribution/"
+ version "/FreeImage"
+ (string-join (string-split version #\.) "")
+ ".zip"))
+ (sha256
+ (base32
+ "0q1gnjnxgphsh4l8i9rfly4bi8xsczsb9ryzbm8hf38lc3fk5bq3"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (and (zero? (system* "unzip" source))
+ (chdir "FreeImage")))
+ (alist-delete
+ 'configure
+ (alist-cons-before
+ 'build 'patch-makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "Makefile.gnu"
+ (("/usr") (assoc-ref outputs "out"))
+ (("-o root -g root") "")))
+ %standard-phases)))
+ #:make-flags '("CC=gcc")
+ #:tests? #f)) ; no check target
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (synopsis "Library for handling popular graphics image formats")
+ (description
+ "FreeImage is a library for developers who would like to support popular
+graphics image formats like PNG, BMP, JPEG, TIFF and others.")
+ (license license:gpl2+)
+ (home-page "http://freeimage.sourceforge.net")))
--
2.1.1
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
- [PATCH] gnu: Add freeimage., David Thompson, 2014/11/01
- Re: [PATCH] gnu: Add freeimage., Andreas Enge, 2014/11/01
- Re: [PATCH] gnu: Add freeimage.,
David Thompson <=
- Re: [PATCH] gnu: Add freeimage., Andreas Enge, 2014/11/02
- Re: [PATCH] gnu: Add freeimage., David Thompson, 2014/11/02
- Re: [PATCH] gnu: Add freeimage., Andreas Enge, 2014/11/02
- Re: [PATCH] gnu: Add freeimage., David Thompson, 2014/11/02
- Re: [PATCH] gnu: Add freeimage., Ludovic Courtès, 2014/11/03
- Re: [PATCH] gnu: Add freeimage., Andreas Enge, 2014/11/03
- Re: [PATCH] gnu: Add freeimage., Ludovic Courtès, 2014/11/03
- Re: [PATCH] gnu: Add freeimage., David Thompson, 2014/11/03