* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
@ 2020-11-12 16:59 ` karl-nilsson
2020-11-12 17:05 ` karl-nilsson
` (60 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-11-12 16:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9373 bytes --]
From 3396f14d34c05f375f892aeb4c6ab2099a7130fa Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 0e41a366254..3f2ceb647f1 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=7a5324625c68eb72569cbb1f830c41846a99b746400611255b52271fb4364039
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 43bae03b3026c903bd0bb1068088446b537471af Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..e2d5508e760 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=95e3ac0601600aedb5311636a690c0c1b34c5755bc1084e4b6f239bef65a63a3
post_install() {
vmkdir usr/share/uranium/cmake
From 275f7fea8bab7bf4605cddaac21a717615d5a359 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.
---
srcpkgs/cura-engine/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 12b5935449d..fa2bb872f60 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,6 +1,6 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
+version=4.8
revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=6a2a06700b553a5240a3025b74a43353a97e5be9b1f741eb6f01e67b2a6a222d
post_install() {
vlicense LICENSE
From 99d89922a83a3f503df24fe21a15da25a702d511 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..05a4da9293b 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=3eca776172eac2f63d2d46cf0c67b930a3422867c2bc4180f5a44c5db04c3354
post_install() {
vlicense LICENSE
From 28f0ac3375f70621caf04c3ae7198daf9c46c9b9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..4dc098c4cd3 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=aad740cbc370a0445745df69b5cc92f9a96315b569c4eace78a0d3f4057c5ebb
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 3ad92d6c2f36c3e624aebea30110eaf12ea30334 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From 7f95b7cfd2c2bef2e3689452f3ef55e0bfa1b824 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From ba82ae93153ca9fa6a3d1a2b2ef81c082496bf7b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.
---
srcpkgs/cura/template | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..ec658b069d5 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,10 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=1ce1f61a79a04de10ec624d29f287b80c96c613cafcf3b4407ee87b6b8e72bc1
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
2020-11-12 16:59 ` [PR PATCH] [Updated] " karl-nilsson
@ 2020-11-12 17:05 ` karl-nilsson
2020-11-13 1:16 ` [PR REVIEW] " ndowens
` (59 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-11-12 17:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
New comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-726209360
Comment:
status update: Ultimaker forked the libnest2d repo and modified it, but didn't tag a new release, so the pynest2d build fails
Also, neither upstream libnest2d nor Ultimaker's fork set the soversion, so for now I'm leaving the package as header-only.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
2020-11-12 16:59 ` [PR PATCH] [Updated] " karl-nilsson
2020-11-12 17:05 ` karl-nilsson
@ 2020-11-13 1:16 ` ndowens
2020-11-19 21:14 ` [PR PATCH] [Updated] " karl-nilsson
` (58 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ndowens @ 2020-11-13 1:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
New review comment by ndowens on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r522547513
Comment:
I'd put python3-pynest2d on a new line, it is a bit long as is
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (2 preceding siblings ...)
2020-11-13 1:16 ` [PR REVIEW] " ndowens
@ 2020-11-19 21:14 ` karl-nilsson
2020-12-14 0:55 ` karl-nilsson
` (57 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-11-19 21:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9376 bytes --]
From 3396f14d34c05f375f892aeb4c6ab2099a7130fa Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 0e41a366254..3f2ceb647f1 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=7a5324625c68eb72569cbb1f830c41846a99b746400611255b52271fb4364039
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 43bae03b3026c903bd0bb1068088446b537471af Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..e2d5508e760 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=95e3ac0601600aedb5311636a690c0c1b34c5755bc1084e4b6f239bef65a63a3
post_install() {
vmkdir usr/share/uranium/cmake
From 275f7fea8bab7bf4605cddaac21a717615d5a359 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.
---
srcpkgs/cura-engine/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 12b5935449d..fa2bb872f60 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,6 +1,6 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
+version=4.8
revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=6a2a06700b553a5240a3025b74a43353a97e5be9b1f741eb6f01e67b2a6a222d
post_install() {
vlicense LICENSE
From 99d89922a83a3f503df24fe21a15da25a702d511 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..05a4da9293b 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=3eca776172eac2f63d2d46cf0c67b930a3422867c2bc4180f5a44c5db04c3354
post_install() {
vlicense LICENSE
From 28f0ac3375f70621caf04c3ae7198daf9c46c9b9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..4dc098c4cd3 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=aad740cbc370a0445745df69b5cc92f9a96315b569c4eace78a0d3f4057c5ebb
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 3ad92d6c2f36c3e624aebea30110eaf12ea30334 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From 7f95b7cfd2c2bef2e3689452f3ef55e0bfa1b824 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 4e3cb658b6cd0d22e4a48ec8a622bb632842f345 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..2bddd6895e1 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=1ce1f61a79a04de10ec624d29f287b80c96c613cafcf3b4407ee87b6b8e72bc1
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (3 preceding siblings ...)
2020-11-19 21:14 ` [PR PATCH] [Updated] " karl-nilsson
@ 2020-12-14 0:55 ` karl-nilsson
2020-12-23 23:00 ` karl-nilsson
` (56 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-12-14 0:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9441 bytes --]
From 53ff65e56f4e9c2072c9943ceb9b42416c1eb9d6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..3f2ceb647f1 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=7a5324625c68eb72569cbb1f830c41846a99b746400611255b52271fb4364039
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From aec32dc3ba711b1c7cd784bb796cd6dcdf35c28a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..e2d5508e760 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=95e3ac0601600aedb5311636a690c0c1b34c5755bc1084e4b6f239bef65a63a3
post_install() {
vmkdir usr/share/uranium/cmake
From 614ebba939b7b6956880ca30cf8e962008a65643 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..fa2bb872f60 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=6a2a06700b553a5240a3025b74a43353a97e5be9b1f741eb6f01e67b2a6a222d
post_install() {
vlicense LICENSE
From 978f69f4b0a139b652563440cc96b02f20947484 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..05a4da9293b 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=3eca776172eac2f63d2d46cf0c67b930a3422867c2bc4180f5a44c5db04c3354
post_install() {
vlicense LICENSE
From 7072b77bfafd088c027955ac42931077d1023455 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..4dc098c4cd3 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=aad740cbc370a0445745df69b5cc92f9a96315b569c4eace78a0d3f4057c5ebb
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 12992e8c9382a6012b31713df779b23bfc977a22 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From cf10ee7cf85e38564a3d1eae1b63e4277eada7e9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 324276f7db38e28f927040d4946738b94fd76162 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..2bddd6895e1 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=1ce1f61a79a04de10ec624d29f287b80c96c613cafcf3b4407ee87b6b8e72bc1
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (4 preceding siblings ...)
2020-12-14 0:55 ` karl-nilsson
@ 2020-12-23 23:00 ` karl-nilsson
2020-12-31 18:57 ` karl-nilsson
` (55 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-12-23 23:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9441 bytes --]
From f68840ea0fc1616b7885aa5f35eca5230f968634 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..3f2ceb647f1 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=7a5324625c68eb72569cbb1f830c41846a99b746400611255b52271fb4364039
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 743ff02be44449b2c64898b2f596fb1b7daea016 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..e2d5508e760 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=95e3ac0601600aedb5311636a690c0c1b34c5755bc1084e4b6f239bef65a63a3
post_install() {
vmkdir usr/share/uranium/cmake
From abae79ecd5a929e9d1a94875db7d9d0294eb5ada Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..fa2bb872f60 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=6a2a06700b553a5240a3025b74a43353a97e5be9b1f741eb6f01e67b2a6a222d
post_install() {
vlicense LICENSE
From f1c28ab42640c9f40cbd9c93a096a7899e59a9c9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..05a4da9293b 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=3eca776172eac2f63d2d46cf0c67b930a3422867c2bc4180f5a44c5db04c3354
post_install() {
vlicense LICENSE
From 175ebdfaff1c36ed9e880230024b196634e25705 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..4dc098c4cd3 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=aad740cbc370a0445745df69b5cc92f9a96315b569c4eace78a0d3f4057c5ebb
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From f4477ed8128162cf2e6037285ea29381e31655f1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From 1c46b51b6716fb7d6442fe6f5c545f0fc45d20a7 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From beb9037cb34b7aabe917e6d8e7bf664a1b507fdd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..2bddd6895e1 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=1ce1f61a79a04de10ec624d29f287b80c96c613cafcf3b4407ee87b6b8e72bc1
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (5 preceding siblings ...)
2020-12-23 23:00 ` karl-nilsson
@ 2020-12-31 18:57 ` karl-nilsson
2021-01-12 18:08 ` karl-nilsson
` (54 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2020-12-31 18:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9465 bytes --]
From 1e62715ba53dadbbd061305b4ffa2a456d850bf5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..9f82e09d2ed 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 37ec8114a4772123b5246235c8ea7a9641685710 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 541ff8ea8cbca14cef1aaf1512d44752158008b6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..5760846a2d2 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From 077fe34698763fec358884873090a09f496d3f9f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From df2254b73e888dda62c24df95deeea986eafdbee Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From cdf346dbb5dc0f525f26926eb2ef78caeb6d1009 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From 150774f7bd494ad5078e8d4b6ba821b584e9371e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 27f00f64a0db3194b791c78bc29efefa88003683 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (6 preceding siblings ...)
2020-12-31 18:57 ` karl-nilsson
@ 2021-01-12 18:08 ` karl-nilsson
2021-01-14 14:54 ` karl-nilsson
` (53 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-01-12 18:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 9465 bytes --]
From 3fa524780da9e40e08bd535a7e4abbfaf6d12dc4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..9f82e09d2ed 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 88d28347a25b06002e06614de79ddbff33a8040a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From a90ea0552d1edc600793280eb79c05a4db01c0f7 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..5760846a2d2 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From eace0087d2fc0a1c30f92e377adbe6ed0f794000 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From bf468a5e3db9dc92f32cd024fd6cd8656f7b8628 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 79f8ea99e54c786eb61fec24e304d83fdeaba466 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..c4ea2532de9
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/Ultimaker/libnest2d"
+distfiles="https://github.com/Ultimaker/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
From 1c5366b71767a4e90a27382028162f5c3d554f1d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 6673645bc9c8433a24bc51bcbc71b41f733269c3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (7 preceding siblings ...)
2021-01-12 18:08 ` karl-nilsson
@ 2021-01-14 14:54 ` karl-nilsson
2021-02-05 3:43 ` karl-nilsson
` (52 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-01-14 14:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 15507 bytes --]
From 3fa524780da9e40e08bd535a7e4abbfaf6d12dc4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..9f82e09d2ed 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 88d28347a25b06002e06614de79ddbff33a8040a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From a90ea0552d1edc600793280eb79c05a4db01c0f7 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..5760846a2d2 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From eace0087d2fc0a1c30f92e377adbe6ed0f794000 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From bf468a5e3db9dc92f32cd024fd6cd8656f7b8628 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 33551cb0d9aaa8aad4517895179a495968c2f56a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/template | 24 ++++
3 files changed, 147 insertions(+)
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 5e6a8d0c6ec..4dc55fb5e6d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4040,6 +4040,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 9d625b18efca5c0fb11bab205652480197613b75 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 6e9755b451bf62e9e978f3c69433d2d6bded4e13 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (8 preceding siblings ...)
2021-01-14 14:54 ` karl-nilsson
@ 2021-02-05 3:43 ` karl-nilsson
2021-02-22 7:57 ` karl-nilsson
` (51 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-05 3:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 15507 bytes --]
From 3b6a014b605a2143508e62eaf7d2201d2e84b273 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:27 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7d4fa49fbfe..9f82e09d2ed 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,7 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 851362a4aa623c770b5c347de99b503a2cc6d151 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 6ca2cc3cfd4746d58660b72ff3fa7e4558ef933a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:54 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e60be59391b..5760846a2d2 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,7 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -12,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From b1a48c9a0bef70346206d56579ebfeb946686610 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 19155d760fe2c9b09db33e3164f6fcbb3035859c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 26ad7c640ef1707e29882d6068cb89a1cb77ea75 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/template | 24 ++++
3 files changed, 147 insertions(+)
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 35263ec4744..02ac0a77b99 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4021,6 +4021,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From f2e3412babc2a09bd95495c53cbb59d0b727502f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 9f31bef24245c66c150f3e9816c26c8a4d524fa9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index 7ebd118bd80..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,7 +1,7 @@
# Template file for 'cura'
pkgname=cura
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -10,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (9 preceding siblings ...)
2021-02-05 3:43 ` karl-nilsson
@ 2021-02-22 7:57 ` karl-nilsson
2021-02-22 19:33 ` karl-nilsson
` (50 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-22 7:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 13228 bytes --]
From bad20e224740fa2f5fba6d9bf1fe493f9ba06c42 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From b0b34fdcbe460f8bcf187526a3060c95d946d546 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 96d976e7b0ae6aa517b625400fc5d60c9b4c851e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From e3ed8ef5ef5fab5ab39aa3ec8a77258520ad74b0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/template | 24 ++++
3 files changed, 147 insertions(+)
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index fd1a20b0f64..b812f4de3d5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3910,6 +3910,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 329b5782cf08ed4b88b7894169bbd22454ba7557 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 4e0e7b650b12bc3ad341dff6e07b22659dac5931 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (10 preceding siblings ...)
2021-02-22 7:57 ` karl-nilsson
@ 2021-02-22 19:33 ` karl-nilsson
2021-02-23 0:24 ` karl-nilsson
` (49 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-22 19:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 13228 bytes --]
From 4c694da28ff287272a8c9b315b233f7ed97a3de0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 23452e2c5c55198583623a71b99c53d0a7601d9e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 3a8a72cea64a6d988dc22e95cbb854bde8251c1f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 654763718fa9007f233ae68806654cb23f916e46 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/template | 24 ++++
3 files changed, 147 insertions(+)
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..175b167b6b1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 20ca7acee12e947296b24cf5fee6b1dbed6d7129 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From f1176b57c6711a9dc4ad5d9c4580b8ab70435079 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (11 preceding siblings ...)
2021-02-22 19:33 ` karl-nilsson
@ 2021-02-23 0:24 ` karl-nilsson
2021-02-23 0:39 ` karl-nilsson
` (48 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 0:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17153 bytes --]
From 4c694da28ff287272a8c9b315b233f7ed97a3de0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 23452e2c5c55198583623a71b99c53d0a7601d9e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 3a8a72cea64a6d988dc22e95cbb854bde8251c1f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From f677ef3451e65c0f1cf948750401a2947757c4d0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From fdaf0f08c7794b7a02a6ef66e0eab55ab88f1721 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..9feef890f58
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=4d2a336d9e7c793b42e6f3db2a4a084b3663445bbb644f8d4c51615738944f91
From 7c5e467b56c36915e9b6d272b2e6b337af45ed6a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (12 preceding siblings ...)
2021-02-23 0:24 ` karl-nilsson
@ 2021-02-23 0:39 ` karl-nilsson
2021-02-23 0:48 ` karl-nilsson
` (47 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 0:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17163 bytes --]
From 4c694da28ff287272a8c9b315b233f7ed97a3de0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 23452e2c5c55198583623a71b99c53d0a7601d9e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 3a8a72cea64a6d988dc22e95cbb854bde8251c1f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From f677ef3451e65c0f1cf948750401a2947757c4d0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..f8f8800fccb
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 9c29322f4d5c955c54c7f7ca6640646534bfe1c8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..ce8b2bb49d1
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From dab7e619c6841a4ec7c753f60754299a67b45a49 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (13 preceding siblings ...)
2021-02-23 0:39 ` karl-nilsson
@ 2021-02-23 0:48 ` karl-nilsson
2021-02-23 3:45 ` karl-nilsson
` (46 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 0:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17172 bytes --]
From 4c694da28ff287272a8c9b315b233f7ed97a3de0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..5ccc003a95c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,7 +1,7 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
@@ -13,7 +13,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 23452e2c5c55198583623a71b99c53d0a7601d9e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 3a8a72cea64a6d988dc22e95cbb854bde8251c1f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 08baf20cf928e6d0d35d103ac0bb8042e81b999a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..8dca99613fc
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 8cbaca98e95b44f096b92fed3988fb1b5ad3dd33 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..ce8b2bb49d1
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 35a480e77f70f7c09efad94237646b6bebdef658 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (14 preceding siblings ...)
2021-02-23 0:48 ` karl-nilsson
@ 2021-02-23 3:45 ` karl-nilsson
2021-02-23 4:33 ` karl-nilsson
` (45 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 3:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17622 bytes --]
From 0cb64a3132124ae657613688f2923dcacd1bb7a3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..2fe12cbb598 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,22 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy libArcus-python3 python3-numpy-stl
+ python3-scipy python3-PyQt5 python3-PyQt5-quick python3-certifi
+ python3-cryptography python3-Twisted python3-shapely"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 9da4126e178504a0440838bc651d0838f75eeb56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From a4c7c00c53aa4e9e1e0cb90c7f166211665eeba2 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 55cd173675456d74e1c1e7d1485d827ff505c126 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..8dca99613fc
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+# checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 13ae50499d49f3d6a8db7a69fb20baac96b68a98 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..ce8b2bb49d1
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From fd3d6b9e23ad49c98153dccada311bd0c075554b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (15 preceding siblings ...)
2021-02-23 3:45 ` karl-nilsson
@ 2021-02-23 4:33 ` karl-nilsson
2021-02-23 4:55 ` karl-nilsson
` (44 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 4:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17620 bytes --]
From 0cb64a3132124ae657613688f2923dcacd1bb7a3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..2fe12cbb598 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,22 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy libArcus-python3 python3-numpy-stl
+ python3-scipy python3-PyQt5 python3-PyQt5-quick python3-certifi
+ python3-cryptography python3-Twisted python3-shapely"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 9da4126e178504a0440838bc651d0838f75eeb56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From a4c7c00c53aa4e9e1e0cb90c7f166211665eeba2 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 9c1494ca5e09910c7e3a6a82f8b1adf424e3216e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..925cc572c60
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 815ae46702f243b2b28560476560481037bed678 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..ce8b2bb49d1
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 9ca73dc1cd1f8bbcc32eb91948f179d59ac9be99 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..af415126861 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (16 preceding siblings ...)
2021-02-23 4:33 ` karl-nilsson
@ 2021-02-23 4:55 ` karl-nilsson
2021-02-23 4:56 ` [PR REVIEW] " ericonr
` (43 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 4:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
New comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-783876655
Comment:
Package builds fine, but tests fail.
Help is appreciated.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (17 preceding siblings ...)
2021-02-23 4:55 ` karl-nilsson
@ 2021-02-23 4:56 ` ericonr
2021-02-23 4:56 ` ericonr
` (42 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-02-23 4:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r580767253
Comment:
Might want https://github.com/archlinux/svntogit-community/blob/564137e74f6ea07ac6ca17502b0b98b3d6b025eb/trunk/fix-cpp-version.patch here
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (18 preceding siblings ...)
2021-02-23 4:56 ` [PR REVIEW] " ericonr
@ 2021-02-23 4:56 ` ericonr
2021-02-23 4:56 ` ericonr
` (41 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-02-23 4:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r580768786
Comment:
Also https://github.com/archlinux/svntogit-community/blob/2adf6c9364e0038f87a1d88852ede2b7fb6dcb47/trunk/fix-cpp-version.patch
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (19 preceding siblings ...)
2021-02-23 4:56 ` ericonr
@ 2021-02-23 4:56 ` ericonr
2021-02-23 4:56 ` karl-nilsson
` (40 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-02-23 4:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r580766970
Comment:
Should be 2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (20 preceding siblings ...)
2021-02-23 4:56 ` ericonr
@ 2021-02-23 4:56 ` karl-nilsson
2021-02-23 4:56 ` [PR REVIEW] " ericonr
` (39 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 4:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
New comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-783876655
Comment:
Package builds and runs fine, but tests fail.
Help is appreciated.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (21 preceding siblings ...)
2021-02-23 4:56 ` karl-nilsson
@ 2021-02-23 4:56 ` ericonr
2021-02-23 4:58 ` karl-nilsson
` (38 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-02-23 4:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r580768893
Comment:
Maybe best not to set this if upstream doesn't guarantee ABI?
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (22 preceding siblings ...)
2021-02-23 4:56 ` [PR REVIEW] " ericonr
@ 2021-02-23 4:58 ` karl-nilsson
2021-02-23 5:02 ` [PR PATCH] [Updated] " karl-nilsson
` (37 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 4:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
New review comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r580769668
Comment:
That patch has already been upstreamed. I'm manually patching because there's no recent release.
https://github.com/tamasmeszaros/libnest2d/pull/27
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (23 preceding siblings ...)
2021-02-23 4:58 ` karl-nilsson
@ 2021-02-23 5:02 ` karl-nilsson
2021-02-23 5:12 ` karl-nilsson
` (36 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 5:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17620 bytes --]
From 0cb64a3132124ae657613688f2923dcacd1bb7a3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..2fe12cbb598 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,22 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy libArcus-python3 python3-numpy-stl
+ python3-scipy python3-PyQt5 python3-PyQt5-quick python3-certifi
+ python3-cryptography python3-Twisted python3-shapely"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 9da4126e178504a0440838bc651d0838f75eeb56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From a4c7c00c53aa4e9e1e0cb90c7f166211665eeba2 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 9c1494ca5e09910c7e3a6a82f8b1adf424e3216e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..925cc572c60
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 815ae46702f243b2b28560476560481037bed678 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..ce8b2bb49d1
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,14 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From b59fc90dc3a50f687ff4990314619323ec8456ba Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (24 preceding siblings ...)
2021-02-23 5:02 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-02-23 5:12 ` karl-nilsson
2021-02-23 17:27 ` ericonr
` (35 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 5:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17687 bytes --]
From 0cb64a3132124ae657613688f2923dcacd1bb7a3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..2fe12cbb598 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,22 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy libArcus-python3 python3-numpy-stl
+ python3-scipy python3-PyQt5 python3-PyQt5-quick python3-certifi
+ python3-cryptography python3-Twisted python3-shapely"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 9da4126e178504a0440838bc651d0838f75eeb56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From a4c7c00c53aa4e9e1e0cb90c7f166211665eeba2 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From d34825951f1af2ae5defe1f9863ef7582097bd08 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..beaa8354e3a
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD_14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From f5df331327639994ffd41dd9df9d91d944016d3b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..26beac64e65
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD 14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 88f6115996d3b53c6f29a453146b3cdd6c9b1265 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (25 preceding siblings ...)
2021-02-23 5:12 ` karl-nilsson
@ 2021-02-23 17:27 ` ericonr
2021-02-23 18:59 ` [PR PATCH] [Updated] " karl-nilsson
` (34 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-02-23 17:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-784369722
Comment:
```
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 2fe12cbb59..b42cf2513b 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -8,9 +8,8 @@ hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
-checkdepends="python3-pytest python3-mypy libArcus-python3 python3-numpy-stl
- python3-scipy python3-PyQt5 python3-PyQt5-quick python3-certifi
- python3-cryptography python3-Twisted python3-shapely"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
```
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (26 preceding siblings ...)
2021-02-23 17:27 ` ericonr
@ 2021-02-23 18:59 ` karl-nilsson
2021-03-08 16:39 ` karl-nilsson
` (33 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-02-23 18:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17573 bytes --]
From 589ef5b21020c833926591902fd7c0f6be6c8741 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..b42cf2513bf 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 3191ecccfe3fb41139f1172c3cb35e2b1e97f8ab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From c8a6b8cdf6ed1db5fc75de98c40e160bfd128185 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From a499e4350ad852410df46ef98b6653b994a1fea5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index d86b7eddef0..ee3298e4d43 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3913,6 +3913,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..beaa8354e3a
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD_14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 736323ab25f93658bae26b14246ec46c72352574 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..26beac64e65
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD 14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 5ca0f2aab5de0c4694e96f2368eadd8f78ab7dab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (27 preceding siblings ...)
2021-02-23 18:59 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-03-08 16:39 ` karl-nilsson
2021-03-08 16:52 ` karl-nilsson
` (32 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-08 16:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17573 bytes --]
From f277fc3b0b979806c0fec627d9edd2134a860f27 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..b42cf2513bf 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From fc08889f4197643cac75c5915a1d91298dfd30fe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 5a80a175434c387d30aa9c3599db7e34bfefb0f5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 3e384d0789851a889119cb74e981207eb5764fea Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..beaa8354e3a
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD_14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From a3aab6c873d1a469ea41c84425d863b25ead0a84 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..26beac64e65
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD 14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 5d1d2156d138fb640220e94523e169be22e01c1f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (28 preceding siblings ...)
2021-03-08 16:39 ` karl-nilsson
@ 2021-03-08 16:52 ` karl-nilsson
2021-03-08 21:42 ` karl-nilsson
` (31 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-08 16:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17573 bytes --]
From f277fc3b0b979806c0fec627d9edd2134a860f27 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..b42cf2513bf 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From fc08889f4197643cac75c5915a1d91298dfd30fe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 5a80a175434c387d30aa9c3599db7e34bfefb0f5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 0cdf84ac6578f0e12cced971a5411ba4b57d5862 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From a3e21215f222641f2cb78fe8c58d0fc3f88465bd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..26beac64e65
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD 14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 7054363f0da4afc6b149712ca0eec0c93ac051f4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (29 preceding siblings ...)
2021-03-08 16:52 ` karl-nilsson
@ 2021-03-08 21:42 ` karl-nilsson
2021-03-08 22:00 ` karl-nilsson
` (30 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-08 21:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17573 bytes --]
From f277fc3b0b979806c0fec627d9edd2134a860f27 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..b42cf2513bf 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From fc08889f4197643cac75c5915a1d91298dfd30fe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 5a80a175434c387d30aa9c3599db7e34bfefb0f5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 0cdf84ac6578f0e12cced971a5411ba4b57d5862 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From a3e21215f222641f2cb78fe8c58d0fc3f88465bd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..26beac64e65
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD 14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 7054363f0da4afc6b149712ca0eec0c93ac051f4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..d43b4f763f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,11 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (30 preceding siblings ...)
2021-03-08 21:42 ` karl-nilsson
@ 2021-03-08 22:00 ` karl-nilsson
2021-03-09 4:40 ` karl-nilsson
` (29 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-08 22:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 17697 bytes --]
From 0dc405a65206ac1d3cc4bface962cfc6cb2f5827 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 1/6] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..8548636138c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
- qt5-quickcontrols2 python3-shapely python3-cryptography"
+ qt5-quickcontrols2 python3-shapely python3-cryptography gettext"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 69aed8bd20dfbe0e17576ad4d2f47eb2f6fb861a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 2/6] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From d02a993c7da117739689043909506a465fd2d74f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 3/6] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From d955492d1aa8d0df5550657d3578a139c5a1b01f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 4/6] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 560f17acf160dc8ac664485b21b470aa93bf6673 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 5/6] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..182a27001f7
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From a473dee119ef1d03f955461794143e8b98f9703f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 6/6] cura: update to 4.8.0.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..a13a923f3f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (31 preceding siblings ...)
2021-03-08 22:00 ` karl-nilsson
@ 2021-03-09 4:40 ` karl-nilsson
2021-03-09 7:10 ` [PR REVIEW] " ericonr
` (28 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-09 4:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20029 bytes --]
From 581cb583394cdbabe3ae3dfa021cc882492635e0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:36:38 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index b7a5b0f9267..574e76eea9d 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.8.0
+revision=2
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 52d8507703c203846477a2c48b23e962bdf5669b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..8548636138c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
- qt5-quickcontrols2 python3-shapely python3-cryptography"
+ qt5-quickcontrols2 python3-shapely python3-cryptography gettext"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 4527e05bfec2f0236dc09298c61d5090a8556580 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:38:36 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 439810c1a08..0d0f35f1a86 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From 80dfe66a97320cdd81c82488081bb1c14f244fe8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 8832a376de834f941c2654d3b7cc3136985521fc Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 47d707a2636370395035c9bd5e7bd2fcb29626af Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 2e5019830ba870b5d3534696d18781f67d6a3ab9 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..182a27001f7
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 7819198481a1d72231cee16d63932574ec1fdf51 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..a13a923f3f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (32 preceding siblings ...)
2021-03-09 4:40 ` karl-nilsson
@ 2021-03-09 7:10 ` ericonr
2021-03-09 7:56 ` sgn
` (27 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-03-09 7:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r590003307
Comment:
I think you might be missing `python3` from `hostmakedepends`?
Also, @sgn, could this benefit from sip build style?
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (33 preceding siblings ...)
2021-03-09 7:10 ` [PR REVIEW] " ericonr
@ 2021-03-09 7:56 ` sgn
2021-03-10 14:57 ` sgn
` (26 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: sgn @ 2021-03-09 7:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r590043337
Comment:
I think yes, I'll look into this one after finishing #27041
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (34 preceding siblings ...)
2021-03-09 7:56 ` sgn
@ 2021-03-10 14:57 ` sgn
2021-03-10 16:14 ` [PR PATCH] [Updated] " karl-nilsson
` (25 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: sgn @ 2021-03-10 14:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r591592641
Comment:
Actually, no. This package uses sip4 not sip-build
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (35 preceding siblings ...)
2021-03-10 14:57 ` sgn
@ 2021-03-10 16:14 ` karl-nilsson
2021-03-10 16:14 ` karl-nilsson
` (24 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-10 16:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20067 bytes --]
From 581cb583394cdbabe3ae3dfa021cc882492635e0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:36:38 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index b7a5b0f9267..574e76eea9d 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.8.0
+revision=2
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 52d8507703c203846477a2c48b23e962bdf5669b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..8548636138c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
- qt5-quickcontrols2 python3-shapely python3-cryptography"
+ qt5-quickcontrols2 python3-shapely python3-cryptography gettext"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 4527e05bfec2f0236dc09298c61d5090a8556580 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:38:36 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 439810c1a08..0d0f35f1a86 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From 80dfe66a97320cdd81c82488081bb1c14f244fe8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 8832a376de834f941c2654d3b7cc3136985521fc Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 47d707a2636370395035c9bd5e7bd2fcb29626af Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index a911b3892cb..5adbe209f65 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 50ce74b16e73c44b94a2601a130d82a7421f90d0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..3050d3c3950
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From aacd211ba68777e951f248dcecebc4e0b8448001 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..a13a923f3f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (36 preceding siblings ...)
2021-03-10 16:14 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-03-10 16:14 ` karl-nilsson
2021-03-10 16:47 ` karl-nilsson
` (23 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-10 16:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20067 bytes --]
From 240ef5b8fc0e97666a7d12e31f9585a33ed99e3e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:36:38 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index b7a5b0f9267..574e76eea9d 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.8.0
+revision=2
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From e91ff7686aa132f22eba9b7678031ed7933f57b0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..8548636138c 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
hostmakedepends="python3"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
- qt5-quickcontrols2 python3-shapely python3-cryptography"
+ qt5-quickcontrols2 python3-shapely python3-cryptography gettext"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From c1a29238485c38b2e01c9a1e898ce3bb4da8a210 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:38:36 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 439810c1a08..0d0f35f1a86 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From 68ed387f6ac20447d6f9c02e0b01bf24404ac805 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 42835cd755a83f2b01b846044f50a04e74a1a3b6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 862982fd5ced4eeafe69cd4317d6d745ba00598f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..4c324c2b7ad 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 8da25119ad244f9fbc109bd6bff518ad65d5d4f6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..3050d3c3950
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 5dc17e50a69f198b6646d1187377f3dd0509dcca Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..a13a923f3f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (37 preceding siblings ...)
2021-03-10 16:14 ` karl-nilsson
@ 2021-03-10 16:47 ` karl-nilsson
2021-03-10 17:00 ` karl-nilsson
` (22 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-10 16:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20035 bytes --]
From 240ef5b8fc0e97666a7d12e31f9585a33ed99e3e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:36:38 -0500
Subject: [PATCH 1/8] libArcus: update to 4.8.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index b7a5b0f9267..574e76eea9d 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.8.0
+revision=2
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=f5a7234506c89a36adccdab2a3c410a75aaaa9e7c7f9533db834881c59001677
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From cbc3ef60cc9a74f44a027d397e1639da3efcdb4d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.8.0.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa..f6b57b1106d 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=17e292361b7bbd89838599e78e4df2a8e69f247209b38e5098b25f5c83affcf2
post_install() {
vmkdir usr/share/uranium/cmake
From 09ce5e84a3a89a5420a191ab7acde51943ef03df Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Mon, 8 Mar 2021 23:38:36 -0500
Subject: [PATCH 3/8] cura-engine: update to 4.8.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index 439810c1a08..0d0f35f1a86 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=752977fbe48653743b9f1a6e25e6d1f061513b7cf1cd4f0105b233595e8a15ff
post_install() {
vlicense LICENSE
From 6714519af77c187b7b44571705a94bcfb7a8d60f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.8.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d..58102afbbe7 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.8.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1fe1462f60700e08314e24e636eebf3218eb0174db8763cd955ad080c6568f1a
post_install() {
vlicense LICENSE
From 3a55f56ae31b69de55a320b1dbc5304852d78de1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.8.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe33..647ed166f63 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.8.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=9eb1a0277d64f7d95cc3f81f0e5e35f16cb06b9190d9fc15c18ad7d1da7aeaf2
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 5a5c8c0265ec0b6e4bfcad8f1e4a95b2c9612793 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..4c324c2b7ad 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3955,6 +3955,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 00000000000..9b14d88294b
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 00000000000..615bad97b0b
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 00000000000..4530d3235da
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 00000000000..1a1c53495de
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 00000000000..0ef27ccd137
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From de1111b685aaca8a8b2215898f6069a8f9931112 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 00000000000..3050d3c3950
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 90a7645d579bedbd1ff5944114057eaa2af2c479 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.8.0.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e1..a13a923f3f4 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.8.0
+revision=2
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=3f59a53f9d5ba820153401f5f2e9921be843df7677ef4d2b3316bfd08a402cc2
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (38 preceding siblings ...)
2021-03-10 16:47 ` karl-nilsson
@ 2021-03-10 17:00 ` karl-nilsson
2021-06-16 14:30 ` [PR PATCH] [Updated] " karl-nilsson
` (21 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-03-10 17:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
New comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-795741108
Comment:
adding python3-sip-devel to hostmakedepends fixes pynest2d cross-build, but Uranium's unit tests fail.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (39 preceding siblings ...)
2021-03-10 17:00 ` karl-nilsson
@ 2021-06-16 14:30 ` karl-nilsson
2021-06-16 14:33 ` karl-nilsson
` (20 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-16 14:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20063 bytes --]
From fc15469af5d0a9d5beaa103ace2c098dee2004da Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..f5ce08f1b804 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=2
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 41d3ab601e6e6cb1469b1e4a3f4583b8f825527b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 9d9307fb29566511242f1aa5fd47cc9fe4bda64b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From ab6db41ae3f9d74bbfd7d2b46553519f5b6fbb08 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 3622115be38aecf7d4da25f89eb83438e16699ca Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 5f3ccc7a7fab3c197ecc213be1b44592ff5bf1da Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From ccd6651d7fcdf5a40a58a9398dfe0a90928daf39 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 25f7a2071a83fa69204e3e87be9565b703992590 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..d7c0336a84aa 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.8
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (40 preceding siblings ...)
2021-06-16 14:30 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-06-16 14:33 ` karl-nilsson
2021-06-17 1:13 ` [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1 karl-nilsson
` (19 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-16 14:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.8
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 20063 bytes --]
From 510f467e9296846c04055a985c65f8d5876f7dab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 712a1953ad79eda4b8ff8e90a70f4f598e1e8b4b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
---
srcpkgs/Uranium/template | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 56ec6689ddd45707bba004b71259b0ad6950193d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 602b0b8f2f1a998265ff6b6032dd62c90bc69bb5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 50c93205592903d0cb58ecbc00855bf049133cc5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 5af7dc457f1cb95da46581501b2bc245900e62dc Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 0ca1f66aacde484d95cc65c11d9d908ee7ad1984 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 5fc2a1fbd6f7c09c6f85a883be7cff099f5594ca Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..d7c0336a84aa 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (41 preceding siblings ...)
2021-06-16 14:33 ` karl-nilsson
@ 2021-06-17 1:13 ` karl-nilsson
2021-06-17 1:26 ` karl-nilsson
` (18 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-17 1:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21060 bytes --]
From 510f467e9296846c04055a985c65f8d5876f7dab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 159818de9eb473aab0b1583e1ea4fa5eac22aa1c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..7e62abf47450
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..3c090736 100644
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -50,7 +50,7 @@ foreach(_plugin ${_plugins})
+ endforeach()
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
++#add_test(
++# NAME "code-style"
++# COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 25d21b1e44836c3313aa1701ea8059da8e041c6b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 5240d3ea1abe09eb21ada86bb670be263532dad8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 4fc4c77502b88d5291b906654436dc57b7dd4652 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 1ce23af58e775ceee2a70c48bc0daf0b640debfe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From c8e6a3386a8162e54a051455000fc94c6c392c06 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 7434a9aaf2167f18f12e37520aaad62713cc9035 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..d7c0336a84aa 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (42 preceding siblings ...)
2021-06-17 1:13 ` [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1 karl-nilsson
@ 2021-06-17 1:26 ` karl-nilsson
2021-06-17 1:46 ` karl-nilsson
` (17 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-17 1:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21076 bytes --]
From 510f467e9296846c04055a985c65f8d5876f7dab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 159818de9eb473aab0b1583e1ea4fa5eac22aa1c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..7e62abf47450
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..3c090736 100644
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -50,7 +50,7 @@ foreach(_plugin ${_plugins})
+ endforeach()
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
++#add_test(
++# NAME "code-style"
++# COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 25d21b1e44836c3313aa1701ea8059da8e041c6b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 5240d3ea1abe09eb21ada86bb670be263532dad8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 4fc4c77502b88d5291b906654436dc57b7dd4652 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 1ce23af58e775ceee2a70c48bc0daf0b640debfe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From c8e6a3386a8162e54a051455000fc94c6c392c06 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 201357e4394df3a7b897f31cd2f62fcef1b5e19e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
---
srcpkgs/cura/template | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..68204d3b096b 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (43 preceding siblings ...)
2021-06-17 1:26 ` karl-nilsson
@ 2021-06-17 1:46 ` karl-nilsson
2021-06-17 1:55 ` karl-nilsson
` (16 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-17 1:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 22102 bytes --]
From 510f467e9296846c04055a985c65f8d5876f7dab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 159818de9eb473aab0b1583e1ea4fa5eac22aa1c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..7e62abf47450
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..3c090736 100644
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -50,7 +50,7 @@ foreach(_plugin ${_plugins})
+ endforeach()
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
++#add_test(
++# NAME "code-style"
++# COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 25d21b1e44836c3313aa1701ea8059da8e041c6b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 5240d3ea1abe09eb21ada86bb670be263532dad8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 4fc4c77502b88d5291b906654436dc57b7dd4652 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 1ce23af58e775ceee2a70c48bc0daf0b640debfe Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From c8e6a3386a8162e54a051455000fc94c6c392c06 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 143df935004e7b456761b5aca924bbd786825532 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 21 +++++++++++++++++++
srcpkgs/cura/template | 11 +++++-----
2 files changed, 27 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..dd38a7551ff0
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,21 @@
+diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake
+index babb86f74..143abb222 100644
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -51,11 +51,11 @@ endfunction()
+
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
++#add_test(
++# NAME "code-style"
++# COMMAND ${Python3_EXECUTABLE} run_mypy.py
++# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..68204d3b096b 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (44 preceding siblings ...)
2021-06-17 1:46 ` karl-nilsson
@ 2021-06-17 1:55 ` karl-nilsson
2021-06-17 2:16 ` karl-nilsson
` (15 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-17 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 22102 bytes --]
From 40b8a256f731a927f61eb639eddedc4f87f437b1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 83318d51f63c862ae52369ec46dc89cf3b88bbce Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..7e62abf47450
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..3c090736 100644
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -50,7 +50,7 @@ foreach(_plugin ${_plugins})
+ endforeach()
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
++#add_test(
++# NAME "code-style"
++# COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From e80a102e2031dbbbe3e4e372a8359c536fcda090 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From e0199d670aeefa950fee4a160a16928030f63bb3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From c1ec329b57ac32cf103094dc08bb0b72675039af Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From ea425556379b70c582e0449850476a102a95f556 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From d5ab084a95512613a66fc2781f72c4713e3627a5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 760ee601c4f141fc576f84dea19d05f79d2ba3e0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
Disable code style checks
---
.../patches/disable_code_style_test.patch | 21 +++++++++++++++++++
srcpkgs/cura/template | 11 +++++-----
2 files changed, 27 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..dd38a7551ff0
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,21 @@
+diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake
+index babb86f74..143abb222 100644
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -51,11 +51,11 @@ endfunction()
+
+
+ #Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
++#add_test(
++# NAME "code-style"
++# COMMAND ${Python3_EXECUTABLE} run_mypy.py
++# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++#)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..68204d3b096b 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (45 preceding siblings ...)
2021-06-17 1:55 ` karl-nilsson
@ 2021-06-17 2:16 ` karl-nilsson
2021-06-29 16:00 ` [PR PATCH] [Updated] " karl-nilsson
` (14 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-17 2:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New comment by karl-nilsson on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#issuecomment-862862318
Comment:
It finally works!
Testers welcom!
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (46 preceding siblings ...)
2021-06-17 2:16 ` karl-nilsson
@ 2021-06-29 16:00 ` karl-nilsson
2021-06-29 16:00 ` karl-nilsson
` (13 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-29 16:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21798 bytes --]
From 40b8a256f731a927f61eb639eddedc4f87f437b1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 4e548c0198aaf0c2998107ae26c02aa4ca3c6fac Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..d1ba63a64858
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+# code style test consistently fails, so disable it
+
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From bc13b7b9fec04932c2a329e7455899e13e1d6c24 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 71147fb623af91ad4599d63607270f538566ea49 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From fb67a4a610b4cdb8f599284f6bf3d645028bf47a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 122ae0e15e599f62d0ce4be076c1ad3663cd7bab Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 179fe27443be..cd555c17b590 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 13d286ee033d86560924aa41450db60a5f7b696a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From cddba281c4b3b5341f3b0e2ab8127dad45c3ba49 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..68204d3b096b 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (47 preceding siblings ...)
2021-06-29 16:00 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-06-29 16:00 ` karl-nilsson
2021-06-29 16:37 ` karl-nilsson
` (12 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-29 16:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21798 bytes --]
From 44303306c44927b44dc7a792febaf957b85160a3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.9.1.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..14fe2d88b624 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.9.1
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=18d939fd2428c72fdce35a286c196438327cfc3c8476e463e5ca46570168c9ce
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eafb4922311626f828442906e8f2258431f9ba10 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.9.1.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..d1ba63a64858
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+# code style test consistently fails, so disable it
+
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..4d544544dfa0 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e7c641f2241a4074887f3e3f36f13a34455096fb8631b7539521c6b6a43d83d8
post_install() {
vmkdir usr/share/uranium/cmake
From 6c89a3818276c33fea315e18ce2f9ad17af7115f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.9.1.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..cf75efc25f29 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.9.1
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=eb422ef388bee09d26bbf3bade489359bf1fd59fd04d8452ac5d6ab3ba5e3894
post_install() {
vlicense LICENSE
From 9b5494c9194071e277a94f36c14865b6d7e5c9ac Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.9.1.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..31795cf7d604 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.9.1
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=829f25cfcdcd0e9bd522f67111c049f4a49209dac6f70c9b3f010fa488882385
post_install() {
vlicense LICENSE
From 52bb0bc825eb5bb0e0e97af4ace92bc2569a8054 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.9.1.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..61ab8fa3a17e 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.9.1
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=d936107d62d260dd43de18d572511ef0287835f4aba4e0a6078580ff0f08a671
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 6f6367bd394a5ae54f7c3dc0d6e7f833210271b8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..b302d1408136 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3985,6 +3985,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 50fb4806d2583646fad9529ef37b2994baf0cab7 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 67083f26fa61ee5a9345453e58995d507e500018 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.9.1.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..68204d3b096b 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.9.1
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=087186b93e69b2393cba72d7deb1be77037ccfb34da88cc281e4ca68ef2a2639
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.9.1
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (48 preceding siblings ...)
2021-06-29 16:00 ` karl-nilsson
@ 2021-06-29 16:37 ` karl-nilsson
2021-06-29 19:58 ` [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0 karl-nilsson
` (11 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-29 16:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.9.1
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21746 bytes --]
From 8b26cd43fa626715a9620caf6aef1d5213ec0dd6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 753564f263cd8c520fbec3df70bbdb9e52643f30 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..d1ba63a64858
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+# code style test consistently fails, so disable it
+
+--- cmake/UraniumTests.cmake
++++ cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From 92aca84f0271f78f34c46bcf41602e646236558b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From e1d7496d625c4c2ac97110f5a1d4e85692bd2092 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From 051c8b6632e15357503cd3758cb6edfdc927aff1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..5754fae17a83 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 413b4da03946f2eea95d665c6bba667c74fa9d61 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..b302d1408136 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3985,6 +3985,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From dc6e30ea5a35da7794f5bfdc0473171006564482 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 4dfb85174f8ecac7bf71f9ddd609fb8c7b97550e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (49 preceding siblings ...)
2021-06-29 16:37 ` karl-nilsson
@ 2021-06-29 19:58 ` karl-nilsson
2021-07-09 22:59 ` karl-nilsson
` (10 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-06-29 19:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21794 bytes --]
From 8b26cd43fa626715a9620caf6aef1d5213ec0dd6 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From d6146cbe7ef824dfb2cf3eae289c716262a58879 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From d452fd532dd5de52857c6bb8e15dd0442fbc7992 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 196617006b6ad6ea4ca9406386359f7d6f83fb13 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From b4eeb5000b4f671c83a7fb4738924314c628411e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..5754fae17a83 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From b662f15194867311d1a2b7f5ca65120e107f273c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 8a7eef8df8c3..b302d1408136 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3985,6 +3985,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 4faacbeb6a9ea29ccd7136e154d75b8384f78506 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 04403f098ad16090ba20673ce31f4e0830299fc7 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (50 preceding siblings ...)
2021-06-29 19:58 ` [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0 karl-nilsson
@ 2021-07-09 22:59 ` karl-nilsson
2021-07-11 18:41 ` karl-nilsson
` (9 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-09 22:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21858 bytes --]
From 992dd8fdea070989577b2ad5b81aa705362a39c2 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From 6cbdd3e12598cd8a27f93fbfb8d7a77cbc603d0b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From c90d8c5222b2bb65528007f1b97a238541ab6d90 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 0c068921fa3cb97e40f37e312bed3c0083b9d1df Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From e7c0e94a3592d20c9acde13ea928c42ecebb82b4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From a3ffdfdbc610924dac96c40617368995b9233974 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index e4d075482ff8..14a3a9f7bfc9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3988,6 +3988,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 1ee9ff0b0114087d65e0f6c2ffbdcea230e5922f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 93651dbfff84bab99ad6b9465d623a1dcfc29767 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (51 preceding siblings ...)
2021-07-09 22:59 ` karl-nilsson
@ 2021-07-11 18:41 ` karl-nilsson
2021-07-12 2:12 ` karl-nilsson
` (8 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-11 18:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21858 bytes --]
From 2ebf53a70af664a80e4bedcebdad421697cd0311 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eb5f98413c2775d16c0cab5aec8e611e8597ea4c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From e0282a615b8849fc2a974f6db54389b9d305ee5e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 2f734f03a001ba9c6fec02ee6b30534a7013d24a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From d0165910dfad2edcb1d426afda524c181002f021 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From d6611919d81396a771bcfefe662ceaacf18cff16 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 9df122c0edfe..ebd8838d4ca6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3988,6 +3988,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..615bad97b0b5
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- include/libnest2d/nester.hpp
++++ include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- include/libnest2d/placers/nfpplacer.hpp
++++ include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 98728d347eea470221cff3e8a8c9b82677bcc388 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From e7a9b8a141dbe03ccd325cf04b546354eb905b0c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (52 preceding siblings ...)
2021-07-11 18:41 ` karl-nilsson
@ 2021-07-12 2:12 ` karl-nilsson
2021-07-12 2:23 ` karl-nilsson
` (7 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-12 2:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21870 bytes --]
From 2ebf53a70af664a80e4bedcebdad421697cd0311 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eb5f98413c2775d16c0cab5aec8e611e8597ea4c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From e0282a615b8849fc2a974f6db54389b9d305ee5e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 2f734f03a001ba9c6fec02ee6b30534a7013d24a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From d0165910dfad2edcb1d426afda524c181002f021 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 55037a2af50690cea621ed250af938282ff1e48d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 9df122c0edfe..ebd8838d4ca6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3988,6 +3988,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..6cc19a82c562
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- a/include/libnest2d/placers/nfpplacer.hpp
++++ b/include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 6be43220216cc88eace01d3810f2eddba136a05e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 5873b83c4f71d7f9c50195827fe75955f836553a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..bbc57d641dad
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- cmake/CuraTests.cmake
++++ cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (53 preceding siblings ...)
2021-07-12 2:12 ` karl-nilsson
@ 2021-07-12 2:23 ` karl-nilsson
2021-07-12 2:37 ` karl-nilsson
` (6 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-12 2:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21874 bytes --]
From 2ebf53a70af664a80e4bedcebdad421697cd0311 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eb5f98413c2775d16c0cab5aec8e611e8597ea4c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From e0282a615b8849fc2a974f6db54389b9d305ee5e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 2f734f03a001ba9c6fec02ee6b30534a7013d24a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From d0165910dfad2edcb1d426afda524c181002f021 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 55037a2af50690cea621ed250af938282ff1e48d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 9df122c0edfe..ebd8838d4ca6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3988,6 +3988,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..6cc19a82c562
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- a/include/libnest2d/placers/nfpplacer.hpp
++++ b/include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 6be43220216cc88eace01d3810f2eddba136a05e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.8.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..3050d3c39500
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.8.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=7ebc1cf881a8686dcbf7a382e47caecd70fbd6e1eb975ce8a4d41b53ef485ab7
From 2afcbdca718838b507fc237cc582e44ef67166e0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..b545f46c3b84
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- a/cmake/CuraTests.cmake
++++ b/cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (54 preceding siblings ...)
2021-07-12 2:23 ` karl-nilsson
@ 2021-07-12 2:37 ` karl-nilsson
2021-07-12 6:27 ` [PR REVIEW] " ericonr
` (5 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-12 2:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
[WIP] Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21876 bytes --]
From 2ebf53a70af664a80e4bedcebdad421697cd0311 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eb5f98413c2775d16c0cab5aec8e611e8597ea4c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From e0282a615b8849fc2a974f6db54389b9d305ee5e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 2f734f03a001ba9c6fec02ee6b30534a7013d24a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From d0165910dfad2edcb1d426afda524c181002f021 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 55037a2af50690cea621ed250af938282ff1e48d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
common/shlibs | 1 +
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 24 ++++
6 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/common/shlibs b/common/shlibs
index 9df122c0edfe..ebd8838d4ca6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3988,6 +3988,7 @@ libndr-samba-samba4.so samba-libs-4.13.2_1
libndr-samba4.so samba-libs-4.13.2_1
libprinter-driver-samba4.so samba-libs-4.13.3_1
libsmb-transport-samba4.so samba-libs-4.13.2_1
+libnest2d_clipper_nlopt.so.1.0 libnest2d-0.4_1
libtdb-wrap-samba4.so samba-libs-4.13.3_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..9b14d88294b6
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d/
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..6cc19a82c562
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- a/include/libnest2d/placers/nfpplacer.hpp
++++ b/include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..0ef27ccd1378
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,24 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From f64419abd5682a26ef4ea807963dc08cfa0e6f45 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.10.0
---
srcpkgs/python3-pynest2d/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..c3fa6fba9d47
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.10.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=97babd182f2bab75c0519ac79ead7ac4fc34b8a16de0569b5d2a7d2f7c3592ef
From 7a9f1a030b6ec47a5a79e13dad5b92a8c78224c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..b545f46c3b84
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- a/cmake/CuraTests.cmake
++++ b/cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (55 preceding siblings ...)
2021-07-12 2:37 ` karl-nilsson
@ 2021-07-12 6:27 ` ericonr
2021-07-12 6:27 ` ericonr
` (4 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-07-12 6:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r667655550
Comment:
Break this at ~80 columns.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (56 preceding siblings ...)
2021-07-12 6:27 ` [PR REVIEW] " ericonr
@ 2021-07-12 6:27 ` ericonr
2021-07-12 6:27 ` ericonr
` (3 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-07-12 6:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r667655134
Comment:
Nit, symlinks are usually without the trailing slash: `libnest2d`
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (57 preceding siblings ...)
2021-07-12 6:27 ` ericonr
@ 2021-07-12 6:27 ` ericonr
2021-07-12 6:27 ` ericonr
` (2 subsequent siblings)
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-07-12 6:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r667656661
Comment:
Nothing links to this library, so I think we can skip adding it here? If we can't, please don't break the samba block in half :)
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR REVIEW] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (58 preceding siblings ...)
2021-07-12 6:27 ` ericonr
@ 2021-07-12 6:27 ` ericonr
2021-07-12 16:25 ` [PR PATCH] [Updated] " karl-nilsson
2021-07-13 1:49 ` [PR PATCH] [Merged]: " ericonr
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-07-12 6:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26295#discussion_r667655643
Comment:
Same here
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Updated] Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (59 preceding siblings ...)
2021-07-12 6:27 ` ericonr
@ 2021-07-12 16:25 ` karl-nilsson
2021-07-13 1:49 ` [PR PATCH] [Merged]: " ericonr
61 siblings, 0 replies; 63+ messages in thread
From: karl-nilsson @ 2021-07-12 16:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
There is an updated pull request by karl-nilsson against master on the void-packages repository
https://github.com/karl-nilsson/void-packages cura
https://github.com/void-linux/void-packages/pull/26295
Cura: Update to 4.10.0
Still working on the new dependencies: libnest2d and pynest2d
A patch file from https://github.com/void-linux/void-packages/pull/26295.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cura-26295.patch --]
[-- Type: text/x-diff, Size: 21315 bytes --]
From 2ebf53a70af664a80e4bedcebdad421697cd0311 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:22:05 -0400
Subject: [PATCH 1/8] libArcus: update to 4.10.0.
---
srcpkgs/libArcus/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/libArcus/template b/srcpkgs/libArcus/template
index 7807b209d701..18f0be773ddf 100644
--- a/srcpkgs/libArcus/template
+++ b/srcpkgs/libArcus/template
@@ -1,8 +1,7 @@
# Template file for 'libArcus'
pkgname=libArcus
-reverts=4.8.0_1
-version=4.7.1
-revision=5
+version=4.10.0
+revision=1
build_style=cmake
configure_args="-DBUILD_EXAMPLES=OFF"
hostmakedepends="protobuf python3-sip-devel"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libArcus"
distfiles="https://github.com/Ultimaker/libArcus/archive/${version}.tar.gz"
-checksum=ba35ebecf4112ccfbe2b493c0e10e0276e85e0d449ce82cfa7590165b801facf
+checksum=04a9eb24ad5a55ffb24888c2dc83b6486d704536f457bce0e6c5523cd6cadae8
libArcus-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
From eb5f98413c2775d16c0cab5aec8e611e8597ea4c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:05:31 -0500
Subject: [PATCH 2/8] Uranium: update to 4.10.0.
Disable code style checks
---
.../Uranium/patches/disable_code_style_test.patch | 14 ++++++++++++++
srcpkgs/Uranium/template | 10 ++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 srcpkgs/Uranium/patches/disable_code_style_test.patch
diff --git a/srcpkgs/Uranium/patches/disable_code_style_test.patch b/srcpkgs/Uranium/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..1b0bca443145
--- /dev/null
+++ b/srcpkgs/Uranium/patches/disable_code_style_test.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/UraniumTests.cmake b/cmake/UraniumTests.cmake
+index 332b24c0..68a34acb 100644
+--- a/cmake/UraniumTests.cmake
++++ b/cmake/UraniumTests.cmake
+@@ -49,8 +49,3 @@ foreach(_plugin ${_plugins})
+ endif()
+ endforeach()
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+\ No newline at end of file
diff --git a/srcpkgs/Uranium/template b/srcpkgs/Uranium/template
index 35a15a395aa5..dab977f04b48 100644
--- a/srcpkgs/Uranium/template
+++ b/srcpkgs/Uranium/template
@@ -1,19 +1,21 @@
# Template file for 'Uranium'
pkgname=Uranium
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
pycompile_dirs="usr/lib/uranium/plugins"
-hostmakedepends="python3"
+hostmakedepends="python3 gettext"
depends="libArcus-python3 python3-PyQt5-opengl python3-PyQt5-quick
python3-PyQt5-svg python3-numpy-stl python3-scipy qt5-quickcontrols
qt5-quickcontrols2 python3-shapely python3-cryptography"
+checkdepends="python3-pytest python3-mypy python3-certifi
+ python3-Twisted $depends"
short_desc="Python framework for building Desktop applications"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Uranium"
distfiles="https://github.com/Ultimaker/Uranium/archive/${version}.tar.gz"
-checksum=16a72ef9e73df86016ceff37a068e3d70a111223669bfa4f86608c29fdaacc0c
+checksum=e72942b9e24ba0855f8a1184220a57e4af8a4ebcb8ced27973c18bfb1777d737
post_install() {
vmkdir usr/share/uranium/cmake
From e0282a615b8849fc2a974f6db54389b9d305ee5e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 16 Jun 2021 10:23:26 -0400
Subject: [PATCH 3/8] cura-engine: update to 4.10.0.
---
srcpkgs/cura-engine/template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/cura-engine/template b/srcpkgs/cura-engine/template
index e138e37605db..ab6052d471b9 100644
--- a/srcpkgs/cura-engine/template
+++ b/srcpkgs/cura-engine/template
@@ -1,8 +1,7 @@
# Template file for 'cura-engine'
pkgname=cura-engine
-reverts=4.8.0_1
-version=4.7.1
-revision=4
+version=4.10.0
+revision=1
wrksrc="CuraEngine-${version}"
build_style=cmake
configure_args="-DCURA_ENGINE_VERSION=${version}"
@@ -13,7 +12,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="AGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/CuraEngine"
distfiles="https://github.com/Ultimaker/CuraEngine/archive/${version}.tar.gz"
-checksum=7e1e408f269a604418f37575ba8ef5f69323bebc4dd7f3091c1c2e9b000ffcbf
+checksum=bbc931251c89f68b8670cd0e5a06b81fde99a5e440bdbfe0e7efc3a749642157
post_install() {
vlicense LICENSE
From 2f734f03a001ba9c6fec02ee6b30534a7013d24a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:40:59 -0500
Subject: [PATCH 4/8] cura-fdm-materials: update to 4.10.0.
---
srcpkgs/cura-fdm-materials/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/cura-fdm-materials/template b/srcpkgs/cura-fdm-materials/template
index 90011988e0d1..0d150b0631d3 100644
--- a/srcpkgs/cura-fdm-materials/template
+++ b/srcpkgs/cura-fdm-materials/template
@@ -1,7 +1,7 @@
# Template file for 'cura-fdm-materials'
pkgname=cura-fdm-materials
reverts="2019.08.21_1"
-version=4.7.1
+version=4.10.0
revision=1
wrksrc="fdm_materials-${version}"
build_style=cmake
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="CC0-1.0"
homepage="https://github.com/Ultimaker/fdm_materials"
distfiles="https://github.com/Ultimaker/fdm_materials/archive/${version}.tar.gz"
-checksum=f828baf9248ffcb05685980d079db906f2363958aa637255e36719d29d9922c5
+checksum=1d516b1a326db9d214125ae882e82ed6ca97881c984d5d2ed7571456082c252b
post_install() {
vlicense LICENSE
From d0165910dfad2edcb1d426afda524c181002f021 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:05 -0500
Subject: [PATCH 5/8] libSavitar: update to 4.10.0.
---
srcpkgs/libSavitar/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template
index b033f1bbe332..b513c14664ab 100644
--- a/srcpkgs/libSavitar/template
+++ b/srcpkgs/libSavitar/template
@@ -1,7 +1,7 @@
# Template file for 'libSavitar'
pkgname=libSavitar
-version=4.7.1
-revision=2
+version=4.10.0
+revision=1
build_style=cmake
hostmakedepends="python3"
makedepends="python3-sip-devel python3-devel pugixml-devel"
@@ -10,7 +10,7 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/libSavitar"
distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz"
-checksum=3287d155e20744bf09cfddb4dede72adb579c9dcc0a74e6f12ddde57f4d417b0
+checksum=299e3cb3015e46e5dc6748d3ad46bc49fafb06054b09c38c1611dd509c6ede52
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python3-sip-devel"
From 6c30f5ab887a56d14316dfa3f9c8494954b21d24 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 22:27:26 -0500
Subject: [PATCH 6/8] New package: libnest2d-0.4
---
srcpkgs/libnest2d-devel | 1 +
.../patches/allow-disallowed-areas.patch | 122 ++++++++++++++++++
srcpkgs/libnest2d/patches/fix-cmake.patch | 65 ++++++++++
srcpkgs/libnest2d/patches/soversion.patch | 21 +++
srcpkgs/libnest2d/template | 25 ++++
5 files changed, 234 insertions(+)
create mode 120000 srcpkgs/libnest2d-devel
create mode 100644 srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
create mode 100644 srcpkgs/libnest2d/patches/fix-cmake.patch
create mode 100644 srcpkgs/libnest2d/patches/soversion.patch
create mode 100644 srcpkgs/libnest2d/template
diff --git a/srcpkgs/libnest2d-devel b/srcpkgs/libnest2d-devel
new file mode 120000
index 000000000000..df358dcc31a3
--- /dev/null
+++ b/srcpkgs/libnest2d-devel
@@ -0,0 +1 @@
+libnest2d
\ No newline at end of file
diff --git a/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
new file mode 100644
index 000000000000..6cc19a82c562
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/allow-disallowed-areas.patch
@@ -0,0 +1,122 @@
+From 2e91be2679b5efa0773292d9d0a2ae72255bb271 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:13:15 +0200
+Subject: [PATCH 1/3] Allow for an item to be a disallowed area
+
+Disallowed areas have slightly different behaviour from fixed items: Other items won't get packed closely around them. Implementation of that pending.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 2f207d5..932a060 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -71,6 +71,15 @@ class _Item {
+ int binid_{BIN_ID_UNSET}, priority_{0};
+ bool fixed_{false};
+
++ /**
++ * \brief If this is a fixed area, indicates whether it is a disallowed area
++ * or a previously placed item.
++ *
++ * If this is a disallowed area, other objects will not get packed close
++ * together with this item. It only blocks other items in its area.
++ */
++ bool disallowed_{false};
++
+ public:
+
+ /// The type of the shape which was handed over as the template argument.
+@@ -129,11 +138,18 @@ class _Item {
+ sh_(sl::create<RawShape>(std::move(contour), std::move(holes))) {}
+
+ inline bool isFixed() const noexcept { return fixed_; }
++ inline bool isDisallowedArea() const noexcept { return disallowed_; }
+ inline void markAsFixedInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+ }
++ inline void markAsDisallowedAreaInBin(int binid)
++ {
++ fixed_ = binid >= 0;
++ binid_ = binid;
++ disallowed_ = true;
++ }
+
+ inline void binId(int idx) { binid_ = idx; }
+ inline int binId() const noexcept { return binid_; }
+
+From ff61049e59d3151462bca7ff2e2268c2b32731e7 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Tue, 6 Oct 2020 16:14:36 +0200
+Subject: [PATCH 2/3] Allow unsetting of being a disallowed area
+
+If you set the bin to -1 or set the item to be a simple fixed item afterwards, it'll no longer be a disallowed area.
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/nester.hpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git include/libnest2d/nester.hpp include/libnest2d/nester.hpp
+index 932a060..54761a6 100644
+--- a/include/libnest2d/nester.hpp
++++ b/include/libnest2d/nester.hpp
+@@ -143,12 +143,13 @@ class _Item {
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
++ disallowed_ = false;
+ }
+ inline void markAsDisallowedAreaInBin(int binid)
+ {
+ fixed_ = binid >= 0;
+ binid_ = binid;
+- disallowed_ = true;
++ disallowed_ = fixed_;
+ }
+
+ inline void binId(int idx) { binid_ = idx; }
+
+From 31391fd173249ad9b906390058e13b09238fadc8 Mon Sep 17 00:00:00 2001
+From: Ghostkeeper <rubend@tutanota.com>
+Date: Thu, 8 Oct 2020 11:06:58 +0200
+Subject: [PATCH 3/3] Align items to their starting position if all placed
+ items are disallowed
+
+We shouldn't align items to disallowed areas. So place them in the starting position according to the alignment property.
+
+Lot of work to investigate. But very little code changes!
+
+Contributes to issue CURA-7754.
+---
+ include/libnest2d/placers/nfpplacer.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git include/libnest2d/placers/nfpplacer.hpp include/libnest2d/placers/nfpplacer.hpp
+index 96a8cff..b0ebb15 100644
+--- a/include/libnest2d/placers/nfpplacer.hpp
++++ b/include/libnest2d/placers/nfpplacer.hpp
+@@ -101,7 +101,7 @@ struct NfpPConfig {
+ * alignment with the candidate item or do anything else.
+ *
+ * \param remaining A container with the remaining items waiting to be
+- * placed. You can use some features about the remaining items to alter to
++ * placed. You can use some features about the remaining items to alter the
+ * score of the current placement. If you know that you have to leave place
+ * for other items as well, that might influence your decision about where
+ * the current candidate should be placed. E.g. imagine three big circles
+@@ -735,7 +735,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer<RawShape, TBin
+ remlist.insert(remlist.end(), remaining.from, remaining.to);
+ }
+
+- if(items_.empty()) {
++ if(std::all_of(items_.begin(), items_.end(),
++ [](const Item& item) { return item.isDisallowedArea(); })) {
+ setInitialPosition(item);
+ best_overfit = overfit(item.transformedShape(), bin_);
+ can_pack = best_overfit <= 0;
diff --git a/srcpkgs/libnest2d/patches/fix-cmake.patch b/srcpkgs/libnest2d/patches/fix-cmake.patch
new file mode 100644
index 000000000000..4530d3235da6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/fix-cmake.patch
@@ -0,0 +1,65 @@
+From fac1e5d5da70e7fb56c520eb2d9b6a6e3282459e Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 11:29:18 +0330
+Subject: [PATCH 1/2] Fix CMake Error at CMakeLists.txt:125 (install)
+
+When using such command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no ARCHIVE DESTINATION for static library target
+ "libnest2d_clipper_nlopt".
+
+This commit fixes the error as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2f2bec..ab71296 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -124,6 +124,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
++ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
+
+From 6be371cad6ecaaf0d11b541400c3c8d77e605cd7 Mon Sep 17 00:00:00 2001
+From: Megidd <megiddgit@gmail.com>
+Date: Sun, 14 Feb 2021 13:14:31 +0330
+Subject: [PATCH 2/2] Also consider another error:
+
+When running this command:
+
+cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=./installdir -DRP_ENABLE_DOWNLOADING=ON -DBUILD_SHARED_LIBS=ON
+
+This error is thrown:
+
+CMake Error at CMakeLists.txt:125 (install):
+ install TARGETS given no LIBRARY DESTINATION for shared library target
+ "libnest2d_clipper_nlopt".
+
+This commits resolves the error, as far as tested.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab71296..1b9d4ed 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -125,6 +125,7 @@ export(EXPORT ${PROJECT_NAME}Targets
+ install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME}
+ EXPORT ${PROJECT_NAME}Targets
+ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/srcpkgs/libnest2d/patches/soversion.patch b/srcpkgs/libnest2d/patches/soversion.patch
new file mode 100644
index 000000000000..1a1c53495de6
--- /dev/null
+++ b/srcpkgs/libnest2d/patches/soversion.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <karl.robert.nilsson@gmail.com>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+ add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+ set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+ set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++ set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+ target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+ target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+ target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})
diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template
new file mode 100644
index 000000000000..bb68eac3f976
--- /dev/null
+++ b/srcpkgs/libnest2d/template
@@ -0,0 +1,25 @@
+# Template file for 'libnest2d'
+pkgname=libnest2d
+version=0.4
+revision=1
+build_style=cmake
+configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF
+ -DLIBNEST2D_BUILD_UNITTESTS=ON -DCMAKE_CXX_STANDARD=14"
+makedepends="clipper-devel nlopt-devel boost-devel catch2"
+checkdepends="catch2"
+short_desc="2D irregular bin packing and nesting library"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/tamasmeszaros/libnest2d"
+distfiles="https://github.com/tamasmeszaros/libnest2d/archive/${version}.tar.gz"
+checksum=00c909aa5690bead2be36cc57653c54c7c69d260a3c74924e9dfd79994729a2a
+
+libnest2d-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/cmake
+ vmove "usr/lib/*.so"
+ }
+}
From 4f0979860729084cd5657b15f83fc79eae68b3d3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Thu, 12 Nov 2020 11:43:25 -0500
Subject: [PATCH 7/8] New package: python3-pynest2d-4.10.0
---
srcpkgs/python3-pynest2d/template | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 srcpkgs/python3-pynest2d/template
diff --git a/srcpkgs/python3-pynest2d/template b/srcpkgs/python3-pynest2d/template
new file mode 100644
index 000000000000..e18f0b1bf0b4
--- /dev/null
+++ b/srcpkgs/python3-pynest2d/template
@@ -0,0 +1,17 @@
+# Template file for 'python3-pynest2d'
+pkgname=python3-pynest2d
+version=4.10.0
+revision=1
+wrksrc="pynest2d-${version}"
+build_style=cmake
+configure_args="-DCMAKE_CXX_STANDARD=14"
+hostmakedepends="python3-sip-devel"
+makedepends="python3-devel libnest2d-devel python3-sip-devel pkg-config
+ clipper-devel nlopt-devel boost-devel"
+depends="libnest2d"
+short_desc="Python3 bindings for libnest2d"
+maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/Ultimaker/pynest2d"
+distfiles="https://github.com/Ultimaker/pynest2d/archive/${version}.tar.gz"
+checksum=97babd182f2bab75c0519ac79ead7ac4fc34b8a16de0569b5d2a7d2f7c3592ef
From eb24696177a3f709a3c40f0a388d37d8472114da Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Wed, 11 Nov 2020 12:41:08 -0500
Subject: [PATCH 8/8] cura: update to 4.10.0.
Disable code style checks
---
.../cura/patches/disable_code_style_test.patch | 17 +++++++++++++++++
srcpkgs/cura/template | 11 ++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/cura/patches/disable_code_style_test.patch
diff --git a/srcpkgs/cura/patches/disable_code_style_test.patch b/srcpkgs/cura/patches/disable_code_style_test.patch
new file mode 100644
index 000000000000..b545f46c3b84
--- /dev/null
+++ b/srcpkgs/cura/patches/disable_code_style_test.patch
@@ -0,0 +1,17 @@
+# code style check consistently fails, so disable it
+
+--- a/cmake/CuraTests.cmake
++++ b/cmake/CuraTests.cmake
+@@ -50,12 +50,6 @@ function(cura_add_test)
+ endfunction()
+
+
+-#Add code style test.
+-add_test(
+- NAME "code-style"
+- COMMAND ${Python3_EXECUTABLE} run_mypy.py
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-)
+
+ #Add test for import statements which are not compatible with all builds
+ add_test(
diff --git a/srcpkgs/cura/template b/srcpkgs/cura/template
index de6e6cf20e19..ae3039e72abe 100644
--- a/srcpkgs/cura/template
+++ b/srcpkgs/cura/template
@@ -1,8 +1,7 @@
# Template file for 'cura'
pkgname=cura
-reverts=4.8.0_1
-version=4.7.1
-revision=3
+version=4.10.0
+revision=1
wrksrc="Cura-${version}"
build_style=cmake
configure_args="-DCURA_VERSION=${version}
@@ -11,10 +10,12 @@ pycompile_dirs="usr/lib/cura/plugins"
hostmakedepends="python3"
makedepends="Uranium libArcus-devel python3-devel"
depends="Uranium cura-engine cura-fdm-materials python3-pyserial python3-zeroconf
- python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects"
+ python3-certifi python3-trimesh libSavitar-python3 python3-requests qt5-graphicaleffects
+ python3-pynest2d python3-keyring"
+checkdepends="python3-pytest python3-mypy $depends"
short_desc="3D printer / slicing GUI"
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
license="LGPL-3.0-or-later"
homepage="https://github.com/Ultimaker/Cura"
distfiles="https://github.com/Ultimaker/Cura/archive/${version}.tar.gz"
-checksum=1c09552de062ffbe0b2715e983e82c1ac9582aaaa649abfd27c7f82ff59fcf94
+checksum=744ddda24b29df996ae5b333d3e3b36c897034a53f4214f128a2f328558a1b6a
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PR PATCH] [Merged]: Cura: Update to 4.10.0
2020-11-11 17:55 [PR PATCH] [WIP] Cura: Update to 4.8 karl-nilsson
` (60 preceding siblings ...)
2021-07-12 16:25 ` [PR PATCH] [Updated] " karl-nilsson
@ 2021-07-13 1:49 ` ericonr
61 siblings, 0 replies; 63+ messages in thread
From: ericonr @ 2021-07-13 1:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
There's a merged pull request on the void-packages repository
Cura: Update to 4.10.0
https://github.com/void-linux/void-packages/pull/26295
Description:
Still working on the new dependencies: libnest2d and pynest2d
^ permalink raw reply [flat|nested] 63+ messages in thread