GNU bug report logs -
#56408
[PATCH] gnu: mia: Build against VTK 9.
Previous Next
Reported by: Felix Gruber <felgru <at> posteo.net>
Date: Tue, 5 Jul 2022 19:41:01 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 07 Jul 2022 22:19:46 +0100
with message-id <877d4oliwg.fsf <at> cbaines.net>
and subject line Re: [bug#56408] [PATCH] gnu: mia: Build against VTK 9.
has caused the debbugs.gnu.org bug report #56408,
regarding [PATCH] gnu: mia: Build against VTK 9.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
56408: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56408
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/image-processing.scm (mia): Build against VTK 9.
[inputs]: Remove vtk-7; add vtk.
[source]: Add mia-vtk9.patch.
* gnu/packages/patches/mia-vtk9.patch: New file.
* gnu/local.mk: Add it.
---
gnu/local.mk | 1 +
gnu/packages/image-processing.scm | 10 ++---
gnu/packages/patches/mia-vtk9.patch | 64 +++++++++++++++++++++++++++++
3 files changed, 69 insertions(+), 6 deletions(-)
create mode 100644 gnu/packages/patches/mia-vtk9.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index faad6cc6b2..0a41b428d1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1496,6 +1496,7 @@ dist_patch_DATA = \
%D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mia-fix-boost-headers.patch \
+ %D%/packages/patches/mia-vtk9.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
%D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \
%D%/packages/patches/mingw-w64-reproducible-gendef.patch \
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 0c25b41dad..bcb1d7a2f6 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -13,7 +13,7 @@
;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
;;; Copyright © 2020 Brendan Tildesley <mail <at> brendan.scot>
;;; Copyright © 2021 Oleh Malyi <astroclubzp <at> gmail.com>
-;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2021, 2022 Felix Gruber <felgru <at> posteo.net>
;;; Copyright © 2021 Andy Tai <atai <at> atai.org>
;;; Copyright © 2021 Ekaitz Zarraga <ekaitz <at> elenq.tech>
;;; Copyright © 2021 Paul Garlick <pgarlick <at> tourbillion-technology.com>
@@ -194,7 +194,8 @@ licences similar to the Modified BSD licence."))))
(sha256
(base32
"0qpcd3n26q52dpyibm11f5l6cgscdr54p2jish39gc3p1f5h3ws1"))
- (patches (search-patches "mia-fix-boost-headers.patch"))))
+ (patches (search-patches "mia-fix-boost-headers.patch"
+ "mia-vtk9.patch"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
@@ -221,10 +222,7 @@ licences similar to the Modified BSD licence."))))
nlopt
openexr-2
python-lxml
- ;; The build fails when using the regular VTK (currently at version
- ;; 9), with error "addons/vtk/vtkvf.cc:23:10: fatal error:
- ;; vtkStructuredPointsReader.h: No such file or directory".
- vtk-7))
+ vtk))
(native-inputs
(list pkg-config
python-wrapper))
diff --git a/gnu/packages/patches/mia-vtk9.patch b/gnu/packages/patches/mia-vtk9.patch
new file mode 100644
index 0000000000..a8f1adab6c
--- /dev/null
+++ b/gnu/packages/patches/mia-vtk9.patch
@@ -0,0 +1,64 @@
+This patch has been taken from
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012689
+--- a/addons/vtk/CMakeLists.txt
++++ b/addons/vtk/CMakeLists.txt
+@@ -20,9 +20,9 @@
+
+ IF(WITH_VTKIO)
+ if (STRICT_DEPENDECIES)
+- FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkIOImage vtkIOXML vtkIOLegacy)
++ FIND_PACKAGE(VTK REQUIRED COMPONENTS IOImage IOXML IOLegacy)
+ else (STRICT_DEPENDECIES)
+- FIND_PACKAGE(VTK COMPONENTS vtkIOImage vtkIOXML vtkIOLegacy)
++ FIND_PACKAGE(VTK COMPONENTS IOImage IOXML IOLegacy)
+ endif (STRICT_DEPENDECIES)
+ IF(VTK_FOUND)
+ DEFINE_PROPERTY(GLOBAL PROPERTY HAVE_VTK_PROP BRIEF_DOCS "yeah" FULL_DOCS "yeah")
+@@ -41,8 +41,17 @@
+ SET(VTK_LINK_LIBS_3D ${SELECTED_VTK_LIBS} mia3d)
+
+ PLUGIN_WITH_TEST_AND_PREFIX2("mesh" "io" vtkmesh "${VTK_LINK_LIBS_MESH}")
++ target_link_libraries(mesh-io-vtkmesh ${VTK_LIBRARIES})
++ target_link_libraries(mesh-io-vtkmesh-common ${VTK_LIBRARIES})
++ target_link_libraries(test-mesh-io-vtkmesh ${VTK_LIBRARIES})
+ PLUGIN_WITH_TEST_AND_PREFIX2("3dvf" "io" vtkvf "${VTK_LINK_LIBS_3D}")
++ target_link_libraries(3dvf-io-vtkvf ${VTK_LIBRARIES})
++ target_link_libraries(3dvf-io-vtkvf-common ${VTK_LIBRARIES})
++ target_link_libraries(test-3dvf-io-vtkvf ${VTK_LIBRARIES})
+ PLUGIN_WITH_TEST_AND_PREFIX2("3dimage" "io" vtkimage "${VTK_LINK_LIBS_3D}")
++ target_link_libraries(3dimage-io-vtkimage ${VTK_LIBRARIES})
++ target_link_libraries(3dimage-io-vtkimage-common ${VTK_LIBRARIES})
++ target_link_libraries(test-3dimage-io-vtkimage ${VTK_LIBRARIES})
+
+ ELSEIF(VTK_FOUND)
+ MESSAGE(MESSAGE "VTK not found, disabled")
+--- a/addons/vtk/vtkmesh.cc
++++ b/addons/vtk/vtkmesh.cc
+@@ -78,7 +78,8 @@
+ // read all cells, if a cell is formed of more than 3 corners, then triangulate,
+ // if it hes less then 3 corners, ignore it (no wireframes supported here
+ auto triangles = CVtkMeshIO::PTrianglefield(new CVtkMeshIO::CTrianglefield ());
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdType const *pts;
+ auto strips = mesh.GetStrips();
+
+ while (strips->GetNextCell(npts, pts)) {
+@@ -183,7 +184,7 @@
+ auto is = mesh.normals_begin();
+
+ for (auto i = 0; i < n_normals; ++i, ++is) {
+- normals->GetTupleValue(i, &is->x);
++ normals->GetTypedTuple(i, &is->x);
+ cvdebug() << i << ": read normal " << *is << "\n";
+ }
+ }
+@@ -217,7 +218,7 @@
+ auto is = mesh.color_begin();
+
+ for (auto i = 0; i < n_colors; ++i, ++is)
+- colors->GetTupleValue(i, &is->x);
++ colors->GetTypedTuple(i, &is->x);
+ }
+
+ PTriangleMesh CVtkMeshIO::do_load(string const& filename) const
--
2.30.2
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Felix Gruber <felgru <at> posteo.net> writes:
> * gnu/packages/image-processing.scm (mia): Build against VTK 9.
> [inputs]: Remove vtk-7; add vtk.
> [source]: Add mia-vtk9.patch.
> * gnu/packages/patches/mia-vtk9.patch: New file.
> * gnu/local.mk: Add it.
> ---
> gnu/local.mk | 1 +
> gnu/packages/image-processing.scm | 10 ++---
> gnu/packages/patches/mia-vtk9.patch | 64 +++++++++++++++++++++++++++++
> 3 files changed, 69 insertions(+), 6 deletions(-)
> create mode 100644 gnu/packages/patches/mia-vtk9.patch
Thanks Felix, I've pushed this as
45ed812da502344d58e8128515abd5b8ec6ca7a0.
Chris
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.