aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-06-25 19:50:30 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-11-02 12:33:25 -0500
commit43402c5cd25f0d4b3a7238c12413ed0a7833708e (patch)
tree99d527741b927ec0f127f450aa669744bd0cd9e6 /gnu
parent76c9b6aaef284ef39a06a83ec176f1408520892b (diff)
downloadguix-43402c5cd25f0d4b3a7238c12413ed0a7833708e.tar
guix-43402c5cd25f0d4b3a7238c12413ed0a7833708e.tar.gz
gnu: Add freeimage.
* gnu/packages/image.scm (freeimage): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/image.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 38e3ddd73f..f4f4c785c6 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")))