gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
index 99bc90e..0867433 100644 (file)
@@ -1,10 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2017 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -37,7 +37,6 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
-  #:use-module (gnu packages databases)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
@@ -56,7 +55,9 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages web)
   #:use-module (gnu packages wxwidgets)
 (define-public libraw
   (package
     (name "libraw")
-    (version "0.18.12")
+    (version "0.19.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.libraw.org/data/LibRaw-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1m2khr2cij8z6lawgbmdksjn14fpnjsy8ad4qahnpqapm1slsxap"))))
+                "1x827sh6vl8j3ll2ihkcr234y07f31hi1v7sl08jfw3irkbn58j0"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libjpeg" ,libjpeg)))           ;for lossy DNGs and old Kodak cameras
+    (propagated-inputs
+     `(("lcms" ,lcms)))                 ;for color profiles
     (home-page "https://www.libraw.org")
     (synopsis "Raw image decoder")
     (description
      "LibRaw is a library for reading RAW files obtained from digital photo
 cameras (CRW/CR2, NEF, RAF, DNG, and others).")
-    (license license:lgpl2.1+)))
+    ;; LibRaw is distributed under both LGPL2.1 and CDDL 1.0.  From the README:
+    ;; "You may use one of these licensing modes and switch between them.  If
+    ;; you modify LibRaw source and made your changes public, you should accept
+    ;; both two licensing modes for your changes/additions."
+    (license (list license:lgpl2.1 license:cddl1.0))))
+
+(define-public libraw-0.18
+  (package (inherit libraw)
+    (name "libraw")
+    (version "0.18.12")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.libraw.org/data/LibRaw-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1m2khr2cij8z6lawgbmdksjn14fpnjsy8ad4qahnpqapm1slsxap"))))))
 
 (define-public libexif
   (package
@@ -94,12 +117,13 @@ cameras (CRW/CR2, NEF, RAF, DNG, and others).")
               (uri (string-append "mirror://sourceforge/libexif/libexif/"
                                   version "/libexif-" version ".tar.bz2"))
               (patches (search-patches "libexif-CVE-2016-6328.patch"
-                                       "libexif-CVE-2017-7544.patch"))
+                                       "libexif-CVE-2017-7544.patch"
+                                       "libexif-CVE-2018-20030.patch"))
               (sha256
                (base32
                 "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
     (build-system gnu-build-system)
-    (home-page "http://libexif.sourceforge.net/")
+    (home-page "https://libexif.github.io/")
     (synopsis "Read and manipulate EXIF data in digital photographs")
     (description
      "The libexif C library allows applications to read, edit, and save EXIF
@@ -109,14 +133,14 @@ data as produced by digital cameras.")
 (define-public libgphoto2
   (package
     (name "libgphoto2")
-    (version "2.5.17")
+    (version "2.5.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
                                   version "/libgphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0mdmjb8a07g37bb5q69h11sixw0w6y5g3kbii9z97yhklgq68x21"))))
+                "0bc5x2bkqbfi4hbkz8ab5xc0bkks9vvks1vygxhdh3x498v27byq"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
@@ -140,14 +164,14 @@ from digital cameras.")
 (define-public gphoto2
   (package
     (name "gphoto2")
-    (version "2.5.17")
+    (version "2.5.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
                                   "/gphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0kslwclyyzvnxjw3gdzhlagj7l5f8lba833ipr9s0s0c4hwi0mxa"))))
+                "1laqwhxr0xhbykmp0dhd3j4rr2lhj5y228s31afnqxp700hhk1yz"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -181,18 +205,24 @@ MTP, and much more.")
     ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
     (license license:gpl2+)))
 
+;; Note: See <https://metacpan.org/pod/Image::ExifTool> for the latest
+;; release.  The versions at <https://www.sno.phy.queensu.ca/~phil/exiftool/>
+;; are not meant for production use according to the Changes file.
 (define-public perl-image-exiftool
   (package
     (name "perl-image-exiftool")
-    (version "10.80")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
-                    version ".tar.gz"))
-              (sha256
-               (base32
-                "14rwr5wk2snqv4yva6fax1gfsdv88941n237m0wyzn3n0xh9dy5w"))))
+    (version "11.30")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (list
+             (string-append "mirror://cpan/authors/id/E/EX/EXIFTOOL/"
+                            "Image-ExifTool-" version ".tar.gz")
+             ;; New releases may take a while to hit CPAN.
+             (string-append "https://www.sno.phy.queensu.ca/~phil/exiftool/"
+                            "Image-ExifTool-" version ".tar.gz")))
+       (sha256
+        (base32 "0vkjb2c1a3jdlq8rx1jywx4p3f1bmgjn7rzfwx6dxgij2lx76lrs"))))
     (build-system perl-build-system)
     (arguments
      '(#:phases
@@ -205,8 +235,9 @@ MTP, and much more.")
                     (pm  (find-files out "^ExifTool\\.pm$"))
                     (lib (dirname (dirname (car pm)))))
                (wrap-program (string-append out "/bin/exiftool")
-                             `("PERL5LIB" prefix (,lib)))))))))
-    (home-page "http://search.cpan.org/dist/Image-ExifTool")
+                 `("PERL5LIB" prefix (,lib)))
+               #t))))))
+    (home-page "https://metacpan.org/release/Image-ExifTool")
     (synopsis "Program and Perl library to manipulate EXIF and other metadata")
     (description "This package provides the @code{exiftool} command and the
 @code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images
@@ -330,36 +361,33 @@ photographic equipment.")
 (define-public darktable
   (package
     (name "darktable")
-    (version "2.4.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/darktable-org/darktable/releases/"
-                    "download/release-"
-                    version "/darktable-" version ".tar.xz"))
-              (sha256
-               (base32
-                "0kdhmiw4wxk2w9v2hms9yk8nl4ymdshnqyj0l07nivzzr6w20hwn"))))
+    (version "2.6.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/darktable-org/darktable/releases/"
+             "download/release-" version "/darktable-" version ".tar.xz"))
+       (sha256
+        (base32 "1w3q3dhcxa0bs590zbsj61ap8z84wmn04xs5q3gjwisqhjf9j655"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f ; There are no tests.
+     `(#:tests? #f                      ; there are no tests
        #:configure-flags '("-DBINARY_PACKAGE_BUILD=On")
-       #:make-flags
-       (list
-        (string-append "CPATH=" (assoc-ref %build-inputs "ilmbase")
-                       "/include/OpenEXR:" (or (getenv "CPATH") "")))
        #:phases
        (modify-phases %standard-phases
-         (add-before 'configure 'set-ldflags
-           (lambda* (#:key outputs #:allow-other-keys)
+         (add-before 'configure 'set-LDFLAGS-and-CPATH
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "LDFLAGS"
                      (string-append
                       "-Wl,-rpath="
                       (assoc-ref outputs "out") "/lib/darktable"))
+
+             ;; Ensure the OpenEXR headers are found.
+             (setenv "CPATH"
+                     (string-append (assoc-ref inputs "ilmbase")
+                                    "/include/OpenEXR:" (or (getenv "CPATH") "")))
              #t)))))
-    (native-inputs
-     `(("llvm" ,llvm-3.9.1)
-       ("clang" ,clang-3.9.1)))
     (inputs
      `(("libxslt" ,libxslt)
        ("libxml2" ,libxml2)
@@ -393,14 +421,14 @@ photographic equipment.")
 developer.  It manages your digital negatives in a database, lets you view
 them through a zoomable lighttable and enables you to develop raw images
 and enhance them.")
-    ;; see src/is_supported_platform.h for supported platforms
+    ;; See src/is_supported_platform.h for supported platforms.
     (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
     (license license:gpl3+)))
 
 (define-public hugin
   (package
     (name "hugin")
-    (version "2016.2.0")
+    (version "2019.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
@@ -408,7 +436,7 @@ and enhance them.")
                                   "/hugin-" version ".tar.bz2"))
               (sha256
                (base32
-                "058zd63vx29yrx2pphbbll7kzcxkai22q26lpw13rn4lvp41pasl"))))
+                "1l925qslp98gg7yzmgps10h6dq0nb60wbfk345anlxsv0g2ifizr"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("gettext" ,gnu-gettext)
@@ -416,7 +444,7 @@ and enhance them.")
     (inputs
      `(("boost" ,boost)
        ("enblend-enfuse" ,enblend-enfuse)
-       ("exiv2" ,exiv2)
+       ("exiv2" ,exiv2-0.26)
        ("fftw" ,fftw)
        ("flann" ,flann)
        ("freeglut" ,freeglut)
@@ -470,28 +498,28 @@ a complete panorama and stitch any series of overlapping pictures.")
 (define-public rawtherapee
   (package
     (name "rawtherapee")
-    (version "5.4")
+    (version "5.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://rawtherapee.com/shared/source/"
                                   "rawtherapee-" version ".tar.xz"))
               (sha256
                (base32
-                "1229hxqq824hcqg1hy2cfglsp7kjbhhis9m33ss39pgmrb1w227d"))))
+                "0x0dcfp6f3j08gr11wq5ah4prp790xy4iadbgsm9kgc0jlalpspr"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f ; no test suite
+     '(#:tests? #f                      ; no test suite
        #:build-type "release"
        #:configure-flags
        (list (string-append "-DLENSFUNDBDIR="
                             (assoc-ref %build-inputs "lensfun")
                             "/share/lensfun")
-             ; Don't optimize the build for the host machine. See the file
-             ; 'ProcessorTargets.cmake' in the source distribution for more
-             ; information.
+             ;; Don't optimize the build for the host machine. See the file
+             ;; 'ProcessorTargets.cmake' in the source distribution for more
+             ;; information.
              "-DPROC_TARGET_NUMBER=1"
-             ; These flags are recommended by upstream for distributed packages.
-             ; See the file 'RELEASE_NOTES.txt' in the source distribution.
+             ;; These flags are recommended by upstream for distributed packages.
+             ;; See the file 'RELEASE_NOTES.txt' in the source distribution.
              "-O3"
              "-DCACHE_NAME_SUFFIX=\"\"")))
     (native-inputs
@@ -509,6 +537,7 @@ a complete panorama and stitch any series of overlapping pictures.")
        ("libiptcdata" ,libiptcdata)
        ("libjpeg" ,libjpeg)
        ("libpng" ,libpng)
+       ("librsvg" ,librsvg)
        ("libsigc++" ,libsigc++)
        ("libtiff" ,libtiff)
        ("zlib" ,zlib)))