gnu: fbreader: Fix build failure.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
index c7bb9af..5994796 100644 (file)
@@ -1,11 +1,13 @@
 ;;; 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, 2018 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>
+;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +28,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages file)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tex)
+  #:use-module (gnu packages time)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages web)
   #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xfig)
   #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module (srfi srfi-26))
 
+(define-public rapid-photo-downloader
+  (package
+    (name "rapid-photo-downloader")
+    (version "0.9.18")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://launchpad.net/rapid/pyqt/"
+                                  version "/+download/" name "-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "15p7sssg6vmqbm5xnc4j5dr89d7gl7y5qyq44a240yl5aqkjnybw"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("file" ,file)
+       ("intltool" ,intltool)
+       ("gobject-introspection" ,gobject-introspection)))
+    (inputs
+     `(("gdk-pixbuf" ,gdk-pixbuf)
+       ("gexiv2" ,gexiv2)
+       ("gst-libav" ,gst-libav)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)
+       ("libgudev" ,libgudev)
+       ("libnotify" ,libnotify)
+       ("libmediainfo" ,libmediainfo)
+       ("usdisks" ,udisks)
+       ("python-pyqt" ,python-pyqt)
+       ("python-pygobject" ,python-pygobject)
+       ("python-gphoto2" ,python-gphoto2)
+       ("python-pyzmq" ,python-pyzmq)
+       ("python-tornado" ,python-tornado)
+       ("python-psutil" ,python-psutil)
+       ("python-pyxdg" ,python-pyxdg)
+       ("python-arrow" ,python-arrow)
+       ("python-dateutil" ,python-dateutil)
+       ("python-easygui" ,python-easygui)
+       ("python-colour" ,python-colour)
+       ("python-pymediainfo" ,python-pymediainfo)
+       ("python-sortedcontainers" ,python-sortedcontainers)
+       ("python-rawkit" ,python-rawkit)
+       ("python-requests" ,python-requests)
+       ("python-colorlog" ,python-colorlog)
+       ("python-pyprind" ,python-pyprind)
+       ("python-tenacity" ,python-tenacity)
+       ("perl-image-exiftool" ,perl-image-exiftool)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libmediainfo
+           (lambda _
+             (substitute* "raphodo/metadatavideo.py"
+               (("pymedia_library_file = 'libmediainfo.so.0'")
+                (string-append "pymedia_library_file = '"
+                               (assoc-ref %build-inputs "libmediainfo")
+                               "/lib/libmediainfo.so.0'")))
+             #t))
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out               (assoc-ref outputs "out"))
+                   (path              (string-join
+                                       (list (string-append
+                                              (assoc-ref inputs "perl-image-exiftool")
+                                              "/bin"))
+                                       ":"))
+                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
+                   (python-path       (getenv "PYTHONPATH")))
+               (for-each
+                (lambda (program)
+                  (wrap-program program
+                    `("PATH" ":" prefix (,path))
+                    `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
+                    `("PYTHONPATH"             ":" prefix (,python-path))))
+                (map (lambda (name)
+                       (string-append out "/bin/" name))
+                     '("analyze-pv-structure"
+                       "rapid-photo-downloader"))))
+             #t)))))
+    (home-page "https://www.damonlynch.net/rapid/")
+    (synopsis "Import photos and videos from cameras, phones and memory cards")
+    (description "Import photos and videos from cameras, phones and memory
+cards and generate meaningful file and folder names.")
+    (license license:gpl2+)))
+
 (define-public libraw
   (package
     (name "libraw")
-    (version "0.19.1")
+    (version "0.19.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.libraw.org/data/LibRaw-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1xjyw4n9gfr2r637pjbpbi3h98h9mdjn61b0hsxwqynq2vdij452"))))
+                "1x827sh6vl8j3ll2ihkcr234y07f31hi1v7sl08jfw3irkbn58j0"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("libjpeg" ,libjpeg)))           ;for lossy DNGs and old Kodak cameras
+     `(("libjpeg" ,libjpeg-turbo)))     ;for lossy DNGs and old Kodak cameras
     (propagated-inputs
      `(("lcms" ,lcms)))                 ;for color profiles
     (home-page "https://www.libraw.org")
@@ -117,7 +212,8 @@ 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"))))
@@ -132,14 +228,14 @@ data as produced by digital cameras.")
 (define-public libgphoto2
   (package
     (name "libgphoto2")
-    (version "2.5.22")
+    (version "2.5.24")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
                                   version "/libgphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0n6f6nagys775ib483nka1sbclhkm1dz3n5z3lgaz1m9m5x35mqm"))))
+                "0cgvsk06c4kcfj16plc27nm7g16r9ci0y4k83sf3iyphd63mfg7x"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
@@ -163,14 +259,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)))
@@ -204,18 +300,25 @@ 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 "11.11")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
-                    version ".tar.gz"))
-              (sha256
-               (base32
-                "1szg1k82nz88pp5n7lg71ja7q3hh5i5f9bcbb7m482dwrmsywkp6"))))
+    (version "11.85")
+    (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
+         "15zqm0ly2b3paqg0ym44ib2mvh6k18a9q5rvdirwipqa127al2lb"))))
     (build-system perl-build-system)
     (arguments
      '(#:phases
@@ -251,7 +354,7 @@ and a wide variety of other metadata.")
                 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
     (build-system cmake-build-system)
     (inputs
-     `(("libjpeg" ,libjpeg)
+     `(("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libtiff" ,libtiff)
        ("zlib" ,zlib)))
@@ -293,7 +396,7 @@ overlapping images, as well as some command line tools.")
      `(("boost" ,boost)
        ("gsl" ,gsl)
        ("lcms" ,lcms)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libtiff" ,libtiff)
        ("openexr" ,openexr)
@@ -354,43 +457,44 @@ photographic equipment.")
 (define-public darktable
   (package
     (name "darktable")
-    (version "2.6.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/darktable-org/darktable/releases/"
-                    "download/release-"
-                    version "/darktable-" version ".tar.xz"))
-              (sha256
-               (base32
-                "0y04cx0a0rwdclmn16f5y0z2vnm7yxly291gzjgdhcn59a77sga8"))))
+    (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)))
+     `(("intltool" ,intltool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("libxslt" ,libxslt)
        ("libxml2" ,libxml2)
        ("pugixml" ,pugixml)
        ("gtk+" ,gtk+)
        ("sqlite" ,sqlite)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("cairo" ,cairo)
        ("lcms" ,lcms)
@@ -403,9 +507,6 @@ photographic equipment.")
        ("ilmbase" ,ilmbase)
        ("libsoup" ,libsoup)
        ("python-jsonschema" ,python-jsonschema)
-       ("intltool" ,intltool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)
        ("libwebp" ,libwebp)
        ("lensfun" ,lensfun)
        ("librsvg" ,librsvg)
@@ -417,14 +518,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 "2018.0.0")
+    (version "2019.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
@@ -432,21 +533,21 @@ and enhance them.")
                                   "/hugin-" version ".tar.bz2"))
               (sha256
                (base32
-                "1jv5wpqbq49fhbl5g521g1qxhdm1rm7acxd18fr3n3n5d830vbyk"))))
+                "0gjsm5bgz10wbr5q3y74f8dzb238dh32xx0p5wa3yca6lbzbv9lb"))))
     (build-system cmake-build-system)
     (native-inputs
-     `(("gettext" ,gnu-gettext)
+     `(("gettext" ,gettext-minimal)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("boost" ,boost)
        ("enblend-enfuse" ,enblend-enfuse)
-       ("exiv2" ,exiv2)
+       ("exiv2" ,exiv2-0.26)
        ("fftw" ,fftw)
        ("flann" ,flann)
        ("freeglut" ,freeglut)
        ("glew" ,glew)
        ("lcms" ,lcms)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpano13" ,libpano13)
        ("libpng" ,libpng)
        ("libtiff" ,libtiff)
@@ -494,28 +595,28 @@ a complete panorama and stitch any series of overlapping pictures.")
 (define-public rawtherapee
   (package
     (name "rawtherapee")
-    (version "5.5")
+    (version "5.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://rawtherapee.com/shared/source/"
                                   "rawtherapee-" version ".tar.xz"))
               (sha256
                (base32
-                "1w28a2rnxnw8hs7s8x8zkccgi5z5y653602jg7g86lfx6zxwjsf1"))))
+                "0lq8qi7g0a28h3rab7bk5bbbd4gvfma42bvlz1dfn8p9mah2h19n"))))
     (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
@@ -531,8 +632,9 @@ a complete panorama and stitch any series of overlapping pictures.")
        ("lensfun" ,lensfun)
        ("libcanberra" ,libcanberra)
        ("libiptcdata" ,libiptcdata)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
+       ("librsvg" ,librsvg)
        ("libsigc++" ,libsigc++)
        ("libtiff" ,libtiff)
        ("zlib" ,zlib)))