1 |
commit: 456ed205b6472c6a5187c51ac933564b1cdd9d78 |
2 |
Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 29 15:10:56 2020 +0000 |
4 |
Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 18:37:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=456ed205 |
7 |
|
8 |
dev-python/pynest2d: added new ebuild |
9 |
|
10 |
Signed-off-by: Dennis Lamm <expeditoneer <AT> gentoo.org> |
11 |
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org> |
12 |
|
13 |
dev-python/pynest2d/Manifest | 1 + |
14 |
....8.0-required-flags-from-Libnest2D-target.patch | 24 ++++++++++++++ |
15 |
dev-python/pynest2d/metadata.xml | 11 +++++++ |
16 |
dev-python/pynest2d/pynest2d-4.8.0.ebuild | 37 ++++++++++++++++++++++ |
17 |
4 files changed, 73 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/pynest2d/Manifest b/dev-python/pynest2d/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..0bb7ea88612 |
22 |
--- /dev/null |
23 |
+++ b/dev-python/pynest2d/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST pynest2d-4.8.0.tar.gz 18174 BLAKE2B 3720815b3d5ba5d4a0dd24ec4104af318d2d7f2e86e66ada68ead8249ed28184d9a153995f143cc4e00d603804da959a086a27decfe2b1e0ef00256a891e0d17 SHA512 1304450f94589b5212f11d83fb228f0deb919698b44b1651f248105c23b65cf3d233e67526bbfb47df74b9b18d0c465f4188d02a0a6941564b551f50d9a3c84f |
26 |
|
27 |
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 |
28 |
new file mode 100644 |
29 |
index 00000000000..c2c9452756f |
30 |
--- /dev/null |
31 |
+++ b/dev-python/pynest2d/files/pynest2d-4.8.0-required-flags-from-Libnest2D-target.patch |
32 |
@@ -0,0 +1,24 @@ |
33 |
+See https://github.com/Ultimaker/pynest2d/pull/3 |
34 |
+--- a/CMakeLists.txt |
35 |
++++ b/CMakeLists.txt |
36 |
+@@ -10,11 +10,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") |
37 |
+ find_package(PythonInterp 3.5 REQUIRED) # Dependency of SIP. |
38 |
+ find_package(PythonLibs 3.5 REQUIRED) # Dependency of SIP. |
39 |
+ find_package(SIP REQUIRED) # To create Python bindings. |
40 |
+-find_package(libnest2d REQUIRED) # The library we're creating bindings for. |
41 |
+-find_package(Clipper REQUIRED) # Dependency of libnest2d. |
42 |
+-find_package(NLopt REQUIRED) # Dependency of libnest2d. |
43 |
+-find_package(Boost REQUIRED) # Dependency of libnest2d. |
44 |
+-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. |
45 |
++find_package(Libnest2D REQUIRED) # The library we're creating bindings for. |
46 |
+ |
47 |
+ # Some build options. |
48 |
+ set(CMAKE_CXX_STANDARD 11) |
49 |
+@@ -45,5 +41,5 @@ set(SIP_EXTRA_FILES_DEPEND |
50 |
+ ) |
51 |
+ |
52 |
+ set(SIP_EXTRA_OPTIONS -g) # Always release the GIL before calling C++ methods. |
53 |
+-include_directories(src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS} ${CLIPPER_INCLUDE_DIRS} ${NLopt_INCLUDE_DIRS} ${LIBNEST2D_INCLUDE_DIRS}) |
54 |
+-add_sip_python_module(pynest2d src/Pynest2D.sip ${CLIPPER_LIBRARIES} ${NLopt_LIBRARIES}) |
55 |
++include_directories(src/ ${SIP_INCLUDE_DIRS}) |
56 |
++add_sip_python_module(pynest2d src/Pynest2D.sip Libnest2D::libnest2d_headeronly) |
57 |
|
58 |
diff --git a/dev-python/pynest2d/metadata.xml b/dev-python/pynest2d/metadata.xml |
59 |
new file mode 100644 |
60 |
index 00000000000..52add8ef746 |
61 |
--- /dev/null |
62 |
+++ b/dev-python/pynest2d/metadata.xml |
63 |
@@ -0,0 +1,11 @@ |
64 |
+<?xml version="1.0" encoding="UTF-8"?> |
65 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
66 |
+<pkgmetadata> |
67 |
+ <maintainer type="project"> |
68 |
+ <email>3dprint@g.o</email> |
69 |
+ <name>Gentoo 3D Printer Project</name> |
70 |
+ </maintainer> |
71 |
+ <upstream> |
72 |
+ <remote-id type="github">Ultimaker/pynest2d</remote-id> |
73 |
+ </upstream> |
74 |
+</pkgmetadata> |
75 |
|
76 |
diff --git a/dev-python/pynest2d/pynest2d-4.8.0.ebuild b/dev-python/pynest2d/pynest2d-4.8.0.ebuild |
77 |
new file mode 100644 |
78 |
index 00000000000..28e6d6d64f2 |
79 |
--- /dev/null |
80 |
+++ b/dev-python/pynest2d/pynest2d-4.8.0.ebuild |
81 |
@@ -0,0 +1,37 @@ |
82 |
+# Copyright 1999-2020 Gentoo Authors |
83 |
+# Distributed under the terms of the GNU General Public License v2 |
84 |
+ |
85 |
+EAPI=7 |
86 |
+ |
87 |
+PYTHON_COMPAT=( python3_{7,8} ) |
88 |
+ |
89 |
+inherit cmake python-single-r1 |
90 |
+ |
91 |
+DESCRIPTION="Python bindings for libnest2d" |
92 |
+HOMEPAGE="https://github.com/Ultimaker/pynest2d" |
93 |
+SRC_URI="https://github.com/Ultimaker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
94 |
+ |
95 |
+LICENSE="LGPL-3" |
96 |
+SLOT="0" |
97 |
+KEYWORDS="~amd64 ~x86" |
98 |
+ |
99 |
+IUSE="" |
100 |
+ |
101 |
+RDEPEND=" |
102 |
+ dev-libs/libnest2d |
103 |
+ $(python_gen_cond_dep 'dev-python/sip[${PYTHON_MULTI_USEDEP}]') |
104 |
+ " |
105 |
+ |
106 |
+DEPEND="${RDEPEND}" |
107 |
+ |
108 |
+PATCHES=( "${FILESDIR}/${P}-required-flags-from-Libnest2D-target.patch" ) |
109 |
+ |
110 |
+# test? ( ) |
111 |
+# "" |
112 |
+ |
113 |
+#DEPENDENCIES |
114 |
+ |
115 |
+# Clipper, a polygon clipping library. |
116 |
+# NLopt, a library to solve non-linear optimization problems. |
117 |
+# Boost, the headers only. |
118 |
+# Sip, an application to generate Python bindings more easily. |