From 463b1378781aac8534288fd51f0f432dc8fa6690 Mon Sep 17 00:00:00 2001 From: Bernd Waibel Date: Mon, 2 Jan 2023 08:50:55 +0100 Subject: sci-libs/opencascade: simplify vtk logic (v7.7.0) Avoid using conditional logic to determine the include directory for VTK. Suggested-by: Sam James Signed-off-by: Bernd Waibel Signed-off-by: Sam James --- sci-libs/opencascade/opencascade-7.7.0-r1.ebuild | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sci-libs/opencascade') diff --git a/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild index efd245f9b465..57907bad4816 100644 --- a/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild +++ b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild @@ -133,17 +133,14 @@ src_configure() { fi if use vtk; then + local vtk_ver=$(best_version "sci-libs/vtk") + vtk_ver=${vtk_ver#sci-libs/vtk-} + vtk_ver=$(ver_cut 1-2 ${vtk_ver}) mycmakeargs+=( -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-${vtk_ver} -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) ) - if has_version ">=sci-libs/vtk-9.2.0"; then - mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.2 ) - elif has_version ">=sci-libs/vtk-9.1.0"; then - mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 ) - elif has_version ">=sci-libs/vtk-9.0.0"; then - mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 ) - fi fi cmake_src_configure -- cgit v1.2.3-65-gdbad