summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Lamm <expeditioneer@gentoo.org>2020-11-29 16:10:56 +0100
committerDennis Lamm <expeditioneer@gentoo.org>2020-11-30 19:37:42 +0100
commit456ed205b6472c6a5187c51ac933564b1cdd9d78 (patch)
tree92b47f0b922e4fd5f7960d0c99e47c4d508b0f11 /dev-python/pynest2d
parentdev-libs/libnest2d: added new ebuild (diff)
downloadgentoo-456ed205b6472c6a5187c51ac933564b1cdd9d78.tar.gz
gentoo-456ed205b6472c6a5187c51ac933564b1cdd9d78.tar.bz2
gentoo-456ed205b6472c6a5187c51ac933564b1cdd9d78.zip
dev-python/pynest2d: added new ebuild
Signed-off-by: Dennis Lamm <expeditoneer@gentoo.org> Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Diffstat (limited to 'dev-python/pynest2d')
-rw-r--r--dev-python/pynest2d/Manifest1
-rw-r--r--dev-python/pynest2d/files/pynest2d-4.8.0-required-flags-from-Libnest2D-target.patch24
-rw-r--r--dev-python/pynest2d/metadata.xml11
-rw-r--r--dev-python/pynest2d/pynest2d-4.8.0.ebuild37
4 files changed, 73 insertions, 0 deletions
diff --git a/dev-python/pynest2d/Manifest b/dev-python/pynest2d/Manifest
new file mode 100644
index 000000000000..0bb7ea88612a
--- /dev/null
+++ b/dev-python/pynest2d/Manifest
@@ -0,0 +1 @@
+DIST pynest2d-4.8.0.tar.gz 18174 BLAKE2B 3720815b3d5ba5d4a0dd24ec4104af318d2d7f2e86e66ada68ead8249ed28184d9a153995f143cc4e00d603804da959a086a27decfe2b1e0ef00256a891e0d17 SHA512 1304450f94589b5212f11d83fb228f0deb919698b44b1651f248105c23b65cf3d233e67526bbfb47df74b9b18d0c465f4188d02a0a6941564b551f50d9a3c84f
diff --git a/dev-python/pynest2d/files/pynest2d-4.8.0-required-flags-from-Libnest2D-target.patch b/dev-python/pynest2d/files/pynest2d-4.8.0-required-flags-from-Libnest2D-target.patch
new file mode 100644
index 000000000000..c2c9452756fb
--- /dev/null
+++ b/dev-python/pynest2d/files/pynest2d-4.8.0-required-flags-from-Libnest2D-target.patch
@@ -0,0 +1,24 @@
+See https://github.com/Ultimaker/pynest2d/pull/3
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,11 +10,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+ find_package(PythonInterp 3.5 REQUIRED) # Dependency of SIP.
+ find_package(PythonLibs 3.5 REQUIRED) # Dependency of SIP.
+ 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 11)
+@@ -45,5 +41,5 @@ set(SIP_EXTRA_FILES_DEPEND
+ )
+
+ set(SIP_EXTRA_OPTIONS -g) # Always release the GIL before calling C++ methods.
+-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/metadata.xml b/dev-python/pynest2d/metadata.xml
new file mode 100644
index 000000000000..52add8ef7465
--- /dev/null
+++ b/dev-python/pynest2d/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>3dprint@gentoo.org</email>
+ <name>Gentoo 3D Printer Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Ultimaker/pynest2d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pynest2d/pynest2d-4.8.0.ebuild b/dev-python/pynest2d/pynest2d-4.8.0.ebuild
new file mode 100644
index 000000000000..28e6d6d64f27
--- /dev/null
+++ b/dev-python/pynest2d/pynest2d-4.8.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+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 ~x86"
+
+IUSE=""
+
+RDEPEND="
+ dev-libs/libnest2d
+ $(python_gen_cond_dep 'dev-python/sip[${PYTHON_MULTI_USEDEP}]')
+ "
+
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-required-flags-from-Libnest2D-target.patch" )
+
+# test? ( )
+# ""
+
+#DEPENDENCIES
+
+# Clipper, a polygon clipping library.
+# NLopt, a library to solve non-linear optimization problems.
+# Boost, the headers only.
+# Sip, an application to generate Python bindings more easily.