;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
-;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2020 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016, 2017, 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
-;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2017 Nikita <nikita@n0.is>
+;;; Copyright © 2017,2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages algebra)
#:use-module (gnu packages assembly)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages qt)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages textutils)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
- #:use-module (gnu packages qt)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
#:use-module (guix deprecation)
#:use-module (srfi srfi-1))
+(define-public iqa
+ (package
+ (name "iqa")
+ (version "1.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://sourceforge.net/projects/iqa/files/"
+ "1.1.2%20Release/iqa_1.1.2_src.tar.gz/download"))
+ (sha256
+ (base32 "00mgwy031ammab6bwmd1whhvqv3fxy1cs1igabq0n3ag12zhjs77"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ (install-file "build/debug/libiqa.a" lib)
+ #t))))))
+ (synopsis "Image Quality Assessment")
+ (description "IQA is a C library for objectively measuring image/video
+quality. It implements many popular algorithms, such as MS-SSIM, MS-SSIM*,
+SIMM, MSE, and PSNR. It is designed to be fast, accurate, and reliable. All
+code is Valgrind-clean and unit tested.")
+ (home-page "https://sourceforge.net/projects/iqa/")
+ (license license:bsd-4)))
+
(define-public libpng
(package
(name "libpng")
images. It can further losslessly compress them by as much as 40%.")
(license license:zlib)))
-(define-public pngcrunch
- ;; This package used to be wrongfully name "pngcrunch".
- (deprecated-package "pngcrunch" pngcrush))
-
(define-public pnglite
(let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
(revision "1"))
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/ImageOptim/libimagequant.git")
+ (url "https://github.com/ImageOptim/libimagequant")
(commit version)))
(file-name (git-file-name name version))
(sha256
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/kornelski/pngquant.git")
+ (url "https://github.com/kornelski/pngquant")
(commit version)))
(file-name (git-file-name name version))
(sha256
(define-public ijg-libjpeg
(package
(name "libjpeg")
- (version "9c")
+ (version "9d")
(source (origin
(method url-fetch)
(uri (string-append "https://www.ijg.org/files/jpegsrc.v"
version ".tar.gz"))
(sha256 (base32
- "08kixcf3a7s9x91174abjnk1xbvj4v8crdc73zi4k9h3jfbm00k5"))))
+ "0clwys9lcqlxqgcw8s1gwfm5ix2zjlqpklmd3mbvqmj5ibj51jwr"))))
(build-system gnu-build-system)
(synopsis "Library for handling JPEG files")
(description
(license license:ijg)
(home-page "https://www.ijg.org/")))
-(define-public ijg-libjpeg-8
- (package (inherit ijg-libjpeg)
- (version "8d")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
- version ".tar.gz"))
- (sha256 (base32
- "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
-
(define-public libjxr
(package
(name "libjxr")
(source
(origin
(method url-fetch)
- (uri (string-append "http://download.osgeo.org/libtiff/tiff-"
+ (uri (string-append "https://download.osgeo.org/libtiff/tiff-"
version ".tar.gz"))
(sha256
(base32
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/DanBloomberg/leptonica.git")
+ (url "https://github.com/DanBloomberg/leptonica")
(commit version)))
(file-name (git-file-name name version))
(sha256
("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)
- ("libwebp" ,libwebp)))
- (propagated-inputs
- ;; Linking a program with leptonica also requires these.
- `(("openjpeg" ,openjpeg)
+ ("libwebp" ,libwebp)
+ ("openjpeg" ,openjpeg)
("zlib" ,zlib)))
(arguments
'(#:phases
(string-append " " (which "sh") " "))
(("which gnuplot")
"true"))
- #t)))))
+ #t))
+ (add-after 'install 'provide-absolute-giflib-reference
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (giflib (assoc-ref inputs "giflib")))
+ ;; Add an absolute reference to giflib to avoid propagation.
+ (with-directory-excursion (string-append out "/lib")
+ (substitute* '("liblept.la" "pkgconfig/lept.pc")
+ (("-lgif") (string-append "-L" giflib "/lib -lgif"))))
+ #t))))))
(home-page "http://www.leptonica.com/")
(synopsis "Library and tools for image processing and analysis")
(description
(define-public jbig2dec
(package
(name "jbig2dec")
- (version "0.17")
+ (version "0.18")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ArtifexSoftware"
"/ghostpdl-downloads/releases/download"
- "/gs950/" name "-" version ".tar.gz"))
+ "/gs951/" name "-" version ".tar.gz"))
(sha256
(base32
- "0wpvslmwazia3z8gyk343kbq6yj47pxr4x5yjvx332v309qssazp"))
- (patches (search-patches "jbig2dec-ignore-testtest.patch"))))
+ "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy"))))
(build-system gnu-build-system)
- (arguments '(#:configure-flags '("--disable-static")))
+ (arguments '(#:configure-flags '("--disable-static")
+ #:phases (modify-phases %standard-phases
+ (add-before 'bootstrap 'force-bootstrap
+ (lambda _
+ ;; XXX: jbig2dec 0.18 was released with
+ ;; a broken configure script, so we
+ ;; recreate the build system here.
+ ;; Remove the autoconf inputs below
+ ;; when deleting this code.
+ (delete-file "configure")
+ (delete-file "autogen.sh")
+ #t)))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("python" ,python-wrapper))) ;for tests
(synopsis "Decoder of the JBIG2 image compression format")
(description
"JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
(license (list license:isc ; pbmtools/p?m.5
license:gpl2+)))) ; the rest
+(define-public openjpeg-data
+ (package
+ (name "openjpeg-data")
+ (version "2020.05.19")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/uclouvain/openjpeg-data.git")
+ (commit "c5c4a8c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1jp84gbhw8q5b8mhc322ql9410hjf32w9hg10x4isfa9j59mnncb"))))
+ (build-system copy-build-system)
+ (synopsis "Test files for OpenJPEG")
+ (description "OpenJPEG-Data contains all files required to run the openjpeg
+test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
+15444-4 procedures), non-regression tests and unit tests.")
+ (home-page "https://github.com/uclouvain/openjpeg-data")
+ (license license:bsd-2)))
+
(define-public openjpeg
(package
(name "openjpeg")
(home-page "http://giflib.sourceforge.net/")
(license license:x11)))
+(define-public libuemf
+ (package
+ (name "libuemf")
+ (version "0.2.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/libuemf/libUEMF-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "05djs99vqf067x81xfpskh7a66y5x7b4mmjavybcy7swnm0swg7v"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Overriding CMAKE_INSTALL_PREFIX is not a good idea.
+ (add-after 'unpack 'fix-CMakeLists.txt
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ ((".*SET\\(CMAKE_INSTALL_PREFIX.*") ""))
+ #t))
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (sources (string-append "../libUEMF-" ,version))
+ (drm-tools (assoc-ref inputs "drm-tools"))
+ (extract (string-append drm-tools "/bin/extract"))
+ (execinput (string-append drm-tools "/bin/execinput")))
+ (with-directory-excursion sources
+ (substitute* "testit.sh"
+ (("^EPATH=.*")
+ (format #f "EPATH=~a~%" bin))
+ (("`which diff`")
+ "diff")
+ (("^EXTRACT=.*")
+ (format #f "EXTRACT=~a~%" extract))
+ (("^EXECINPUT=.*")
+ (format #f "EXECINPUT=~a~%" execinput)))
+ (invoke "sh" "testit.sh"))))))))
+ (native-inputs `(("drm-tools" ,drm-tools))) ;for tests
+ (home-page "http://libuemf.sourceforge.net/")
+ (synopsis "Library for working with WFM, EMF and EMF+ images")
+ (description "The libUEMF library is a portable C99 implementation for
+reading and writing @acronym{WFM, Windows Metafile}, @acronym{EMF, Enhanced
+Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
+ (license license:gpl2+)))
+
(define-public libungif
(package
(name "libungif")
(string-append
"http://linuxbrit.co.uk/downloads/giblib-"
version ".tar.gz")
+ (string-append
+ "https://src.fedoraproject.org/repo/pkgs/giblib/giblib-"
+ version ".tar.gz/c810ef5389baf24882a1caca2954385e/giblib-"
+ version ".tar.gz")
(string-append
"https://sourceforge.net/projects/slackbuildsdirectlinks/"
"files/giblib/giblib-" version ".tar.gz")))
(inputs
`(("libx11" ,libx11)
("imlib2" ,imlib2)))
- (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
+ (home-page
+ ;; This vanished page is universally accepted as giblib's home despite not
+ ;; mentioning the package once.
+ (string-append "https://web.archive.org/web/20140907071208/"
+ "https://linuxbrit.co.uk/software/"))
(synopsis "Wrapper library for imlib2")
(description
"Giblib is a simple library which wraps imlib2's context API, avoiding
(delete-file-recursively (string-append "Source/" dir)))
'("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
"LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
- (patches (search-patches "freeimage-unbundle.patch"))))
+ (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
`(("lcms" ,lcms)
("libjpeg" ,libjpeg-turbo)
("zlib" ,zlib)))
- (home-page "http://www.libmng.com/")
+ (home-page "https://www.libmng.com/")
(synopsis "Library for handling MNG files")
(description
"Libmng is the MNG (Multiple-image Network Graphics) reference library.")
(define-public exiv2
(package
(name "exiv2")
- (version "0.27.2")
+ (version "0.27.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://www.exiv2.org/builds/exiv2-" version
"-Source.tar.gz"))
(sha256
- (base32 "0gqminvj14xm3rgbnydbywf22608js80rp7nmxxk4497j5mzali6"))))
+ (base32 "0y77wfadjsrcxijdqgkr3q88b6mm9y3rg8kqsmaig8iah49md7x7"))))
(build-system cmake-build-system)
(arguments '(#:tests? #f)) ; no test suite
(propagated-inputs
(define-public jasper
(package
(name "jasper")
- (version "2.0.16")
+ (version "2.0.20")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/mdadams/jasper.git")
+ (url "https://github.com/mdadams/jasper")
(commit (string-append "version-" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6"))))
+ "1bn4mg6l5afryrlyk3y7p3accdq113fis8hpwywy5g51ycablz3h"))))
(build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-checking-disabled-things
+ (lambda _
+ ;; The MIF codec was disabled for security reasons in JasPer 2.0.20
+ ;; but its test suite still assumes that the format is supported.
+ (for-each delete-file
+ (find-files "data/test" "\\.mif$")) ; for run_test_1
+ (substitute* "test/bin/run_test_2"
+ (("image_formats\\+=\\(mif\\)") ""))
+ #t)))))
(inputs `(("libjpeg" ,libjpeg-turbo)))
(synopsis "JPEG-2000 library")
(description "The JasPer Project is an initiative to provide a reference
(define-public zimg
(package
(name "zimg")
- (version "2.9.2")
+ (version "2.9.3")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/sekrit-twc/zimg.git")
+ (url "https://github.com/sekrit-twc/zimg")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0jlgrlfs9maixd8mx7gk2kfawz8ixnihkxi7vhyzfy1gq49vmxm2"))))
+ (base32 "1dqyrq3p8bkgvj4ci50ac342hjnhyz6xxvhiwp7wpi3v3nbj7s02"))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/myint/perceptualdiff.git")
+ (url "https://github.com/myint/perceptualdiff")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(source
(origin (method git-fetch)
(uri (git-reference
- (url "https://github.com/extemporelang/stb.git")
+ (url "https://github.com/extemporelang/stb")
(commit commit)))
(sha256
(base32
(package
(name "libjpeg-turbo")
(version "2.0.4")
+ (replacement libjpeg-turbo/fixed)
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/libjpeg-turbo/"
`(("nasm" ,nasm)))
(arguments
`(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
- "-DENABLE_STATIC=0")
+ "-DENABLE_STATIC=0"
+ ;; djpeg-shared-3x2-float-prog-cmp fails on 32-bit PPC.
+ ,@(if (string=? "powerpc-linux" (%current-system))
+ `("-DFLOATTEST=NO")
+ '())
+ ;; The build system probes for the current CPU, but
+ ;; that fails when cross-compiling.
+ ,@(let ((target (%current-target-system)))
+ (if target
+ (cond
+ ((string-prefix? "arm" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=arm"))
+ ((string-prefix? "aarch64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=aarch64"))
+ ((string-prefix? "i686" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86"))
+ ((string-prefix? "x86_64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86_64"))
+ ;; 32-bit and 64-bit
+ ((string-prefix? "powerpc" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=powerpc"))
+ (else '()))
+ '())))
,@(if (%current-target-system)
'()
;; Use a special "bootstrap" CMake for the native build to work
;; around a circular dependency between CMake and this package.
- `(#:cmake ,cmake-minimal-bootstrap))))
+ `(#:cmake ,cmake-bootstrap))))
(home-page "https://libjpeg-turbo.org/")
(synopsis "SIMD-accelerated JPEG image handling library")
(description "libjpeg-turbo is a JPEG image codec that accelerates baseline
license:ijg ;the libjpeg library and associated tools
license:zlib)))) ;the libjpeg-turbo SIMD extensions
+(define libjpeg-turbo/fixed
+ (package
+ (inherit libjpeg-turbo)
+ (version "2.0.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
+ version "/libjpeg-turbo-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0pbv6pc97kbj7ib31qcwi7lnmm9xg5y3b11aasmkhfjvf7rgdy0n"))))))
+
(define-deprecated libjpeg libjpeg-turbo)
+(export libjpeg)
(define-public niftilib
(package
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/thezbyg/gpick.git")
+ (url "https://github.com/thezbyg/gpick")
(commit (string-append name "-" version))))
(file-name (git-file-name name version))
(sha256
(build-system scons-build-system)
(native-inputs
`(("boost" ,boost)
- ("gettext" ,gnu-gettext)
+ ("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)))
(inputs
`(("expat" ,expat)
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/lupoDharkael/flameshot.git")
+ (url "https://github.com/lupoDharkael/flameshot")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(define-public grim
(package
(name "grim")
- (version "1.2.0")
+ (version "1.3.1")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/emersion/grim.git")
+ (url "https://github.com/emersion/grim")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0brljl4zfbn5mh9hkfrfkvd27c5y9vdkgap9r1hrfy9r1x20sskn"))))
+ (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib"))))
(build-system meson-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("scdoc" ,scdoc)))
(inputs `(("cairo" ,cairo)
("libjpeg-turbo" ,libjpeg-turbo)
- ("scdoc" ,scdoc)
("wayland" ,wayland)
("wayland-protocols" ,wayland-protocols)))
(home-page "https://github.com/emersion/grim")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/emersion/slurp.git")
+ (url "https://github.com/emersion/slurp")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
SNG is implemented by a compiler/decompiler called sng that
losslessly translates between SNG and PNG.")
(license license:zlib)))
+
+(define-public lodepng
+ ;; There are no tags in the repository, so we take the version as defined in
+ ;; lodepng.cpp.
+ (let ((commit "48e5364ef48ec2408f44c727657ac1b6703185f8")
+ (revision "1")
+ (version "20200215"))
+ (package
+ (name "lodepng")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lvandeve/lodepng")
+ (commit commit)))
+ (sha256
+ (base32
+ "1a1x8ag2scanzb2066jm9hg2y9kaa3wmpgmz10l1x9bkpik612lw"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (setenv "CXXFLAGS" "-fPIC")
+ (invoke "make" "lodepng.o")
+ (invoke "make" "lodepng_util.o")
+ (invoke "g++" "-fPIC" "-O3"
+ "-o" "liblodepng.so"
+ "-shared" "lodepng.o" "lodepng_util.o")
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "make" "unittest")
+ (invoke "./unittest")
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc"))
+ (lib (string-append out "/lib"))
+ (include (string-append out "/include")))
+ (install-file "lodepng.h" include)
+ (install-file "lodepng_util.h" include)
+ (install-file "liblodepng.so" lib)
+ (install-file "README.md" doc)
+ #t))))))
+ (home-page "https://lodev.org/lodepng/")
+ (synopsis "PNG encoder and decoder in C and C++, without dependencies")
+ (description "LodePNG is a PNG image decoder and encoder, all in one,
+no dependency or linkage required. It's made for C (ISO C90), and has a C++
+wrapper with a more convenient interface on top.")
+ (license license:zlib))))
+
+(define-public icoutils
+ (package
+ (name "icoutils")
+ (version "0.32.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://savannah/icoutils/icoutils-" version ".tar.bz2"))
+ (sha256
+ (base32 "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libpng" ,libpng)
+ ("perl" ,perl)))
+ (propagated-inputs
+ `(("perl-libwww" ,perl-libwww)))
+ (home-page "https://www.nongnu.org/icoutils/")
+ (synopsis "Extract and convert bitmaps from Windows icon and cursor files")
+ (description "Icoutils are a set of program for extracting and converting
+bitmaps from Microsoft Windows icon and cursor files. These files usually
+have the extension @code{.ico} or @code{.cur}, but they can also be embedded
+in executables and libraries (@code{.dll}-files). (Such embedded files are
+referred to as resources.)
+
+Conversion of these files to and from PNG images is done @command{icotool}.
+@command{extresso} automates these tasks with the help of special resource
+scripts. Resources such can be extracted from MS Windows executable and
+library files with @command{wrestool}.
+
+This package can be used to create @code{favicon.ico} files for web sites.")
+ (license license:gpl3+)))
+
+(define-public libavif
+ (package
+ (name "libavif")
+ (version "0.7.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AOMediaCodec/libavif")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17hagdngpc4xzrr0aa48nx399y5lawyyx9cpcdhpds1mqk6p77lp"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON"
+ "-DAVIF_CODEC_RAV1E=OFF" ; not packaged yet
+ "-DAVIF_BUILD_TESTS=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "./aviftest" "../source/tests/data")))
+ (add-after 'install 'install-readme
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (string-append out "/share/doc/libavif-" ,version)))
+ (install-file "../source/README.md" doc)
+ #t))))))
+ (inputs
+ `(("libaom" ,libaom)
+ ("dav1d" ,dav1d)))
+ (synopsis "Encode and decode AVIF files")
+ (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image
+File Format}. It can encode and decode all YUV formats and bit depths supported
+by AOM, including with alpha.")
+ (home-page "https://github.com/AOMediaCodec/libavif")
+ (license (list license:bsd-2 ; libavif itself
+ license:expat)))) ; cJSON in the test suite
+
+(define-public mtpaint
+ (package
+ (name "mtpaint")
+ ;; The author neither releases tarballs nor uses git version tags.
+ ;; Instead, author puts version in git commit title.
+ (version "3.49.27")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wjaguar/mtPaint")
+ (commit "26751cd0336414e2f16cbe25c9fe2702f34e7b5c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12mzai9pqvyb342m21rjz0jxiy75q24sjw6ax147pzy8frzkgd54"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("pkg-config" ,pkg-config)
+ ("which" ,which)))
+ (inputs
+ `(("imlib2" ,imlib2)
+ ("libtiff" ,libtiff)
+ ("libpng" ,libpng)
+ ("libungif", libungif)
+ ("libjpeg", libjpeg-turbo)
+ ("libwebp" ,libwebp)
+ ("openjpeg" ,openjpeg)
+ ("lcms" ,lcms)
+ ("zlib", zlib)
+ ("glib" ,glib)
+ ;; Support for gtk3 is in the testing stage.
+ ("gtk+" ,gtk+-2)))
+ (arguments
+ `(#:configure-flags
+ (list "intl" ; build internationalized version
+ "man") ; build the man page
+ #:tests? #f)) ; no test suite
+ (home-page "http://mtpaint.sourceforge.net/")
+ (synopsis "Create pixel art and manipulate digital images")
+ (description
+ "Mtpaint is a graphic editing program which uses the GTK+ toolkit.
+It can create and edit indexed palette or 24bit RGB images, offers basic
+painting and palette manipulation tools. It also handles JPEG, JPEG2000,
+GIF, TIFF, WEBP, BMP, PNG, XPM formats.")
+ (license license:gpl3+)))
+
+(define-public phockup
+ (package
+ (name "phockup")
+ (version "1.5.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ivandokov/phockup")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "13ajj0xch7yfqaaxbw0awxs0fz17n1rxir4gqh2wcgxjysqk1j2y"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("src" "share/phockup/")
+ ("phockup.py" "share/phockup/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (list "src/dependency.py" "src/exif.py")
+ (("exiftool")
+ (string-append (assoc-ref inputs "perl-image-exiftool")
+ "/bin/exiftool")))
+ #t))
+ (add-before 'install 'check
+ (lambda _
+ (invoke "pytest")))
+ (add-after 'install 'install-bin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir (string-append out "/bin"))
+ (symlink (string-append out "/share/phockup/phockup.py")
+ (string-append out "/bin/phockup")))
+ #t)))))
+ (inputs
+ `(("perl-image-exiftool" ,perl-image-exiftool)
+ ("python" ,python)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (home-page "https://github.com/ivandokov/phockup")
+ (synopsis "Organize photos and videos in folders")
+ (description "Phockup is a media sorting tool that uses creation date and
+time information in photos and videos to organize them into folders by year,
+month and day. All files which are not images or videos or those which do not
+have creation date information will be placed in a folder called
+@file{unknown}.")
+ (license license:expat)))