Archived
1
0
Fork 0

gnu: vigra: Update to 1.11.1-0.9b514fa.

* gnu/packages/image.scm (vigra): Update to 1.11.1-0.9b514fa.
[source]: Use git-fetch. Remove obsolete patch.
* gnu/packages/patches/vigra-python-compat.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Leo Famulari 2021-08-08 15:53:12 -04:00
parent e012c29463
commit f4f4037fcd
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
3 changed files with 79 additions and 92 deletions

View file

@ -1795,7 +1795,6 @@ dist_patch_DATA = \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
%D%/packages/patches/vigra-python-compat.patch \
%D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \ %D%/packages/patches/virglrenderer-CVE-2017-6386.patch \

View file

@ -1175,79 +1175,85 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(home-page "http://freeimage.sourceforge.net"))) (home-page "http://freeimage.sourceforge.net")))
(define-public vigra (define-public vigra
(package (let ((commit "9b514fa00a136f5fd81bb57ee9f6293c333ffc1f")
(name "vigra") (revision "0"))
(version "1.11.1") (package
(source (name "vigra")
(origin (version (git-version "1.11.1" revision commit))
(method url-fetch) (source
(uri (string-append "https://github.com/ukoethe/vigra/releases/download/" (origin
"Version-" (string-join (string-split version #\.) "-") ;; The last release is 1.11.1, from 2017. It's becoming more and more
"/vigra-" version "-src.tar.gz")) ;; difficult to build this old release, and the upstream developers
(patches (search-patches "vigra-python-compat.patch")) ;; suggest on their home page to build from the Git repo, saying "It is
(sha256 (base32 ;; generally safe to use the 'master' branch of the development snapshot,
"1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5")))) ;; as we avoid uploading untested or incompatible changes to this branch."
(build-system cmake-build-system) (method git-fetch)
(inputs (uri (git-reference
`(("boost" ,boost) (url "https://github.com/ukoethe/vigra")
("fftw" ,fftw) (commit commit)))
("fftwf" ,fftwf) (file-name (git-file-name name version))
("hdf5" ,hdf5) (sha256 (base32
("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly "1vzlypviala109imwxkp46lqhhxszf79ypfb8wxg6z7g02j7mm73"))))
; to create a configure-flag (build-system cmake-build-system)
("libjpeg" ,libjpeg-turbo) (inputs
("libpng" ,libpng) `(("boost" ,boost)
("libtiff" ,libtiff) ("fftw" ,fftw)
("openexr" ,openexr) ("fftwf" ,fftwf)
("python" ,python-wrapper) ("hdf5" ,hdf5)
("python-numpy" ,python-numpy) ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
("zlib" ,zlib))) ; to create a configure-flag
(native-inputs ("libjpeg" ,libjpeg-turbo)
`(("doxygen" ,doxygen) ("libpng" ,libpng)
("python-nose" ,python-nose) ("libtiff" ,libtiff)
("sphinx" ,python-sphinx))) ("openexr" ,openexr)
(arguments ("python" ,python-wrapper)
`(#:test-target "check" ("python-numpy" ,python-numpy)
#:phases ("zlib" ,zlib)))
(modify-phases %standard-phases (native-inputs
(add-after 'unpack 'disable-broken-tests `(("doxygen" ,doxygen)
(lambda _ ("python-nose" ,python-nose)
;; See https://github.com/ukoethe/vigra/issues/432 ("sphinx" ,python-sphinx)))
(substitute* "test/fourier/CMakeLists.txt" (arguments
(("VIGRA_ADD_TEST.*") "")) `(#:test-target "check"
;; This test fails with Numpy 1.15: #:phases
;; <https://github.com/ukoethe/vigra/issues/436>. (modify-phases %standard-phases
(substitute* "vigranumpy/test/CMakeLists.txt" (add-after 'unpack 'disable-broken-tests
(("test1\\.py") "")) (lambda _
#t))) ;; See https://github.com/ukoethe/vigra/issues/432
#:configure-flags (substitute* "test/fourier/CMakeLists.txt"
(list "-Wno-dev" ; suppress developer mode with lots of warnings (("VIGRA_ADD_TEST.*") ""))
(string-append "-DVIGRANUMPY_INSTALL_DIR=" ;; This test fails with Numpy 1.15:
(assoc-ref %outputs "out") ;; <https://github.com/ukoethe/vigra/issues/436>.
"/lib/python" (substitute* "vigranumpy/test/CMakeLists.txt"
,(version-major+minor (package-version python)) (("test1\\.py") ""))
"/site-packages") #t)))
;; OpenEXR is not enabled by default. #:configure-flags
"-DWITH_OPENEXR=1" (list "-Wno-dev" ; suppress developer mode with lots of warnings
;; Fix rounding error on 32-bit machines (string-append "-DVIGRANUMPY_INSTALL_DIR="
"-DCMAKE_C_FLAGS=-ffloat-store" (assoc-ref %outputs "out")
;; The header files of ilmbase are not found when included "/lib/python"
;; by the header files of openexr, and an explicit flag ,(version-major+minor (package-version python))
;; needs to be set. "/site-packages")
(string-append "-DCMAKE_CXX_FLAGS=-I" ;; OpenEXR is not enabled by default.
(assoc-ref %build-inputs "ilmbase") "-DWITH_OPENEXR=1"
"/include/OpenEXR" ;; Fix rounding error on 32-bit machines
" -ffloat-store")))) "-DCMAKE_C_FLAGS=-ffloat-store"
(synopsis "Computer vision library") ;; The header files of ilmbase are not found when included
(description ;; by the header files of openexr, and an explicit flag
"VIGRA stands for Vision with Generic Algorithms. It is an image ;; needs to be set.
processing and analysis library that puts its main emphasis on customizable (string-append "-DCMAKE_CXX_FLAGS=-I"
algorithms and data structures. It is particularly strong for (assoc-ref %build-inputs "ilmbase")
multi-dimensional image processing.") "/include/OpenEXR"
(license license:expat) " -ffloat-store"))))
(home-page "https://ukoethe.github.io/vigra/") (synopsis "Computer vision library")
(properties '((max-silent-time . 7200))))) ;2 hours, to avoid timing out (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 (define-public vigra-c
(let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7") (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7")

View file

@ -1,18 +0,0 @@
Fix build with Boost + Python 3.7.
Taken from upstream:
https://github.com/ukoethe/vigra/commit/a6fa62663c6a6b752ed0707e95f643e25867a0f9
diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx
index ec38d3636..c81c6ae52 100644
--- a/vigranumpy/src/core/vigranumpycore.cxx
+++ b/vigranumpy/src/core/vigranumpycore.cxx
@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s)
return checksum(data, size);
#else
Py_ssize_t size = 0;
- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
+ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
return checksum(data, size);
#endif
}