From 012161af0b9f82255795e2049b591098109ca9fb Mon Sep 17 00:00:00 2001 From: Adam Pimentel Date: Fri, 3 Feb 2023 01:12:11 -0500 Subject: [PATCH] net-p2p/feather: stop monero subdirectory from touching cflags Closes: https://bugs.gentoo.org/892577 Signed-off-by: Adam Pimentel --- net-p2p/feather/feather-2.2.3.ebuild | 5 +++-- ...gs.patch => feather_remove_cflags-2.2.3.patch} | 0 ...patch => monero_add_some_includes-2.2.3.patch} | 0 .../files/monero_remove_cflags-2.2.3.patch | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) rename net-p2p/feather/files/{feather_remove_cflags.patch => feather_remove_cflags-2.2.3.patch} (100%) rename net-p2p/feather/files/{monero_add_some_includes.patch => monero_add_some_includes-2.2.3.patch} (100%) create mode 100644 net-p2p/feather/files/monero_remove_cflags-2.2.3.patch diff --git a/net-p2p/feather/feather-2.2.3.ebuild b/net-p2p/feather/feather-2.2.3.ebuild index 5052332abc..6a22d7eb07 100644 --- a/net-p2p/feather/feather-2.2.3.ebuild +++ b/net-p2p/feather/feather-2.2.3.ebuild @@ -98,9 +98,10 @@ src_prepare() { default echo "#define FEATHER_VERSION \"${PV}\"" > "${WORKDIR}"/${PF}/src/config-feather.h || die echo "#define TOR_VERSION \"NOT_EMBEDDED\"" >> "${WORKDIR}"/${PF}/src/config-feather.h || die - eapply "${FILESDIR}"/feather_remove_cflags.patch + eapply "${FILESDIR}"/feather_remove_cflags-${PV}.patch pushd monero || die - eapply "${FILESDIR}"/monero_add_some_includes.patch + eapply "${FILESDIR}"/monero_remove_cflags-${PV}.patch + eapply "${FILESDIR}"/monero_add_some_includes-${PV}.patch popd || die cmake_src_prepare } diff --git a/net-p2p/feather/files/feather_remove_cflags.patch b/net-p2p/feather/files/feather_remove_cflags-2.2.3.patch similarity index 100% rename from net-p2p/feather/files/feather_remove_cflags.patch rename to net-p2p/feather/files/feather_remove_cflags-2.2.3.patch diff --git a/net-p2p/feather/files/monero_add_some_includes.patch b/net-p2p/feather/files/monero_add_some_includes-2.2.3.patch similarity index 100% rename from net-p2p/feather/files/monero_add_some_includes.patch rename to net-p2p/feather/files/monero_add_some_includes-2.2.3.patch diff --git a/net-p2p/feather/files/monero_remove_cflags-2.2.3.patch b/net-p2p/feather/files/monero_remove_cflags-2.2.3.patch new file mode 100644 index 0000000000..5ae53dd887 --- /dev/null +++ b/net-p2p/feather/files/monero_remove_cflags-2.2.3.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -901,9 +901,9 @@ + message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}") + message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}") + +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG}") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG}") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_BACKCOMPAT_FLAGS}") + + # With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that + # is fixed in the code (Issue #847), force compiler to be conservative.