diff options
author | Piotr Karbowski <slashbeast@gentoo.org> | 2022-07-02 12:18:34 +0200 |
---|---|---|
committer | Piotr Karbowski <slashbeast@gentoo.org> | 2022-07-02 12:19:05 +0200 |
commit | 0094c528b4e54cb6f6096d68443c66a7e83c0d00 (patch) | |
tree | 8accbc1f607c7c6e9518cf107822243474ed9adc /media-gfx | |
parent | Revert "dev-libs/argtable: drop 2.13-r1" (diff) | |
download | gentoo-0094c528b4e54cb6f6096d68443c66a7e83c0d00.tar.gz gentoo-0094c528b4e54cb6f6096d68443c66a7e83c0d00.tar.bz2 gentoo-0094c528b4e54cb6f6096d68443c66a7e83c0d00.zip |
media-gfx/prusaslicer: 2.5.0_alpha2 added.
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
Diffstat (limited to 'media-gfx')
4 files changed, 187 insertions, 52 deletions
diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest index 665768040b96..cf0d605a0d71 100644 --- a/media-gfx/prusaslicer/Manifest +++ b/media-gfx/prusaslicer/Manifest @@ -1,2 +1,3 @@ +DIST prusaslicer-2.5.0_alpha2.tar.gz 48053741 BLAKE2B 161462ee4dc061ee1816c165b0e85688bcce1ee010451f3d6d724a71526ccea4eb006c9610124ec006ff19b030af2fcb74993016658069222d98152f29660c7e SHA512 8c29d79349e834df284374131659b863d1df592ee5304f2bae7cdbe1825feac465eaf78e0932d4184f4077a44d6add3194db31f12c5202cb064020fbaf4beecd DIST prusaslicer-2.6.0_pre20220601.tar.xz 29096924 BLAKE2B d1bb1733528a817384583c203fa84bd41daee97f24698fd421967838a8c4ec7a8705de39ad065ac1778c7e67289a491c298d063a4a53e5276256a3f230cba43c SHA512 d8581c292f4b6085992046a3063d90b151746690df9d7eea01bf68e72508f1b54e7547c1fcc0dd493712a752dcd158deed037559bd8825fc521e5b6aa5b199f8 DIST prusaslicer-2.6.0_pre20220620.tar.xz 29309256 BLAKE2B 2b2dda3f1efa05e674574812b50773b0f6c6d0c1dcfa0095deab7b80e62c5ed9f5837bc6141993ed41bcf985c598c11cf2741e17623309dbf8d7612c7af24a50 SHA512 7ad510b1e0db1774500049b76547e73b62976be897d47d118844c996939f843c9c0699c96bdf9569992a4d170a900e302566aa45ec8abee9ee4742104fb5deea diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch new file mode 100644 index 000000000000..749f3c06289a --- /dev/null +++ b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch @@ -0,0 +1,103 @@ +diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp +index 7c8029c..d75f8c5 100644 +--- a/src/hints/HintsToPot.cpp ++++ b/src/hints/HintsToPot.cpp +@@ -1,6 +1,7 @@ + #include <iostream> + #include <vector> + #include <string> ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <boost/dll.hpp> + #include <boost/property_tree/ini_parser.hpp> +@@ -9,7 +10,7 @@ + + bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data) + { +- boost::filesystem::ofstream file(std::move(path), std::ios_base::app); ++ boost::nowide::ofstream file(std::move(path), std::ios_base::app); + for (const auto& element : data) + { + //Example of .pot element +diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp +index 4664cff..41dd374 100644 +--- a/src/libslic3r/Preset.cpp ++++ b/src/libslic3r/Preset.cpp +@@ -25,6 +25,7 @@ + #include <stdexcept> + #include <unordered_map> + #include <boost/format.hpp> ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <boost/filesystem/fstream.hpp> + #include <boost/algorithm/string.hpp> +@@ -84,7 +85,7 @@ ConfigFileType guess_config_file_type(const ptree &tree) + VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all) + { + ptree tree; +- boost::filesystem::ifstream ifs(path); ++ boost::nowide::ifstream ifs(path); + boost::property_tree::read_ini(ifs, tree); + return VendorProfile::from_ini(tree, path, load_all); + } +diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp +index 81c681b..7f99a50 100644 +--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp ++++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp +@@ -10,6 +10,7 @@ + #include "libslic3r/Platform.hpp" + #include "libslic3r/Config.hpp" + ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <boost/log/trivial.hpp> + #include <boost/dll/runtime_symbol_info.hpp> +@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() + + } // namespace GUI + } // namespace Slic3r +-#endif // __linux__ +\ No newline at end of file ++#endif // __linux__ +diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp +index 5bc770b..d566e91 100644 +--- a/src/slic3r/GUI/GUI_App.cpp ++++ b/src/slic3r/GUI/GUI_App.cpp +@@ -13,6 +13,7 @@ + #include <cstdlib> + #include <regex> + #include <string_view> ++#include <boost/nowide/fstream.hpp> + #include <boost/algorithm/string/predicate.hpp> + #include <boost/algorithm/string.hpp> + #include <boost/format.hpp> +diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp +index 14ebbc6..2de896c 100644 +--- a/src/slic3r/GUI/HintNotification.cpp ++++ b/src/slic3r/GUI/HintNotification.cpp +@@ -15,6 +15,7 @@ + #include "libslic3r/PrintConfig.hpp" + + #include <boost/algorithm/string/replace.hpp> ++#include <boost/nowide/fstream.hpp> + #include <boost/filesystem.hpp> + #include <boost/nowide/fstream.hpp> + #include <boost/log/trivial.hpp> +@@ -65,7 +66,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f + + void write_used_binary(const std::vector<std::string>& ids) + { +- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary); ++ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary); + cereal::BinaryOutputArchive archive(file); + HintsCerealData cd { ids }; + try +@@ -84,7 +85,7 @@ void read_used_binary(std::vector<std::string>& ids) + BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string(); + return; + } +- boost::filesystem::ifstream file(path); ++ boost::nowide::ifstream file(path); + cereal::BinaryInputArchive archive(file); + HintsCerealData cd; + try diff --git a/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch b/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch deleted file mode 100644 index 1026d1263552..000000000000 --- a/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp -index 81c681bc3..7f99a505c 100644 ---- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp -+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp -@@ -10,6 +10,7 @@ - #include "libslic3r/Platform.hpp" - #include "libslic3r/Config.hpp" - -+#include <boost/nowide/fstream.hpp> - #include <boost/filesystem.hpp> - #include <boost/log/trivial.hpp> - #include <boost/dll/runtime_symbol_info.hpp> -@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() - - } // namespace GUI - } // namespace Slic3r --#endif // __linux__ -\ No newline at end of file -+#endif // __linux__ -diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp -index 8533854f4..4435f836b 100644 ---- a/src/slic3r/GUI/GUI_App.cpp -+++ b/src/slic3r/GUI/GUI_App.cpp -@@ -13,6 +13,7 @@ - #include <cstdlib> - #include <regex> - #include <string_view> -+#include <boost/nowide/fstream.hpp> - #include <boost/algorithm/string/predicate.hpp> - #include <boost/algorithm/string.hpp> - #include <boost/format.hpp> -diff --git a/src/slic3r/Utils/AppUpdater.cpp b/src/slic3r/Utils/AppUpdater.cpp -index 60739ccb3..80f31f69f 100644 ---- a/src/slic3r/Utils/AppUpdater.cpp -+++ b/src/slic3r/Utils/AppUpdater.cpp -@@ -5,6 +5,7 @@ - - #include <boost/filesystem.hpp> - #include <boost/log/trivial.hpp> -+#include <boost/nowide/fstream.hpp> - #include <boost/nowide/convert.hpp> - #include <boost/property_tree/ini_parser.hpp> - #include <curl/curl.h> -@@ -242,7 +243,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d - tmp_path += format(".%1%%2%", get_current_pid(), ".download"); - try - { -- boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); -+ boost::nowide::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); - file.write(body.c_str(), body.size()); - file.close(); - boost::filesystem::rename(tmp_path, dest_path); diff --git a/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild new file mode 100644 index 000000000000..adcc79140a37 --- /dev/null +++ b/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild @@ -0,0 +1,83 @@ +# 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="${PV//_/-}" + +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_2.5.0-alpha2.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-1.73.0:=[nls,threads(+)] + 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 + media-libs/glew:0= + media-libs/libpng:0= + media-libs/qhull:= + sci-libs/libigl + 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}/${PN}-2.4.0-fix-build-with-cereal-1.3.1.patch" + "${FILESDIR}/${PN}-2.5.0_alpha2-boost-fixes.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 + 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 +} |