summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Misbakh-Soloviov <mva@gentoo.org>2024-01-16 00:14:58 +0700
committerVadim Misbakh-Soloviov <mva@gentoo.org>2024-01-16 00:14:58 +0700
commite4f29b9e8c08ff10e242ac32eaec2381161ae27c (patch)
treea10d46be8a0d4596c091e3048572fea553779854
parentdev-libs/fuzzylite: fix build (diff)
downloadgamerlay-e4f29b9e8c08ff10e242ac32eaec2381161ae27c.tar.gz
gamerlay-e4f29b9e8c08ff10e242ac32eaec2381161ae27c.tar.bz2
gamerlay-e4f29b9e8c08ff10e242ac32eaec2381161ae27c.zip
dev-libs/fuzzylite: Some more fixes
Closes: https://bugs.gentoo.org/905664 Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
-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
}