public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Piotr Karbowski" <slashbeast@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/
Date: Tue, 27 Dec 2022 20:12:31 +0000 (UTC)	[thread overview]
Message-ID: <1672171948.6a714bb602a25290d2aedf74eb1232fb9efd5979.slashbeast@gentoo> (raw)

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
+}


             reply	other threads:[~2022-12-27 20:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 20:12 Piotr Karbowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-18  9:12 [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/files/, media-gfx/prusaslicer/ Miroslav Šulc
2024-12-26  7:21 Sam James
2024-12-15 14:24 Miroslav Šulc
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
2024-05-22 10:35 Miroslav Šulc
2023-04-22 11:03 Miroslav Šulc
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

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=1672171948.6a714bb602a25290d2aedf74eb1232fb9efd5979.slashbeast@gentoo \
    --to=slashbeast@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