media-gfx/prusaslicer: provide 2.5.0 ebuild until Portage catches up
This commit is contained in:
7
media-gfx/prusaslicer/Manifest
Normal file
7
media-gfx/prusaslicer/Manifest
Normal file
@@ -0,0 +1,7 @@
|
||||
AUX prusaslicer-2.4.0-fix-build-with-cereal-1.3.1.patch 1601 SHA256 d463bb33e7ddd91ac1534daaa9eee0e2fb78c5ab37ebeaedd532803fcb0e8535 SHA512 21377080026fa43bf23dc06c4925decd6c6e7827599caebc2ba2e7b3f4f4428fcd6fe4044f3bc3d0f059cf2ede043cafe2928622046bf9443bdd3f21f1ff6c59 WHIRLPOOL 8d0f019abfc52a85d2d64c3fa90fee7a2e0407185f155d84cf30fa4d884a0a9924789bc0158bd98d7f1f6131efe33c5eae647ea657e557fb77db9271c6c8d65c
|
||||
AUX prusaslicer-2.5.0_alpha2-boost-fixes.patch 3836 SHA256 9610f99c895888a7dca8ca991622ed26a9e77ae7174bbeb342294afdc9428602 SHA512 3a13e2e0fb0fd53571ea2b44403c810729b80c715a8fcaa5c596f680eb9c67e9f86c2194e09af4de54baa5bd95023b32f27cb475ccfe9ac71ea583b5ab02aba5 WHIRLPOOL d3446e989e1a60f2451c2f81c755f3b74da440b44ad9f516629be3eb93af37637cb58f84459704e8ad4b2712e47a468b6b99f8dd4990b6174ae13dec4a67a180
|
||||
AUX prusaslicer-2.5.0_rc1-cereal-1.3.1.patch 1384 SHA256 bca9591d35b34ae89a6a2ffef64f765c0b8623f4e7bda9e7ea6fab93b2a9ac98 SHA512 c325f7fed4bcdb380221c3b63ad525a53d26bab8baf7c7347035c8d22474ab38af944e445fc58da7f7979d9ec53f61b17a9edc1e7d86c65ac796e479a0316ce6 WHIRLPOOL baa7963d2c148de59cab792b93db30c5465b68b46e8ae66978a7d2d980563c654d10d0f4b33c83a7cf44c8a5ce5e36c2f50b0ba168fe5d16196381c34beb43b3
|
||||
AUX prusaslicer-2.5.0_rc1-fix-tests.patch 363 SHA256 e411dd68bd3b97965fee9cd900cc24cd7002738bb66b11e0cdb13f193f161240 SHA512 952958b687bf1b0d454ed921799d283b08fe56acaccbd909c41269243839cd5c02b1aca594d1fa947aff73c853ef6dcfd52e938f4f39a54396ec32d2e9cb284b WHIRLPOOL 7ac20e2ff39e2edc70b0cf43a9eb4450247761ca3a498dc1fddcc27f200ca66a6e2e0021cf814ab810b3fbd7ddca124e071f87dd53fe6cdfccf49fd096885869
|
||||
DIST prusaslicer-2.5.0.tar.gz 48591956 SHA256 dbbf3e10c812d1dc7bae4bd6879e60f864d763b2738b099dd34b9636d0e5eb6a SHA512 b31c1bf5c0692ce34e965e356cc27a07819712a524a514100bcb9372a08d3c4c9200a097b72f6b4e3efd0d3e9253bc3d813a9fe24d1f8a3d5a2933c9e3712665 WHIRLPOOL fc0a1c2174d1ae28f3df4f3b8fa50982b0058aea1fb50104917267757d7812ca04866d962721b560e71b92fb78759aad2836f6eb0d1c44ed29de8f155c4a09bf
|
||||
EBUILD prusaslicer-2.5.0.ebuild 1940 SHA256 408e6c95f5d3c66b7a9c5738fa69115dd8e3ebb2ae6166995790d2f1defe47e6 SHA512 0fd8cd783948cf70ae6bbc8db73a9cac1813eb78829b36db27210b3db37676f32fdc1b066f1a1c4ef507572f926805fd3666629856e38dd97caabc52a7ae4eee WHIRLPOOL aebed9c2eeb788ebb848b35175272889894b9811e72f84580d11cd21e2512f3f54bf8403e7fcc33318f134182943e594db0873e6fe0cfd6dd6efdf5d2d624f8e
|
||||
MISC metadata.xml 1028 SHA256 c797bb1194124a1110bd21f5c71a3465113b4bd4ccc2128bc9d6770e3683422d SHA512 5760ea954f5ccf09e5d69e101b6d68839a4517a9375adc3009b1bf846b98091ee0555e9c92bb0cf316670efec699cd24d04b4ebe7db5b65e363f83051d868512 WHIRLPOOL 63bef0bff7136a0ceaa3fccb936ef7d2b330c79bbe3fac17ad0f6bf030424c93500b188a633c4ea957cd6f7763065343c9750b010dedb2c6ad6b55f469736892
|
||||
@@ -0,0 +1,47 @@
|
||||
https://bugs.gentoo.org/834005
|
||||
https://github.com/prusa3d/PrusaSlicer/commit/0ffcfd8393457fd035576436752267c9a1e6bbcc
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -506,6 +506,9 @@ endif ()
|
||||
|
||||
# Find the Cereal serialization library
|
||||
find_package(cereal REQUIRED)
|
||||
+if (NOT TARGET cereal::cereal)
|
||||
+ add_library(cereal::cereal ALIAS cereal)
|
||||
+endif ()
|
||||
|
||||
# l10n
|
||||
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE)
|
||||
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||
endif ()
|
||||
|
||||
-target_link_libraries(PrusaSlicer libslic3r cereal)
|
||||
+target_link_libraries(PrusaSlicer libslic3r cereal::cereal)
|
||||
if (APPLE)
|
||||
# add_compile_options(-stdlib=libc++)
|
||||
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
|
||||
--- a/src/libslic3r/CMakeLists.txt
|
||||
+++ b/src/libslic3r/CMakeLists.txt
|
||||
@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED)
|
||||
target_link_libraries(libslic3r
|
||||
libnest2d
|
||||
admesh
|
||||
- cereal
|
||||
+ cereal::cereal
|
||||
libigl
|
||||
miniz
|
||||
boost_libs
|
||||
--- a/src/slic3r/CMakeLists.txt
|
||||
+++ b/src/slic3r/CMakeLists.txt
|
||||
@@ -270,7 +270,7 @@ endforeach()
|
||||
|
||||
encoding_check(libslic3r_gui)
|
||||
|
||||
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
+target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(libslic3r_gui Setupapi.lib)
|
||||
@@ -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
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -127,7 +127,7 @@
|
||||
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||
endif ()
|
||||
|
||||
-target_link_libraries(PrusaSlicer libslic3r cereal)
|
||||
+target_link_libraries(PrusaSlicer libslic3r libcereal)
|
||||
|
||||
if (APPLE)
|
||||
# add_compile_options(-stdlib=libc++)
|
||||
--- a/src/slic3r/CMakeLists.txt
|
||||
+++ b/src/slic3r/CMakeLists.txt
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
encoding_check(libslic3r_gui)
|
||||
|
||||
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(libslic3r_gui Setupapi.lib)
|
||||
--- a/src/libslic3r/CMakeLists.txt
|
||||
+++ b/src/libslic3r/CMakeLists.txt
|
||||
@@ -395,7 +395,7 @@
|
||||
target_link_libraries(libslic3r
|
||||
libnest2d
|
||||
admesh
|
||||
- cereal
|
||||
+ libcereal
|
||||
libigl
|
||||
miniz
|
||||
boost_libs
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -446,6 +446,12 @@
|
||||
|
||||
# Find the Cereal serialization library
|
||||
find_package(cereal REQUIRED)
|
||||
+add_library(libcereal INTERFACE)
|
||||
+if (NOT TARGET cereal::cereal)
|
||||
+ target_link_libraries(libcereal INTERFACE cereal)
|
||||
+else()
|
||||
+ target_link_libraries(libcereal INTERFACE cereal::cereal)
|
||||
+endif()
|
||||
|
||||
# l10n
|
||||
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/tests/fff_print/test_data.cpp
|
||||
+++ b/tests/fff_print/test_data.cpp
|
||||
@@ -4,10 +4,9 @@
|
||||
#include "libslic3r/GCodeReader.hpp"
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/Print.hpp"
|
||||
-#include "libslic3r/Format/OBJ.hpp"
|
||||
-#include "libslic3r/Format/STL.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
+#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
22
media-gfx/prusaslicer/metadata.xml
Normal file
22
media-gfx/prusaslicer/metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>3dprint@gentoo.org</email>
|
||||
<name>Gentoo 3D Printer Project</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into G-code instructions for FFF printers or PNG
|
||||
layers for mSLA 3D printers. It's compatible with any modern printer based on the RepRap toolchain, including
|
||||
all those based on the Marlin, Prusa, Sprinter and Repetier firmware. It also works with Mach3, LinuxCNC and
|
||||
Machinekit controllers.
|
||||
|
||||
PrusaSlicer is based on Slic3r by Alessandro Ranellucci and the RepRap community.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/prusa3d/PrusaSlicer/issues</bugs-to>
|
||||
<doc>https://help.prusa3d.com/en/article/general-info_1910</doc>
|
||||
<remote-id type="cpe">cpe:/a:prusa3d:prusaslicer</remote-id>
|
||||
<remote-id type="github">prusa3d/PrusaSlicer</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
87
media-gfx/prusaslicer/prusaslicer-2.5.0.ebuild
Normal file
87
media-gfx/prusaslicer/prusaslicer-2.5.0.ebuild
Normal file
@@ -0,0 +1,87 @@
|
||||
# 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/"FastSweepingDomain
|
||||
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"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user