public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2020-12-15 19:22 Dennis Lamm
  0 siblings, 0 replies; 12+ messages in thread
From: Dennis Lamm @ 2020-12-15 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     ddd3cc90514a49692ed8c06b4aedf87402bdd1cf
Author:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 18:03:30 2020 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 19:21:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd3cc90

media-gfx/prusaslicer: added new ebuild

Closes: https://bugs.gentoo.org/652100

Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/18668
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 media-gfx/prusaslicer/Manifest                     |  1 +
 .../prusaslicer/files/PrusaGcodeviewer.desktop     |  9 +++
 media-gfx/prusaslicer/files/PrusaSlicer.desktop    | 12 ++++
 .../files/prusaslicer-2.2.0-atomic.patch           | 10 +++
 .../files/prusaslicer-2.2.0-boost-1.73.patch       | 60 ++++++++++++++++
 media-gfx/prusaslicer/metadata.xml                 | 19 ++++++
 media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild     | 79 ++++++++++++++++++++++
 7 files changed, 190 insertions(+)

diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest
new file mode 100644
index 00000000000..ac05bb7cb7d
--- /dev/null
+++ b/media-gfx/prusaslicer/Manifest
@@ -0,0 +1 @@
+DIST prusaslicer-2.2.0.tar.gz 30811929 BLAKE2B cde004add53ee025728d566cb7331cb7b1eac5412e9ad3bee037d13277c24dcdc6024c91f09bb9ef0653a12a3ee7c5cb5cec21e2a00825d185472ea7036e08f5 SHA512 5c8dc5b581e04208a1ae53771ef2607da189ee85aadf501ce1480008f5a6ddb10bb528ddc2608d3f04acd26c583ff895ad4148d6a1397f002292e20098971e1d

diff --git a/media-gfx/prusaslicer/files/PrusaGcodeviewer.desktop b/media-gfx/prusaslicer/files/PrusaGcodeviewer.desktop
new file mode 100644
index 00000000000..4b73cc905c6
--- /dev/null
+++ b/media-gfx/prusaslicer/files/PrusaGcodeviewer.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Prusa GCode viewer
+Exec=prusa-slicer --gcodeviewer %F
+Icon=PrusaSlicer
+Terminal=false
+Type=Application
+MimeType=text/x.gcode;
+Categories=Graphics;3DGraphics;
+Keywords=3D;Printing;Slicer;

diff --git a/media-gfx/prusaslicer/files/PrusaSlicer.desktop b/media-gfx/prusaslicer/files/PrusaSlicer.desktop
new file mode 100644
index 00000000000..dae507b54ab
--- /dev/null
+++ b/media-gfx/prusaslicer/files/PrusaSlicer.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=PrusaSlicer
+GenericName=3D Printing Software
+Icon=PrusaSlicer
+Exec=prusa-slicer %F
+Terminal=false
+Type=Application
+MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
+Categories=Graphics;3DGraphics;Engineering;
+Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
+StartupNotify=false
+StartupWMClass=prusa-slicer
\ No newline at end of file

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.2.0-atomic.patch b/media-gfx/prusaslicer/files/prusaslicer-2.2.0-atomic.patch
new file mode 100644
index 00000000000..4319ad0f146
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.2.0-atomic.patch
@@ -0,0 +1,10 @@
+--- a/src/slic3r/GUI/Mouse3DController.hpp
++++ b/src/slic3r/GUI/Mouse3DController.hpp
+@@ -8,6 +8,7 @@
+
+ #include "hidapi.h"
+
++#include <atomic>
+ #include <queue>
+ #include <thread>
+ #include <vector>

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.2.0-boost-1.73.patch b/media-gfx/prusaslicer/files/prusaslicer-2.2.0-boost-1.73.patch
new file mode 100644
index 00000000000..50abea11b32
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.2.0-boost-1.73.patch
@@ -0,0 +1,60 @@
+--- a/src/admesh/stlinit.cpp
++++ b/src/admesh/stlinit.cpp
+@@ -28,7 +28,6 @@
+
+ #include <boost/log/trivial.hpp>
+ #include <boost/nowide/cstdio.hpp>
+-#include <boost/detail/endian.hpp>
+
+ #include "stl.h"
+
+@@ -36,9 +35,9 @@
+ #error "SEEK_SET not defined"
+ #endif
+
+-#ifndef BOOST_LITTLE_ENDIAN
++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+ extern void stl_internal_reverse_quads(char *buf, size_t cnt);
+-#endif /* BOOST_LITTLE_ENDIAN */
++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
+
+ static FILE* stl_open_count_facets(stl_file *stl, const char *file)
+ {
+@@ -89,10 +88,10 @@
+     	// Read the int following the header.  This should contain # of facets.
+ 	  	uint32_t header_num_facets;
+     	bool header_num_faces_read = fread(&header_num_facets, sizeof(uint32_t), 1, fp) != 0;
+-#ifndef BOOST_LITTLE_ENDIAN
++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+     	// Convert from little endian to big endian.
+     	stl_internal_reverse_quads((char*)&header_num_facets, 4);
+-#endif /* BOOST_LITTLE_ENDIAN */
++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
+     	if (! header_num_faces_read || num_facets != header_num_facets)
+ 			BOOST_LOG_TRIVIAL(info) << "stl_open_count_facets: Warning: File size doesn't match number of facets in the header: " << file;
+   	}
+@@ -158,10 +157,10 @@
+       		// Read a single facet from a binary .STL file. We assume little-endian architecture!
+       		if (fread(&facet, 1, SIZEOF_STL_FACET, fp) != SIZEOF_STL_FACET)
+       			return false;
+-#ifndef BOOST_LITTLE_ENDIAN
++#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+       		// Convert the loaded little endian data to big endian.
+       		stl_internal_reverse_quads((char*)&facet, 48);
+-#endif /* BOOST_LITTLE_ENDIAN */
++#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
+     	} else {
+ 			// Read a single facet from an ASCII .STL file
+ 			// skip solid/endsolid
+
+--- a/CMakeLists.txt	(revision 3b2c51fd5ab04a72592bfdba1cd39cd6298b66c2)
++++ b/CMakeLists.txt	(date 1607811414000)
+@@ -260,7 +260,7 @@
+ # set(Boost_COMPILER "-mgw81")
+ if(NOT WIN32)
+     # boost::process was introduced first in version 1.64.0
+-    set(MINIMUM_BOOST_VERSION "1.64.0")
++    set(MINIMUM_BOOST_VERSION "1.72.0")
+ endif()
+ set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time")
+ find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})

