commit:     111127c008c0f37857692cb8ca86ad973a8c34cb
Author:     Thiago Donato Ferreira <flowlnlnln <AT> gmail <DOT> com>
AuthorDate: Wed Nov  8 22:36:21 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Nov  9 07:47:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111127c0

games-action/prismlauncher: remove CMAKE_CXX_FLAGS_RELEASE from upstream

According to the CMake documentation, the CMAKE_<LANG>_FLAGS_<CONFIG>
flags will always be added after the CMAKE_<LANG>_FLAGS, which are the
ones affected by the CXXFLAGS environment variable Gentoo uses.

So, as to not override the user settings, we remove the line that sets
that variable, handling both the -D_FORTIFY_SOURCE=2 and -O2 flags.

CMake reference:
https://cmake.org/cmake/help/v3.28/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS

Closes: https://bugs.gentoo.org/911858
Signed-off-by: Thiago Donato Ferreira <flowlnlnln <AT> gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../{prismlauncher-7.2.ebuild => prismlauncher-7.2-r1.ebuild}       | 6 ++++--
 games-action/prismlauncher/prismlauncher-9999.ebuild                | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/games-action/prismlauncher/prismlauncher-7.2.ebuild 
b/games-action/prismlauncher/prismlauncher-7.2-r1.ebuild
similarity index 92%
rename from games-action/prismlauncher/prismlauncher-7.2.ebuild
rename to games-action/prismlauncher/prismlauncher-7.2-r1.ebuild
index 1d4b9a04996f..c60586d65332 100644
--- a/games-action/prismlauncher/prismlauncher-7.2.ebuild
+++ b/games-action/prismlauncher/prismlauncher-7.2-r1.ebuild
@@ -108,9 +108,11 @@ RDEPEND="
 src_prepare() {
        cmake_src_prepare
 
+       sed -i -e 's/-Werror//' CMakeLists.txt || die 'Failed to remove -Werror 
via sed'
+
        # Prevent conflicting with the user's flags
-       # See https://bugs.gentoo.org/848765 for more info
-       sed -i -e 's/-Werror//' -e 's/-D_FORTIFY_SOURCE=2//' CMakeLists.txt || 
die 'Failed to remove -Werror and -D_FORTIFY_SOURCE via sed'
+       # See https://bugs.gentoo.org/848765 and https://bugs.gentoo.org/911858 
for more info
+       sed -i -e "/CMAKE_CXX_FLAGS_RELEASE/d" CMakeLists.txt || die 'Failed to 
remove "CMAKE_CXX_FLAGS_RELEASE" from CMakeLists via sed'
 }
 
 src_configure(){

diff --git a/games-action/prismlauncher/prismlauncher-9999.ebuild 
b/games-action/prismlauncher/prismlauncher-9999.ebuild
index 1d4b9a04996f..c60586d65332 100644
--- a/games-action/prismlauncher/prismlauncher-9999.ebuild
+++ b/games-action/prismlauncher/prismlauncher-9999.ebuild
@@ -108,9 +108,11 @@ RDEPEND="
 src_prepare() {
        cmake_src_prepare
 
+       sed -i -e 's/-Werror//' CMakeLists.txt || die 'Failed to remove -Werror 
via sed'
+
        # Prevent conflicting with the user's flags
-       # See https://bugs.gentoo.org/848765 for more info
-       sed -i -e 's/-Werror//' -e 's/-D_FORTIFY_SOURCE=2//' CMakeLists.txt || 
die 'Failed to remove -Werror and -D_FORTIFY_SOURCE via sed'
+       # See https://bugs.gentoo.org/848765 and https://bugs.gentoo.org/911858 
for more info
+       sed -i -e "/CMAKE_CXX_FLAGS_RELEASE/d" CMakeLists.txt || die 'Failed to 
remove "CMAKE_CXX_FLAGS_RELEASE" from CMakeLists via sed'
 }
 
 src_configure(){

Reply via email to