commit:     11bab52c6e09ce85a0a2ef8c879f2548c0f0cb40
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 31 17:59:18 2020 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Aug 31 18:00:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11bab52c

games-board/gambit: Respect CFLAGS

Closes: https://bugs.gentoo.org/739218
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Package-Manager: Portage-3.0.0, Repoman-2.3.23

 .../gambit/files/gambit-1.0.4-compile-flags.patch  | 28 ++++++++++++++++++++++
 ...{gambit-1.0.4.ebuild => gambit-1.0.4-r1.ebuild} |  6 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/games-board/gambit/files/gambit-1.0.4-compile-flags.patch 
b/games-board/gambit/files/gambit-1.0.4-compile-flags.patch
new file mode 100644
index 00000000000..c8df686b86a
--- /dev/null
+++ b/games-board/gambit/files/gambit-1.0.4-compile-flags.patch
@@ -0,0 +1,28 @@
+From f573e47d095b114e07255537d754ef4ee4bf2885 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebast...@pipping.org>
+Date: Mon, 31 Aug 2020 19:51:56 +0200
+Subject: [PATCH] Respect custom CFLAGS and CXXFLAGS
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1be8b83..fa5f5b6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -114,9 +114,9 @@ if(POLICY CMP0020)
+     cmake_policy(SET CMP0020 NEW)
+ endif()
+ 
+-set(CMAKE_C_FLAGS "-Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes -Wbad-function-cast -Wformat=2 -Wundef 
-pedantic -Wno-long-long")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wpointer-arith 
-Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wbad-function-cast 
-Wformat=2 -Wundef -pedantic -Wno-long-long")
+ 
+-set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wshadow -Wpointer-arith 
-Wcast-align -Wwrite-strings -Wredundant-decls -Wformat=2 -Wundef -pedantic 
-Wno-long-long")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wshadow 
-Wpointer-arith -Wcast-align -Wwrite-strings -Wredundant-decls -Wformat=2 
-Wundef -pedantic -Wno-long-long")
+ 
+ if(DEVELOPER_MODE)
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -pedantic-errors")
+-- 
+2.27.0
+

diff --git a/games-board/gambit/gambit-1.0.4.ebuild 
b/games-board/gambit/gambit-1.0.4-r1.ebuild
similarity index 92%
rename from games-board/gambit/gambit-1.0.4.ebuild
rename to games-board/gambit/gambit-1.0.4-r1.ebuild
index e078316f6b2..fd20cc73c5d 100644
--- a/games-board/gambit/gambit-1.0.4.ebuild
+++ b/games-board/gambit/gambit-1.0.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -28,6 +28,10 @@ RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}-src"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-compile-flags.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                -DCONFIG_ENABLE_UPDATE_CHECKER=OFF

Reply via email to