diff options
Diffstat (limited to 'dev-python/pynest2d')
-rw-r--r-- | dev-python/pynest2d/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch | 23 | ||||
-rw-r--r-- | dev-python/pynest2d/pynest2d-4.12.1.ebuild | 29 |
3 files changed, 53 insertions, 0 deletions
diff --git a/dev-python/pynest2d/Manifest b/dev-python/pynest2d/Manifest index 29c09e38cea8..6fe013eda4e1 100644 --- a/dev-python/pynest2d/Manifest +++ b/dev-python/pynest2d/Manifest @@ -1 +1,2 @@ +DIST pynest2d-4.12.1.tar.gz 18448 BLAKE2B 5432d7acfe600afd32a0fb4543728eed351dea442ff23c9397182919f43015c4aed530aa7ec5b59c75d6373ea6ed122262d7018eb12cdd1b4586bf3ec960586b SHA512 0494efbc0ad6379fde4bdf9cdfe902cb4cbce30129771d34e01661b58ee38d6256910e10184c121de3b2d7139e6dbfee5b4e039d7d35507347efa2c475977625 DIST pynest2d-4.9.1.tar.gz 18252 BLAKE2B ea98af68e7b60d615eaf6e90a68b37f8e26aa181fafecc2470b5d93d1d20a9667f5a8c903be87d419cedf47befd4e9ce757a90880c0ef19e7bb920147b2443b2 SHA512 f208e13cace4345fe691beebfe61895cbf81b7f90c19adf6a63b592928abd8591fed5c10e5b12d60c375684398856ea8d569fe8d1893a049e45d89b0ffcfc51d diff --git a/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch b/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch new file mode 100644 index 000000000000..ff4482d197bf --- /dev/null +++ b/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,11 +21,7 @@ + endif() + + find_package(SIP REQUIRED) # To create Python bindings. +-find_package(libnest2d REQUIRED) # The library we're creating bindings for. +-find_package(Clipper REQUIRED) # Dependency of libnest2d. +-find_package(NLopt REQUIRED) # Dependency of libnest2d. +-find_package(Boost REQUIRED) # Dependency of libnest2d. +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLIBNEST2D_GEOMETRIES_clipper -DLIBNEST2D_OPTIMIZERS_nlopt -DLIBNEST2D_THREADING_std") # Tell libnest2d to use Clipper and NLopt, and standard threads. ++find_package(Libnest2D REQUIRED) # The library we're creating bindings for. + + # Some build options. + set(CMAKE_CXX_STANDARD 17) +@@ -56,5 +52,5 @@ + ) + + set(SIP_EXTRA_OPTIONS -g -n PyQt5.sip) # Always release the GIL before calling C++ methods. -n PyQt5.sip is required to not get the PyCapsule error +-include_directories(src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS} ${CLIPPER_INCLUDE_DIRS} ${NLopt_INCLUDE_DIRS} ${LIBNEST2D_INCLUDE_DIRS}) +-add_sip_python_module(pynest2d src/Pynest2D.sip ${CLIPPER_LIBRARIES} ${NLopt_LIBRARIES}) ++include_directories(src/ ${SIP_INCLUDE_DIRS}) ++add_sip_python_module(pynest2d src/Pynest2D.sip Libnest2D::libnest2d_headeronly) diff --git a/dev-python/pynest2d/pynest2d-4.12.1.ebuild b/dev-python/pynest2d/pynest2d-4.12.1.ebuild new file mode 100644 index 000000000000..3057bf795690 --- /dev/null +++ b/dev-python/pynest2d/pynest2d-4.12.1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit cmake python-single-r1 + +DESCRIPTION="Python bindings for libnest2d" +HOMEPAGE="https://github.com/Ultimaker/pynest2d" +SRC_URI="https://github.com/Ultimaker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-libs/libnest2d + $(python_gen_cond_dep '<dev-python/sip-5[${PYTHON_USEDEP}]') + " + +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-4.12.1-required-flags-from-Libnest2D-target.patch +) |