media-gfx/superslicer: Fix boost headers and support wxGTK 3.2

Thanks-to: William Pettersson
Closes: https://bugs.gentoo.org/936146
Closes: https://bugs.gentoo.org/939115
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
This commit is contained in:
Pacho Ramos
2024-09-15 14:12:18 +02:00
parent 4f79cdcc9f
commit 12895db94a
2 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
https://bugs.gentoo.org/936146
--- a/src/slic3r/GUI/GLTexture.cpp 2024-08-10 11:05:17.663411745 +0100
+++ b/src/slic3r/GUI/GLTexture.cpp 2024-08-10 11:05:34.463543701 +0100
@@ -10,6 +10,8 @@
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/predicate.hpp>
+#include <boost/log/trivial.hpp>
+#include <boost/log/core.hpp>
#include <vector>
#include <algorithm>
--- a/src/slic3r/GUI/RemovableDriveManager.cpp 2024-08-10 11:24:53.572234573 +0100
+++ b/src/slic3r/GUI/RemovableDriveManager.cpp 2024-08-10 11:28:24.393792051 +0100
@@ -22,7 +22,7 @@
#include <pwd.h>
#include <boost/filesystem.hpp>
#include <boost/system/error_code.hpp>
-#include <boost/filesystem/convenience.hpp>
+//#include <boost/filesystem/convenience.hpp>
#include <boost/process.hpp>
#endif
--- a/src/slic3r/GUI/ScriptExecutor.cpp 2024-08-10 11:28:32.423851365 +0100
+++ b/src/slic3r/GUI/ScriptExecutor.cpp 2024-08-10 11:28:41.893921315 +0100
@@ -10,7 +10,7 @@
#include <boost/algorithm/string/erase.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/filesystem.hpp>
-#include <boost/filesystem/string_file.hpp>
+//#include <boost/filesystem/string_file.hpp>
#include <fstream>
#include <string>
--- a/src/slic3r/GUI/BitmapCache.cpp.old 2024-08-10 12:00:52.538869133 +0100
+++ b/src/slic3r/GUI/BitmapCache.cpp 2024-08-10 12:01:15.519040423 +0100
@@ -6,6 +6,8 @@
#include "GUI_Utils.hpp"
#include <boost/filesystem.hpp>
+#include <boost/log/trivial.hpp>
+#include <boost/log/core.hpp>
#ifdef __WXGTK2__
// Broken alpha workaround

View File

@@ -0,0 +1,110 @@
# 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="SuperSlicer"
SLICER_PROFILES_COMMIT="ca25c7ec55dcc6073da61e39692c321cdb6497dc"
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.8-additional-imports-fixes.patch"
"${FILESDIR}/${PN}-2.5.59.8-fix-compilation-error-gnu17.patch"
"${FILESDIR}/${PN}-2.5.59.8-libnest2d-link-xcb.patch"
"${FILESDIR}/${PN}-2.5.59.8-boost-replace-load-string-file.patch"
"${FILESDIR}/${PN}-2.5.59.10-boost-1.85.patch"
"${FILESDIR}/${PN}-2.5.59.10-boost-headers.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
}