gnu: Add ronn-ng
[jackhill/guix/guix.git] / gnu / packages / photo.scm
index a2a882f..4a077cf 100644 (file)
@@ -8,6 +8,7 @@
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages photo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages file)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages geo)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages iso-codes)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages opencl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
@@ -165,14 +175,14 @@ cards and generate meaningful file and folder names.")
 (define-public libraw
   (package
     (name "libraw")
-    (version "0.19.5")
+    (version "0.20.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.libraw.org/data/LibRaw-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1x827sh6vl8j3ll2ihkcr234y07f31hi1v7sl08jfw3irkbn58j0"))))
+                "18wlsvj6c1rv036ph3695kknpgzc3lk2ikgshy8417yfl8ykh2hz"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -206,17 +216,17 @@ cameras (CRW/CR2, NEF, RAF, DNG, and others).")
 (define-public libexif
   (package
     (name "libexif")
-    (version "0.6.21")
+    (version "0.6.22")
     (source (origin
               (method url-fetch)
-              (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-2018-20030.patch"))
+              (uri (string-append
+                    "https://github.com/libexif/libexif/releases"
+                    "/download/libexif-"
+                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
+                    "-release/libexif-" version ".tar.xz"))
               (sha256
                (base32
-                "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
+                "0mhcad5zab7fsn120rd585h8ncwkq904nzzrq8vcd72hzk4g2j2h"))))
     (build-system gnu-build-system)
     (home-page "https://libexif.github.io/")
     (synopsis "Read and manipulate EXIF data in digital photographs")
@@ -228,14 +238,14 @@ data as produced by digital cameras.")
 (define-public libgphoto2
   (package
     (name "libgphoto2")
-    (version "2.5.24")
+    (version "2.5.25")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
                                   version "/libgphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0cgvsk06c4kcfj16plc27nm7g16r9ci0y4k83sf3iyphd63mfg7x"))))
+                "0fkz2rx7xlmr6zl6f56hhxps6bx16dwcw5pyd8c2icf273s9h3kw"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
@@ -457,7 +467,7 @@ photographic equipment.")
 (define-public darktable
   (package
     (name "darktable")
-    (version "2.6.3")
+    (version "3.0.2")
     (source
      (origin
        (method url-fetch)
@@ -465,13 +475,22 @@ photographic equipment.")
              "https://github.com/darktable-org/darktable/releases/"
              "download/release-" version "/darktable-" version ".tar.xz"))
        (sha256
-        (base32 "1w3q3dhcxa0bs590zbsj61ap8z84wmn04xs5q3gjwisqhjf9j655"))))
+        (base32 "1yrnkw8c47kmy2x6m1xp69hwyk02xyc8pd9kvcmyj54lzrhzdfka"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; there are no tests
        #:configure-flags '("-DBINARY_PACKAGE_BUILD=On")
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'prepare-build-environment
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CC" "clang") (setenv "CXX" "clang++")
+             ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
+             ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
+             (substitute* "CMakeLists.txt"
+               (("\\$\\{LLVM_INSTALL_PREFIX\\}")
+                (assoc-ref %build-inputs "clang")))
+             #t))
          (add-before 'configure 'set-LDFLAGS-and-CPATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "LDFLAGS"
@@ -483,35 +502,62 @@ photographic equipment.")
              (setenv "CPATH"
                      (string-append (assoc-ref inputs "ilmbase")
                                     "/include/OpenEXR:" (or (getenv "CPATH") "")))
-             #t)))))
+             #t))
+          (add-after 'install 'wrap-program
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (wrap-program (string-append (assoc-ref outputs "out")
+                                           "/bin/darktable")
+                ;; For GtkFileChooserDialog.
+                `("GSETTINGS_SCHEMA_DIR" =
+                  (,(string-append (assoc-ref inputs "gtk+")
+                                   "/share/glib-2.0/schemas"))))
+              #t)))))
     (native-inputs
-     `(("intltool" ,intltool)
+     `(("clang" ,clang-9)
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("llvm" ,llvm-9) ;should match the Clang version
+       ("opencl-headers" ,opencl-headers)
        ("perl" ,perl)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("po4a" ,po4a)))
     (inputs
-     `(("libxslt" ,libxslt)
-       ("libxml2" ,libxml2)
-       ("pugixml" ,pugixml)
+     `(("cairo" ,cairo)
+       ("colord-gtk" ,colord-gtk)
+       ("cups" ,cups)
+       ("curl" ,curl)
+       ("dbus-glib" ,dbus-glib)
+       ("exiv2" ,exiv2)
+       ("freeimage" ,freeimage)
+       ("gmic" ,gmic)
+       ("graphicsmagick" ,graphicsmagick)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)
-       ("sqlite" ,sqlite)
+       ("ilmbase" ,ilmbase)
+       ("iso-codes" ,iso-codes)
+       ("json-glib" ,json-glib)
+       ("lcms" ,lcms)
+       ("lensfun" ,lensfun)
+       ("libgphoto2" ,libgphoto2)
        ("libjpeg" ,libjpeg-turbo)
+       ("libomp" ,libomp)
        ("libpng" ,libpng)
-       ("cairo" ,cairo)
-       ("lcms" ,lcms)
-       ("exiv2" ,exiv2)
+       ("librsvg" ,librsvg)
+       ("libsecret" ,libsecret)
+       ("libsoup" ,libsoup)
        ("libtiff" ,libtiff)
-       ("curl" ,curl)
-       ("libgphoto2" ,libgphoto2)
-       ("dbus-glib" ,dbus-glib)
+       ("libwebp" ,libwebp)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("lua" ,lua) ;for plugins
        ("openexr" ,openexr)
-       ("ilmbase" ,ilmbase)
-       ("libsoup" ,libsoup)
+       ("openjpeg" ,openjpeg)
+       ("osm-gps-map" ,osm-gps-map)
+       ("pugixml" ,pugixml)
        ("python-jsonschema" ,python-jsonschema)
-       ("libwebp" ,libwebp)
-       ("lensfun" ,lensfun)
-       ("librsvg" ,librsvg)
-       ("json-glib" ,json-glib)
-       ("freeimage" ,freeimage)))
+       ("sqlite" ,sqlite)))
     (home-page "https://www.darktable.org")
     (synopsis "Virtual lighttable and darkroom for photographers")
     (description "Darktable is a photography workflow application and RAW
@@ -520,12 +566,122 @@ them through a zoomable lighttable and enables you to develop raw images
 and enhance them.")
     ;; See src/is_supported_platform.h for supported platforms.
     (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
+    (license (list license:gpl3+ ;; Darktable itself.
+                   license:lgpl2.1+)))) ;; Rawspeed library.
+
+(define-public photoflare
+  (package
+    (name "photoflare")
+    (version "1.6.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/photoflare/photoflare")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a394324h7ds567z3i3pw6kkii78n4qwdn129kgkkm996yh03q89"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ;no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((magickpp (assoc-ref inputs "graphicsmagick"))
+                   (out (assoc-ref outputs "out")))
+               (invoke "qmake"
+                       (string-append "INCLUDEPATH += " magickpp
+                                      "/include/GraphicsMagick")
+                       (string-append "PREFIX=" out)
+                       "Photoflare.pro")))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("graphicsmagick" ,graphicsmagick)
+       ("libomp" ,libomp)
+       ("qtbase" ,qtbase)))
+    (home-page "https://photoflare.io")
+    (synopsis "Quick, simple but powerful image editor")
+    (description "Photoflare is a cross-platform image editor with an aim
+to balance between powerful features and a very friendly graphical user
+interface.  It suits a wide variety of different tasks and users who value a
+more nimble workflow.  Features include basic image editing capabilities,
+paint brushes, image filters, colour adjustments and more advanced features
+such as Batch image processing.")
+    (license license:gpl3+)))
+
+(define-public entangle
+  (package
+    (name "entangle")
+    (version "3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/entangle/entangle")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1pdmgxjdb3xlcqsaz7l8qzj5f7g7nwzhsrgid8929bm36d49cgc7"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'skip-gtk-update-icon-cache
+           ;; Don't create 'icon-theme.cache'.
+           (lambda _
+             (substitute* "meson_post_install.py"
+               (("gtk-update-icon-cache") "true"))
+             #t))
+         (add-after 'install 'wrap-gi-python
+           ;; Make GTK find files needed by plugins.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out               (assoc-ref outputs "out"))
+                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
+                   (python-path       (getenv "PYTHONPATH")))
+               (wrap-program (string-append out "/bin/entangle")
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
+                 `("PYTHONPATH" ":" prefix (,python-path))))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk-doc" ,gtk-doc)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("xmllint" ,libxml2)))
+    (inputs
+     `(("gdk-pixbuf" ,gdk-pixbuf)
+       ("gexiv2" ,gexiv2)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gstreamer" ,gstreamer)
+       ("gtk+" ,gtk+)
+       ("lcms" ,lcms)
+       ("libgphoto2" ,libgphoto2)
+       ("libgudev" ,libgudev)
+       ("libpeas" ,libpeas)
+       ("libraw" ,libraw)
+       ("python" ,python)
+       ("python-pygobject" ,python-pygobject)))
+    (home-page "https://entangle-photo.org/")
+    (synopsis "Camera control and capture")
+    (description
+     "Entangle is an application which uses GTK and libgphoto2 to provide a
+graphical interface for tethered photography with digital cameras.  It
+includes control over camera shooting and configuration settings and 'hands
+off' shooting directly from the controlling computer.")
     (license license:gpl3+)))
 
 (define-public hugin
   (package
     (name "hugin")
-    (version "2019.0.0")
+    (version "2019.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
@@ -533,7 +689,7 @@ and enhance them.")
                                   "/hugin-" version ".tar.bz2"))
               (sha256
                (base32
-                "1l925qslp98gg7yzmgps10h6dq0nb60wbfk345anlxsv0g2ifizr"))))
+                "0gjsm5bgz10wbr5q3y74f8dzb238dh32xx0p5wa3yca6lbzbv9lb"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)