From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0F10C13835A for ; Mon, 31 May 2021 19:26:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1903DE0815; Mon, 31 May 2021 19:26:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2A70AE0815 for ; Mon, 31 May 2021 19:26:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6368335D36 for ; Mon, 31 May 2021 19:26:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4966778B for ; Mon, 31 May 2021 19:26:18 +0000 (UTC) From: "Alexey Shvetsov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexey Shvetsov" Message-ID: <1622489162.b83b3eaf0c8423672624c1cb06cc0ff5bc4aa360.alexxy@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/freecad/freecad-0.19.2.ebuild X-VCS-Directories: media-gfx/freecad/ X-VCS-Committer: alexxy X-VCS-Committer-Name: Alexey Shvetsov X-VCS-Revision: b83b3eaf0c8423672624c1cb06cc0ff5bc4aa360 X-VCS-Branch: master Date: Mon, 31 May 2021 19:26:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0a8286eb-9627-4d2c-acf1-529926f425d7 X-Archives-Hash: ec15810d8e64a68c007a234b806b56d4 commit: b83b3eaf0c8423672624c1cb06cc0ff5bc4aa360 Author: Bernd Waibel posteo net> AuthorDate: Tue May 18 18:40:01 2021 +0000 Commit: Alexey Shvetsov gentoo org> CommitDate: Mon May 31 19:26:02 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b83b3eaf media-gfx/freecad: fix opencascade issue Fix an issue with sci-libs/opencascade:7.4.0, where a wrong options has been passed to cmake. Additionally improves testing which version of opencascade has been installed and adds some guards to select correct options. Closes: https://bugs.gentoo.org/789705 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Bernd Waibel posteo.net> Signed-off-by: Alexey Shvetsov gentoo.org> media-gfx/freecad/freecad-0.19.2.ebuild | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/media-gfx/freecad/freecad-0.19.2.ebuild b/media-gfx/freecad/freecad-0.19.2.ebuild index 7e191a22a02..4719298feb3 100644 --- a/media-gfx/freecad/freecad-0.19.2.ebuild +++ b/media-gfx/freecad/freecad-0.19.2.ebuild @@ -141,11 +141,20 @@ src_prepare() { rm "${S}/cMake/FindCoin3D.cmake" || die # Fix OpenCASCADE lookup - # TODO: check this for opencascade-7.5.1 locations, which have - # changed since 7.4.0 after that package has merged - sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \ - -e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \ - -i cMake/FindOpenCasCade.cmake || die + 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 @@ -227,14 +236,16 @@ src_configure() { 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/} mycmakeargs+=( - -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade-7.5.1 - -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/opencascade-7.5.1 + -DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P} + -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P} ) else #