summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-09 23:13:45 +0200
committerMarius Bakke <marius@gnu.org>2022-08-10 00:29:01 +0200
commit02de6a59813df9dd839117669535118f1b798ed4 (patch)
tree068f317e3dca0a30a7439eeeedbb58d4cc4bd70f
parentf2e9f04dd905d9a5700114233f22ef8282407f42 (diff)
downloadguix-02de6a59813df9dd839117669535118f1b798ed4.tar.gz
gnu: freeimage: Remove input labels.
* gnu/packages/image.scm (freeimage): Reindent.
[arguments]: Use G-expression and SEARCH-INPUT-DIRECTORY.
[inputs]: Remove labels.
-rw-r--r--gnu/packages/image.scm161
1 files changed, 81 insertions, 80 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 0a677d7835..0b0452664b 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -19,7 +19,7 @@
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018-2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
@@ -98,6 +98,7 @@
   #:use-module (gnu packages fonts)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
@@ -1071,89 +1072,89 @@ supplies a generic doubly-linked list and some string functions.")
 
 (define-public freeimage
   (package
-   (name "freeimage")
-   (version "3.18.0")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append
-                  "mirror://sourceforge/freeimage/Source%20Distribution/"
-                  version "/FreeImage"
-                  (string-concatenate (string-split version #\.))
-                  ".zip"))
-            (sha256
-             (base32
-              "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"))
-            (modules '((guix build utils)))
-            (snippet
-             '(begin
-                (for-each
-                  (lambda (dir)
-                    (delete-file-recursively (string-append "Source/" dir)))
-                  '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
-                    "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
-            (patches
-             (append
-              (search-patches "freeimage-unbundle.patch")
-              ;; Take one patch from Arch Linux that adds LibRaw 0.20 compatibility.
-              (list (origin
-                      (method url-fetch)
-                      (uri "https://raw.githubusercontent.com/archlinux\
+    (name "freeimage")
+    (version "3.18.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/freeimage/Source%20Distribution/"
+                    version "/FreeImage"
+                    (string-concatenate (string-split version #\.))
+                    ".zip"))
+              (sha256
+               (base32
+                "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each
+                   (lambda (dir)
+                     (delete-file-recursively (string-append "Source/" dir)))
+                   '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
+                     "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
+              (patches
+               (append
+                (search-patches "freeimage-unbundle.patch")
+                ;; Take one patch from Arch Linux that adds LibRaw 0.20 compatibility.
+                (list (origin
+                        (method url-fetch)
+                        (uri "https://raw.githubusercontent.com/archlinux\
 /svntogit-community/ca3e6a52f5a46dec87cbf85e9d84fe370e282c8c/trunk\
 /freeimage-libraw-0.20.patch")
-                      (file-name "freeimage-libraw-compat.patch")
-                      (sha256
-                       (base32
-                        "0cwjxjz0f4gs6igvwqg0p99mnrsrwzkal1l2n08yvz2xq9s5khki"))))))))
-   (build-system gnu-build-system)
-   (arguments
-    `(#:phases
-      (modify-phases %standard-phases
-        ;; According to Fedora these files depend on private headers, but their
-        ;; presence is required for building, so we replace them with empty files.
-        (add-after 'unpack 'delete-unbuildable-files
-          (lambda _
-            (for-each (lambda (file)
-                        (delete-file file)
-                        (close (open file O_CREAT)))
-                      '("Source/FreeImage/PluginG3.cpp"
-                        "Source/FreeImageToolkit/JPEGTransform.cpp"))
-            #t))
-        ;; These scripts generate the Makefiles.
-        (replace 'configure
-          (lambda _
-            (invoke "sh" "gensrclist.sh")
-            (invoke "sh" "genfipsrclist.sh")))
-        (add-before 'build 'patch-makefile
-          (lambda* (#:key outputs #:allow-other-keys)
-            (substitute* "Makefile.gnu"
-              (("/usr") (assoc-ref outputs "out"))
-              (("-o root -g root") ""))
-            #t)))
+                        (file-name "freeimage-libraw-compat.patch")
+                        (sha256
+                         (base32
+                          "0cwjxjz0f4gs6igvwqg0p99mnrsrwzkal1l2n08yvz2xq9s5khki"))))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; According to Fedora these files depend on private headers, but their
+          ;; presence is required for building, so we replace them with empty files.
+          (add-after 'unpack 'delete-unbuildable-files
+            (lambda _
+              (for-each (lambda (file)
+                          (delete-file file)
+                          (close (open file O_CREAT)))
+                        '("Source/FreeImage/PluginG3.cpp"
+                          "Source/FreeImageToolkit/JPEGTransform.cpp"))))
+          ;; These scripts generate the Makefiles.
+          (replace 'configure
+            (lambda _
+              (invoke "sh" "gensrclist.sh")
+              (invoke "sh" "genfipsrclist.sh")))
+          (add-before 'build 'patch-makefile
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* "Makefile.gnu"
+                (("/usr") (assoc-ref outputs "out"))
+                (("-o root -g root") "")))))
       #:make-flags
-      (list ,(string-append "CC=" (cc-for-target))
-            ;; We need '-fpermissive' for Source/FreeImage.h.
-            ;; libjxr doesn't have a pkg-config file.
-            (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive "
-                           "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib"))
-      #:tests? #f)) ; no check target
-   (native-inputs
-    (list pkg-config unzip))
-   (inputs
-    `(("libjpeg" ,libjpeg-turbo)
-      ("libjxr" ,libjxr)
-      ("libpng" ,libpng)
-      ("libraw" ,libraw)
-      ("libtiff" ,libtiff)
-      ("libwebp" ,libwebp)
-      ("openexr" ,openexr-2)
-      ("openjpeg" ,openjpeg)
-      ("zlib" ,zlib)))
-   (synopsis "Library for handling popular graphics image formats")
-   (description
-    "FreeImage is a library for developers who would like to support popular
+      #~(let ((jxrlib (search-input-directory %build-inputs "include/jxrlib")))
+          (list (string-append "CC=" #$(cc-for-target))
+                ;; We need '-fpermissive' for Source/FreeImage.h.
+                ;; libjxr doesn't have a pkg-config file.
+                (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden "
+                               "-fpermissive -I" jxrlib)))
+      #:tests? #f))                     ; no check target
+    (native-inputs
+     (list pkg-config unzip))
+    (inputs
+     (list libjpeg-turbo
+           libjxr
+           libpng
+           libraw
+           libtiff
+           libwebp
+           openexr-2
+           openjpeg
+           zlib))
+    (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 "https://freeimage.sourceforge.io/")))
+    (license license:gpl2+)
+    (home-page "https://freeimage.sourceforge.io/")))
 
 (define-public vigra
     (let ((commit "9b514fa00a136f5fd81bb57ee9f6293c333ffc1f")