From patchwork Tue Jul 5 19:39:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Gruber X-Patchwork-Id: 40526 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 630C327BBEA; Tue, 5 Jul 2022 20:41:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B2E7027BBE9 for ; Tue, 5 Jul 2022 20:41:16 +0100 (BST) Received: from localhost ([::1]:33840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8oQ7-0003Bq-S7 for patchwork@mira.cbaines.net; Tue, 05 Jul 2022 15:41:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8oPu-0003Bf-53 for guix-patches@gnu.org; Tue, 05 Jul 2022 15:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8oPt-0005AM-TI for guix-patches@gnu.org; Tue, 05 Jul 2022 15:41:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8oPt-0006pc-RJ for guix-patches@gnu.org; Tue, 05 Jul 2022 15:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56408] [PATCH] gnu: mia: Build against VTK 9. Resent-From: Felix Gruber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Jul 2022 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56408@debbugs.gnu.org Cc: Felix Gruber X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165705001126170 (code B ref -1); Tue, 05 Jul 2022 19:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jul 2022 19:40:11 +0000 Received: from localhost ([127.0.0.1]:51740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oOx-0006no-Jd for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:40:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:59828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8oOs-0006nG-SM for submit@debbugs.gnu.org; Tue, 05 Jul 2022 15:40:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8oOr-00039A-KG for guix-patches@gnu.org; Tue, 05 Jul 2022 15:39:58 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8oOp-0004nC-EM for guix-patches@gnu.org; Tue, 05 Jul 2022 15:39:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 21EF3240027 for ; Tue, 5 Jul 2022 21:39:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1657049992; bh=iBKqdAA2Sj5/Fd25Oj4MMfHdC5xrUdDwb7hf6/W3qxg=; h=From:To:Cc:Subject:Date:From; b=fbtW9QQzfrS2rmriFWOT5bTFdTZpOvhmT3obAzhUe5gBfp/eNoiIDqJg+6dgOSxfz ml7/k5rlL4Iu5m3OujxC7EzzKke6i3PqemgvUyzkAFzKgFkvFMMDXKpsw1w7JG8zF+ 5VzqQFwf1t0llNc7/qLFz8LCg7Q4GZ9pOKarScsZVugeJ2337DCKKoIcMMKrxkgH+x 7DQiZeyzd+dfwZmAKdbFSxBcvIL1i0an8tt9T2u/eXruNuMvBfpgcQmq3p3gdnuVrF hs9kMcnO2alryXSjx7QM1YFcfiY+oyiCdJTkuAI/fiz565enRTH3nGyj/uG757Otgt BstrSP5rbNujg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LctKz2Bvlz9rxL; Tue, 5 Jul 2022 21:39:51 +0200 (CEST) From: Felix Gruber Date: Tue, 5 Jul 2022 19:39:48 +0000 Message-Id: <20220705193948.461428-1-felgru@posteo.net> MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.65; envelope-from=felgru@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2020 Brendan Tildesley ;;; Copyright © 2021 Oleh Malyi -;;; Copyright © 2021 Felix Gruber +;;; Copyright © 2021, 2022 Felix Gruber ;;; Copyright © 2021 Andy Tai ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021 Paul Garlick @@ -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