diff options
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r-- | gnu/packages/image.scm | 248 |
1 files changed, 131 insertions, 117 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 6e67c56d78..2dd64d7c4c 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2017, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> @@ -26,6 +26,7 @@ ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com> @@ -113,8 +114,8 @@ (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")) + (string-append "mirror://sourceforge/iqa/" + version " Release" "/iqa_" version "_src.tar.gz")) (sha256 (base32 "00mgwy031ammab6bwmd1whhvqv3fxy1cs1igabq0n3ag12zhjs77")))) (build-system gnu-build-system) @@ -583,7 +584,7 @@ extracting icontainer icon files.") (define-public libtiff (package (name "libtiff") - (version "4.1.0") + (version "4.3.0") (source (origin (method url-fetch) @@ -591,11 +592,10 @@ extracting icontainer icon files.") version ".tar.gz")) (sha256 (base32 - "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax")))) - (replacement libtiff/fixed) + "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf")))) (build-system gnu-build-system) (outputs '("out" - "doc")) ;1.3 MiB of HTML documentation + "doc")) ;1.8 MiB of HTML documentation (arguments ;; Instead of using --docdir, this package has its own --with-docdir. `(#:configure-flags @@ -616,20 +616,6 @@ collection of tools for doing simple manipulations of TIFF images.") "See COPYRIGHT in the distribution.")) (home-page "http://www.simplesystems.org/libtiff/"))) -(define-public libtiff/fixed - (package - (inherit libtiff) - (name "libtiff") - (version "4.2.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://download.osgeo.org/libtiff/tiff-" - version ".tar.gz")) - (sha256 - (base32 - "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b")))))) - (define-public leptonica (package (name "leptonica") @@ -692,15 +678,15 @@ arithmetic ops.") (define-public jbig2dec (package (name "jbig2dec") - (version "0.18") + (version "0.19") (source (origin (method url-fetch) (uri (string-append "https://github.com/ArtifexSoftware" "/ghostpdl-downloads/releases/download" - "/gs951/" name "-" version ".tar.gz")) + "/gs9533/" name "-" version ".tar.gz")) (sha256 (base32 - "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy")))) + "0dwa24kjqyg9hmm40fh048sdxfpnasz43l2rm8wlkw1qbdlpd517")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--disable-static") #:phases (modify-phases %standard-phases @@ -718,7 +704,7 @@ arithmetic ops.") `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool) - ("python" ,python-wrapper))) ;for tests + ("python" ,python-minimal-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 @@ -811,17 +797,17 @@ images of initially unknown height.") (define-public openjpeg-data (package (name "openjpeg-data") - (version "2020.05.19") + (version "2020.11.30") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/uclouvain/openjpeg-data") - (commit "c5c4a8c"))) + (commit "cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60"))) (file-name (git-file-name name version)) (sha256 - (base32 "1jp84gbhw8q5b8mhc322ql9410hjf32w9hg10x4isfa9j59mnncb")))) + (base32 "1q2swh4g9r9haqs075fyk42aclqcs9q51lqqzfb57lisszminpwm")))) (build-system copy-build-system) (synopsis "Test files for OpenJPEG") (description "OpenJPEG-Data contains all files required to run the openjpeg @@ -833,23 +819,47 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC (define-public openjpeg (package (name "openjpeg") - (version "2.3.1") + (version "2.4.0") (source (origin (method git-fetch) - (uri - (git-reference - (url "https://github.com/uclouvain/openjpeg") - (commit - (string-append "v" version)))) - (file-name - (git-file-name "openjpeg" version)) + (uri (git-reference + (url "https://github.com/uclouvain/openjpeg") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb")))) + (base32 "143dvy5g6v6129lzvl0r8mrgva2fppkn0zl099qmi9yi9l9h7yyf")))) (build-system cmake-build-system) (arguments - '(#:tests? #f ;TODO: requires a 1.1 GiB data repository - #:configure-flags '("-DBUILD_STATIC_LIBS=OFF"))) + `(#:configure-flags + (list + "-DBUILD_STATIC_LIBS=OFF" + "-DBUILD_UNIT_TESTS=ON" + "-DBUILD_TESTING=ON" + (string-append "-DOPJ_DATA_ROOT=" + (assoc-ref %build-inputs "openjpeg-data"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + ;; To be re-enabled after upstream fixes the bug, + ;; https://github.com/uclouvain/openjpeg/issues/1264 + (substitute* "tests/CMakeLists.txt" + (("add_subdirectory\\(nonregression\\)") + "")) + ;; These tests fail on all architectures except x86_64 + (substitute* "tests/conformance/CMakeLists.txt" + ;; 4, 5, 6 fail + (("numFileC1P0 RANGE 1 16") "numFileC1P0 RANGE 7 16") + ;; 2, 3, 4, 5 fail + (("numFileC1P1 RANGE 1 7") "numFileC1P1 1 6 7") + ;; 2, 3 fail + (("numFileJP2 RANGE 1 9") "numFileJP2 RANGE 4 9") + ;; All fail + (("subsampling.*") "") + (("zoo.*") ""))))))) + (native-inputs + `(("openjpeg-data" ,openjpeg-data))) ; Files for test-suite (inputs `(("lcms" ,lcms) ("libpng" ,libpng) @@ -1167,79 +1177,85 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.") (home-page "http://freeimage.sourceforge.net"))) (define-public vigra - (package - (name "vigra") - (version "1.11.1") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/ukoethe/vigra/releases/download/" - "Version-" (string-join (string-split version #\.) "-") - "/vigra-" version "-src.tar.gz")) - (patches (search-patches "vigra-python-compat.patch")) - (sha256 (base32 - "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5")))) - (build-system cmake-build-system) - (inputs - `(("boost" ,boost) - ("fftw" ,fftw) - ("fftwf" ,fftwf) - ("hdf5" ,hdf5) - ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly - ; to create a configure-flag - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libtiff" ,libtiff) - ("openexr" ,openexr) - ("python" ,python-wrapper) - ("python-numpy" ,python-numpy) - ("zlib" ,zlib))) - (native-inputs - `(("doxygen" ,doxygen) - ("python-nose" ,python-nose) - ("sphinx" ,python-sphinx))) - (arguments - `(#:test-target "check" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-broken-tests - (lambda _ - ;; See https://github.com/ukoethe/vigra/issues/432 - (substitute* "test/fourier/CMakeLists.txt" - (("VIGRA_ADD_TEST.*") "")) - ;; This test fails with Numpy 1.15: - ;; <https://github.com/ukoethe/vigra/issues/436>. - (substitute* "vigranumpy/test/CMakeLists.txt" - (("test1\\.py") "")) - #t))) - #:configure-flags - (list "-Wno-dev" ; suppress developer mode with lots of warnings - (string-append "-DVIGRANUMPY_INSTALL_DIR=" - (assoc-ref %outputs "out") - "/lib/python" - ,(version-major+minor (package-version python)) - "/site-packages") - ;; OpenEXR is not enabled by default. - "-DWITH_OPENEXR=1" - ;; Fix rounding error on 32-bit machines - "-DCMAKE_C_FLAGS=-ffloat-store" - ;; The header files of ilmbase are not found when included - ;; by the header files of openexr, and an explicit flag - ;; needs to be set. - (string-append "-DCMAKE_CXX_FLAGS=-I" - (assoc-ref %build-inputs "ilmbase") - "/include/OpenEXR" - " -ffloat-store")))) - (synopsis "Computer vision library") - (description - "VIGRA stands for Vision with Generic Algorithms. It is an image -processing and analysis library that puts its main emphasis on customizable -algorithms and data structures. It is particularly strong for -multi-dimensional image processing.") - (license license:expat) - (home-page "https://ukoethe.github.io/vigra/") - (properties '((max-silent-time . 7200))))) ;2 hours, to avoid timing out - + (let ((commit "9b514fa00a136f5fd81bb57ee9f6293c333ffc1f") + (revision "0")) + (package + (name "vigra") + (version (git-version "1.11.1" revision commit)) + (source + (origin + ;; The last release is 1.11.1, from 2017. It's becoming more and more + ;; difficult to build this old release, and the upstream developers + ;; suggest on their home page to build from the Git repo, saying "It is + ;; generally safe to use the 'master' branch of the development snapshot, + ;; as we avoid uploading untested or incompatible changes to this branch." + (method git-fetch) + (uri (git-reference + (url "https://github.com/ukoethe/vigra") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 (base32 + "1vzlypviala109imwxkp46lqhhxszf79ypfb8wxg6z7g02j7mm73")))) + (build-system cmake-build-system) + (inputs + `(("boost" ,boost) + ("fftw" ,fftw) + ("fftwf" ,fftwf) + ("hdf5" ,hdf5) + ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly + ; to create a configure-flag + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("openexr" ,openexr) + ("python" ,python-wrapper) + ("python-numpy" ,python-numpy) + ("zlib" ,zlib))) + (native-inputs + `(("doxygen" ,doxygen) + ("python-nose" ,python-nose) + ("sphinx" ,python-sphinx))) + (arguments + `(#:test-target "check" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-broken-tests + (lambda _ + ;; See https://github.com/ukoethe/vigra/issues/432 + (substitute* "test/fourier/CMakeLists.txt" + (("VIGRA_ADD_TEST.*") "")) + ;; This test fails with Numpy 1.15: + ;; <https://github.com/ukoethe/vigra/issues/436>. + (substitute* "vigranumpy/test/CMakeLists.txt" + (("test1\\.py") "")) + #t))) + #:configure-flags + (list "-Wno-dev" ; suppress developer mode with lots of warnings + (string-append "-DVIGRANUMPY_INSTALL_DIR=" + (assoc-ref %outputs "out") + "/lib/python" + ,(version-major+minor (package-version python)) + "/site-packages") + ;; OpenEXR is not enabled by default. + "-DWITH_OPENEXR=1" + ;; Fix rounding error on 32-bit machines + "-DCMAKE_C_FLAGS=-ffloat-store" + ;; The header files of ilmbase are not found when included + ;; by the header files of openexr, and an explicit flag + ;; needs to be set. + (string-append "-DCMAKE_CXX_FLAGS=-I" + (assoc-ref %build-inputs "ilmbase") + "/include/OpenEXR" + " -ffloat-store")))) + (synopsis "Computer vision library") + (description + "VIGRA stands for Vision with Generic Algorithms. It is an image + processing and analysis library that puts its main emphasis on customizable + algorithms and data structures. It is particularly strong for + multi-dimensional image processing.") + (license license:expat) + (home-page "https://ukoethe.github.io/vigra/") + (properties '((max-silent-time . 7200)))))) ;2 hours, to avoid timing out (define-public vigra-c (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7") @@ -1277,7 +1293,7 @@ language bindings to VIGRA.") (define-public libwebp (package (name "libwebp") - (version "1.1.0") + (version "1.2.0") (source (origin ;; No tarballs are provided for >0.6.1. @@ -1288,7 +1304,7 @@ language bindings to VIGRA.") (file-name (git-file-name name version)) (sha256 (base32 - "0r2yy9if0ndvpzadk39bigvsygyqnlv0xjb9w2aj6rs534mncazz")))) + "1rgblphsd56033w7lpkrzl7m5w0fi7wavxri1ayzlg8fhpmmqp4k")))) (build-system gnu-build-system) (inputs `(("freeglut" ,freeglut) @@ -2364,9 +2380,7 @@ Wacom-style graphics tablets.") (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)) + (search-input-file inputs "/bin/exiftool"))))) (add-before 'install 'check (lambda _ (invoke "pytest"))) |