all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add freeimage.
@ 2014-11-01 15:48 David Thompson
  2014-11-01 16:59 ` Andreas Enge
  0 siblings, 1 reply; 15+ messages in thread
From: David Thompson @ 2014-11-01 15:48 UTC (permalink / raw)
  To: guix-devel

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

This patch adds the freeimage library.  It's a handy way to load images
of various formats via a single interface.

How does it look?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-freeimage.patch --]
[-- Type: text/x-diff, Size: 2660 bytes --]

From 908cad8230ecc89dbf36ab54c0687879e4cf9b22 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
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 | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 38e3ddd..b492399 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,43 @@ 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


[-- Attachment #3: Type: text/plain, Size: 136 bytes --]


-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-11-05  3:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-01 15:48 [PATCH] gnu: Add freeimage David Thompson
2014-11-01 16:59 ` Andreas Enge
2014-11-01 17:21   ` David Thompson
2014-11-02 17:26     ` Ludovic Courtès
2014-11-02 17:35       ` David Thompson
2014-11-02 17:46     ` Andreas Enge
2014-11-02 17:55       ` David Thompson
2014-11-02 21:10         ` Andreas Enge
2014-11-02 21:38           ` David Thompson
2014-11-03  9:00           ` Ludovic Courtès
2014-11-03  9:29             ` Andreas Enge
2014-11-03 20:28               ` Ludovic Courtès
2014-11-03 23:29           ` David Thompson
2014-11-04  9:50             ` Ludovic Courtès
2014-11-05  3:12               ` David Thompson

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.