Compare commits

...

24 Commits
f35 ... rawhide

Author SHA1 Message Date
Mamoru TASAKA
e7e66a9e36 Backport upstream fix for build with Boost 1.79+ 2023-02-27 09:56:00 +09:00
Jonathan Wakely
991b979a79 Rebuilt for Boost 1.81 2023-02-20 22:13:08 +00:00
Scott Talbert
1549bb81f9 Rebuild with wxWidgets 3.2 (again) with additional fixes 2023-02-01 19:57:32 -05:00
Scott Talbert
a62e48a5ab Fix FTBFS with GCC 13 2023-01-27 11:45:01 +01:00
Fedora Release Engineering
e1c016f900 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 10:22:40 +00:00
Miro Hrončok
03c907e3cb Rebuilt for openvdb 10.0 2022-12-31 21:46:53 +01:00
Kalev Lember
4f32e08fa8 Switch back to wxWidgets 3.0 (#2131615)
When built against wxWidgets 3.2, prusa-slicer crashes on startup and is
completely unusable. Upstream recommends sticking with wxWidgets 3.0 for
now.

See https://github.com/prusa3d/PrusaSlicer/issues/8284

This reverts commit f2c45198b5.
2022-10-25 22:07:37 +02:00
Kalev Lember
fdd89dbdaf Remove incorrect flatpak conditional
Avoid dropping data/hints.ini for flatpak builds as it is equally useful
for both flatpak and regular builds. Plus, we can get rid of some spec
file complexity.
2022-10-24 19:51:50 +02:00
Kalev Lember
e244ab2c08 Don't ship udev rules for flatpak builds
Work around flatpak module build FTBFS by dropping udev rules. They are
only used when installed on the host, not in flatpak containers so we
can get rid of an unneccesary file at the same time.
2022-10-24 19:51:50 +02:00
Scott Talbert
f2c45198b5 Rebuild with wxWidgets 3.2 2022-08-04 14:30:24 -04:00
Jan Staněk
6bad3771f5 Update to 2.4.2 2022-07-25 16:36:04 +02:00
Fedora Release Engineering
0804388956 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 15:30:46 +00:00
Miro Hrončok
bc72b3e9e4 Rebuilt for openvdb 9.1 2022-06-27 17:23:01 +02:00
Miro Hrončok
eef89e9ece Exclude ix86 on F37+
https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
2022-06-27 17:21:54 +02:00
Thomas Rodgers
745a2de187 Rebuilt for Boost 1.78 2022-05-04 11:41:14 +02:00
Mamoru TASAKA
6597f2176e Remove the previous voronoi workaround for fixed binutils 2022-03-17 16:09:58 +09:00
Mamoru TASAKA
2afb99f84b %ix86 %arm: kill LTO for now
kill test_voronoi.cpp, compilation (as) hangs
2022-03-02 08:06:46 +09:00
Miro Hrončok
8957980666 libnest2d is now packaged in Fedora 2022-02-22 00:44:46 +01:00
Miro Hrončok
9e4ba3cf2e Adapt spec for 2.4.0 2022-02-22 00:12:55 +01:00
Miro Hrončok
60fc9ebe6c Revert "Disable GLIBCXX_ASSERTIONS"
This reverts commit 49eb9ad063.

It is no longer needed.
2022-02-22 00:04:27 +01:00
Tom spot Callaway
cb7a199d52 add no cereal lib patch 2022-02-14 13:32:37 -05:00
Tom spot Callaway
465b852a28 2.4.0 2022-02-14 13:32:03 -05:00
Orion Poplawski
200ca08428 Rebuild for glew 2.2 2022-02-09 21:03:04 -07:00
Fedora Release Engineering
6aaef67d53 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 09:32:44 +00:00
13 changed files with 380 additions and 102 deletions

View File

@ -1,29 +0,0 @@
From 581fef448d1afb1dc89199848dcccaee2e8a5c89 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Sat, 15 May 2021 22:04:55 -0500
Subject: [PATCH] Fix build error with non-const MINSIGSTKSZ.
see https://github.com/catchorg/Catch2/issues/2178
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
tests/catch2/catch.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/catch2/catch.hpp b/tests/catch2/catch.hpp
index 282d1562c..a8c71c864 100644
--- a/tests/catch2/catch.hpp
+++ b/tests/catch2/catch.hpp
@@ -10819,7 +10819,8 @@ namespace Catch {
// 32kb for the alternate stack seems to be sufficient. However, this value
// is experimentally determined, so that's not guaranteed.
- static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
+ // Update: MINSIGSTKSZ is not const anymore with recent glibc
+ static constexpr std::size_t sigStackSize = 32768;
static SignalDefs signalDefs[] = {
{ SIGINT, "SIGINT - Terminal interrupt signal" },
--
2.31.1

View File

@ -0,0 +1,31 @@
From 926ae0471800abd1e5335e251a5934570eb8f6ff Mon Sep 17 00:00:00 2001
From: Vojtech Bubnik <bubnikv@gmail.com>
Date: Mon, 25 Apr 2022 11:32:03 +0200
Subject: [PATCH] Follow-up to 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Fixing
compilation of tests on latest GCC/boost
---
tests/fff_print/test_data.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/fff_print/test_data.cpp b/tests/fff_print/test_data.cpp
index 32e31c264c..f7077007db 100644
--- a/tests/fff_print/test_data.cpp
+++ b/tests/fff_print/test_data.cpp
@@ -11,6 +11,7 @@
#include <string>
#include <boost/nowide/cstdio.hpp>
+#include <boost/nowide/fstream.hpp>
#include <boost/filesystem.hpp>
#include <libslic3r/ModelArrange.hpp>
@@ -286,7 +287,7 @@ std::string gcode(Print & print)
print.set_status_silent();
print.process();
print.export_gcode(temp.string(), nullptr, nullptr);
- std::ifstream t(temp.string());
+ boost::nowide::ifstream t(temp.string());
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
boost::nowide::remove(temp.string().c_str());
return str;

View File

@ -0,0 +1,81 @@
From 408e56f0390f20aaf793e0aa0c70c4d9544401d4 Mon Sep 17 00:00:00 2001
From: Vojtech Bubnik <bubnikv@gmail.com>
Date: Mon, 25 Apr 2022 08:33:48 +0200
Subject: [PATCH] Fix of Boost 1.79 deprecated boost::filesystem::ofstream
#8238 Replacing boost::filesystem::fstream with boost::nowide::fstream
variants with the unfortunate cost of string path conversion on Windows from
16 bits to UTF8 and back to 16 bits.
Unfortunately we cannot use std::filesystem yet as it is missing
on older MACs and because the interface is crooked minefield on Windows
see https://github.com/microsoft/STL/issues/909
---
src/hints/HintsToPot.cpp | 2 +-
src/libslic3r/Preset.cpp | 2 +-
src/slic3r/GUI/HintNotification.cpp | 8 +++++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp
index 7c8029cdeb..4791f0612f 100644
--- a/src/hints/HintsToPot.cpp
+++ b/src/hints/HintsToPot.cpp
@@ -9,7 +9,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(path.string(), 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 f3a1c15b3e..f171cb14dd 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -84,7 +84,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.string());
boost::property_tree::read_ini(ifs, tree);
return VendorProfile::from_ini(tree, path, load_all);
}
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index 93e0fb3259..820b74eedb 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -14,12 +14,14 @@
#include "libslic3r/Config.hpp"
#include "libslic3r/PrintConfig.hpp"
+#include <map>
+
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/log/trivial.hpp>
#include <boost/property_tree/ini_parser.hpp>
-#include <map>
+
#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
@@ -65,7 +67,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").string(), std::ios::binary);
cereal::BinaryOutputArchive archive(file);
HintsCerealData cd { ids };
try
@@ -84,7 +86,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.string());
cereal::BinaryInputArchive archive(file);
HintsCerealData cd;
try

View File

@ -0,0 +1,26 @@
Author: Thomas Viehmann <tv@beamnet.de>
Date: Thu, 8 Dec 2022 12:23:15 +0800
Subject: Fix segfault due to uninitialized imgui in wxwidgets3.2
Bug-Debian: https://bugs.debian.org/1022234
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022234#15
Forwarded: no
---
src/slic3r/GUI/HintNotification.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index e88947d..1ca52e0 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -560,7 +560,9 @@ void HintDatabase::clear_used()
void NotificationManager::HintNotification::count_spaces()
{
- //determine line width
+ ImGuiWrapper& imgui = *wxGetApp().imgui();
+ imgui.new_frame();
+ //determine line width
m_line_height = ImGui::CalcTextSize("A").y;

View File

@ -0,0 +1,32 @@
From: Chow Loong Jin <hyperair@debian.org>
Date: Tue, 11 Oct 2022 10:42:05 +0800
Subject: Fix segfault due to WxTranslations::Get() returning nullptr
Bug-Debian: https://bugs.debian.org/1020702
Bug: https://github.com/prusa3d/PrusaSlicer/issues/9024
Origin: https://github.com/prusa3d/PrusaSlicer/issues/8299#issuecomment-1236874810
Author: Lukas Matena <lukasmatena@seznam.cz>
---
src/slic3r/GUI/GUI_App.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 0aeebc7..fd22f2c 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -2075,6 +2075,15 @@ bool GUI_App::load_language(wxString language, bool initial)
{
// Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance.
wxLocale temp_locale;
+#ifdef __WXOSX__
+ // ysFIXME - temporary workaround till it isn't fixed in wxWidgets:
+ // Use English as an initial language, because of under OSX it try to load "inappropriate" language for wxLANGUAGE_DEFAULT.
+ // For example in our case it's trying to load "en_CZ" and as a result PrusaSlicer catch warning message.
+ // But wxWidgets guys work on it.
+ temp_locale.Init(wxLANGUAGE_ENGLISH);
+#else
+ temp_locale.Init();
+#endif // __WXOSX__
// Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code).
wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT);
// Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer

11
prusa-slicer-gcc13.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp.gcc13 PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp
--- PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp.gcc13 2022-04-22 07:01:19.000000000 -0400
+++ PrusaSlicer-version_2.4.2/src/libslic3r/PNGReadWrite.hpp 2023-01-26 20:47:42.311148005 -0500
@@ -4,6 +4,7 @@
#include <vector>
#include <string>
#include <istream>
+#include <cstdint>
namespace Slic3r { namespace png {

View File

@ -0,0 +1,35 @@
diff -up PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt.no-cereal-lib 2022-02-11 20:07:36.399806933 +0000
+++ PrusaSlicer-version_2.4.0/src/libslic3r/CMakeLists.txt 2022-02-11 20:14:53.806895641 +0000
@@ -335,7 +335,6 @@ target_include_directories(libslic3r PUB
target_link_libraries(libslic3r
libnest2d
admesh
- cereal
libigl
miniz
boost_libs
diff -up PrusaSlicer-version_2.4.0/src/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/CMakeLists.txt.no-cereal-lib 2022-02-11 20:31:04.581810442 +0000
+++ PrusaSlicer-version_2.4.0/src/CMakeLists.txt 2022-02-11 20:31:15.726430666 +0000
@@ -125,7 +125,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)
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
diff -up PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt.no-cereal-lib PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt
--- PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt.no-cereal-lib 2022-02-11 20:30:36.653762157 +0000
+++ PrusaSlicer-version_2.4.0/src/slic3r/CMakeLists.txt 2022-02-11 20:30:47.604388990 +0000
@@ -260,7 +260,7 @@ add_library(libslic3r_gui STATIC ${SLIC3
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 imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)

View File

@ -1,12 +1,11 @@
diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake
index 02420fed8..4b93111ab 100644
--- a/cmake/modules/FindOpenVDB.cmake
+++ b/cmake/modules/FindOpenVDB.cmake
@@ -326,28 +326,10 @@ macro(just_fail msg)
diff -up PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake.openexr3 PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake
--- PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake.openexr3 2021-12-21 15:57:35.000000000 +0000
+++ PrusaSlicer-version_2.4.0/cmake/modules/FindOpenVDB.cmake 2022-02-11 19:27:12.105404186 +0000
@@ -347,28 +347,10 @@ macro(just_fail msg)
return()
endmacro()
-find_package(IlmBase QUIET COMPONENTS Half)
-find_package(IlmBase QUIET)
-if(NOT IlmBase_FOUND)
- pkg_check_modules(IlmBase QUIET IlmBase)
-endif()
@ -32,7 +31,7 @@ index 02420fed8..4b93111ab 100644
# Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
# which we can query for optional deps. This basically runs ldd/otoll/objdump
@@ -398,7 +380,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
@@ -419,7 +401,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUI
set(OpenVDB_USES_LOG4CPLUS ON)
endif()
@ -41,7 +40,7 @@ index 02420fed8..4b93111ab 100644
if(NOT ${_HAS_DEP} EQUAL -1)
set(OpenVDB_USES_ILM ON)
endif()
@@ -429,11 +411,7 @@ if(OpenVDB_USES_LOG4CPLUS)
@@ -450,11 +432,7 @@ if(OpenVDB_USES_LOG4CPLUS)
find_package(Log4cplus ${_quiet} ${_required})
endif()
@ -54,7 +53,7 @@ index 02420fed8..4b93111ab 100644
find_package(OpenEXR ${_quiet} ${_required})
endif()
@@ -450,7 +428,7 @@ endif()
@@ -471,7 +449,7 @@ endif()
set(_OPENVDB_VISIBLE_DEPENDENCIES
Boost::iostreams
Boost::system
@ -63,7 +62,7 @@ index 02420fed8..4b93111ab 100644
)
set(_OPENVDB_DEFINITIONS)
@@ -460,10 +438,7 @@ endif()
@@ -481,10 +459,7 @@ endif()
if(OpenVDB_USES_EXR)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES

View File

@ -0,0 +1,43 @@
From f9f8e811526dbf41c4987400924b1028c2dadd1a Mon Sep 17 00:00:00 2001
From: KARBOWSKI Piotr <piotr.karbowski@gmail.com>
Date: Mon, 9 May 2022 10:35:50 +0200
Subject: [PATCH] Fix building with new Boost 1.79.0.
Fixes #8302
---
src/slic3r/GUI/DesktopIntegrationDialog.cpp | 3 ++-
src/slic3r/GUI/GUI_App.cpp | 1 +
src/slic3r/Utils/AppUpdater.cpp | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
index 81c681bc3a..7f99a505c6 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 8533854f4d..4435f836b3 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>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">prusa-slicer.desktop</id>
<id type="desktop">PrusaSlicer.desktop</id>
<metadata_license>0BSD</metadata_license>
<project_licence>AGPLv3</project_licence>
<summary>3D printing slicer optimized for Prusa printers</summary>

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Name=PrusaSlicer
GenericName=3D Printing Software
Icon=prusa-slicer
Exec=prusa-slicer %F
Terminal=false
Type=Application
MimeType=model/stl;model/x-wavefront-obj;model/3mf;model/x-geomview-off;application/x-amf;
Categories=Graphics;3DGraphics;Engineering;
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
StartupNotify=false
StartupWMClass=prusa-slicer

View File

@ -7,8 +7,8 @@
%endif
Name: prusa-slicer
Version: 2.3.3
Release: 3%{?dist}
Version: 2.4.2
Release: 9%{?dist}
Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -22,13 +22,17 @@ Summary: 3D printing slicer optimized for Prusa printers
License: AGPLv3
URL: https://github.com/prusa3d/PrusaSlicer/
Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%version.tar.gz
Source1: %name.desktop
Source2: %name.appdata.xml
# Fix build error with non-const MINSIGSTKSZ
# https://github.com/prusa3d/PrusaSlicer/pull/6518
Patch1: 0001-Fix-build-error-with-non-const-MINSIGSTKSZ.patch
Patch1: prusa-slicer-no-cereal-lib.patch
# Add missing include, needed for GCC13
# Proposed upstream: https://github.com/prusa3d/PrusaSlicer/pull/9434
Patch2: prusa-slicer-gcc13.patch
# Fix a couple of segfaults that happen with wxWidgets 3.2 (from Debian)
Patch3: prusa-slicer-fix-wxtranslations-segfault.patch
Patch4: prusa-slicer-fix-uninitialized-imgui-segfault.patch
# Beware!
# Patches >= 340 are only applied on Fedora 34+
@ -38,14 +42,23 @@ Patch1: 0001-Fix-build-error-with-non-const-MINSIGSTKSZ.patch
# OpenEXR 3 fixes
Patch351: https://github.com/archlinux/svntogit-community/blob/1dea61c0b5/trunk/prusa-slicer-openexr3.patch
# Boost 1.79 fixes
# https://github.com/prusa3d/PrusaSlicer/pull/8304
Patch391: prusa-slicer-pr8304-boost-1_79-fix.patch
# https://github.com/prusa3d/PrusaSlicer/commit/408e56f0390f20aaf793e0aa0c70c4d9544401d4
Patch392: prusa-slicer-boost_filesystem_ofstream-deprecation-1_79.patch
# https://github.com/prusa3d/PrusaSlicer/commit/926ae0471800abd1e5335e251a5934570eb8f6ff
Patch393: prusa-slicer-boost_filesystem_ofstream-deprecation-1_79-followup.patch
# Highly-parallel uild can run out of memory on PPC64le
%ifarch ppc64le
%global _smp_ncpus_max 8
%endif
# Workaround for https://github.com/prusa3d/PrusaSlicer/issues/7231
# https://bugzilla.redhat.com/show_bug.cgi?id=2023345
%global optflags %(echo '%optflags' | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
ExcludeArch: %{ix86}
%endif
BuildRequires: boost-devel
BuildRequires: cmake
@ -63,17 +76,14 @@ BuildRequires: gtest-devel
BuildRequires: ilmbase-devel
BuildRequires: ImageMagick
BuildRequires: libgudev
BuildRequires: miniz-devel
# Upstream miniz is no longer compatible, gotta use the fork.
# BuildRequires: miniz-devel
BuildRequires: NLopt-devel
BuildRequires: openvdb
BuildRequires: openvdb-devel
BuildRequires: systemd-devel
BuildRequires: tbb-devel
BuildRequires: wxBase3-devel
BuildRequires: wxGTK3-devel
# Upstream says this is obsolete, but still needed to compile
BuildRequires: poly2tri-devel
BuildRequires: wxGTK-devel
# Things we wish we could unbundle
#BuildRequires: admesh-devel >= 0.98.1
@ -81,6 +91,9 @@ BuildRequires: poly2tri-devel
#BuildRequires: boost-nowide-devel
#BuildRequires: qhull-devel
# For the %%_udevrulesdir macro
BuildRequires: systemd
%if %{with perltests}
# All of the old Perl dependencies needed to run the test suite
BuildRequires: perl-devel
@ -157,8 +170,13 @@ Provides: bundled(imgui) = 1.66
# License: MIT
Provides: bundled(mesa-libGLU)
# A header-only library, developed by one of the authors of PrusaSlicer. Not
# packaged in Fedora, but could be (for little benefit).
# PrusaResearch added functions to the upstream miniz. Yay.
# See https://github.com/prusa3d/PrusaSlicer/issues/7080
# License: MIT
Provides: bundled(miniz) = 2.1.0prusa
# A header-only library, developed by one of the authors of PrusaSlicer.
# Packaged in Fedora, but have not yet attempted unbundling.
# None of the source files carry licensing information, but a file LICENSE.txt
# exists and contains the AGPL text.
# License: AGPLv3
@ -219,6 +237,11 @@ Provides: slic3r-prusa3d = %version-%release
# Get Fedora 33++ behavior on anything older
%undefine __cmake_in_source_build
# i686 arm build fails with lto
%ifarch %ix86 %arm
%define _lto_cflags %{nil}
%endif
%description
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
@ -264,11 +287,6 @@ unbundle () {
unbundle eigen
unbundle expat
unbundle glew
unbundle miniz
# Upstream says this is obsolete, but it's still needed for compilation.
# The Fedora version appears to work fine for that purpose so we'll use it.
unbundle poly2tri
# These tests were fixed but the fixes were undone upsteam with commit ac6969c
# https://github.com/prusa3d/PrusaSlicer/issues/2288
@ -276,6 +294,13 @@ unbundle poly2tri
rm -f t/combineinfill.t t/custom_gcode.t t/fill.t t/multi.t t/retraction.t t/skirt_brim.t
commit "Remove xfail tests."
# compiling test_voronoi.cpp seems to hang...
# Fixed with binutils-2.38-6.fc37 (bug 2059646)
%if 0%{?fedora} < 37
sed -i tests/libslic3r/CMakeLists.txt -e '\@test_voronoi.cpp@d'
commit "Disable voronoi test"
%endif
%build
# -DSLIC3R_PCH=0 - Disable precompiled headers, which break cmake for some reason
@ -288,20 +313,6 @@ commit "Remove xfail tests."
%endif
%cmake_build
# Extract multiple sizes of PNG from the included .ico file. The order of
# extracted files can change, so a bit of magic is required to get stable
# filenames.
mkdir hicolor
pushd hicolor
convert -set filename:dim '%%wx%%h' ../resources/icons/PrusaSlicer.ico %name-%%[filename:dim].png
for res in 16 32 48 64 128 256; do
mkdir -p ${res}x${res}/apps
cp %name-${res}x${res}.png ${res}x${res}/apps/%name.png
done
rm %name-*.png
popd
# To avoid "iCCP: Not recognized known sRGB profile that has been edited"
pushd resources/icons
find . -type f -name "*.png" -exec convert {} -strip {} \;
@ -320,14 +331,9 @@ exec %_bindir/prusa-slicer.wrapped "$@"
END
chmod 755 %buildroot%_bindir/prusa-slicer
mkdir -p %buildroot%_datadir/icons/hicolor/
cp -r hicolor/* %buildroot%_datadir/icons/hicolor/
mkdir -p %buildroot%_datadir/appdata
install -m 644 %SOURCE2 %buildroot%_datadir/appdata/%name.appdata.xml
desktop-file-install --dir=%buildroot%_datadir/applications %SOURCE1
# For now, delete the Perl module that gets installed. It only exists because
# we want the test suite to run. It could be placed into a subpackage, but
# nothing needs it currently and it would conflict with the other slic3r
@ -366,12 +372,14 @@ find %buildroot%_datadir/PrusaSlicer/localization -type d | sed '
s:\(.*\):%dir \1:
' >> lang-files
# remove the flatpak data on non flatpak builds
%if 0%{?flatpak}
rm -rf %buildroot%_datadir/PrusaSlicer/data/
# Remove udev rules that aren't needed for flatpak builds
rm -f %buildroot%_prefix/lib/udev/rules.d/90-3dconnexion.rules
%endif
%check
desktop-file-validate %buildroot%_datadir/applications/PrusaGcodeviewer.desktop
# Some tests are Perl but there is a framework for other tests even though
# currently the only thing that uses them is one of the bundled libraries.
# There's no reason not to run as much as we can.
@ -384,17 +392,70 @@ rm -rf %buildroot%_datadir/PrusaSlicer/data/
%_bindir/%name
%_bindir/prusa-gcodeviewer
%_bindir/%name.wrapped
%_datadir/icons/hicolor/*/apps/%name.png
%_datadir/applications/%name.desktop
%_datadir/icons/hicolor/*/apps/PrusaSlicer*.png
%_datadir/applications/PrusaGcodeviewer.desktop
%_datadir/applications/PrusaSlicer.desktop
%_datadir/appdata/%name.appdata.xml
%dir %_datadir/PrusaSlicer
%if 0%{?flatpak}
%_datadir/PrusaSlicer/{icons,models,profiles,shaders,udev,applications}/
%else
%_datadir/PrusaSlicer/{icons,models,profiles,shaders,udev,applications,data}/
%_datadir/PrusaSlicer/{icons,models,profiles,shaders,shapes,udev,applications,data}/
%if !0%{?flatpak}
%_udevrulesdir/90-3dconnexion.rules
%endif
%changelog
* Mon Feb 27 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.2-9
- Backport upstream fix for build with Boost 1.79+
* Mon Feb 20 2023 Jonathan Wakely <jwakely@redhat.com> - 2.4.2-8
- Rebuilt for Boost 1.81
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-7
- Rebuild with wxWidgets 3.2 (again) with additional fixes
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-6
- Fix FTBFS with GCC 13
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Dec 31 2022 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
- Rebuilt for openvdb 10.0
* Tue Oct 25 2022 Kalev Lember <klember@redhat.com> - 2.4.2-3
- Switch back to wxWidgets 3.0 (#2131615)
* Thu Aug 04 2022 Scott Talbert <swt@techie.net> - 2.4.2-2
- Rebuild with wxWidgets 3.2
* Fri Jul 22 2022 Jan Staněk <jstanek@redhat.com> - 2.4.2-1
- Update to 2.4.2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 27 2022 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-5
- Rebuilt for openvdb 9.1
- Fixes: rhbz#2098784
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 2.4.0-4
- Rebuilt for Boost 1.78
* Thu Mar 17 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.0-3
- Remove the previous voronoi workaround for fixed binutils
* Wed Mar 2 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.0-2
- %%ix86 %%arm: kill LTO for now
- kill test_voronoi.cpp, compilation (as) hangs (bug 2059646)
* Mon Feb 14 2022 Tom Callaway <spot@fedoraproject.org> - 2.4.0-1
- update to 2.4.0
* Thu Feb 10 2022 Orion Poplawski <orion@nwra.com> - 2.3.3-5
- Rebuild for glew 2.2
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 30 2021 Miro Hrončok <mhroncok@redhat.com> - 2.3.3-3
- Disable GLIBCXX_ASSERTIONS
- Fixes rhbz#2023345

View File

@ -1 +1 @@
SHA512 (version_2.3.3.tar.gz) = 1f6b97e135202ad9de8f0bb212239ce2497de4205ea32f860b483473fb1f1783451d539a67cd97ef31f512a797b29c1067a1eff4134ea4a29b6218e5757657e2
SHA512 (version_2.4.2.tar.gz) = d480c608eadb58b53ee220317a749c0363db580759322ed7a9aebe2ea5c1acc30dbd3bdf9ed9849c23ba5c125ee6f923de6ac01987bf85abf7aeb3f91c2ae23f