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 17D0B139360 for ; Thu, 5 Aug 2021 16:56:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 353BCE0877; Thu, 5 Aug 2021 16:56:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 16019E0877 for ; Thu, 5 Aug 2021 16:56:37 +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 5015C33BE3F for ; Thu, 5 Aug 2021 16:56:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAAA3851 for ; Thu, 5 Aug 2021 16:56:34 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1628182583.9cea95ba389362e85935d32bb5a027993531d698.andrewammerlaan@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/ X-VCS-Repository: proj/sci X-VCS-Files: dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild X-VCS-Directories: dev-python/cadquery-ocp/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 9cea95ba389362e85935d32bb5a027993531d698 X-VCS-Branch: master Date: Thu, 5 Aug 2021 16:56:34 +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: 7ac1c911-0377-46ec-b20d-040de815c7a6 X-Archives-Hash: 107d8c57e3d069338599eb55af6ea348 commit: 9cea95ba389362e85935d32bb5a027993531d698 Author: leycec gmail com> AuthorDate: Tue Aug 3 04:41:46 2021 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Thu Aug 5 16:56:23 2021 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=9cea95ba dev-python/cadquery-ocp: relax OCCT requirement build CadQuery OCP against any OCCT 7.5.x version rather than just 7.5.2 by rebuilding its internal OCCT symbol table with LIEF Signed-off-by: Cecil Curry gmail.com> Closes: https://github.com/gentoo/sci/pull/1103 Signed-off-by: Andrew Ammerlaan gentoo.org> .../cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild b/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild index 57e223c07..9bed84595 100644 --- a/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild +++ b/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild @@ -23,11 +23,16 @@ SLOT="0" REQUIRED_USE="${PYTHON_REQUIRED_USE}" # CMake and VTK requirements derive from the "OCP/CMakeLists.txt" file -# generated by the src_prepare() phase. -BDEPEND=">=dev-util/cmake-3.16" +# generated by the src_prepare() phase. OCP currently requires opencascade +# (OCCT) to be built with "-DUSE_GLES2=OFF" and thus "-gles2". See also: +# https://github.com/CadQuery/OCP/issues/46#issuecomment-808920994 +BDEPEND=" + >=dev-libs/lief-0.11.5[python] + >=dev-util/cmake-3.16 +" RDEPEND=" ${PYTHON_DEPS} - ~sci-libs/opencascade-${OCCT_PV}[json,tbb,vtk] + sci-libs/opencascade:7.5=[json,tbb,vtk,-gles2] >=sci-libs/vtk-9.0.0[python,${PYTHON_SINGLE_USEDEP}] " DEPEND="${RDEPEND} @@ -37,7 +42,7 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${MY_P}" -# Explicitly set ${BUILD_DIR} to avoid eclass conflicts. +# The source "OCP/CMakeLists.txt" file is output by "bindgen" in src_prepare(). CMAKE_IN_SOURCE_BUILD=True # Ensure the path returned by get_llvm_prefix() contains clang. @@ -83,6 +88,11 @@ src_prepare() { local _OCCT_INCLUDE_DIR="${EPREFIX}/usr/include/opencascade-${OCCT_PV}" local _OCCT_LIB_DIR="${EPREFIX}/usr/lib64/opencascade-${OCCT_PV}" + # Absolute dirname of a temporary directory to store symbol tables for this + # OCCT version dumped below by the "dump_symbols.py" script. + local _OCCT_DUMP_SYMBOLS_ROOT_DIR="${T}/dump_symbols" + local _OCCT_DUMP_SYMBOLS_DIR="${_OCCT_DUMP_SYMBOLS_ROOT_DIR}/lib_linux" + # Absolute dirname of VTK's include directory, local _VTK_INCLUDE_DIR="${EPREFIX}/usr/include/vtk-${_VTK_VERSION}" @@ -100,13 +110,27 @@ src_prepare() { has_version -r "=${_CLANG_PYTHON_ATOM}" || die "${_CLANG_PYTHON_ATOM} not installed." - # Remove all vendored subdirectories. - rm -r conda opencascade pywrap || die + # Remove all vendored paths. + rm -r conda opencascade pywrap *.dat || die # Inject a symlink to OCCT's include directory. ln -s "${_OCCT_INCLUDE_DIR}" opencascade || die + # Inject a symlink from OCCT's shared library directory into this temporary + # directory as required by the "dump_symbols.py" script. + mkdir -p "${_OCCT_DUMP_SYMBOLS_DIR}" || die + ln -s "${_OCCT_LIB_DIR}" "${_OCCT_DUMP_SYMBOLS_DIR}"/. || die + + # Update all hardcoded OCCT shared library versions in "dump_symbols.py". + sed -i -e 's~\(\.so\.\)[0-9]\+.[0-9]\+.[0-9]\+~\1'${OCCT_PV}'~' \ + dump_symbols.py || die + + # Dump (i.e., generate) symbol tables for this OCCT version. + einfo 'Dumping OCCT symbol tables...' + ${EPYTHON} dump_symbols.py "${_OCCT_DUMP_SYMBOLS_ROOT_DIR}" || die + # Generate OCCT bindings in the "OCP/" subdirectory. + einfo 'Building OCP CMake binary tree...' ${EPYTHON} -m bindgen \ --verbose \ --njobs $(makeopts_jobs) \