From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7251C1581C1 for ; Tue, 16 Jul 2024 07:24:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B54332BC015; Tue, 16 Jul 2024 07:24:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 941602BC015 for ; Tue, 16 Jul 2024 07:24:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 882E7340813 for ; Tue, 16 Jul 2024 07:24:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B18B8B82 for ; Tue, 16 Jul 2024 07:24:54 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1721114331.1d274045638c2ef671a60b5c324ea264c3f85e5b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/superslicer/files/, media-gfx/superslicer/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/superslicer/Manifest media-gfx/superslicer/files/superslicer-2.5.59.8-additional-imports-fixes.patch media-gfx/superslicer/files/superslicer-2.5.59.8-boost-replace-load-string-file.patch media-gfx/superslicer/files/superslicer-2.5.59.8-fix-compilation-error-gnu17.patch media-gfx/superslicer/files/superslicer-2.5.59.8-libnest2d-link-xcb.patch media-gfx/superslicer/superslicer-2.5.59.8.ebuild X-VCS-Directories: media-gfx/superslicer/ media-gfx/superslicer/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1d274045638c2ef671a60b5c324ea264c3f85e5b X-VCS-Branch: master Date: Tue, 16 Jul 2024 07:24:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3f74d3d1-96ba-4d77-b1dd-0f331e509120 X-Archives-Hash: cf60a22f2d4201d4dfa3512e2750b410 commit: 1d274045638c2ef671a60b5c324ea264c3f85e5b Author: Sam James gentoo org> AuthorDate: Tue Jul 16 07:18:51 2024 +0000 Commit: Sam James gentoo 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 gmail.com> Signed-off-by: Sam James 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 + + 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 + #endif + #include ++#include + #include + #include + #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 + #include ++#include + #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 + #include + ++#include + #include + #include + #include +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 ++#include + + 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 ++#include ++#include "libslic3r/Config.hpp" ++#include ++#include ++#include ++#include + + #ifdef __APPLE__ + #include +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 + */ ++#include + + + 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 + #include + #include ++#include + //#include + + namespace pt = boost::property_tree; + + #include ++#include + + #include + #include 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 + #include + ++#include ++ + #include + #include + #include +@@ -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(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 +}