public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2021-07-27  9:49 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2021-07-27  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     2afa2bdc14c6d591e1e0f0061f3d757eb5143d5f
Author:     leycec <leycec <AT> gmail <DOT> com>
AuthorDate: Tue Jul 20 05:30:07 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Jul 27 09:48:56 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=2afa2bdc

dev-python/cadquery-ocp: add

add OCP, a mandatory dependency of CadQuery

Signed-off-by: Cecil Curry <leycec <AT> gmail.com>
Closes: https://github.com/gentoo/sci/pull/1099
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild    | 171 +++++++++++++++++++++
 dev-python/cadquery-ocp/metadata.xml               |  11 ++
 2 files changed, 182 insertions(+)

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
new file mode 100644
index 000000000..5133dc09a
--- /dev/null
+++ b/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+
+# OCP uses "python-single-r1" only because VTK uses "python-single-r1".
+inherit check-reqs cmake llvm multiprocessing python-single-r1
+
+MY_PN=OCP
+MY_PV="${PV//_/-}"
+MY_P="${MY_PN}-${MY_PV}"
+OCCT_PV=$(ver_cut 1-3)
+
+DESCRIPTION="Python wrapper for OCCT generated using pywrap"
+HOMEPAGE="https://github.com/CadQuery/OCP"
+SRC_URI="https://github.com/CadQuery/OCP/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+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"
+RDEPEND="
+	${PYTHON_DEPS}
+	~sci-libs/opencascade-${OCCT_PV}[json,tbb,vtk]
+	>=sci-libs/vtk-9.0.0[${PYTHON_SINGLE_USEDEP}]
+"
+DEPEND="${RDEPEND}
+	$(python_gen_cond_dep '
+		>=dev-python/cadquery-pywrap-'${OCCT_PV}'_rc0[${PYTHON_USEDEP}]')
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# Explicitly set ${BUILD_DIR} to avoid eclass conflicts.
+CMAKE_IN_SOURCE_BUILD=True
+
+# Ensure the path returned by get_llvm_prefix() contains clang.
+llvm_check_deps() {
+	has_version -r "sys-devel/clang:${LLVM_SLOT}"
+}
+
+cadquery-ocp_check_reqs() {
+	CHECKREQS_DISK_BUILD=1300M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+	cadquery-ocp_check_reqs
+}
+
+pkg_setup() {
+	cadquery-ocp_check_reqs
+	llvm_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+# OCP currently requires manual configuration, compilation, and installation
+# loosely inspired by the conda-specific "build-bindings-job.yml" file.
+#
+# Note that the cmake_src_prepare() function called below handles user patches.
+src_prepare() {
+	# Most recently installed version of Clang.
+	local _CLANG_VERSION="$(CPP=clang clang-fullversion)"
+
+	# Most recently installed version (excluding trailing patch) of VTK.
+	local _VTK_VERSION="$(best_version -r sci-libs/vtk)"
+	_VTK_VERSION="$(ver_cut 1-2 "${_VTK_VERSION##sci-libs/vtk}")"
+
+	# Absolute dirname of the most recently installed Clang include directory,
+	# mimicing similar logic in the "dev-python/shiboken2" ebuild. See also:
+	#     https://bugs.gentoo.org/619490
+	local _CLANG_INCLUDE_DIR="${EPREFIX}/usr/lib/clang/${_CLANG_VERSION}/include"
+
+	# Absolute filename of the most recently installed Clang shared library.
+	local _CLANG_LIB_FILE="$(get_llvm_prefix)/lib64/libclang.so"
+
+	# Absolute dirname of OCCT's include and shared library directories.
+	local _OCCT_INCLUDE_DIR="${EPREFIX}/usr/include/opencascade-${OCCT_PV}"
+	local _OCCT_LIB_DIR="${EPREFIX}/usr/lib64/opencascade-${OCCT_PV}"
+
+	# Absolute dirname of VTK's include directory,
+	local _VTK_INCLUDE_DIR="${EPREFIX}/usr/include/vtk-${_VTK_VERSION}"
+
+	# Ensure the above paths exist as a crude sanity test.
+	test -d "${_CLANG_INCLUDE_DIR}" || die "${_CLANG_INCLUDE_DIR} not found."
+	test -f "${_CLANG_LIB_FILE}"    || die "${_CLANG_LIB_FILE} not found."
+	test -d "${_OCCT_INCLUDE_DIR}"  || die "${_OCCT_INCLUDE_DIR} not found."
+	test -d "${_OCCT_LIB_DIR}"      || die "${_OCCT_LIB_DIR} not found."
+	test -d "${_VTK_INCLUDE_DIR}"   || die "${_VTK_INCLUDE_DIR} not found."
+
+	# "dev-python/clang-python" atom targeting this Clang version.
+	local _CLANG_PYTHON_ATOM="dev-python/clang-python-${_CLANG_VERSION}"
+
+	# Ensure "dev-python/clang-python" targets this Clang version.
+	has_version -r "=${_CLANG_PYTHON_ATOM}" ||
+		die "${_CLANG_PYTHON_ATOM} not installed."
+
+	# Remove all vendored subdirectories.
+	rm -r conda opencascade pywrap || die
+
+	# Inject a symlink to OCCT's include directory.
+	ln -s "${_OCCT_INCLUDE_DIR}" opencascade || die
+
+	# Generate OCCT bindings in the "OCP/" subdirectory.
+	${EPYTHON} -m bindgen \
+		--verbose \
+		--njobs $(makeopts_jobs) \
+		--libclang "${_CLANG_LIB_FILE}" \
+		--include "${_CLANG_INCLUDE_DIR}" \
+		--include "${_VTK_INCLUDE_DIR}" \
+		all ocp.toml || die
+
+	# Remove the source "FindOpenCascade.cmake" after generating bindings,
+	# which copied that file to the target "OCP/FindOpenCascade.cmake".
+	rm FindOpenCascade.cmake || die
+
+	#FIXME: Submit an issue recommending upstream replace their
+	#non-working "OCP/FindOpenCascade.cmake" file with a standard top-level
+	#"CMakeLists.txt" file that finds dependency paths: e.g., via @waebbl
+	#    find_package(vtk 9 CONFIG REQUIRED)
+	#    if(TARGET VTK::VTK)
+	#      get_target_property(VTK_INCLUDE_DIRS VTK::VTK INTERFACE_INCLUDE_DIRECTORIES)
+	#    endif()
+
+	# Replace all hardcoded paths in "OCP/FindOpenCascade.cmake" with
+	# standard OCCT paths derived above. That file is both fundamentally
+	# broken and useless, as the ${CASROOT} environment variable and
+	# "/usr/lib64/cmake/opencascade-${PV}/OpenCASCADEConfig.cmake" file
+	# already reliably identify all requisite OpenCASCADE paths. Failure to
+	# patch this file results in src_configure() failures resembling:
+	#     -- Could NOT find OPENCASCADE (missing: OPENCASCADE_LIBRARIES)
+	sed -i \
+		-e 's~$ENV{CONDA_PREFIX}/include/opencascade\b~'${_OCCT_INCLUDE_DIR}'~' \
+		-e 's~$ENV{CONDA_PREFIX}/lib\b~'${_OCCT_LIB_DIR}'~' \
+		-e 's~$ENV{CONDA_PREFIX}/Library/\(lib\|include/opencascade\)~~' \
+		OCP/FindOpenCascade.cmake || die
+
+	# Patch the "OCP/CMakeLists.txt" file generated by "bindgen" above, passed
+	# as an absolute path both here and below to minimize eclass issues.
+	CMAKE_USE_DIR="${S}/OCP" cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-B "${S}/OCP.build"
+		-DPYTHON_EXECUTABLE="${PYTHON}"
+		-Wno-dev
+	)
+
+	CMAKE_USE_DIR="${S}/OCP" cmake_src_configure
+}
+
+src_compile() {
+	CMAKE_USE_DIR="${S}/OCP.build" cmake_src_compile
+}
+
+# OCP currently ships no test suite, so we synthesize a crude import unit test.
+src_test() {
+	PYTHONPATH="${S}/OCP.build" ${EPYTHON} -c \
+		'from OCP.gp import gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Trsf, gp_GTrsf, gp, gp_XYZ'
+}
+
+src_install() {
+	python_moduleinto .
+	python_domodule "${S}/OCP.build/"OCP*.so
+}

diff --git a/dev-python/cadquery-ocp/metadata.xml b/dev-python/cadquery-ocp/metadata.xml
new file mode 100644
index 000000000..a8bf5ee04
--- /dev/null
+++ b/dev-python/cadquery-ocp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>sci@gentoo.org</email>
+		<name>Gentoo Science Project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">CadQuery/OCP</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2021-07-27 16:22 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2021-07-27 16:22 UTC (permalink / raw
  To: gentoo-commits

commit:     1fe38cad3870e9ce343ee76765c7f5a9744c1f68
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 27 16:22:17 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Jul 27 16:22:17 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=1fe38cad

dev-python/cadquery-ocp: add python flag as dep

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 5133dc09a..57e223c07 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
@@ -28,7 +28,7 @@ BDEPEND=">=dev-util/cmake-3.16"
 RDEPEND="
 	${PYTHON_DEPS}
 	~sci-libs/opencascade-${OCCT_PV}[json,tbb,vtk]
-	>=sci-libs/vtk-9.0.0[${PYTHON_SINGLE_USEDEP}]
+	>=sci-libs/vtk-9.0.0[python,${PYTHON_SINGLE_USEDEP}]
 "
 DEPEND="${RDEPEND}
 	$(python_gen_cond_dep '


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2021-08-05 16:56 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2021-08-05 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     9cea95ba389362e85935d32bb5a027993531d698
Author:     leycec <leycec <AT> gmail <DOT> com>
AuthorDate: Tue Aug  3 04:41:46 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> 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 <leycec <AT> gmail.com>
Closes: https://github.com/gentoo/sci/pull/1103
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> 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) \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2021-08-07  9:00 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2021-08-07  9:00 UTC (permalink / raw
  To: gentoo-commits

commit:     2f866c79a999133f7fa67574cda0c4e586d4a9da
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  7 07:28:43 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Aug  7 07:28:43 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=2f866c79

dev-python/cadquery-ocp: add PYTHON_SINGLE_USEDEP to lief dep

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 9bed84595..1a638a985 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
@@ -27,7 +27,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 # (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-libs/lief-0.11.5[python,${PYTHON_SINGLE_USEDEP}]
 	>=dev-util/cmake-3.16
 "
 RDEPEND="


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2022-01-11 19:04 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2022-01-11 19:04 UTC (permalink / raw
  To: gentoo-commits

commit:     506d5cbf440a2ddf92499f0daf2acdd86b92ae1e
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 11 19:04:51 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Jan 11 19:04:51 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=506d5cbf

dev-python/cadquery-ocp: opencascade: slot --> subslot

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 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 a53334cba..842e7c766 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
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -32,7 +32,7 @@ BDEPEND="
 "
 RDEPEND="
 	${PYTHON_DEPS}
-	sci-libs/opencascade:7.5=[json,tbb,vtk,-gles2]
+	sci-libs/opencascade:0/7.5[json,tbb,vtk,-gles2]
 	>=sci-libs/vtk-9.0.0[python,${PYTHON_SINGLE_USEDEP}]
 "
 DEPEND="${RDEPEND}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2022-01-16  9:36 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2022-01-16  9:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ec5497016e405380199369f2dac7fa39230378ef
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 16 09:35:39 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Jan 16 09:35:39 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ec549701

dev-python/cadquery-ocp: gles2 flag dropped from vtk

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 842e7c766..ec0b8526d 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
@@ -32,7 +32,7 @@ BDEPEND="
 "
 RDEPEND="
 	${PYTHON_DEPS}
-	sci-libs/opencascade:0/7.5[json,tbb,vtk,-gles2]
+	sci-libs/opencascade:0/7.5[json,tbb,vtk]
 	>=sci-libs/vtk-9.0.0[python,${PYTHON_SINGLE_USEDEP}]
 "
 DEPEND="${RDEPEND}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2023-01-12 11:59 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2023-01-12 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     7a6c1b6d5014acbc758a9d2cfaf9b57e68064968
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 12 11:51:31 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Jan 12 11:51:31 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a6c1b6d

dev-python/cadquery-ocp: drop 7.5.2_beta

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild    | 195 ---------------------
 1 file changed, 195 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
deleted file mode 100644
index ec0b8526d..000000000
--- a/dev-python/cadquery-ocp/cadquery-ocp-7.5.2_beta.ebuild
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-
-# OCP uses "python-single-r1" only because VTK uses "python-single-r1".
-inherit check-reqs cmake llvm multiprocessing python-single-r1 toolchain-funcs
-
-MY_PN=OCP
-MY_PV="${PV//_/-}"
-MY_P="${MY_PN}-${MY_PV}"
-OCCT_PV=$(ver_cut 1-3)
-
-DESCRIPTION="Python wrapper for OCCT generated using pywrap"
-HOMEPAGE="https://github.com/CadQuery/OCP"
-SRC_URI="https://github.com/CadQuery/OCP/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-KEYWORDS="~amd64 ~x86"
-SLOT="0"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# CMake and VTK requirements derive from the "OCP/CMakeLists.txt" file
-# 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,${PYTHON_SINGLE_USEDEP}]
-	>=dev-util/cmake-3.16
-"
-RDEPEND="
-	${PYTHON_DEPS}
-	sci-libs/opencascade:0/7.5[json,tbb,vtk]
-	>=sci-libs/vtk-9.0.0[python,${PYTHON_SINGLE_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	$(python_gen_cond_dep '
-		>=dev-python/cadquery-pywrap-'${OCCT_PV}'_rc0[${PYTHON_USEDEP}]')
-"
-
-S="${WORKDIR}/${MY_P}"
-
-# 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.
-llvm_check_deps() {
-	has_version -r "sys-devel/clang:${LLVM_SLOT}"
-}
-
-cadquery-ocp_check_reqs() {
-	CHECKREQS_DISK_BUILD=1300M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-pkg_pretend() {
-	cadquery-ocp_check_reqs
-}
-
-pkg_setup() {
-	cadquery-ocp_check_reqs
-	llvm_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-# OCP currently requires manual configuration, compilation, and installation
-# loosely inspired by the conda-specific "build-bindings-job.yml" file.
-#
-# Note that the cmake_src_prepare() function called below handles user patches.
-src_prepare() {
-	# Most recently installed version of Clang.
-	local _CLANG_VERSION="$(CPP=clang clang-fullversion)"
-
-	# Most recently installed version (excluding trailing patch) of VTK.
-	local _VTK_VERSION="$(best_version -r sci-libs/vtk)"
-	_VTK_VERSION="$(ver_cut 1-2 "${_VTK_VERSION##sci-libs/vtk}")"
-
-	# Absolute dirname of the most recently installed Clang include directory,
-	# mimicing similar logic in the "dev-python/shiboken2" ebuild. See also:
-	#     https://bugs.gentoo.org/619490
-	local _CLANG_INCLUDE_DIR="${EPREFIX}/usr/lib/clang/${_CLANG_VERSION}/include"
-
-	# Absolute filename of the most recently installed Clang shared library.
-	local _CLANG_LIB_FILE="$(get_llvm_prefix)/lib64/libclang.so"
-
-	# Absolute dirname of OCCT's include and shared library directories.
-	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}"
-
-	# Ensure the above paths exist as a crude sanity test.
-	test -d "${_CLANG_INCLUDE_DIR}" || die "${_CLANG_INCLUDE_DIR} not found."
-	test -f "${_CLANG_LIB_FILE}"    || die "${_CLANG_LIB_FILE} not found."
-	test -d "${_OCCT_INCLUDE_DIR}"  || die "${_OCCT_INCLUDE_DIR} not found."
-	test -d "${_OCCT_LIB_DIR}"      || die "${_OCCT_LIB_DIR} not found."
-	test -d "${_VTK_INCLUDE_DIR}"   || die "${_VTK_INCLUDE_DIR} not found."
-
-	# "dev-python/clang-python" atom targeting this Clang version.
-	local _CLANG_PYTHON_ATOM="dev-python/clang-python-${_CLANG_VERSION}"
-
-	# Ensure "dev-python/clang-python" targets this Clang version.
-	has_version -r "=${_CLANG_PYTHON_ATOM}" ||
-		die "${_CLANG_PYTHON_ATOM} not installed."
-
-	# 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) \
-		--libclang "${_CLANG_LIB_FILE}" \
-		--include "${_CLANG_INCLUDE_DIR}" \
-		--include "${_VTK_INCLUDE_DIR}" \
-		all ocp.toml || die
-
-	# Remove the source "FindOpenCascade.cmake" after generating bindings,
-	# which copied that file to the target "OCP/FindOpenCascade.cmake".
-	rm FindOpenCascade.cmake || die
-
-	#FIXME: Submit an issue recommending upstream replace their
-	#non-working "OCP/FindOpenCascade.cmake" file with a standard top-level
-	#"CMakeLists.txt" file that finds dependency paths: e.g., via @waebbl
-	#    find_package(vtk 9 CONFIG REQUIRED)
-	#    if(TARGET VTK::VTK)
-	#      get_target_property(VTK_INCLUDE_DIRS VTK::VTK INTERFACE_INCLUDE_DIRECTORIES)
-	#    endif()
-
-	# Replace all hardcoded paths in "OCP/FindOpenCascade.cmake" with
-	# standard OCCT paths derived above. That file is both fundamentally
-	# broken and useless, as the ${CASROOT} environment variable and
-	# "/usr/lib64/cmake/opencascade-${PV}/OpenCASCADEConfig.cmake" file
-	# already reliably identify all requisite OpenCASCADE paths. Failure to
-	# patch this file results in src_configure() failures resembling:
-	#     -- Could NOT find OPENCASCADE (missing: OPENCASCADE_LIBRARIES)
-	sed -i \
-		-e 's~$ENV{CONDA_PREFIX}/include/opencascade\b~'${_OCCT_INCLUDE_DIR}'~' \
-		-e 's~$ENV{CONDA_PREFIX}/lib\b~'${_OCCT_LIB_DIR}'~' \
-		-e 's~$ENV{CONDA_PREFIX}/Library/\(lib\|include/opencascade\)~~' \
-		OCP/FindOpenCascade.cmake || die
-
-	# Patch the "OCP/CMakeLists.txt" file generated by "bindgen" above, passed
-	# as an absolute path both here and below to minimize eclass issues.
-	CMAKE_USE_DIR="${S}/OCP" cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-B "${S}/OCP.build"
-		-DPYTHON_EXECUTABLE="${PYTHON}"
-		-Wno-dev
-	)
-
-	CMAKE_USE_DIR="${S}/OCP" cmake_src_configure
-}
-
-src_compile() {
-	CMAKE_USE_DIR="${S}/OCP.build" cmake_src_compile
-}
-
-# OCP currently ships no test suite, so we synthesize a crude import unit test.
-src_test() {
-	PYTHONPATH="${S}/OCP.build" ${EPYTHON} -c \
-		'from OCP.gp import gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Trsf, gp_GTrsf, gp, gp_XYZ'
-}
-
-src_install() {
-	python_moduleinto .
-	python_domodule "${S}/OCP.build/"OCP*.so
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/
@ 2023-01-29 13:47 Horea Christian
  0 siblings, 0 replies; 8+ messages in thread
From: Horea Christian @ 2023-01-29 13:47 UTC (permalink / raw
  To: gentoo-commits

commit:     128d0a799de76d347f7c8667454783bafdc336da
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Sun Jan 29 13:45:58 2023 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Sun Jan 29 13:45:58 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=128d0a79

dev-python/cadquery-ocp: hard masked version, due to:

opencascade slot 0/7.5 having been removed from ::gentoo in ff9032e688571dde15e9d36cebedf5a247ded1b8

Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 dev-python/cadquery-ocp/cadquery-ocp-7.5.3.0.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-python/cadquery-ocp/cadquery-ocp-7.5.3.0.ebuild b/dev-python/cadquery-ocp/cadquery-ocp-7.5.3.0.ebuild
index e165d6578..8a97782bd 100644
--- a/dev-python/cadquery-ocp/cadquery-ocp-7.5.3.0.ebuild
+++ b/dev-python/cadquery-ocp/cadquery-ocp-7.5.3.0.ebuild
@@ -18,7 +18,9 @@ HOMEPAGE="https://github.com/CadQuery/OCP"
 SRC_URI="https://github.com/CadQuery/OCP/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="Apache-2.0"
-KEYWORDS="~amd64 ~x86"
+# Hard masking due to opencascade slot 0/7.5 having been removed from ::gentoo in ff9032e688571dde15e9d36cebedf5a247ded1b8
+#KEYWORDS="~amd64 ~x86"
+KEYWORDS=""
 SLOT="0"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-29 13:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-05 16:56 [gentoo-commits] proj/sci:master commit in: dev-python/cadquery-ocp/ Andrew Ammerlaan
  -- strict thread matches above, loose matches on Subject: below --
2023-01-29 13:47 Horea Christian
2023-01-12 11:59 Andrew Ammerlaan
2022-01-16  9:36 Andrew Ammerlaan
2022-01-11 19:04 Andrew Ammerlaan
2021-08-07  9:00 Andrew Ammerlaan
2021-07-27 16:22 Andrew Ammerlaan
2021-07-27  9:49 Andrew Ammerlaan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox