1 |
commit: c2e007c630acea68b4be35af63ebc1accb33b210 |
2 |
Author: Christophe Lermytte <gentoo <AT> lermytte <DOT> be> |
3 |
AuthorDate: Thu Feb 24 22:10:07 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 24 22:26:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2e007c6 |
7 |
|
8 |
media-gfx/prusaslicer: fix build with cereal-1.3.1 |
9 |
|
10 |
Upstream patch on master branch, should make it in the new release. |
11 |
|
12 |
Signed-off-by: Christophe Lermytte <gentoo <AT> lermytte.be> |
13 |
Closes: https://bugs.gentoo.org/834005 |
14 |
Closes: https://github.com/gentoo/gentoo/pull/24341 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
.../files/2.4.0-fix-build-with-cereal-1.3.1.patch | 47 ++++++++++++++++++++++ |
18 |
media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild | 4 ++ |
19 |
2 files changed, 51 insertions(+) |
20 |
|
21 |
diff --git a/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch b/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch |
22 |
new file mode 100644 |
23 |
index 000000000000..d57eb8a31728 |
24 |
--- /dev/null |
25 |
+++ b/media-gfx/prusaslicer/files/2.4.0-fix-build-with-cereal-1.3.1.patch |
26 |
@@ -0,0 +1,47 @@ |
27 |
+https://bugs.gentoo.org/834005 |
28 |
+https://github.com/prusa3d/PrusaSlicer/commit/0ffcfd8393457fd035576436752267c9a1e6bbcc |
29 |
+--- a/CMakeLists.txt |
30 |
++++ b/CMakeLists.txt |
31 |
+@@ -506,6 +506,9 @@ endif () |
32 |
+ |
33 |
+ # Find the Cereal serialization library |
34 |
+ find_package(cereal REQUIRED) |
35 |
++if (NOT TARGET cereal::cereal) |
36 |
++ add_library(cereal::cereal ALIAS cereal) |
37 |
++endif () |
38 |
+ |
39 |
+ # l10n |
40 |
+ set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization") |
41 |
+--- a/src/CMakeLists.txt |
42 |
++++ b/src/CMakeLists.txt |
43 |
+@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE) |
44 |
+ set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer") |
45 |
+ endif () |
46 |
+ |
47 |
+-target_link_libraries(PrusaSlicer libslic3r cereal) |
48 |
++target_link_libraries(PrusaSlicer libslic3r cereal::cereal) |
49 |
+ if (APPLE) |
50 |
+ # add_compile_options(-stdlib=libc++) |
51 |
+ # add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) |
52 |
+--- a/src/libslic3r/CMakeLists.txt |
53 |
++++ b/src/libslic3r/CMakeLists.txt |
54 |
+@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED) |
55 |
+ target_link_libraries(libslic3r |
56 |
+ libnest2d |
57 |
+ admesh |
58 |
+- cereal |
59 |
++ cereal::cereal |
60 |
+ libigl |
61 |
+ miniz |
62 |
+ boost_libs |
63 |
+--- a/src/slic3r/CMakeLists.txt |
64 |
++++ b/src/slic3r/CMakeLists.txt |
65 |
+@@ -270,7 +270,7 @@ endforeach() |
66 |
+ |
67 |
+ encoding_check(libslic3r_gui) |
68 |
+ |
69 |
+-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) |
70 |
++target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) |
71 |
+ |
72 |
+ if (MSVC) |
73 |
+ target_link_libraries(libslic3r_gui Setupapi.lib) |
74 |
|
75 |
diff --git a/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild |
76 |
index c6e7e07d2d27..e3318ba01834 100644 |
77 |
--- a/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild |
78 |
+++ b/media-gfx/prusaslicer/prusaslicer-2.4.0-r2.ebuild |
79 |
@@ -49,6 +49,10 @@ DEPEND="${RDEPEND} |
80 |
media-libs/qhull[static-libs] |
81 |
" |
82 |
|
83 |
+PATCHES=( |
84 |
+ "${FILESDIR}"/${PV}-fix-build-with-cereal-1.3.1.patch |
85 |
+) |
86 |
+ |
87 |
S="${WORKDIR}/${MY_PN}-version_${PV}" |
88 |
|
89 |
src_prepare() { |