summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/fuzzylite/files/0000-add-gcc11-12-suppor.patch24
-rw-r--r--dev-libs/fuzzylite/fuzzylite-6.0.ebuild6
2 files changed, 28 insertions, 2 deletions
diff --git a/dev-libs/fuzzylite/files/0000-add-gcc11-12-suppor.patch b/dev-libs/fuzzylite/files/0000-add-gcc11-12-suppor.patch
new file mode 100644
index 0000000..f008533
--- /dev/null
+++ b/dev-libs/fuzzylite/files/0000-add-gcc11-12-suppor.patch
@@ -0,0 +1,24 @@
+--- a/CMakeLists.txt 2023-04-28 18:52:00.282592705 +0200
++++ b/CMakeLists.txt 2023-04-28 21:15:51.596305542 +0200
+@@ -6,6 +6,9 @@
+
+ project(fuzzylite CXX)
+
++if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
++ add_definitions(-DUSE_DEPRECATED_CPP11_CALLS)
++endif()
+
+ if (APPLE)
+ cmake_policy(SET CMP0042 NEW)
+--- a/src/main.cpp 2023-04-28 17:09:20.408988525 +0200
++++ b/src/main.cpp 2023-04-28 21:16:58.692975160 +0200
+@@ -21,7 +21,9 @@
+
+ int main(int argc, const char* argv[]) {
+ std::set_terminate(fl::Exception::terminate);
++#if (__cplusplus < 201703L) && defined(USE_DEPRECATED_CPP11_CALLS)
+ std::set_unexpected(fl::Exception::terminate);
++#endif
+ ::signal(SIGSEGV, fl::Exception::signalHandler);
+ ::signal(SIGABRT, fl::Exception::signalHandler);
+ ::signal(SIGILL, fl::Exception::signalHandler);
diff --git a/dev-libs/fuzzylite/fuzzylite-6.0.ebuild b/dev-libs/fuzzylite/fuzzylite-6.0.ebuild
index 16a104e..a4f0226 100644
--- a/dev-libs/fuzzylite/fuzzylite-6.0.ebuild
+++ b/dev-libs/fuzzylite/fuzzylite-6.0.ebuild
@@ -18,13 +18,15 @@ S="${WORKDIR}/${P}/${PN}"
DOCS="../README.md"
+PATCHES=( "${FILESDIR}"/0000-add-gcc11-12-suppor.patch )
+
src_configure() {
local mycmakeargs=(
-DFL_BUILD_STATIC=$(usex static-libs)
- -DFL_USE_FLOAT=ON
+ -DFL_USE_FLOAT=OFF # https://bugs.gentoo.org/905664#c1
-DFL_BACKTRACE=ON
-DFL_BUILD_TESTS=OFF
- -DCMAKE_CXX_FLAGS="-Wno-error=deprecated-declarations"
+ -DCMAKE_CXX_FLAGS="-Wno-error"
)
cmake_src_configure
}