diff options
author | Bernd Waibel <waebbl-gentoo@posteo.net> | 2021-11-20 02:14:41 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-11-30 14:50:18 +0200 |
commit | e6c53e3e86537e972bea3fcc51d83edee653e3f2 (patch) | |
tree | 37734e5c0ca51f24b3fb02feb719f21647cf9100 /media-gfx/freecad | |
parent | app-text/po4a: Stabilize 0.64 amd64, #826570 (diff) | |
download | gentoo-e6c53e3e86537e972bea3fcc51d83edee653e3f2.tar.gz gentoo-e6c53e3e86537e972bea3fcc51d83edee653e3f2.tar.bz2 gentoo-e6c53e3e86537e972bea3fcc51d83edee653e3f2.zip |
media-gfx/freecad: remove obsolete patch
- fix some dependencies
- simplify opencascade related code, which has been obsoleted due to removal
of slot 7.4.0
- use default CMAKE_INSTALL_PREFIX (/usr) instead of /usr/$(get_libdir)/${PN}.
This leads to some files being installed in /usr/{Ext,Mod}. A new patch
fixes this. The lower case symlinks for the executables are no longer
installed now, as the binaries are in the path and can be called directly.
- use relative patchs for CMAKE_INSTALL_* variables
Closes: https://bugs.gentoo.org/824550
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r-- | media-gfx/freecad/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-9999.ebuild | 81 |
2 files changed, 36 insertions, 46 deletions
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest index fe0489b287e6..94a0fc360a90 100644 --- a/media-gfx/freecad/Manifest +++ b/media-gfx/freecad/Manifest @@ -1,2 +1,3 @@ DIST freecad-0.19.2-0005-Make-smesh-compile-with-vtk9.patch.xz 5368 BLAKE2B 69bafefd049effe3c31719bb2c23d32e8ba7ad58235c58ac8279ba6c036feaf1b97d5751cf2d68896e7489803103b2d0f92f76e61b3ccc97ef05a95b337ca5c2 SHA512 66585cc13fb3b0b026cf9dbd761c8ba1c1fe4d4f7db2e144ddd97706e02ccd78f4a43ac7cd93ddcae6e73933bf41d4cbd4d94bcdff8804b81378a6d946c7b070 DIST freecad-0.19.2.tar.gz 296987961 BLAKE2B 3c21359c71f7ac5a49cc4b4be437dfce02f2af73dfc526a3955547718ee41c461fc787d029a9a77374d58516d7c56fec6982fe6d38ab17fbc30c0a94929136bf SHA512 420f00e696725cbd31c936c47b6ac226d866a17c7b7683ad381b8dd5edaffc7dfb1a3c4238c08e8b4fd34ef0c08d7c244cb7797012e596df1ce0a4f6e3be6b72 +DIST freecad-9999-Gentoo-specific-fix-install-locations-of-Ext-and-Mod.patch.xz 4136 BLAKE2B 207003dacd7f02bd4782ebb0d5f9a7093d8fd3ef8011301454dab03d7a79bab7b2fd623c7d8e11d1f6557803b40f1d206dc75c41b1520e1dd2467dda72d91868 SHA512 d7d6096c1cfb06e6218673a927c5791ec820dc13a23c89df6233109e288d98f86920141e01a8cb680e7cbb8c83c4c655a7a66d5578d284a144dc3f44c028ceb5 diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild index df78793c7f3b..a4a2fa3acc6c 100644 --- a/media-gfx/freecad/freecad-9999.ebuild +++ b/media-gfx/freecad/freecad-9999.ebuild @@ -11,10 +11,12 @@ DESCRIPTION="QT based Computer Aided Design application" HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD" MY_PN=FreeCAD +MY_PATCH="${P}-Gentoo-specific-fix-install-locations-of-Ext-and-Mod" if [[ ${PV} = *9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git" + SRC_URI="https://raw.githubusercontent.com/waebbl/waebbl-gentoo/master/patches/${MY_PATCH}.patch.xz" S="${WORKDIR}/freecad-${PV}" else MY_PV=$(ver_cut 1-2) @@ -47,7 +49,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 +80,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:=[opengl,openni2(+),qt5(+),vtk(+)] ) $(python_gen_cond_dep ' @@ -94,8 +95,14 @@ RDEPEND=" fem? ( dev-python/ply[${PYTHON_USEDEP}] ) ') " -DEPEND="${RDEPEND}" -BDEPEND="dev-lang/swig" +DEPEND=" + ${RDEPEND} + >=dev-cpp/eigen-3.3.1:3 +" +BDEPEND=" + app-text/dos2unix + dev-lang/swig +" # To get required dependencies: # 'grep REQUIRES_MODS cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake' @@ -132,31 +139,27 @@ pkg_setup() { [[ -z ${CASROOT} ]] && die "\${CASROOT} not set, plesae run eselect opencascade" } +src_unpack() { + git-r3_src_unpack + unpack ${MY_PATCH}.patch.xz +} + src_prepare() { # the upstream provided file doesn't find the coin doc tag file, # 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 cmake_src_prepare + + # Fix line endings on a few files for patching + for f in src/Mod/{Cloud,Inspection,Start/StartPage}/CMakeLists.txt; do + dos2unix -q ${f} + done + + eapply "${WORKDIR}"/${P}-Gentoo-specific-fix-install-locations-of-Ext-and-Mod.patch } src_configure() { @@ -207,10 +210,10 @@ src_configure() { -DBUILD_WEB=ON # needed by start workspace -DBUILD_WITH_CONDA=OFF - -DCMAKE_INSTALL_DATADIR=/usr/share/${PN}/data - -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF} - -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${PN} - -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN} + -DCMAKE_INSTALL_DATADIR=share/${PN}/data + -DCMAKE_INSTALL_DOCDIR=share/doc/${PF} + -DCMAKE_INSTALL_INCLUDEDIR=include/${PN} + -DCMAKE_INSTALL_LIBDIR=$(get_libdir)/${PN} -DFREECAD_BUILD_DEBIAN=OFF @@ -235,22 +238,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 # BUILD_SANDBOX currently broken, see @@ -291,12 +286,6 @@ src_install() { dobin src/Tools/freecad-thumbnailer - if ! use headless; then - dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad - mv "${ED}"/usr/$(get_libdir)/freecad/share/* "${ED}"/usr/share || die "failed to move shared ressources" - fi - dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd - python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/ # compile main package in python site-packages as well python_optimize |