commit:     d9a6680070254679a500207f66f7d23a7f567a53
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 25 18:34:50 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 19:13:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9a66800

x11-misc/flow-pomodoro: respect CXXFLAGS

We also use the more modern macro to detect C++11.

Closes: https://bugs.gentoo.org/742776
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../flow-pomodoro-1.2.0-respect-CXXFLAGS.patch     | 23 ++++++++++++++++++++++
 .../flow-pomodoro/flow-pomodoro-1.2.0-r1.ebuild    |  7 +++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git 
a/x11-misc/flow-pomodoro/files/flow-pomodoro-1.2.0-respect-CXXFLAGS.patch 
b/x11-misc/flow-pomodoro/files/flow-pomodoro-1.2.0-respect-CXXFLAGS.patch
new file mode 100644
index 00000000000..0da271d43b0
--- /dev/null
+++ b/x11-misc/flow-pomodoro/files/flow-pomodoro-1.2.0-respect-CXXFLAGS.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,15 +12,16 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ include_directories(${Qt5Core_INCLUDES})
+ include_directories(${Qt5Gui_INCLUDES})
+ 
+-set(CMAKE_CXX_FLAGS "${Qt5Gui_EXECUTABLE_COMPILE_FLAGS}")
++set(CMAKE_CXX_FLAGS "${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
+ 
+ include(CheckCXXCompilerFlag)
++
+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+ CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
++set(CMAKE_CXX_STANDARD_REQUIRED on)
++
+ if(COMPILER_SUPPORTS_CXX11)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+-elseif(COMPILER_SUPPORTS_CXX0X)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
++      set(CMAKE_CXX_STANDARD 11)
+ else()
+     message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. 
Please use a different C++ compiler.")
+ endif()

diff --git a/x11-misc/flow-pomodoro/flow-pomodoro-1.2.0-r1.ebuild 
b/x11-misc/flow-pomodoro/flow-pomodoro-1.2.0-r1.ebuild
index 114dc4f5294..bd7d62f1034 100644
--- a/x11-misc/flow-pomodoro/flow-pomodoro-1.2.0-r1.ebuild
+++ b/x11-misc/flow-pomodoro/flow-pomodoro-1.2.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -25,4 +25,7 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}/${P}-qt-5.12.patch" )
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.2.0-qt-5.12.patch
+       "${FILESDIR}"/${PN}-1.2.0-respect-CXXFLAGS.patch
+)

Reply via email to