Add pinentry 0.9.7-r1 to test qt 5.7 edit
[portage-overlay.git] / app-crypt / pinentry / files / pinentry-0.9.7-require-CPP11-for-qt-5-7.patches
1 From 124d390bea44dd3a83784f2b3da50cac1396f86c Mon Sep 17 00:00:00 2001
2 From: Kristian Fiskerstrand <kf@sumptuouscapital.com>
3 Date: Thu, 11 Aug 2016 14:44:37 +0200
4 Subject: [PATCH] (m4/qt.m4) Qt-5.7 requires build using C++11
5
6 Add detection for Qt-5.7 and make sure --std=c++11 is passed if building
7 against Qt 5.7
8 ---
9  m4/qt.m4 | 10 ++++++++++
10  1 file changed, 10 insertions(+)
11
12 diff --git a/m4/qt.m4 b/m4/qt.m4
13 index 093f428..90c4a6e 100644
14 --- a/m4/qt.m4
15 +++ b/m4/qt.m4
16 @@ -35,6 +35,7 @@ AC_DEFUN([FIND_QT],
17                  enable_pinentry_qt5="try")
18  
19    have_qt5_libs="no";
20 +  require_qt_cpp11="no";
21  
22    if test "$enable_pinentry_qt5" != "no"; then
23      PKG_CHECK_MODULES(PINENTRY_QT,
24 @@ -47,6 +48,15 @@ AC_DEFUN([FIND_QT],
25      fi
26    fi
27    if test "$have_qt5_libs" = "yes"; then
28 +    PKG_CHECK_MODULES(PINENTRY_QT_REQUIRE_CPP11,
29 +                      Qt5Core >= 5.7.0,
30 +                      [require_qt_cpp11="yes"],
31 +                      [require_qt_cpp11="no"])
32 +
33 +    if test "${require_qt_cpp11}" = "yes"; then
34 +      PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -std=c++11"
35 +    fi
36 +
37      AC_CHECK_TOOL(MOC, moc)
38      AC_MSG_CHECKING([moc version])
39      mocversion=`$MOC -v 2>&1`
40 -- 
41 2.7.3
42