summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2023-01-02 08:50:55 +0100
committerSam James <sam@gentoo.org>2023-01-04 05:48:11 +0000
commit463b1378781aac8534288fd51f0f432dc8fa6690 (patch)
tree00f98fd5f7e2ca4438d094027225e3579e4947cd /sci-libs
parentmail-filter/rspamd: respect libdir (diff)
downloadgentoo-463b1378781aac8534288fd51f0f432dc8fa6690.tar.gz
gentoo-463b1378781aac8534288fd51f0f432dc8fa6690.tar.bz2
gentoo-463b1378781aac8534288fd51f0f432dc8fa6690.zip
sci-libs/opencascade: simplify vtk logic (v7.7.0)
Avoid using conditional logic to determine the include directory for VTK. Suggested-by: Sam James <sam@gentoo.org> Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/opencascade/opencascade-7.7.0-r1.ebuild11
1 files changed, 4 insertions, 7 deletions
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