mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 10:57:07 -08:00
media-gfx/superslicer: fix building with boost-1.81.
Patch contributed by Bradley Jarvis. Bug: https://bugs.gentoo.org/887055 Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
This commit is contained in:
+40
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
# 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="SuperSlicer"
|
||||
|
||||
inherit cmake wxwidgets xdg
|
||||
|
||||
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/748fbdfd2ac077e4e415868e7bc963740b92aa8e.tar.gz -> ${P}-profiles.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~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-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}/${P}-openexr3.patch"
|
||||
"${FILESDIR}/${P}-wxgtk3-wayland.patch"
|
||||
"${FILESDIR}/${P}-cereal.patch"
|
||||
"${FILESDIR}/${P}-boost.patch"
|
||||
"${FILESDIR}/${P}-boost-1.81-std-wxString-to-std-wstring.patch"
|
||||
"${FILESDIR}/${P}-missing-includes.patch"
|
||||
"${FILESDIR}/${P}-dont-install-bundled-angelscript.patch"
|
||||
"${FILESDIR}/${P}-fix-gcodeviewer-symlink.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
mv slic3r-profiles-*/* "${S}"/resources/profiles/ || die
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
rm "${ED}/usr/lib/udev/rules.d/90-3dconnexion.rules" || die
|
||||
}
|
||||
Reference in New Issue
Block a user