mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-17 05:45:58 +08:00
Fix building with GCC13 (required to build on Arch and Fedora) (#1220)
* Backport TBB fix to allow building on GCC13 * Fix OpenEXR build with GCC13 * Fix Clipper2 build with GCC13 --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
6108d8ee40
commit
e065809e3a
31
deps/OpenEXR/0001-OpenEXR-GCC13.patch
vendored
Normal file
31
deps/OpenEXR/0001-OpenEXR-GCC13.patch
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
--- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp
|
||||||
|
+++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp
|
||||||
|
@@ -159,6 +159,7 @@
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
+#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
|
// Windows specific addition to prevent the indirect import of the redefined min/max macros
|
||||||
|
--- a/OpenEXR/IlmImf/ImfHuf.h
|
||||||
|
+++ b/OpenEXR/IlmImf/ImfHuf.h
|
||||||
|
@@ -40,6 +40,8 @@
|
||||||
|
#include "ImfExport.h"
|
||||||
|
#include "ImfNamespace.h"
|
||||||
|
|
||||||
|
+#include <cstdint>
|
||||||
|
+
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// 16-bit Huffman compression and decompression:
|
||||||
|
--- a/OpenEXR/IlmImf/ImfMisc.h
|
||||||
|
+++ b/OpenEXR/IlmImf/ImfMisc.h
|
||||||
|
@@ -51,6 +51,7 @@
|
||||||
|
#include "ImfForward.h"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
+#include <cstdint>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
1
deps/OpenEXR/OpenEXR.cmake
vendored
1
deps/OpenEXR/OpenEXR.cmake
vendored
@ -33,6 +33,7 @@ bambustudio_add_cmake_project(OpenEXR
|
|||||||
# GIT_REPOSITORY https://github.com/openexr/openexr.git
|
# GIT_REPOSITORY https://github.com/openexr/openexr.git
|
||||||
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
||||||
URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
|
URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
|
||||||
|
PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OpenEXR-GCC13.patch
|
||||||
DEPENDS ${ZLIB_PKG}
|
DEPENDS ${ZLIB_PKG}
|
||||||
GIT_TAG v2.5.5
|
GIT_TAG v2.5.5
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
|
11
deps/TBB/0001-TBB-GCC13.patch
vendored
Normal file
11
deps/TBB/0001-TBB-GCC13.patch
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/include/tbb/task.h
|
||||||
|
+++ b/include/tbb/task.h
|
||||||
|
@@ -219,7 +219,7 @@
|
||||||
|
#if __TBB_TASK_PRIORITY
|
||||||
|
//! Pointer to the next offloaded lower priority task.
|
||||||
|
/** Used to maintain a list of offloaded tasks inside the scheduler. **/
|
||||||
|
- task* next_offloaded;
|
||||||
|
+ tbb::task* next_offloaded;
|
||||||
|
};
|
||||||
|
#endif /* __TBB_TASK_PRIORITY */
|
||||||
|
|
1
deps/TBB/TBB.cmake
vendored
1
deps/TBB/TBB.cmake
vendored
@ -2,6 +2,7 @@ bambustudio_add_cmake_project(
|
|||||||
TBB
|
TBB
|
||||||
URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
|
URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
|
||||||
URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
|
URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
|
||||||
|
PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-TBB-GCC13.patch
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DTBB_BUILD_SHARED=OFF
|
-DTBB_BUILD_SHARED=OFF
|
||||||
-DTBB_BUILD_TESTS=OFF
|
-DTBB_BUILD_TESTS=OFF
|
||||||
|
@ -17,6 +17,8 @@ constexpr auto CLIPPER2_VERSION = "1.0.6";
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include "clipper.core.h"
|
#include "clipper.core.h"
|
||||||
|
|
||||||
namespace Clipper2Lib {
|
namespace Clipper2Lib {
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "clipper2/clipper.engine.h"
|
#include "clipper2/clipper.engine.h"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
namespace Clipper2Lib {
|
namespace Clipper2Lib {
|
||||||
|
|
||||||
static const double FloatingPointTolerance = 1.0e-12;
|
static const double FloatingPointTolerance = 1.0e-12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user