mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 14:07:01 +01:00
gnu: vigra: Build with Python 3.
* gnu/packages/patches/vigra-python-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (vigra)[source](patches): New field. [inputs]: Change PYTHON-2 and PYTHON2-NUMPY to PYTHON and PYTHON-NUMPY. [native-inputs]: Change from PYTHON2-NOSE to PYTHON. [arguments]: Adjust #:configure-flags accordingly.
This commit is contained in:
parent
2ac164a810
commit
a82e6faa8b
3 changed files with 28 additions and 5 deletions
|
@ -1450,6 +1450,7 @@ dist_patch_DATA = \
|
|||
%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-skip-test-workbuf.patch \
|
||||
%D%/packages/patches/vigra-python-compat.patch \
|
||||
%D%/packages/patches/vinagre-newer-freerdp.patch \
|
||||
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
|
||||
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
|
||||
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
|
||||
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
|
||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
|
||||
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
|
||||
|
@ -76,6 +76,7 @@ (define-module (gnu packages image)
|
|||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system meson)
|
||||
|
@ -1007,6 +1008,7 @@ (define-public vigra
|
|||
(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)
|
||||
|
@ -1021,12 +1023,12 @@ (define-public vigra
|
|||
("libpng" ,libpng)
|
||||
("libtiff" ,libtiff)
|
||||
("openexr" ,openexr)
|
||||
("python" ,python-2) ; print syntax
|
||||
("python2-numpy" ,python2-numpy)
|
||||
("python" ,python)
|
||||
("python-numpy" ,python-numpy)
|
||||
("zlib" ,zlib)))
|
||||
(native-inputs
|
||||
`(("doxygen" ,doxygen)
|
||||
("python2-nose" ,python2-nose)
|
||||
("python-nose" ,python-nose)
|
||||
("sphinx" ,python-sphinx)))
|
||||
(arguments
|
||||
`(#:test-target "check"
|
||||
|
@ -1046,7 +1048,9 @@ (define-public vigra
|
|||
(list "-Wno-dev" ; suppress developer mode with lots of warnings
|
||||
(string-append "-DVIGRANUMPY_INSTALL_DIR="
|
||||
(assoc-ref %outputs "out")
|
||||
"/lib/python2.7/site-packages")
|
||||
"/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
|
||||
|
|
18
gnu/packages/patches/vigra-python-compat.patch
Normal file
18
gnu/packages/patches/vigra-python-compat.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
}
|
Loading…
Reference in a new issue