diff options
author | Bernd Waibel <waebbl-gentoo@posteo.net> | 2021-11-20 11:13:34 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-11-30 14:50:18 +0200 |
commit | 3c966730bf52e6d2169cb8d0a35133e92a13076b (patch) | |
tree | 4d4f4373192c45cebf8052d1a63dc2a6e78b8715 /media-gfx/freecad | |
parent | media-gfx/freecad: remove obsolete patch (diff) | |
download | gentoo-3c966730bf52e6d2169cb8d0a35133e92a13076b.tar.gz gentoo-3c966730bf52e6d2169cb8d0a35133e92a13076b.tar.bz2 gentoo-3c966730bf52e6d2169cb8d0a35133e92a13076b.zip |
media-gfx/freecad: simplify opencascade logic
With sci-libs/opencascade:7.4.0 gone from the tree, this patch simplifies
the code needed to configure various opencascade related variables to cmake.
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/23008
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r-- | media-gfx/freecad/freecad-0.19.2-r5.ebuild (renamed from media-gfx/freecad/freecad-0.19.2-r4.ebuild) | 48 |
1 files changed, 13 insertions, 35 deletions
diff --git a/media-gfx/freecad/freecad-0.19.2-r4.ebuild b/media-gfx/freecad/freecad-0.19.2-r5.ebuild index 24dc6a703399..df0faac7f980 100644 --- a/media-gfx/freecad/freecad-0.19.2-r4.ebuild +++ b/media-gfx/freecad/freecad-0.19.2-r5.ebuild @@ -47,7 +47,6 @@ unset module RDEPEND=" ${PYTHON_DEPS} - >=dev-cpp/eigen-3.3.1:3 dev-libs/OpenNI2[opengl(+)] dev-libs/libspnav[X] dev-libs/xerces-c[icu] @@ -79,7 +78,7 @@ RDEPEND=" dev-libs/openssl:= net-misc/curl ) - fem? ( sci-libs/vtk:=[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] ) + fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] ) openscad? ( media-gfx/openscad ) pcl? ( >=sci-libs/pcl-1.8.1:=[opengl,openni2(+),qt5(+),vtk(+)] ) $(python_gen_cond_dep ' @@ -94,7 +93,10 @@ RDEPEND=" fem? ( dev-python/ply[${PYTHON_USEDEP}] ) ') " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + >=dev-cpp/eigen-3.3.1:3 +" BDEPEND="dev-lang/swig" # To get required dependencies: @@ -143,22 +145,6 @@ src_prepare() { # but cmake ships a working one, so we use this. rm "${S}/cMake/FindCoin3D.cmake" || die - # Fix OpenCASCADE lookup - local OCC_P=$(best_version sci-libs/opencascade[vtk]) - OCC_P=${OCC_P#sci-libs/} - local OCC_PV=${OCC_P#opencascade-} - OCC_PV=$(ver_cut 1-2 ${OCC_PV}) - # check for CASROOT needed to ensure occ-7.5 is eselected and profile resourced - if [[ ${OCC_PV} = 7.5 && ${CASROOT} = "/usr" ]]; then - sed -e 's|/usr/include/opencascade|'${CASROOT}'/include/'${OCC_P}'|' \ - -e 's|/usr/lib|'${CASROOT}'/'$(get_libdir)'/'${OCC_P}' NO_DEFAULT_PATH|' \ - -i cMake/FindOpenCasCade.cmake || die - else - sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \ - -e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \ - -i cMake/FindOpenCasCade.cmake || die - fi - # Fix desktop file sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die @@ -241,22 +227,14 @@ src_configure() { -DOCCT_CMAKE_FALLBACK=ON # don't use occt-config which isn't included in opencascade for Gentoo ) - if has_version ">=sci-libs/opencascade-7.5"; then - # bug https://bugs.gentoo.org/788274 - local OCC_P=$(best_version sci-libs/opencascade[vtk]) - OCC_P=${OCC_P#sci-libs/} - OCC_P=${OCC_P%-r*} - mycmakeargs+=( - -DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P} - -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P} - ) - else - # <occ-7.5 uses different layout - mycmakeargs+=( - -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade - -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir) - ) - fi + # bug https://bugs.gentoo.org/788274 + local OCC_P=$(best_version sci-libs/opencascade[vtk]) + OCC_P=${OCC_P#sci-libs/} + OCC_P=${OCC_P%-r*} + mycmakeargs+=( + -DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P} + -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P} + ) if use debug; then mycmakeargs+=( |