diff --git a/media-gfx/prusaslicer/metadata.xml b/media-gfx/prusaslicer/metadata.xml
new file mode 100644
index 00000000000..0d7a4d35349
--- /dev/null
+++ b/media-gfx/prusaslicer/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>3dprint@gentoo.org</email>
+		<name>Gentoo 3D Printer Project</name>
+	</maintainer>
+	<longdescription>
+		PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into G-code instructions for FFF printers or PNG
+		layers for mSLA 3D printers. It's compatible with any modern printer based on the RepRap toolchain, including
+		all those based on the Marlin, Prusa, Sprinter and Repetier firmware. It also works with Mach3, LinuxCNC and
+		Machinekit controllers.
+
+		PrusaSlicer is based on Slic3r by Alessandro Ranellucci and the RepRap community.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">prusa3d/PrusaSlicer</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild b/media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild
new file mode 100644
index 00000000000..24f2f870cb8
--- /dev/null
+++ b/media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit cmake desktop wxwidgets xdg-utils
+
+MY_PN="PrusaSlicer"
+
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
+HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
+SRC_URI="https://github.com/prusa3d/${MY_PN}/archive/version_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3 CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="gui test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-cpp/eigen:3
+	dev-cpp/tbb
+	>=dev-libs/boost-1.73.0[threads]
+	dev-libs/cereal
+	dev-libs/expat
+	dev-libs/miniz
+	media-libs/glew:0=
+	media-libs/qhull
+	>=media-gfx/openvdb-5.0.0
+	net-misc/curl
+	>=sci-mathematics/cgal-5.0
+	sci-libs/libigl
+	sci-libs/nlopt
+	sys-libs/zlib
+	x11-libs/wxGTK:${WX_GTK_VER}[X]
+	"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/PrusaSlicer-version_${PV}"
+PATCHES=(
+	"${FILESDIR}/${P}-atomic.patch"
+	"${FILESDIR}/${P}-boost-1.73.patch"
+)
+
+src_prepare() {
+	setup-wxwidgets
+	cmake_src_prepare
+}
+
+src_configure() {
+	CMAKE_BUILD_TYPE=Release
+
+	local mycmakeargs=(
+		-DSLIC3R_BUILD_TESTS=$(usex test)
+		-DSLIC3R_FHS=1
+		-DSLIC3R_GUI=$(usex gui)
+		-DSLIC3R_PCH=0
+	  -SLIC3R_STATIC=0
+		-DSLIC3R_WX_STABLE=1
+	)
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	doicon resources/icons/PrusaSlicer.png || die
+	domenu "${FILESDIR}/PrusaGcodeviewer.desktop" || die
+	domenu "${FILESDIR}/PrusaSlicer.desktop" || die
+}
+
+pkg_postinst() {
+	xdg_mimeinfo_database_update
+	xdg_desktop_database_update
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2021-06-14 22:11 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2021-06-14 22:11 UTC (permalink / raw
  To: gentoo-commits

commit:     d6e2f2e2e4a912779ff1c9fb72775b1789cc3364
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 14 18:44:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 14 22:11:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6e2f2e2

media-gfx/prusaslicer: fix build with GCC 11

Closes: https://bugs.gentoo.org/788196
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../prusaslicer-2.3.1-gcc11-missing-include.patch  | 24 ++++++++++++++++++++++
 media-gfx/prusaslicer/prusaslicer-2.3.1.ebuild     |  1 +
 2 files changed, 25 insertions(+)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.3.1-gcc11-missing-include.patch b/media-gfx/prusaslicer/files/prusaslicer-2.3.1-gcc11-missing-include.patch
new file mode 100644
index 00000000000..6480277bde6
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.3.1-gcc11-missing-include.patch
@@ -0,0 +1,24 @@
+https://github.com/prusa3d/PrusaSlicer/commit/62592ca
+https://bugs.gentoo.org/788196
+
+From 62592cab48cfb6a20d84041b1992aecc6a2b659c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= <hejl.lukas@gmail.com>
+Date: Sat, 1 May 2021 22:33:59 +0200
+Subject: [PATCH] Added missing include (GCC 11.1)
+
+---
+ src/libslic3r/Optimize/Optimizer.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libslic3r/Optimize/Optimizer.hpp b/src/libslic3r/Optimize/Optimizer.hpp
+index 05191eba26..8ae55c61c5 100644
+--- a/src/libslic3r/Optimize/Optimizer.hpp
++++ b/src/libslic3r/Optimize/Optimizer.hpp
+@@ -8,6 +8,7 @@
+ #include <functional>
+ #include <limits>
+ #include <cassert>
++#include <optional>
+ 
+ namespace Slic3r { namespace opt {
+ 

diff --git a/media-gfx/prusaslicer/prusaslicer-2.3.1.ebuild b/media-gfx/prusaslicer/prusaslicer-2.3.1.ebuild
index bc9455e57d3..cc29c97ae4a 100644
--- a/media-gfx/prusaslicer/prusaslicer-2.3.1.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-2.3.1.ebuild
@@ -58,6 +58,7 @@ S="${WORKDIR}/${MY_PN}-version_${PV}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.3.0-miniz-zip-header.patch"
+	"${FILESDIR}/${PN}-2.3.1-gcc11-missing-include.patch"
 )
 
 src_configure() {


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2022-02-06  0:23 Dennis Lamm
  0 siblings, 0 replies; 12+ messages in thread
From: Dennis Lamm @ 2022-02-06  0:23 UTC (permalink / raw
  To: gentoo-commits

commit:     572a3be0fb127033983cf685f80266198dab05f6
Author:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  5 23:33:46 2022 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Sun Feb  6 00:23:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=572a3be0

media-gfx/prusaslicer: drop old

Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Closes: https://github.com/gentoo/gentoo/pull/24093
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 media-gfx/prusaslicer/Manifest                     |  1 -
 .../files/prusaslicer-2.3.0-miniz-zip-header.patch |  9 --
 media-gfx/prusaslicer/prusaslicer-2.3.3-r1.ebuild  | 95 ----------------------
 3 files changed, 105 deletions(-)

diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest
index 6cda360fa54a..d7c9689e19a8 100644
--- a/media-gfx/prusaslicer/Manifest
+++ b/media-gfx/prusaslicer/Manifest
@@ -1,2 +1 @@
-DIST prusaslicer-2.3.3.tar.gz 40659538 BLAKE2B 1e1a1f7aeb34934bab03410e004a91e5ed76aaf930ff59e5b373b2e229018b6703d8da8ee7ab9085be25c5b3ce4ef39aeb38204336400867fac4a55f52c76bd4 SHA512 1f6b97e135202ad9de8f0bb212239ce2497de4205ea32f860b483473fb1f1783451d539a67cd97ef31f512a797b29c1067a1eff4134ea4a29b6218e5757657e2
 DIST prusaslicer-2.4.0.tar.gz 46397442 BLAKE2B 686232fddd3e2105db1325ab085b49f6f7a028a24ab90120daf94c53255f09b19411e0ff075bfe7abff138d3c276e8b5341ff6d59e267087bcd4568ac1113c47 SHA512 e923e4e6273dbcfc3e2bc0e28f9eb8cda8530747c0a834f48aea715d75ba1d02be9cfee043689efccdaee40de00114f7964e43accad245b9acd801b997868e3c

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.3.0-miniz-zip-header.patch b/media-gfx/prusaslicer/files/prusaslicer-2.3.0-miniz-zip-header.patch
deleted file mode 100644
index 8fd587d3d481..000000000000
--- a/media-gfx/prusaslicer/files/prusaslicer-2.3.0-miniz-zip-header.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-https://bugs.gentoo.org/761541
---- a/src/libslic3r/miniz_extension.hpp	2021-01-11 08:01:51.000000000 -0500
-+++ b/src/libslic3r/miniz_extension.hpp	2021-01-12 01:16:10.503404521 -0500
-@@ -4,4 +4,5 @@
- #include <string>
- #include <miniz.h>
-+#include <miniz_zip.h>
- 
- namespace Slic3r {

diff --git a/media-gfx/prusaslicer/prusaslicer-2.3.3-r1.ebuild b/media-gfx/prusaslicer/prusaslicer-2.3.3-r1.ebuild
deleted file mode 100644
index 8504f9ddf60e..000000000000
--- a/media-gfx/prusaslicer/prusaslicer-2.3.3-r1.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-WX_GTK_VER="3.0-gtk3"
-
-inherit xdg cmake desktop wxwidgets
-
-MY_PN="PrusaSlicer"
-
-DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
-HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
-SRC_URI="https://github.com/prusa3d/${MY_PN}/archive/version_${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="gui test"
-
-# tests fail to link with USE=-gui, bug #760096
-REQUIRED_USE="test? ( gui )"
-RESTRICT="!test? ( test )"
-
-# Please check if works with newer TBB on next release, bug #820785
-RDEPEND="
-	dev-cpp/eigen:3
-	<dev-cpp/tbb-2021.4.0:=
-	>=dev-libs/boost-1.73.0:=[nls,threads(+)]
-	dev-libs/cereal
-	dev-libs/expat
-	dev-libs/gmp:=
-	>=dev-libs/miniz-2.1.0-r2
-	dev-libs/mpfr:=
-	>=media-gfx/openvdb-5.0.0
-	media-libs/ilmbase:=
-	media-libs/libpng:0=
-	media-libs/qhull:=
-	sci-libs/libigl
-	sci-libs/nlopt
-	>=sci-mathematics/cgal-5.0:=
-	sys-apps/dbus
-	sys-libs/zlib:=
-	gui? (
-		dev-libs/glib:2
-		media-libs/glew:0=
-		net-misc/curl
-		virtual/glu
-		virtual/opengl
-		x11-libs/gtk+:3
-		x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
-	)
-"
-DEPEND="${RDEPEND}
-	media-libs/qhull[static-libs]
-"
-
-S="${WORKDIR}/${MY_PN}-version_${PV}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.3.0-miniz-zip-header.patch"
-)
-
-src_prepare() {
-	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	CMAKE_BUILD_TYPE="Release"
-
-	use gui && setup-wxwidgets
-
-	local mycmakeargs=(
-		-DSLIC3R_BUILD_TESTS=$(usex test)
-		-DSLIC3R_FHS=ON
-		-DSLIC3R_GTK=3
-		-DSLIC3R_GUI=$(usex gui)
-		-DSLIC3R_PCH=OFF
-		-DSLIC3R_WX_STABLE=ON
-		-Wno-dev
-	)
-
-	cmake_src_configure
-}
-
-src_install() {
-	cmake_src_install
-
-	if use gui; then
-		newicon -s 128 resources/icons/PrusaSlicer_128px.png PrusaSlicer.png
-		newicon -s 128 resources/icons/PrusaSlicer-gcodeviewer_128px.png PrusaSlicer-gcodeviewer.png
-		domenu src/platform/unix/Prusa{Slicer,Gcodeviewer}.desktop
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2022-02-15 19:51 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2022-02-15 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     dff8e7cbc3fb7966f14fd783be2cb9bab3dc651a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 20:34:43 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 15 19:50:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dff8e7cb

media-gfx/prusaslicer: support OpenEXR 3 / imath

Bug: https://bugs.gentoo.org/833158
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/prusaslicer-2.4.0-openexr-3.patch        | 76 +++++++++++++++++++++
 media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild  | 78 ++++++++++++++++++++++
 2 files changed, 154 insertions(+)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.4.0-openexr-3.patch b/media-gfx/prusaslicer/files/prusaslicer-2.4.0-openexr-3.patch
new file mode 100644
index 000000000000..cf22b66c7d69
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.4.0-openexr-3.patch
@@ -0,0 +1,76 @@
+https://src.fedoraproject.org/rpms/prusa-slicer/raw/rawhide/f/prusa-slicer-openexr3.patch
+--- a/cmake/modules/FindOpenVDB.cmake
++++ b/cmake/modules/FindOpenVDB.cmake
+@@ -326,28 +326,10 @@ macro(just_fail msg)
+   return()
+ endmacro()
+ 
+-find_package(IlmBase QUIET COMPONENTS Half)
+-if(NOT IlmBase_FOUND)
+-  pkg_check_modules(IlmBase QUIET IlmBase)
+-endif()
+-if (IlmBase_FOUND AND NOT TARGET IlmBase::Half)
+-  message(STATUS "Falling back to IlmBase found by pkg-config...")
+-
+-  find_library(IlmHalf_LIBRARY NAMES Half)
+-  if(IlmHalf_LIBRARY-NOTFOUND OR NOT IlmBase_INCLUDE_DIRS)
+-    just_fail("IlmBase::Half can not be found!")
+-  endif()
+-  
+-  add_library(IlmBase::Half UNKNOWN IMPORTED)
+-  set_target_properties(IlmBase::Half PROPERTIES
+-    IMPORTED_LOCATION "${IlmHalf_LIBRARY}"
+-    INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
+-elseif(NOT IlmBase_FOUND)
+-  just_fail("IlmBase::Half can not be found!")
+-endif()
+ find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
+ find_package(ZLIB ${_quiet} ${_required})
+ find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
++find_package(Imath CONFIG)
+ 
+ # Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
+ # which we can query for optional deps. This basically runs ldd/otoll/objdump
+@@ -398,7 +380,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
+     set(OpenVDB_USES_LOG4CPLUS ON)
+   endif()
+ 
+-  string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
++  string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP)
+   if(NOT ${_HAS_DEP} EQUAL -1)
+     set(OpenVDB_USES_ILM ON)
+   endif()
+@@ -429,11 +411,7 @@ if(OpenVDB_USES_LOG4CPLUS)
+   find_package(Log4cplus ${_quiet} ${_required})
+ endif()
+ 
+-if(OpenVDB_USES_ILM)
+-  find_package(IlmBase ${_quiet} ${_required})
+-endif()
+-
+-if(OpenVDB_USES_EXR)
++if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
+   find_package(OpenEXR ${_quiet} ${_required})
+ endif()
+ 
+@@ -450,7 +428,7 @@ endif()
+ set(_OPENVDB_VISIBLE_DEPENDENCIES
+   Boost::iostreams
+   Boost::system
+-  IlmBase::Half
++  Imath::Imath
+ )
+ 
+ set(_OPENVDB_DEFINITIONS)
+@@ -460,10 +438,7 @@ endif()
+ 
+ if(OpenVDB_USES_EXR)
+   list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
+-    IlmBase::IlmThread
+-    IlmBase::Iex
+-    IlmBase::Imath
+-    OpenEXR::IlmImf
++    OpenEXR::OpenEXR
+   )
+   list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
+ endif()

diff --git a/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild
new file mode 100644
index 000000000000..c6e7e07d2d27
--- /dev/null
+++ b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.0-gtk3"
+
+inherit cmake desktop wxwidgets xdg
+
+MY_PN="PrusaSlicer"
+
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
+HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
+SRC_URI="https://github.com/prusa3d/${MY_PN}/archive/version_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-cpp/eigen:3
+	>=dev-cpp/tbb-2021.4.0:=
+	>=dev-libs/boost-1.73.0:=[nls,threads(+)]
+	dev-libs/cereal
+	dev-libs/expat
+	dev-libs/glib:2
+	dev-libs/gmp:=
+	dev-libs/mpfr:=
+	dev-libs/imath:=
+	>=media-gfx/openvdb-8.2:=
+	net-misc/curl
+	media-libs/glew:0=
+	media-libs/libpng:0=
+	media-libs/qhull:=
+	sci-libs/libigl
+	sci-libs/nlopt
+	>=sci-mathematics/cgal-5.0:=
+	sys-apps/dbus
+	sys-libs/zlib:=
+	virtual/glu
+	virtual/opengl
+	x11-libs/gtk+:3
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+"
+DEPEND="${RDEPEND}
+	media-libs/qhull[static-libs]
+"
+
+S="${WORKDIR}/${MY_PN}-version_${PV}"
+
+src_prepare() {
+	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
+	cmake_src_prepare
+}
+
+src_configure() {
+	CMAKE_BUILD_TYPE="Release"
+
+	setup-wxwidgets
+
+	local mycmakeargs=(
+		-DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
+
+		-DSLIC3R_BUILD_TESTS=$(usex test)
+		-DSLIC3R_FHS=ON
+		-DSLIC3R_GTK=3
+		-DSLIC3R_GUI=ON
+		-DSLIC3R_PCH=OFF
+		-DSLIC3R_STATIC=OFF
+		-DSLIC3R_WX_STABLE=ON
+		-Wno-dev
+	)
+
+	cmake_src_configure
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2022-02-24 22:27 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2022-02-24 22:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c2e007c630acea68b4be35af63ebc1accb33b210
Author:     Christophe Lermytte <gentoo <AT> lermytte <DOT> be>
AuthorDate: Thu Feb 24 22:10:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 24 22:26:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2e007c6

media-gfx/prusaslicer: fix build with cereal-1.3.1

Upstream patch on master branch, should make it in the new release.

Signed-off-by: Christophe Lermytte <gentoo <AT> lermytte.be>
Closes: https://bugs.gentoo.org/834005
Closes: https://github.com/gentoo/gentoo/pull/24341
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/2.4.0-fix-build-with-cereal-1.3.1.patch  | 47 ++++++++++++++++++++++
 media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild  |  4 ++
 2 files changed, 51 insertions(+)

diff --git a/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch b/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch
new file mode 100644
index 000000000000..d57eb8a31728
--- /dev/null
+++ b/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch
@@ -0,0 +1,47 @@
+https://bugs.gentoo.org/834005
+https://github.com/prusa3d/PrusaSlicer/commit/0ffcfd8393457fd035576436752267c9a1e6bbcc
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -506,6 +506,9 @@ endif ()
+ 
+ # Find the Cereal serialization library
+ find_package(cereal REQUIRED)
++if (NOT TARGET cereal::cereal)
++    add_library(cereal::cereal ALIAS cereal)
++endif ()
+ 
+ # l10n
+ set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE)
+     set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
+ endif ()
+ 
+-target_link_libraries(PrusaSlicer libslic3r cereal)
++target_link_libraries(PrusaSlicer libslic3r cereal::cereal)
+ if (APPLE)
+ #    add_compile_options(-stdlib=libc++)
+ #    add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
+--- a/src/libslic3r/CMakeLists.txt
++++ b/src/libslic3r/CMakeLists.txt
+@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED)
+ target_link_libraries(libslic3r
+     libnest2d
+     admesh
+-    cereal
++    cereal::cereal
+     libigl
+     miniz
+     boost_libs
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -270,7 +270,7 @@ endforeach()
+ 
+ encoding_check(libslic3r_gui)
+ 
+-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
++target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
+ 
+ if (MSVC)
+     target_link_libraries(libslic3r_gui Setupapi.lib)

diff --git a/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild
index c6e7e07d2d27..e3318ba01834 100644
--- a/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild
@@ -49,6 +49,10 @@ DEPEND="${RDEPEND}
 	media-libs/qhull[static-libs]
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PV}-fix-build-with-cereal-1.3.1.patch
+)
+
 S="${WORKDIR}/${MY_PN}-version_${PV}"
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2022-12-27 20:12 Piotr Karbowski
  0 siblings, 0 replies; 12+ messages in thread
From: Piotr Karbowski @ 2022-12-27 20:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6a714bb602a25290d2aedf74eb1232fb9efd5979
Author:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 20:11:19 2022 +0000
Commit:     Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 20:12:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a714bb6

media-gfx/prusaslicer: fix building with boost-1.81.

Patch contributed by Bradley Jarvis.

Closes: https://bugs.gentoo.org/887055
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>

 ....0_boost-1.81-std-wxString-to-std-wstring.patch | 40 ++++++++++
 media-gfx/prusaslicer/prusaslicer-2.5.0-r1.ebuild  | 88 ++++++++++++++++++++++
 2 files changed, 128 insertions(+)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.5.0_boost-1.81-std-wxString-to-std-wstring.patch b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_boost-1.81-std-wxString-to-std-wstring.patch
new file mode 100644
index 000000000000..1cb0d9f1afff
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_boost-1.81-std-wxString-to-std-wstring.patch
@@ -0,0 +1,40 @@
+--- a/src/slic3r/GUI/PrintHostDialogs.cpp	2022-12-21 10:21:43.583075853 +1100
++++ b/src/slic3r/GUI/PrintHostDialogs.cpp	2022-12-21 10:23:03.902694287 +1100
+@@ -79,8 +79,8 @@ PrintHostSendDialog::PrintHostSendDialog
+     if (size_t extension_start = recent_path.find_last_of('.'); extension_start != std::string::npos)
+         m_valid_suffix = recent_path.substr(extension_start);
+     // .gcode suffix control
+-    auto validate_path = [this](const wxString &path) -> bool {
+-        if (! path.Lower().EndsWith(m_valid_suffix.Lower())) {
++    auto validate_path = [this](const std::wstring &path) -> bool {
++        if (! wxString(path).Lower().EndsWith(m_valid_suffix.Lower())) {
+             MessageDialog msg_wingow(this, wxString::Format(_L("Upload filename doesn't end with \"%s\". Do you wish to continue?"), m_valid_suffix), wxString(SLIC3R_APP_NAME), wxYES | wxNO);
+             if (msg_wingow.ShowModal() == wxID_NO)
+                 return false;
+@@ -90,7 +90,7 @@ PrintHostSendDialog::PrintHostSendDialog
+ 
+     auto* btn_ok = add_button(wxID_OK, true, _L("Upload"));
+     btn_ok->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+-        if (validate_path(txt_filename->GetValue())) {
++        if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+             post_upload_action = PrintHostPostUploadAction::None;
+             EndDialog(wxID_OK);
+         }
+@@ -100,7 +100,7 @@ PrintHostSendDialog::PrintHostSendDialog
+     if (post_actions.has(PrintHostPostUploadAction::StartPrint)) {
+         auto* btn_print = add_button(wxID_YES, false, _L("Upload and Print"));
+         btn_print->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+-            if (validate_path(txt_filename->GetValue())) {
++            if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+                 post_upload_action = PrintHostPostUploadAction::StartPrint;
+                 EndDialog(wxID_OK);
+             }
+@@ -111,7 +111,7 @@ PrintHostSendDialog::PrintHostSendDialog
+         // Using wxID_MORE as a button identifier to be different from the other buttons, wxID_MORE has no other meaning here.
+         auto* btn_simulate = add_button(wxID_MORE, false, _L("Upload and Simulate"));
+         btn_simulate->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+-            if (validate_path(txt_filename->GetValue())) {
++            if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+                 post_upload_action = PrintHostPostUploadAction::StartSimulation;
+                 EndDialog(wxID_OK);
+             }        

diff --git a/media-gfx/prusaslicer/prusaslicer-2.5.0-r1.ebuild b/media-gfx/prusaslicer/prusaslicer-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..2e02b49090b4
--- /dev/null
+++ b/media-gfx/prusaslicer/prusaslicer-2.5.0-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.0-gtk3"
+MY_PN="PrusaSlicer"
+MY_PV="$(ver_rs 3 -)"
+
+inherit cmake wxwidgets xdg
+
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
+HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
+SRC_URI="https://github.com/prusa3d/PrusaSlicer/archive/refs/tags/version_${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RESTRICT="test"
+
+RDEPEND="
+	dev-cpp/eigen:3
+	dev-cpp/tbb:=
+	dev-libs/boost:=[nls]
+	dev-libs/cereal
+	dev-libs/expat
+	dev-libs/glib:2
+	dev-libs/gmp:=
+	dev-libs/mpfr:=
+	>=media-gfx/openvdb-8.2:=
+	net-misc/curl[adns]
+	media-libs/glew:0=
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:0=
+	media-libs/qhull:=
+	sci-libs/libigl
+	sci-libs/nlopt
+	=sci-libs/opencascade-7.6*:=
+	>=sci-mathematics/cgal-5.0:=
+	sys-apps/dbus
+	sys-libs/zlib:=
+	virtual/opengl
+	x11-libs/gtk+:3
+	x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+"
+DEPEND="${RDEPEND}
+	media-libs/qhull[static-libs]
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.5.0_alpha2-boost-fixes.patch"
+	"${FILESDIR}/${PN}-2.5.0_rc1-cereal-1.3.1.patch"
+	"${FILESDIR}/${PN}-2.5.0_rc1-fix-tests.patch"
+	"${FILESDIR}/${PN}-2.5.0_boost-1.81-std-wxString-to-std-wstring.patch"
+)
+
+S="${WORKDIR}/${MY_PN}-version_${MY_PV}"
+
+src_prepare() {
+	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
+
+	sed -i -e 's/find_package(OpenCASCADE 7.6.2 REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
+		src/occt_wrapper/CMakeLists.txt || die
+	cmake_src_prepare
+}
+
+src_configure() {
+	CMAKE_BUILD_TYPE="Release"
+
+	setup-wxwidgets
+
+	local mycmakeargs=(
+		-DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
+
+		-DSLIC3R_BUILD_TESTS=$(usex test)
+		-DSLIC3R_FHS=ON
+		-DSLIC3R_GTK=3
+		-DSLIC3R_GUI=ON
+		-DSLIC3R_PCH=OFF
+		-DSLIC3R_STATIC=OFF
+		-DSLIC3R_WX_STABLE=ON
+		-Wno-dev
+	)
+
+	cmake_src_configure
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2023-04-22 11:03 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2023-04-22 11:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ca86126321ec717b0bc04009904515dbc447e4e4
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 10:59:42 2023 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 11:03:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca861263

media-gfx/prusaslicer: fixed crash during slicing

thanks to Caleb Jorden for the fix

Bug: https://bugs.gentoo.org/900340
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../files/prusaslicer-2.5.2-fix-slicing.patch      | 76 ++++++++++++++++++++++
 ...er-2.5.2.ebuild => prusaslicer-2.5.2-r1.ebuild} |  1 +
 2 files changed, 77 insertions(+)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.5.2-fix-slicing.patch b/media-gfx/prusaslicer/files/prusaslicer-2.5.2-fix-slicing.patch
new file mode 100644
index 000000000000..ae85057f10bd
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.5.2-fix-slicing.patch
@@ -0,0 +1,76 @@
+diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
+index f8fc2e5a7..c74ee32dd 100644
+--- a/src/libslic3r/GCode.cpp
++++ b/src/libslic3r/GCode.cpp
+@@ -1551,27 +1551,27 @@ void GCode::process_layers(
+             }
+         });
+     const auto spiral_vase = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order,
+-        [&spiral_vase = *this->m_spiral_vase](LayerResult in) -> LayerResult {
++        [spiral_vase = this->m_spiral_vase.get()](LayerResult in) -> LayerResult {
+             if (in.nop_layer_result)
+                 return in;
+ 
+-            spiral_vase.enable(in.spiral_vase_enable);
+-            return { spiral_vase.process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush};
++            spiral_vase->enable(in.spiral_vase_enable);
++            return { spiral_vase->process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush};
+         });
+     const auto pressure_equalizer = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order,
+-        [&pressure_equalizer = *this->m_pressure_equalizer](LayerResult in) -> LayerResult {
+-            return pressure_equalizer.process_layer(std::move(in));
++        [pressure_equalizer = this->m_pressure_equalizer.get()](LayerResult in) -> LayerResult {
++            return pressure_equalizer->process_layer(std::move(in));
+         });
+     const auto cooling = tbb::make_filter<LayerResult, std::string>(slic3r_tbb_filtermode::serial_in_order,
+-        [&cooling_buffer = *this->m_cooling_buffer](LayerResult in) -> std::string {
++        [cooling_buffer = this->m_cooling_buffer.get()](LayerResult in) -> std::string {
+              if (in.nop_layer_result)
+                 return in.gcode;
+ 
+-             return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
++             return cooling_buffer->process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
+         });
+     const auto find_replace = tbb::make_filter<std::string, std::string>(slic3r_tbb_filtermode::serial_in_order,
+-        [&self = *this->m_find_replace](std::string s) -> std::string {
+-            return self.process_layer(std::move(s));
++        [find_replace = this->m_find_replace.get()](std::string s) -> std::string {
++            return find_replace->process_layer(std::move(s));
+         });
+     const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order,
+         [&output_stream](std::string s) { output_stream.write(s); }
+@@ -1633,25 +1633,25 @@ void GCode::process_layers(
+             }
+         });
+     const auto spiral_vase = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order,
+-        [&spiral_vase = *this->m_spiral_vase](LayerResult in)->LayerResult {
++        [spiral_vase = this->m_spiral_vase.get()](LayerResult in)->LayerResult {
+             if (in.nop_layer_result)
+                 return in;
+-            spiral_vase.enable(in.spiral_vase_enable);
+-            return { spiral_vase.process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush };
++            spiral_vase->enable(in.spiral_vase_enable);
++            return { spiral_vase->process_layer(std::move(in.gcode)), in.layer_id, in.spiral_vase_enable, in.cooling_buffer_flush };
+         });
+     const auto pressure_equalizer = tbb::make_filter<LayerResult, LayerResult>(slic3r_tbb_filtermode::serial_in_order,
+-        [&pressure_equalizer = *this->m_pressure_equalizer](LayerResult in) -> LayerResult {
+-             return pressure_equalizer.process_layer(std::move(in));
++        [pressure_equalizer = this->m_pressure_equalizer.get()](LayerResult in) -> LayerResult {
++             return pressure_equalizer->process_layer(std::move(in));
+         });
+     const auto cooling = tbb::make_filter<LayerResult, std::string>(slic3r_tbb_filtermode::serial_in_order,
+-        [&cooling_buffer = *this->m_cooling_buffer](LayerResult in)->std::string {
++        [cooling_buffer = this->m_cooling_buffer.get()](LayerResult in)->std::string {
+             if (in.nop_layer_result)
+                 return in.gcode;
+-            return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
++            return cooling_buffer->process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
+         });
+     const auto find_replace = tbb::make_filter<std::string, std::string>(slic3r_tbb_filtermode::serial_in_order,
+-        [&self = *this->m_find_replace](std::string s) -> std::string {
+-            return self.process_layer(std::move(s));
++        [find_replace = this->m_find_replace.get()](std::string s) -> std::string {
++            return find_replace->process_layer(std::move(s));
+         });
+     const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order,
+         [&output_stream](std::string s) { output_stream.write(s); }

diff --git a/media-gfx/prusaslicer/prusaslicer-2.5.2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.5.2-r1.ebuild
similarity index 97%
rename from media-gfx/prusaslicer/prusaslicer-2.5.2.ebuild
rename to media-gfx/prusaslicer/prusaslicer-2.5.2-r1.ebuild
index 09476833706a..e0a2d4fd7cfd 100644
--- a/media-gfx/prusaslicer/prusaslicer-2.5.2.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-2.5.2-r1.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.5.0_rc1-cereal-1.3.1.patch"
 	"${FILESDIR}/${PN}-2.5.0_rc1-fix-tests.patch"
 	"${FILESDIR}/${PN}-2.5.0_boost-1.81-std-wxString-to-std-wstring.patch"
+	"${FILESDIR}/${PN}-2.5.2-fix-slicing.patch"
 )
 
 S="${WORKDIR}/${MY_PN}-version_${MY_PV}"


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2024-05-22 10:35 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2024-05-22 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     3dc903a2ced6a6344ebb4083f8b3b168eb3b9033
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Wed May 22 10:34:27 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed May 22 10:34:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dc903a2

media-gfx/prusaslicer: dropped obsolete 2.6.1 & 2.7.1

Bug: https://bugs.gentoo.org/932283
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-gfx/prusaslicer/Manifest                     |  2 -
 .../prusaslicer-2.6.0-disable-noisy-asserts.patch  | 12 ---
 media-gfx/prusaslicer/prusaslicer-2.6.1.ebuild     | 92 ----------------------
 media-gfx/prusaslicer/prusaslicer-2.7.1.ebuild     | 92 ----------------------
 4 files changed, 198 deletions(-)

diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest
index de04fd64840a..ff8ebdecd89c 100644
--- a/media-gfx/prusaslicer/Manifest
+++ b/media-gfx/prusaslicer/Manifest
@@ -1,3 +1 @@
-DIST prusaslicer-2.6.1.tar.gz 58479800 BLAKE2B d5bfe09a76c5e1e5d3f5fae350db27db61e1f90465db42b5573314c58d77c89d3c04e67b45c449374570b7c1a0ee13bf7984b011f751a71e3b1414759cc921e9 SHA512 2b04eeff4feca2afd560b2fb6a5bbdaae6cabed2180d1416f2e4c7c385a50f859ec334c864a737b7c09eb3fd88f80af68655a0ef25ce9216b16549b16b3020b0
-DIST prusaslicer-2.7.1.tar.gz 64975776 BLAKE2B 7683e2c97458da6b6f2b0e826f538d556f011e4580246277a926df55a71c5a4668089235b8b13379646e1730d301c446cd5d9116e236986cb29bb322390ba94f SHA512 20037164b8a8853e2f30a5ed613e0da1d02d6fa581c21ef67a51e90af3c33a98eb75e0b3a203adfb8ed7bc67f32de7ea598f3f0ab9c68341738db0c1c1974b3d
 DIST prusaslicer-2.7.4.tar.gz 65396083 BLAKE2B 658c9c623e9b25ba2590f3b816987776050b25849dab2b52500ed1673434f016007b6f40944afe412df4a517351785db15de8c8b8e633d7765d656e35014aa69 SHA512 fa876160ec641ecaed20339d66c01971ca1ad73fdfba3b19bae4169e81020175aa5b99a8a7f4f01bf15d112b817cde8226c01bb4bdfb077f387a2d27f92e5d6b

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.6.0-disable-noisy-asserts.patch b/media-gfx/prusaslicer/files/prusaslicer-2.6.0-disable-noisy-asserts.patch
deleted file mode 100644
index d7c5f25a1651..000000000000
--- a/media-gfx/prusaslicer/files/prusaslicer-2.6.0-disable-noisy-asserts.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/src/slic3r/GUI/GUI_App.cpp
-+++ b/src/slic3r/GUI/GUI_App.cpp
-@@ -1128,6 +1128,9 @@ bool GUI_App::OnInit()
- 
- bool GUI_App::on_init_inner()
- {
-+    // Disable the wxWidgets asserts breakpoints, end users have no use for them.
-+    wxSizerFlags::DisableConsistencyChecks();
-+
-     // Set initialization of image handlers before any UI actions - See GH issue #7469
-     wxInitAllImageHandlers();
- 

diff --git a/media-gfx/prusaslicer/prusaslicer-2.6.1.ebuild b/media-gfx/prusaslicer/prusaslicer-2.6.1.ebuild
deleted file mode 100644
index 89862b5ef9ad..000000000000
--- a/media-gfx/prusaslicer/prusaslicer-2.6.1.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-WX_GTK_VER="3.2-gtk3"
-MY_PN="PrusaSlicer"
-MY_PV="$(ver_rs 3 -)"
-
-inherit cmake wxwidgets xdg
-
-DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
-HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
-SRC_URI="https://github.com/prusa3d/PrusaSlicer/archive/refs/tags/version_${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-S="${WORKDIR}/${MY_PN}-version_${MY_PV}"
-
-LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~x86"
-IUSE="test"
-
-RESTRICT="test"
-
-RDEPEND="
-	dev-cpp/eigen:3
-	dev-cpp/tbb:=
-	dev-libs/boost:=[nls]
-	dev-libs/cereal
-	dev-libs/expat
-	dev-libs/glib:2
-	dev-libs/gmp:=
-	dev-libs/mpfr:=
-	media-gfx/openvdb:=
-	net-misc/curl[adns]
-	media-libs/glew:0=
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:0=
-	media-libs/qhull:=
-	sci-libs/libigl
-	sci-libs/nlopt
-	sci-libs/opencascade:=
-	sci-mathematics/cgal:=
-	sys-apps/dbus
-	sys-libs/zlib:=
-	virtual/opengl
-	x11-libs/gtk+:3
-	>=x11-libs/wxGTK-3.2.2.1-r3:${WX_GTK_VER}[X,opengl]
-	media-libs/nanosvg:=
-"
-DEPEND="${RDEPEND}
-	media-libs/qhull[static-libs]
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.6.0-libexpat-double-definition-fix.patch"
-	"${FILESDIR}/${PN}-2.6.0-disable-noisy-asserts.patch"
-	"${FILESDIR}/${PN}-2.6.0-dont-force-link-to-wayland-and-x11.patch"
-)
-
-src_prepare() {
-	if has_version ">=sci-libs/opencascade-7.8.0"; then
-		eapply "${FILESDIR}/prusaslicer-2.7.2-opencascade-7.8.0.patch"
-	fi
-
-	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
-
-	sed -i -e 's/find_package(OpenCASCADE 7.6.2 REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
-		src/occt_wrapper/CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	CMAKE_BUILD_TYPE="Release"
-
-	setup-wxwidgets
-
-	local mycmakeargs=(
-		-DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
-
-		-DSLIC3R_BUILD_TESTS=$(usex test)
-		-DSLIC3R_FHS=ON
-		-DSLIC3R_GTK=3
-		-DSLIC3R_GUI=ON
-		-DSLIC3R_PCH=OFF
-		-DSLIC3R_STATIC=OFF
-		-DSLIC3R_WX_STABLE=ON
-		-Wno-dev
-	)
-
-	cmake_src_configure
-}

diff --git a/media-gfx/prusaslicer/prusaslicer-2.7.1.ebuild b/media-gfx/prusaslicer/prusaslicer-2.7.1.ebuild
deleted file mode 100644
index 4784511aea1f..000000000000
--- a/media-gfx/prusaslicer/prusaslicer-2.7.1.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-WX_GTK_VER="3.2-gtk3"
-MY_PN="PrusaSlicer"
-MY_PV="$(ver_rs 3 -)"
-
-inherit cmake wxwidgets xdg
-
-DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
-HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
-SRC_URI="https://github.com/prusa3d/PrusaSlicer/archive/refs/tags/version_${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-S="${WORKDIR}/${MY_PN}-version_${MY_PV}"
-
-LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~x86"
-IUSE="test"
-
-RESTRICT="test"
-
-RDEPEND="
-	dev-cpp/eigen:3
-	dev-cpp/tbb:=
-	dev-libs/boost:=[nls]
-	dev-libs/cereal
-	dev-libs/expat
-	dev-libs/glib:2
-	dev-libs/gmp:=
-	dev-libs/mpfr:=
-	media-gfx/openvdb:=
-	media-gfx/libbgcode
-	net-misc/curl[adns]
-	media-libs/glew:0=
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:0=
-	media-libs/qhull:=
-	sci-libs/libigl
-	sci-libs/nlopt
-	sci-libs/opencascade:=
-	sci-mathematics/cgal:=
-	sys-apps/dbus
-	sys-libs/zlib:=
-	virtual/opengl
-	x11-libs/gtk+:3
-	>=x11-libs/wxGTK-3.2.2.1-r3:${WX_GTK_VER}[X,opengl]
-	media-libs/nanosvg:=
-"
-DEPEND="${RDEPEND}
-	media-libs/qhull[static-libs]
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.6.0-libexpat-double-definition-fix.patch"
-	"${FILESDIR}/${PN}-2.6.0-dont-force-link-to-wayland-and-x11.patch"
-)
-
-src_prepare() {
-	if has_version ">=sci-libs/opencascade-7.8.0"; then
-		eapply "${FILESDIR}/prusaslicer-2.7.2-opencascade-7.8.0.patch"
-	fi
-
-	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
-
-	sed -i -e 's/find_package(OpenCASCADE 7.6.2 REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
-		src/occt_wrapper/CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	CMAKE_BUILD_TYPE="Release"
-
-	setup-wxwidgets
-
-	local mycmakeargs=(
-		-DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
-
-		-DSLIC3R_BUILD_TESTS=$(usex test)
-		-DSLIC3R_FHS=ON
-		-DSLIC3R_GTK=3
-		-DSLIC3R_GUI=ON
-		-DSLIC3R_PCH=OFF
-		-DSLIC3R_STATIC=OFF
-		-DSLIC3R_WX_STABLE=ON
-		-Wno-dev
-	)
-
-	cmake_src_configure
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2024-06-22  9:17 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2024-06-22  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     641229ac59f451844879fbd6fc1b14f8555ac7d0
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 09:16:45 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Jun 22 09:16:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=641229ac

media-gfx/prusaslicer: added another missing include

Bug: https://bugs.gentoo.org/934358
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 ...-include.patch => prusaslicer-2.8.0-missing-includes.patch} | 10 ++++++++++
 media-gfx/prusaslicer/prusaslicer-9999.ebuild                  |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-include.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch
similarity index 54%
rename from media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-include.patch
rename to media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch
index 4d71ef87357f..997ad9ab8a0f 100644
--- a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-include.patch
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch
@@ -1,3 +1,13 @@
+--- a/src/slic3r/Config/Version.cpp
++++ b/src/slic3r/Config/Version.cpp
+@@ -7,6 +7,7 @@
+ #include <cctype>
+ 
+ #include <boost/filesystem/operations.hpp>
++#include <boost/filesystem/directory.hpp>
+ #include <boost/nowide/fstream.hpp>
+ 
+ #include "libslic3r/libslic3r.h"
 --- a/src/slic3r/GUI/UserAccountCommunication.cpp
 +++ b/src/slic3r/GUI/UserAccountCommunication.cpp
 @@ -9,6 +9,7 @@

diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index d3a4f5c3f101..c76b9ee39612 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -60,7 +60,7 @@ DEPEND="${RDEPEND}
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-2.8.0-missing-include.patch"
+	"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2024-06-22 10:15 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2024-06-22 10:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ee0ba87fa87c80bebf89a6c63709f27fe1796b72
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 10:14:45 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Jun 22 10:15:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee0ba87f

media-gfx/prusaslicer: fixed linking

Closes: https://bugs.gentoo.org/934358
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../files/prusaslicer-2.8.0-fixed-linking.patch       | 19 +++++++++++++++++++
 media-gfx/prusaslicer/prusaslicer-9999.ebuild         |  1 +
 2 files changed, 20 insertions(+)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch
new file mode 100644
index 000000000000..33ab6256d6b0
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch
@@ -0,0 +1,19 @@
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -376,6 +376,7 @@ set(SLIC3R_GUI_SOURCES
+ )
+ 
+ find_package(NanoSVG REQUIRED)
++find_package(OpenSSL REQUIRED)
+ 
+ if (APPLE)
+     list(APPEND SLIC3R_GUI_SOURCES
+@@ -404,7 +405,7 @@ endforeach()
+ 
+ encoding_check(libslic3r_gui)
+ 
+-target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui libvgcode GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
++target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui libvgcode GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast OpenSSL::SSL OpenSSL::Crypto)
+ 
+ if (MSVC)
+     target_link_libraries(libslic3r_gui Setupapi.lib)

diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index c76b9ee39612..71ea154eda73 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -61,6 +61,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
+	"${FILESDIR}/${PN}-2.8.0-fixed-linking.patch"
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2024-09-12 20:58 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2024-09-12 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     cc07fdfc6286c7066eacb8a73775337ec70fd130
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 12 20:57:47 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Sep 12 20:58:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc07fdfc

media-gfx/prusaslicer: partially fixed live for 2.8.1 rc1

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../prusaslicer/files/prusaslicer-2.8.1-cgal.patch | 84 ++++++++++++++++++++++
 .../files/prusaslicer-2.8.1-eigen3.patch           | 11 +++
 .../files/prusaslicer-2.8.1-fixed-linking.patch    | 10 +++
 .../prusaslicer-2.8.1-opencascade-7.8.0.patch      | 20 ++++++
 media-gfx/prusaslicer/prusaslicer-9999.ebuild      | 14 +++-
 5 files changed, 136 insertions(+), 3 deletions(-)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
new file mode 100644
index 000000000000..53267f1243ff
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
@@ -0,0 +1,84 @@
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -1437,8 +1437,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh                &cgal_model,
+     // detect anomalities in visitor.
+     bool is_valid = true;
+     // NOTE: map are created when convert shapes to cgal model
+-    const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+-    const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
++    EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).value();
++    FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).value();
+     Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
+ 
+     // a property map containing the constrained-or-not status of each edge
+@@ -1587,8 +1587,8 @@ void priv::collect_surface_data(std::queue<FI>  &process,
+ 
+ void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
+ {
+-    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
+-    const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
++    VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
++    EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).value();
+ 
+     // check if vertex was made by edge_2 which is diagonal of quad
+     auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1772,11 +1772,11 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
+     priv::VDistances result(count_shapes_points);
+     for (const SurfacePatch &patch : patches) {
+         // map is created during intersection by corefine visitor
+-        const VertexShapeMap &vert_shape_map = 
+-            models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++        VertexShapeMap &vert_shape_map = 
++            models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
+         uint32_t patch_index = &patch - &patches.front();
+         // map is created during patch creation / dividing
+-        const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++        CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).value();
+         // for each point on outline
+         for (const Loop &loop : patch.loops) 
+         for (const VI &vi_patch : loop) {
+@@ -2785,7 +2785,7 @@ using BBS = std::vector<BoundingBoxf3>;
+ BBS create_bbs(const VCutAOIs &cuts, const CutMeshes &cut_models);
+ 
+ using Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh>;
+-using Traits    = CGAL::AABB_traits<EpicKernel, Primitive>;
++using Traits    = CGAL::AABB_traits_3<EpicKernel, Primitive>;
+ using Ray       = EpicKernel::Ray_3;
+ using Tree      = CGAL::AABB_tree<Traits>;
+ using Trees     = std::vector<Tree>;
+@@ -2939,7 +2939,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
+ uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
+ {
+     // map is created during intersection by corefine visitor
+-    const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++    VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
+     // for each half edge of outline
+     for (HI hi : cut.second) {
+         VI vi = model.source(hi);
+@@ -2964,7 +2964,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
+     patch_new.model_id     = patch.model_id;
+     patch_new.shape_id     = patch.shape_id;
+     // fix cvt
+-    CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
++    CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).value();
+     for (VI &vi : cvt) {
+         if (!vi.is_valid()) continue;
+         vi = cvt_from[vi];
+@@ -2984,7 +2984,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
+     std::string patch_number_name = "f:patch_number";
+     CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI, bool>(patch_number_name, false).first;
+     
+-    const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++    CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).value();
+ 
+     std::vector<FI> fis;
+     fis.reserve(cm.faces().size());
+@@ -3171,7 +3171,7 @@ bool priv::is_over_whole_expoly(const CutAOI    &cutAOI,
+                                 const CutMesh   &mesh)
+ {
+     // NonInterupted contour is without other point and contain all from shape    
+-    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
++    VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
+     for (HI hi : cutAOI.second) { 
+         const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
+         const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch
new file mode 100644
index 000000000000..e215125b1486
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch
@@ -0,0 +1,11 @@
+--- a/src/libslic3r/CMakeLists.txt
++++ b/src/libslic3r/CMakeLists.txt
+@@ -629,7 +629,7 @@ target_link_libraries(libslic3r PRIVATE
+     int128
+ )
+ target_link_libraries(libslic3r PUBLIC
+-    Eigen3::Eigen
++    Eigen3
+     semver
+     admesh
+     localesutils

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
new file mode 100644
index 000000000000..2c7ab74a4c87
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
@@ -0,0 +1,10 @@
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -376,6 +376,7 @@ set(SLIC3R_GUI_SOURCES
+ )
+ 
+ find_package(NanoSVG REQUIRED)
++find_package(OpenSSL REQUIRED)
+ 
+ if (APPLE)
+     list(APPEND SLIC3R_GUI_SOURCES

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch
new file mode 100644
index 000000000000..1e37ce9baa19
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch
@@ -0,0 +1,20 @@
+--- a/src/occt_wrapper/CMakeLists.txt
++++ b/src/occt_wrapper/CMakeLists.txt
+@@ -19,14 +19,11 @@ include(GenerateExportHeader)
+ 
+ generate_export_header(OCCTWrapper)
+ 
+-find_package(OpenCASCADE 7.6.1 REQUIRED)
++find_package(OpenCASCADE REQUIRED)
+ 
+ set(OCCT_LIBS
+-    TKXDESTEP
+-    TKSTEP
+-    TKSTEP209
+-    TKSTEPAttr
+-    TKSTEPBase
++    TKDESTEP
++    TKDESTL
+     TKXCAF
+     TKXSBase
+     TKVCAF

diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index 2bb72a7c183f..e1c44c35352b 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -62,18 +62,26 @@ DEPEND="${RDEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-2.6.0-dont-force-link-to-wayland-and-x11.patch"
 	"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
-	"${FILESDIR}/${PN}-2.8.0-fixed-linking.patch"
+	"${FILESDIR}/${PN}-2.8.1-fixed-linking.patch"
+	"${FILESDIR}/${PN}-2.8.1-eigen3.patch"
+	"${FILESDIR}/${PN}-2.8.1-cgal.patch"
 )
 
 src_prepare() {
 	if has_version ">=sci-libs/opencascade-7.8.0"; then
-		eapply "${FILESDIR}/prusaslicer-2.7.2-opencascade-7.8.0.patch"
+		eapply "${FILESDIR}/prusaslicer-2.8.1-opencascade-7.8.0.patch"
 	fi
 
 	sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
 
-	sed -i -e 's/find_package(OpenCASCADE 7.6.2 REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
+	sed -i -e 's/find_package(OpenCASCADE 7.6.[0-9] REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
 		src/occt_wrapper/CMakeLists.txt || die
+
+	find . -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) -exec \
+		sed -i 's|#include <Eigen/|#include <eigen3/Eigen/|g' {} + || die
+	find . -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \) -exec \
+		sed -i 's|#include <unsupported/Eigen/|#include <eigen3/unsupported/Eigen/|g' {} + || die
+
 	cmake_src_prepare
 }
 


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

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
@ 2024-09-13  9:20 Miroslav Šulc
  0 siblings, 0 replies; 12+ messages in thread
From: Miroslav Šulc @ 2024-09-13  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     5681a3ea5fd57a267ed634971decbad2970e27b0
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 13 09:19:53 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri Sep 13 09:19:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5681a3ea

media-gfx/prusaslicer: fixed compilation with cgal 6.0

Closes: https://bugs.gentoo.org/937456
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../files/prusaslicer-2.8.0-cgal-6.0.patch         | 195 +++++++++++++++++++++
 .../prusaslicer/files/prusaslicer-2.8.1-cgal.patch |  84 ---------
 ...er-2.8.0.ebuild => prusaslicer-2.8.0-r1.ebuild} |   1 +
 media-gfx/prusaslicer/prusaslicer-9999.ebuild      |   2 +-
 4 files changed, 197 insertions(+), 85 deletions(-)

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch
new file mode 100644
index 000000000000..31c98bd75580
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch
@@ -0,0 +1,195 @@
+From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Sat, 13 Jul 2024 01:19:21 +0200
+Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x)
+
+---
+ src/libslic3r/CutSurface.cpp | 53 +++++++++++++++++++++---------------
+ 1 file changed, 31 insertions(+), 22 deletions(-)
+
+diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp
+index b2cf3d96596..5e66d41a8f1 100644
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -4,6 +4,14 @@
+ ///|/
+ #include "CutSurface.hpp"
+ 
++template <typename T>
++auto access_pmap(std::optional<T> opt) -> T {
++    return opt.value();
++}
++
++template <typename Pair>
++auto access_pmap(Pair pair) { return pair.first; }
++
+ /// models_input.obj - Check transormation of model to each others
+ /// projection_center.obj - circle representing center of projection with correct distance
+ /// {M} .. model index
+@@ -33,6 +41,7 @@ using namespace Slic3r;
+ #include <CGAL/Exact_integer.h>
+ #include <CGAL/Surface_mesh.h>
+ #include <CGAL/Cartesian_converter.h>
++#include <CGAL/AABB_traits.h>
+ #include <tbb/parallel_for.h>
+ 
+ // libslic3r
+@@ -997,8 +1006,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons  &shapes,
+     if (shapes.empty()) return {};
+         
+     CutMesh result;
+-    EdgeShapeMap edge_shape_map = result.add_property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+-    FaceShapeMap face_shape_map = result.add_property_map<FI, IntersectingElement>(face_shape_map_name).first;
++    EdgeShapeMap edge_shape_map  = access_pmap((result.add_property_map<EI, IntersectingElement>(edge_shape_map_name)));
++    FaceShapeMap face_shape_map  = access_pmap((result.add_property_map<FI, IntersectingElement>(face_shape_map_name)));
+ 
+     std::vector<VI> indices;
+     auto insert_contour = [&projection, &indices, &result, 
+@@ -1408,17 +1417,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh                &cgal_model,
+                                    const ExPolygonsIndices &s2i)
+ {
+     // pointer to edge or face shape_map
+-    VertexShapeMap vert_shape_map = cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr).first;
++    VertexShapeMap vert_shape_map  = access_pmap((cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr)));
+     
+     // detect anomalities in visitor.
+     bool is_valid = true;
+     // NOTE: map are created when convert shapes to cgal model
+-    const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+-    const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
++    const EdgeShapeMap& edge_shape_map  = access_pmap((cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name)));
++    const FaceShapeMap& face_shape_map  = access_pmap((cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name)));
+     Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
+ 
+     // a property map containing the constrained-or-not status of each edge
+-    EdgeBoolMap ecm = cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false).first;
++    EdgeBoolMap ecm  = access_pmap((cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false)));
+     const auto &p = CGAL::parameters::visitor(visitor)
+                         .edge_is_constrained_map(ecm)
+                         .throw_on_self_intersection(false);
+@@ -1427,7 +1436,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh                &cgal_model,
+ 
+     if (!is_valid) return {};
+ 
+-    FaceTypeMap face_type_map = cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained).first;
++    FaceTypeMap face_type_map  = access_pmap((cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained)));
+ 
+     // Select inside and outside face in model
+     set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i);
+@@ -1563,8 +1572,8 @@ void priv::collect_surface_data(std::queue<FI>  &process,
+ 
+ void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
+ {
+-    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
+-    const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
++    const VertexShapeMap &vert_shape_map  = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
++    const EdgeBoolMap &ecm  = access_pmap((mesh.property_map<EI, bool>(is_constrained_edge_name)));
+ 
+     // check if vertex was made by edge_2 which is diagonal of quad
+     auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1749,10 +1758,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
+     for (const SurfacePatch &patch : patches) {
+         // map is created during intersection by corefine visitor
+         const VertexShapeMap &vert_shape_map = 
+-            models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++            access_pmap((models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+         uint32_t patch_index = &patch - &patches.front();
+         // map is created during patch creation / dividing
+-        const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++        const CvtVI2VI& cvt  = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+         // for each point on outline
+         for (const Loop &loop : patch.loops) 
+         for (const VI &vi_patch : loop) {
+@@ -2640,7 +2649,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+                                               /* const */ CutMesh   &mesh,
+                                               const ReductionMap    *rmap)
+ {
+-    auto is_counted = mesh.add_property_map<VI, bool>("v:is_counted").first;
++    auto is_counted  = access_pmap((mesh.add_property_map<VI, bool>("v:is_counted")));
+     uint32_t count_vertices = 0;
+     if (rmap == nullptr) {
+         for (FI fi : fis) 
+@@ -2670,7 +2679,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+     cm.reserve(count_vertices, count_edges, count_faces);
+ 
+     // vertex conversion function from mesh VI to result VI
+-    CvtVI2VI mesh2result = mesh.add_property_map<VI,VI>("v:mesh2result").first;
++    CvtVI2VI mesh2result  = access_pmap((mesh.add_property_map<VI,VI>("v:mesh2result")));
+ 
+     if (rmap == nullptr) {
+         for (FI fi : fis) {
+@@ -2722,7 +2731,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+     assert(count_edges >= cm.edges().size());
+     
+     // convert VI from this patch to source VI, when exist
+-    CvtVI2VI cvt = cm.add_property_map<VI, VI>(patch_source_name).first;
++    CvtVI2VI cvt  = access_pmap((cm.add_property_map<VI, VI>(patch_source_name)));
+     // vi_s .. VertexIndex into mesh (source)
+     // vi_d .. new VertexIndex in cm (destination)
+     for (VI vi_s : mesh.vertices()) { 
+@@ -2913,7 +2922,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
+ uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
+ {
+     // map is created during intersection by corefine visitor
+-    const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++    const VertexShapeMap &vert_shape_map  = access_pmap((model.property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+     // for each half edge of outline
+     for (HI hi : cut.second) {
+         VI vi = model.source(hi);
+@@ -2938,7 +2947,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
+     patch_new.model_id     = patch.model_id;
+     patch_new.shape_id     = patch.shape_id;
+     // fix cvt
+-    CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
++    CvtVI2VI cvt  = access_pmap((patch_new.mesh.property_map<VI, VI>(patch_source_name)));
+     for (VI &vi : cvt) {
+         if (!vi.is_valid()) continue;
+         vi = cvt_from[vi];
+@@ -2956,9 +2965,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
+     CutMesh& cm = patch.mesh;
+     assert(!cm.faces().empty());
+     std::string patch_number_name = "f:patch_number";
+-    CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI, bool>(patch_number_name, false).first;
++    CutMesh::Property_map<FI,bool> is_processed  = access_pmap((cm.add_property_map<FI, bool>(patch_number_name, false)));
+     
+-    const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++    const CvtVI2VI& cvt_from  = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+ 
+     std::vector<FI> fis;
+     fis.reserve(cm.faces().size());
+@@ -3059,7 +3068,7 @@ priv::SurfacePatches priv::diff_models(VCutAOIs            &cuts,
+         CutAOIs &model_cuts = cuts[model_index];
+         CutMesh &cut_model_ = cut_models[model_index];
+         const CutMesh &cut_model = cut_model_;
+-        ReductionMap vertex_reduction_map = cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name).first;
++        ReductionMap vertex_reduction_map  = access_pmap((cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name)));
+         create_reduce_map(vertex_reduction_map, cut_model);
+ 
+         for (size_t cut_index = 0; cut_index < model_cuts.size(); ++cut_index, ++index) {
+@@ -3145,7 +3154,7 @@ bool priv::is_over_whole_expoly(const CutAOI    &cutAOI,
+                                 const CutMesh   &mesh)
+ {
+     // NonInterupted contour is without other point and contain all from shape    
+-    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
++    const VertexShapeMap &vert_shape_map  = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
+     for (HI hi : cutAOI.second) { 
+         const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
+         const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];
+@@ -3682,7 +3691,7 @@ void priv::store(const CutMesh &mesh, const FaceTypeMap &face_type_map, const st
+     }
+ 
+     CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+-    auto face_colors = mesh_.add_property_map<priv::FI, CGAL::Color>("f:color").first;    
++    auto face_colors  = access_pmap((mesh_.add_property_map<priv::FI, CGAL::Color>("f:color")));    
+     for (FI fi : mesh.faces()) { 
+         auto &color = face_colors[fi];
+         switch (face_type_map[fi]) {
+@@ -3708,7 +3717,7 @@ void priv::store(const CutMesh &mesh, const ReductionMap &reduction_map, const s
+     std::string off_file = dir + "model" + std::to_string(reduction_order++) + ".off";
+ 
+     CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+-    auto vertex_colors = mesh_.add_property_map<priv::VI, CGAL::Color>("v:color").first;    
++    auto vertex_colors  = access_pmap((mesh_.add_property_map<priv::VI, CGAL::Color>("v:color")));    
+     // initialize to gray color
+     for (VI vi: mesh.vertices())
+         vertex_colors[vi] = CGAL::Color{127, 127, 127};

diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
deleted file mode 100644
index 53267f1243ff..000000000000
--- a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
+++ /dev/null
@@ -1,84 +0,0 @@
---- a/src/libslic3r/CutSurface.cpp
-+++ b/src/libslic3r/CutSurface.cpp
-@@ -1437,8 +1437,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh                &cgal_model,
-     // detect anomalities in visitor.
-     bool is_valid = true;
-     // NOTE: map are created when convert shapes to cgal model
--    const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
--    const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
-+    EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).value();
-+    FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).value();
-     Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
- 
-     // a property map containing the constrained-or-not status of each edge
-@@ -1587,8 +1587,8 @@ void priv::collect_surface_data(std::queue<FI>  &process,
- 
- void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
- {
--    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
--    const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
-+    VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
-+    EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).value();
- 
-     // check if vertex was made by edge_2 which is diagonal of quad
-     auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
-@@ -1772,11 +1772,11 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
-     priv::VDistances result(count_shapes_points);
-     for (const SurfacePatch &patch : patches) {
-         // map is created during intersection by corefine visitor
--        const VertexShapeMap &vert_shape_map = 
--            models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
-+        VertexShapeMap &vert_shape_map = 
-+            models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
-         uint32_t patch_index = &patch - &patches.front();
-         // map is created during patch creation / dividing
--        const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
-+        CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).value();
-         // for each point on outline
-         for (const Loop &loop : patch.loops) 
-         for (const VI &vi_patch : loop) {
-@@ -2785,7 +2785,7 @@ using BBS = std::vector<BoundingBoxf3>;
- BBS create_bbs(const VCutAOIs &cuts, const CutMeshes &cut_models);
- 
- using Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh>;
--using Traits    = CGAL::AABB_traits<EpicKernel, Primitive>;
-+using Traits    = CGAL::AABB_traits_3<EpicKernel, Primitive>;
- using Ray       = EpicKernel::Ray_3;
- using Tree      = CGAL::AABB_tree<Traits>;
- using Trees     = std::vector<Tree>;
-@@ -2939,7 +2939,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
- uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
- {
-     // map is created during intersection by corefine visitor
--    const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
-+    VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
-     // for each half edge of outline
-     for (HI hi : cut.second) {
-         VI vi = model.source(hi);
-@@ -2964,7 +2964,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
-     patch_new.model_id     = patch.model_id;
-     patch_new.shape_id     = patch.shape_id;
-     // fix cvt
--    CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
-+    CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).value();
-     for (VI &vi : cvt) {
-         if (!vi.is_valid()) continue;
-         vi = cvt_from[vi];
-@@ -2984,7 +2984,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
-     std::string patch_number_name = "f:patch_number";
-     CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI, bool>(patch_number_name, false).first;
-     
--    const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
-+    CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).value();
- 
-     std::vector<FI> fis;
-     fis.reserve(cm.faces().size());
-@@ -3171,7 +3171,7 @@ bool priv::is_over_whole_expoly(const CutAOI    &cutAOI,
-                                 const CutMesh   &mesh)
- {
-     // NonInterupted contour is without other point and contain all from shape    
--    const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
-+    VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
-     for (HI hi : cutAOI.second) { 
-         const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
-         const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];

diff --git a/media-gfx/prusaslicer/prusaslicer-2.8.0.ebuild b/media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild
similarity index 98%
rename from media-gfx/prusaslicer/prusaslicer-2.8.0.ebuild
rename to media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild
index b9b50e84c4d5..92c404bba643 100644
--- a/media-gfx/prusaslicer/prusaslicer-2.8.0.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild
@@ -64,6 +64,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
 	"${FILESDIR}/${PN}-2.8.0-fixed-linking.patch"
 	"${FILESDIR}/${PN}-2.8.0-wxwidgets-3.2.4.patch"
+	"${FILESDIR}/${PN}-2.8.0-cgal-6.0.patch"
 )
 
 src_prepare() {

diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index 4ecd39373186..69208dbb54d1 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -63,9 +63,9 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.6.0-dont-force-link-to-wayland-and-x11.patch"
 	"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
 	"${FILESDIR}/${PN}-2.8.0-wxwidgets-3.2.4.patch"
+	"${FILESDIR}/${PN}-2.8.0-cgal-6.0.patch"
 	"${FILESDIR}/${PN}-2.8.1-fixed-linking.patch"
 	"${FILESDIR}/${PN}-2.8.1-eigen3.patch"
-	"${FILESDIR}/${PN}-2.8.1-cgal.patch"
 )
 
 src_prepare() {


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

end of thread, other threads:[~2024-09-13  9:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 10:35 [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/ Miroslav Šulc
  -- strict thread matches above, loose matches on Subject: below --
2024-09-13  9:20 Miroslav Šulc
2024-09-12 20:58 Miroslav Šulc
2024-06-22 10:15 Miroslav Šulc
2024-06-22  9:17 Miroslav Šulc
2023-04-22 11:03 Miroslav Šulc
2022-12-27 20:12 Piotr Karbowski
2022-02-24 22:27 Sam James
2022-02-15 19:51 Sam James
2022-02-06  0:23 Dennis Lamm
2021-06-14 22:11 Sam James
2020-12-15 19:22 Dennis Lamm

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