public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/superslicer/files/, media-gfx/superslicer/
Date: Tue, 16 Jul 2024 07:24:54 +0000 (UTC)	[thread overview]
Message-ID: <1721114331.1d274045638c2ef671a60b5c324ea264c3f85e5b.sam@gentoo> (raw)

commit:     1d274045638c2ef671a60b5c324ea264c3f85e5b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 07:18:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 07:18:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d274045

media-gfx/superslicer: add 2.5.59.8

Closes: https://bugs.gentoo.org/918510
Thanks-to: Egor <egorr.berd <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/superslicer/Manifest                     |   2 +
 ...rslicer-2.5.59.8-additional-imports-fixes.patch | 111 +++++++++++++++++++++
 ...r-2.5.59.8-boost-replace-load-string-file.patch |  43 ++++++++
 ...icer-2.5.59.8-fix-compilation-error-gnu17.patch |  20 ++++
 .../superslicer-2.5.59.8-libnest2d-link-xcb.patch  |  12 +++
 media-gfx/superslicer/superslicer-2.5.59.8.ebuild  | 109 ++++++++++++++++++++
 6 files changed, 297 insertions(+)

diff --git a/media-gfx/superslicer/Manifest b/media-gfx/superslicer/Manifest
index c076101e258a..ea74f49bd757 100644
--- a/media-gfx/superslicer/Manifest
+++ b/media-gfx/superslicer/Manifest
@@ -1,2 +1,4 @@
 DIST superslicer-2.5.59.2-profiles.tar.gz 16253775 BLAKE2B 20c99b14ba8ee26ea2a210962e78ea21928a5f32b1e799cbdbe60a3ef587ae1368efce885f5d253468ee9974af6a4419890e56d7df33761732bcefe8dbbc019e SHA512 c20ec66a95d5ec3e1e4fd8b1936bf1a4fc32fbad2c3d78774d5c2480be8a9dcacba5e561c57774a2c761d5189466083e7b6bd9b021a4ca7676e6a5e9676439d7
 DIST superslicer-2.5.59.2.tar.gz 45622782 BLAKE2B ff2fecf233d2710d706b64eb2191bfac39df3f631634de5f9eb1bca6ca712e94b0283beb7c6e9f3b293dc308b50240871ef8651a5355a4d7c5ea6092ac1a836b SHA512 af8878bd8e0c3e0dd5247ce01bdbd2b42b6766d81efbde11b71c6642787a12dfeaea91e653ac928066b9610cd911ea1f4dc77cf4823639030b3c104d955b8cbd
+DIST superslicer-2.5.59.8-profiles.tar.gz 17931886 BLAKE2B 953a777dd12971c355a5f48148d4c3831b9435cf08f1baecb32ff0ef6245678f81c53bf5078cc4d6d04642e9ee18e1023d5d1578ebdf1384c7c1ce44a1153c50 SHA512 2e4561de7c57308a91c8964c8a957bc10c5e4cedc47c5fc37633bbcf78e3576ed1eaa6d7126485e94eb0aa593940c73a460f3d5ad65f33001d32953caa2fb4e1
+DIST superslicer-2.5.59.8.tar.gz 46021260 BLAKE2B 04abffd1a9cdf417d544539d5cde9b3559f2da7c1cb24cfa0e4a5d11359bca53cb25a90a3a14b26ee10e33e283ba4774d404265e6740b5457f82110be2a44af9 SHA512 57ef6c129c24378d6f4f78d34a60ed15668a8c5c266fa706937edebbd7b52d145657aae1e46a7b1d19dabaf403465bc5af50a94fa70205456bfc87a1458bac6e

diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.8-additional-imports-fixes.patch b/media-gfx/superslicer/files/superslicer-2.5.59.8-additional-imports-fixes.patch
new file mode 100644
index 000000000000..1ccef804d0b4
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.8-additional-imports-fixes.patch
@@ -0,0 +1,111 @@
+diff --git a/src/libslic3r/Extruder.hpp b/src/libslic3r/Extruder.hpp
+index e4e16d263..629fd6e0b 100644
+--- a/src/libslic3r/Extruder.hpp
++++ b/src/libslic3r/Extruder.hpp
+@@ -3,6 +3,7 @@
+ 
+ #include "libslic3r.h"
+ #include "Point.hpp"
++#include <optional>
+ 
+ namespace Slic3r {
+ 
+diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp
+index 10cae794d..c82969e20 100644
+--- a/src/slic3r/GUI/Field.cpp
++++ b/src/slic3r/GUI/Field.cpp
+@@ -20,6 +20,7 @@
+ #include <wx/tglbtn.h>
+ #endif
+ #include <wx/tokenzr.h>
++#include <boost/algorithm/string.hpp>
+ #include <boost/algorithm/string/predicate.hpp>
+ #include <boost/log/trivial.hpp>
+ #include "OG_CustomCtrl.hpp"
+diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp
+index ab6039ff0..be01e890a 100644
+--- a/src/slic3r/GUI/Preferences.cpp
++++ b/src/slic3r/GUI/Preferences.cpp
+@@ -8,6 +8,7 @@
+ 
+ #include <wx/notebook.h>
+ #include <wx/scrolwin.h>
++#include <wx/display.h>
+ #include "Notebook.hpp"
+ #include "ButtonsDescription.hpp"
+ #include "OG_CustomCtrl.hpp"
+diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
+index a6c7b580e..1e1566f37 100644
+--- a/src/slic3r/GUI/Tab.cpp
++++ b/src/slic3r/GUI/Tab.cpp
+@@ -29,6 +29,7 @@
+ #include <wx/settings.h>
+ #include <wx/filedlg.h>
+ 
++#include <boost/algorithm/string.hpp>
+ #include <boost/algorithm/string/split.hpp>
+ #include <boost/algorithm/string/predicate.hpp>
+ #include <boost/algorithm/string/replace.hpp>
+diff --git a/src/libslic3r/ObjectID.hpp b/src/libslic3r/ObjectID.hpp
+index 782c58741..08dfba661 100644
+--- a/src/libslic3r/ObjectID.hpp
++++ b/src/libslic3r/ObjectID.hpp
+@@ -2,6 +2,7 @@
+ #define slic3r_ObjectID_hpp_
+ 
+ #include <cereal/access.hpp>
++#include <cereal/types/base_class.hpp>
+ 
+ namespace Slic3r {
+
+diff --git a/src/libslic3r/Format/BBConfig.hpp b/src/libslic3r/Format/BBConfig.hpp
+index a4b27675c..8d821bed5 100644
+--- a/src/libslic3r/Format/BBConfig.hpp
++++ b/src/libslic3r/Format/BBConfig.hpp
+@@ -2,6 +2,13 @@
+ #define slic3r_Format_BBconfig_hpp_
+ 
+ #include "miniz_extension.hpp"
++#include <fstream>
++#include <map>
++#include "libslic3r/Config.hpp"
++#include <boost/algorithm/string/replace.hpp>
++#include <boost/log/trivial.hpp>
++#include <boost/property_tree/ptree.hpp>
++#include <boost/property_tree/ini_parser.hpp>
+ 
+ #ifdef __APPLE__
+     #include <boost/filesystem.hpp>
+diff --git a/src/libslic3r/GCode/FanMover.cpp b/src/libslic3r/GCode/FanMover.cpp
+index 8a39d92c5..68e8c9254 100644
+--- a/src/libslic3r/GCode/FanMover.cpp
++++ b/src/libslic3r/GCode/FanMover.cpp
+@@ -13,9 +13,8 @@
+ #include "../PrintConfig.hpp"
+ #include "../Utils.hpp"
+ #include "Print.hpp"
+-
+-#include <boost/log/trivial.hpp>
+ */
++#include <boost/log/trivial.hpp>
+ 
+ 
+ namespace Slic3r {
+diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp
+index f1570b7a4..777f1d722 100644
+--- a/src/libslic3r/Format/bbs_3mf.cpp
++++ b/src/libslic3r/Format/bbs_3mf.cpp
+@@ -43,11 +43,13 @@
+ #include <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/xml_parser.hpp>
+ #include <boost/foreach.hpp>
++#include <boost/thread/mutex.hpp>
+ //#include <openssl/md5.h>
+ 
+ namespace pt = boost::property_tree;
+ 
+ #include <tbb/parallel_reduce.h>
++#include <tbb/parallel_for.h>
+ 
+ #include <expat.h>
+ #include <Eigen/Dense>

diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.8-boost-replace-load-string-file.patch b/media-gfx/superslicer/files/superslicer-2.5.59.8-boost-replace-load-string-file.patch
new file mode 100644
index 000000000000..9b948ed9c0c4
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.8-boost-replace-load-string-file.patch
@@ -0,0 +1,43 @@
+diff --git a/src/slic3r/GUI/ScriptExecutor.cpp b/src/slic3r/GUI/ScriptExecutor.cpp
+index f32e44204..272af5ec3 100644
+--- a/src/slic3r/GUI/ScriptExecutor.cpp
++++ b/src/slic3r/GUI/ScriptExecutor.cpp
+@@ -5,8 +5,11 @@
+ #include "libslic3r/PresetBundle.hpp"
+ #include "libslic3r/Print.hpp"
+ 
++#include <fstream>
+ #include <string>
+ 
++#include <boost/filesystem.hpp>
++
+ #include <angelscript/source/as_config.h>
+ #include <angelscript/add_on/autowrapper/aswrappedcall.h>
+ #include <angelscript/add_on/scriptarray/scriptarray.h>
+@@ -616,6 +619,17 @@ bool as_is_enabled(std::string &key)
+     return f->is_enabled();
+ }
+ 
++inline
++void load_string_file(const boost::filesystem::path& p, std::string& str)
++{
++       std::ifstream file;
++       file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
++       file.open(p, std::ios_base::binary);
++       std::size_t sz = static_cast<std::size_t>(boost::filesystem::file_size(p));
++       str.resize(sz, '\0');
++       file.read(&str[0], sz);
++}
++
+ //function to reset a field
+ void as_back_initial_value(std::string& key) {
+     current_script->add_to_reset(key);
+@@ -745,7 +759,7 @@ void ScriptContainer::init(const std::string& tab_key, Tab* tab)
+         //res = builder.AddSectionFromFile(ui_script_file.string().c_str()); //seems to be problematic on cyrillic locale
+         {
+             std::string all_file;
+-            boost::filesystem::load_string_file(ui_script_file, all_file);
++            load_string_file(ui_script_file, all_file);
+             res = builder.AddSectionFromMemory(ui_script_file.string().c_str(), all_file.c_str(), (unsigned int)(all_file.length()), 0);
+         }
+         if (res < 0) throw CompileErrorException("Error, can't build the script for tab " + tab_key);

diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.8-fix-compilation-error-gnu17.patch b/media-gfx/superslicer/files/superslicer-2.5.59.8-fix-compilation-error-gnu17.patch
new file mode 100644
index 000000000000..5574340bce63
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.8-fix-compilation-error-gnu17.patch
@@ -0,0 +1,20 @@
+# https://github.com/prusa3d/PrusaSlicer/commit/4aa7366fafb7a3f91cc68d4a808f5195a4aa3dcf
+diff --git a/src/libslic3r/MeshBoolean.cpp b/src/libslic3r/MeshBoolean.cpp
+index d76bf468c7f..22232573953 100644
+--- a/src/libslic3r/MeshBoolean.cpp
++++ b/src/libslic3r/MeshBoolean.cpp
+@@ -152,12 +152,12 @@ indexed_triangle_set cgal_to_indexed_triangle_set(const _Mesh &cgalmesh)
+     const auto &vertices = cgalmesh.vertices();
+     int vsize = int(vertices.size());
+ 
+-    for (auto &vi : vertices) {
++    for (const auto &vi : vertices) {
+         auto &v = cgalmesh.point(vi); // Don't ask...
+         its.vertices.emplace_back(to_vec3f(v));
+     }
+ 
+-    for (auto &face : faces) {
++    for (const auto &face : faces) {
+         auto vtc = cgalmesh.vertices_around_face(cgalmesh.halfedge(face));
+ 
+         int i = 0;

diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.8-libnest2d-link-xcb.patch b/media-gfx/superslicer/files/superslicer-2.5.59.8-libnest2d-link-xcb.patch
new file mode 100644
index 000000000000..441f647b037e
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.8-libnest2d-link-xcb.patch
@@ -0,0 +1,12 @@
+diff --git a/src/libnest2d/CMakeLists.txt b/src/libnest2d/CMakeLists.txt
+index c18dc31cb..852d26d5e 100644
+--- a/src/libnest2d/CMakeLists.txt
++++ b/src/libnest2d/CMakeLists.txt
+@@ -24,5 +24,6 @@ set(LIBNEST2D_SRCFILES
+ add_library(libnest2d STATIC ${LIBNEST2D_SRCFILES})
+ 
+ target_include_directories(libnest2d PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
+-target_link_libraries(libnest2d PUBLIC NLopt::nlopt TBB::tbb Boost::boost libslic3r)
++target_link_libraries(libnest2d PUBLIC NLopt::nlopt TBB::tbb Boost::boost
++    libslic3r xcb)
+ target_compile_definitions(libnest2d PUBLIC LIBNEST2D_THREADING_tbb LIBNEST2D_STATIC LIBNEST2D_OPTIMIZER_nlopt LIBNEST2D_GEOMETRIES_libslic3r)

diff --git a/media-gfx/superslicer/superslicer-2.5.59.8.ebuild b/media-gfx/superslicer/superslicer-2.5.59.8.ebuild
new file mode 100644
index 000000000000..b43862a3db67
--- /dev/null
+++ b/media-gfx/superslicer/superslicer-2.5.59.8.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.0-gtk3"
+MY_PN="SuperSlicer"
+SLICER_PROFILES_COMMIT="8f3bb94a9c60be9a3b40d88a36ff05ba5cf2d6a8"
+
+inherit cmake wxwidgets xdg flag-o-matic
+
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
+HOMEPAGE="https://github.com/supermerill/SuperSlicer/"
+SRC_URI="
+	https://github.com/supermerill/SuperSlicer/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
+	https://github.com/slic3r/slic3r-profiles/archive/${SLICER_PROFILES_COMMIT}.tar.gz -> ${P}-profiles.tar.gz
+"
+
+LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+
+RESTRICT="test"
+
+# No dep on sci-libs/libigl, in-tree version cannot build
+# static library currently. Using bundled one.
+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:=
+	dev-libs/imath:=
+	>=media-gfx/openvdb-8.2:=
+	net-misc/curl[adns]
+	media-libs/glew:0=
+	media-libs/libpng:0=
+	media-libs/qhull:=
+	sci-libs/nlopt
+	sci-libs/opencascade:=
+	>=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]
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.5.59.2-boost.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-cereal.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-dont-install-angelscript.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-gcodeviewer-symlink-fix.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-missing-includes-fix.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-openexr3.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-wxgtk3-wayland-fix.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-relax-OpenCASCADE-dep.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-link-occtwrapper-statically.patch"
+	"${FILESDIR}/${PN}-2.5.59.2-fix-dereferencing-in-std-unique_ptr-to-nullptr.patch"
+	"${FILESDIR}/${P}-additional-imports-fixes.patch"
+	"${FILESDIR}/${P}-fix-compilation-error-gnu17.patch"
+	"${FILESDIR}/${P}-libnest2d-link-xcb.patch"
+	"${FILESDIR}/${P}-boost-replace-load-string-file.patch"
+)
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_unpack() {
+	default
+
+	mv slic3r-profiles-*/* "${S}"/resources/profiles/ || die
+}
+
+src_configure() {
+	CMAKE_BUILD_TYPE="Release"
+
+	append-flags -fno-strict-aliasing
+
+	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
+}
+
+src_install() {
+	cmake_src_install
+
+	rm "${ED}/usr/lib/udev/rules.d/90-3dconnexion.rules" || die
+}


             reply	other threads:[~2024-07-16  7:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  7:24 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-15 11:28 [gentoo-commits] repo/gentoo:master commit in: media-gfx/superslicer/files/, media-gfx/superslicer/ David Seifert
2024-07-05 17:49 Pacho Ramos
2023-06-04 13:02 Piotr Karbowski
2022-12-28 18:13 Piotr Karbowski
2022-12-27 20:12 Piotr Karbowski
2022-07-14 20:45 Piotr Karbowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1721114331.1d274045638c2ef671a60b5c324ea264c3f85e5b.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox