From 9b5637a5893a68c354bebac349ca440f0e82fd77 Mon Sep 17 00:00:00 2001 From: Luca Cinnirella Date: Sat, 2 May 2026 15:49:04 +0200 Subject: [PATCH] vtk: added cross compiling capabilities vtk can cross compile either with a multi-step compiling scheme using VTKCompileTools, as reported in https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html#cross-compiling-a-complex-project-vtk, or with a cross compiling emulator, as shown in VTK_source_code/CMake/vtkCrossCompiling.cmake, such as qemu. Given xbps-src capabilities, using qemu is the most convenient option. --- srcpkgs/vtk/template | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template index 32e0b4fffde511..3ee5c361218795 100644 --- a/srcpkgs/vtk/template +++ b/srcpkgs/vtk/template @@ -1,8 +1,9 @@ # Template file for 'vtk' pkgname=vtk version=9.5.0 -revision=2 +revision=3 build_style=cmake +build_helper=qemu # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON" # Build only the core modules plus python bindings for now configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON @@ -30,7 +31,6 @@ license="BSD-3-Clause" homepage="https://www.vtk.org" distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz" checksum=04ae86246b9557c6b61afbc534a6df099244fbc8f3937f82e6bc0570953af87d -nocross="It seems to need vtk compile tools for the host" case "$XBPS_TARGET_MACHINE" in # List of supported architectures copied from openmpi. @@ -54,9 +54,13 @@ post_extract() { post_install() { vlicense Copyright.txt - # Mangle CPython extension names in CMake like xbps-src will do - vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \ - -i "${DESTDIR}/usr/lib/cmake/vtk-${version:0:3}/VTKPython-targets-none.cmake" + case "$XBPS_TARGET_MACHINE" in + x86_64*) + # Mangle CPython extension names in CMake like xbps-src will do + vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \ + -i "${DESTDIR}/usr/lib/cmake/vtk-${version:0:3}/VTKPython-targets-none.cmake" + ;; + esac } vtk-devel_package() {