mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 22:16:32 +01:00
gnu: Add vtk-7.
* gnu/packages/image-processing.scm: (vtk-7): New variable. * gnu/packages/patches/vtk-7-gcc-10-compat.patch: New patch. * gnu/packages/patches/vtk-7-hdf5-compat.patch: Likewise. * gnu/packages/patches/vtk-7-python-compat.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them.
This commit is contained in:
parent
17375266ea
commit
607e48ba3c
5 changed files with 93 additions and 0 deletions
|
@ -1935,6 +1935,9 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
|
||||
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
|
||||
%D%/packages/patches/vtk-fix-freetypetools-build-failure.patch \
|
||||
%D%/packages/patches/vtk-7-gcc-10-compat.patch \
|
||||
%D%/packages/patches/vtk-7-hdf5-compat.patch \
|
||||
%D%/packages/patches/vtk-7-python-compat.patch \
|
||||
%D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \
|
||||
%D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \
|
||||
%D%/packages/patches/webrtc-audio-processing-big-endian.patch \
|
||||
|
|
|
@ -407,6 +407,28 @@ (define-public vtk
|
|||
integrates with various databases on GUI toolkits such as Qt and Tk.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public vtk-7
|
||||
(package
|
||||
(inherit vtk)
|
||||
(version "7.1.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://vtk.org/files/release/"
|
||||
(version-major+minor version)
|
||||
"/VTK-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0nm7xwwj7rnsxjdv2ssviys8nhci4n9iiiqm2y14s520hl2dsp1d"))
|
||||
(patches (search-patches "vtk-7-python-compat.patch"
|
||||
"vtk-7-hdf5-compat.patch"
|
||||
"vtk-7-gcc-10-compat.patch"))))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments vtk)
|
||||
((#:configure-flags flags)
|
||||
;; Otherwise, the build would fail with: "error: invalid conversion
|
||||
;; from ‘const char*’ to ‘char*’ [-fpermissive]".
|
||||
`(cons "-DCMAKE_CXX_FLAGS=-fpermissive" ,flags))))))
|
||||
|
||||
;; itksnap needs an older variant of VTK.
|
||||
(define-public vtk-6
|
||||
(package (inherit vtk)
|
||||
|
|
14
gnu/packages/patches/vtk-7-gcc-10-compat.patch
Normal file
14
gnu/packages/patches/vtk-7-gcc-10-compat.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
Retrieved from
|
||||
https://sources.debian.org/src/vtk7/7.1.1%2Bdfsg2-10.1/debian/patches/.
|
||||
|
||||
--- a/CMake/VTKGenerateExportHeader.cmake
|
||||
+++ b/CMake/VTKGenerateExportHeader.cmake
|
||||
@@ -174,7 +174,7 @@
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE _gcc_version_info
|
||||
ERROR_VARIABLE _gcc_version_info)
|
||||
- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
|
||||
+ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*"
|
||||
_gcc_version "${_gcc_version_info}")
|
||||
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
||||
# patch level, handle this here:
|
38
gnu/packages/patches/vtk-7-hdf5-compat.patch
Normal file
38
gnu/packages/patches/vtk-7-hdf5-compat.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
Description: The H5FD_class_t struct gained an extra member in 1.10
|
||||
Bug-Debian: https://bugs.debian.org/846372
|
||||
Author: Iain Lane <iain.lane@canonical.com>
|
||||
--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
|
||||
+++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
|
||||
@@ -139,7 +139,11 @@
|
||||
#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
|
||||
static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
|
||||
static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
|
||||
+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10))
|
||||
+static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type);
|
||||
+#else
|
||||
static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file);
|
||||
+#endif
|
||||
#else
|
||||
static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file);
|
||||
static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr);
|
||||
@@ -155,6 +159,9 @@
|
||||
"dsm", /*name */
|
||||
MAXADDR, /*maxaddr */
|
||||
H5F_CLOSE_WEAK, /*fc_degree */
|
||||
+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
|
||||
+ NULL, /* terminate */
|
||||
+#endif
|
||||
NULL, /*sb_size */
|
||||
NULL, /*sb_encode */
|
||||
NULL, /*sb_decode */
|
||||
@@ -687,7 +694,9 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static haddr_t
|
||||
-#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
|
||||
+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10))
|
||||
+H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type)
|
||||
+#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
|
||||
H5FD_dsm_get_eof(const H5FD_t *_file)
|
||||
#else
|
||||
H5FD_dsm_get_eof(H5FD_t *_file)
|
16
gnu/packages/patches/vtk-7-python-compat.patch
Normal file
16
gnu/packages/patches/vtk-7-python-compat.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
Author: Gert Wollny <gewo@debian.org>
|
||||
Description: Work around compile bug with python 3.7.1
|
||||
Debian-Bug: https://bugs.debian.org/914347
|
||||
diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx
|
||||
index 1b1e4b9..682f8b8 100644
|
||||
--- a/Wrapping/PythonCore/vtkPythonArgs.cxx
|
||||
+++ b/Wrapping/PythonCore/vtkPythonArgs.cxx
|
||||
@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext)
|
||||
else if (PyUnicode_Check(o))
|
||||
{
|
||||
#if PY_VERSION_HEX >= 0x03030000
|
||||
- a = PyUnicode_AsUTF8(o);
|
||||
+ a = const_cast<char*>(PyUnicode_AsUTF8(o));
|
||||
return true;
|
||||
#else
|
||||
PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL);
|
Loading…
Reference in a new issue