1 |
commit: 91f3c86af5dc59a1f23e654c5a53f89e8c14b17e |
2 |
Author: wraeth <wraeth <AT> wraeth <DOT> id <DOT> au> |
3 |
AuthorDate: Sat Jan 30 08:40:12 2016 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 1 00:04:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-mate.git/commit/?id=91f3c86a |
7 |
|
8 |
mate-extra/mate-system-monitor: Add support for c++11 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
Signed-off-by: NP-Hardass <NP-Hardass <AT> gentoo.org> |
12 |
|
13 |
...mate-system-monitor-1.10.1-cxxflags-cpp11.patch | 207 +++++++++++++++++++++ |
14 |
.../mate-system-monitor-1.10.1.ebuild | 13 +- |
15 |
2 files changed, 218 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/mate-extra/mate-system-monitor/files/mate-system-monitor-1.10.1-cxxflags-cpp11.patch b/mate-extra/mate-system-monitor/files/mate-system-monitor-1.10.1-cxxflags-cpp11.patch |
18 |
new file mode 100644 |
19 |
index 0000000..825a04a |
20 |
--- /dev/null |
21 |
+++ b/mate-extra/mate-system-monitor/files/mate-system-monitor-1.10.1-cxxflags-cpp11.patch |
22 |
@@ -0,0 +1,207 @@ |
23 |
+From 56594f6f10ba04aa51af976bc8339ea9ae54ea21 Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= <bdejean@×××××.com> |
25 |
+Date: Sun, 2 Aug 2015 06:37:21 +0200 |
26 |
+Subject: [PATCH] Add a smart CXXFLAGS / std=c++11 switch. |
27 |
+ |
28 |
+Code from glom and murrayc http://www.murrayc.com/permalink/2015/07/31/gtkmm-now-uses-c11/ . |
29 |
+--- |
30 |
+ configure.ac | 3 +- |
31 |
+ m4/ax_cxx_compile_stdcxx_11.m4 | 168 +++++++++++++++++++++++++++++++++++++++++ |
32 |
+ 2 files changed, 170 insertions(+), 1 deletion(-) |
33 |
+ create mode 100644 m4/ax_cxx_compile_stdcxx_11.m4 |
34 |
+ |
35 |
+diff --git a/configure.ac b/configure.ac |
36 |
+index 4afb816..b7759db 100644 |
37 |
+--- a/configure.ac |
38 |
++++ b/configure.ac |
39 |
+@@ -20,6 +20,7 @@ AC_PROG_CC |
40 |
+ AC_PROG_CXX |
41 |
+ AC_LANG([C++]) |
42 |
+ AC_LANG_COMPILER_REQUIRE |
43 |
++AX_CXX_COMPILE_STDCXX_11([],[mandatory]) |
44 |
+ PKG_PROG_PKG_CONFIG([0.19]) |
45 |
+ |
46 |
+ # Initialize libtool |
47 |
+@@ -103,7 +104,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then |
48 |
+ -Wnested-externs -Wpointer-arith \ |
49 |
+ -Wcast-align -Wsign-compare \ |
50 |
+ $CFLAGS" |
51 |
+- CXXFLAGS="-Wall -std=c++98 $CXXFLAGS" |
52 |
++ CXXFLAGS="-Wall $CXXFLAGS" |
53 |
+ else |
54 |
+ AC_MSG_RESULT(no) |
55 |
+ fi |
56 |
+diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 |
57 |
+new file mode 100644 |
58 |
+index 0000000..b83fac4 |
59 |
+--- /dev/null |
60 |
++++ b/m4/ax_cxx_compile_stdcxx_11.m4 |
61 |
+@@ -0,0 +1,168 @@ |
62 |
++# ============================================================================ |
63 |
++# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html |
64 |
++# ============================================================================ |
65 |
++# |
66 |
++# SYNOPSIS |
67 |
++# |
68 |
++# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) |
69 |
++# |
70 |
++# DESCRIPTION |
71 |
++# |
72 |
++# Check for baseline language coverage in the compiler for the C++11 |
73 |
++# standard; if necessary, add switches to CXXFLAGS to enable support. |
74 |
++# |
75 |
++# The first argument, if specified, indicates whether you insist on an |
76 |
++# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. |
77 |
++# -std=c++11). If neither is specified, you get whatever works, with |
78 |
++# preference for an extended mode. |
79 |
++# |
80 |
++# The second argument, if specified 'mandatory' or if left unspecified, |
81 |
++# indicates that baseline C++11 support is required and that the macro |
82 |
++# should error out if no mode with that support is found. If specified |
83 |
++# 'optional', then configuration proceeds regardless, after defining |
84 |
++# HAVE_CXX11 if and only if a supporting mode is found. |
85 |
++# |
86 |
++# LICENSE |
87 |
++# |
88 |
++# Copyright (c) 2008 Benjamin Kosnik <bkoz@××××××.com> |
89 |
++# Copyright (c) 2012 Zack Weinberg <zackw@×××××.com> |
90 |
++# Copyright (c) 2013 Roy Stogner <roystgnr@×××××××××××.edu> |
91 |
++# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@××××××.com> |
92 |
++# |
93 |
++# Copying and distribution of this file, with or without modification, are |
94 |
++# permitted in any medium without royalty provided the copyright notice |
95 |
++# and this notice are preserved. This file is offered as-is, without any |
96 |
++# warranty. |
97 |
++ |
98 |
++#serial 11 |
99 |
++ |
100 |
++m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ |
101 |
++ template <typename T> |
102 |
++ struct check |
103 |
++ { |
104 |
++ static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
105 |
++ }; |
106 |
++ |
107 |
++ struct Base { |
108 |
++ virtual void f() {} |
109 |
++ }; |
110 |
++ struct Child : public Base { |
111 |
++ virtual void f() override {} |
112 |
++ }; |
113 |
++ |
114 |
++ typedef check<check<bool>> right_angle_brackets; |
115 |
++ |
116 |
++ int a; |
117 |
++ decltype(a) b; |
118 |
++ |
119 |
++ typedef check<int> check_type; |
120 |
++ check_type c; |
121 |
++ check_type&& cr = static_cast<check_type&&>(c); |
122 |
++ |
123 |
++ auto d = a; |
124 |
++ auto l = [](){}; |
125 |
++ // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] |
126 |
++ struct use_l { use_l() { l(); } }; |
127 |
++ |
128 |
++ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
129 |
++ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this |
130 |
++ namespace test_template_alias_sfinae { |
131 |
++ struct foo {}; |
132 |
++ |
133 |
++ template<typename T> |
134 |
++ using member = typename T::member_type; |
135 |
++ |
136 |
++ template<typename T> |
137 |
++ void func(...) {} |
138 |
++ |
139 |
++ template<typename T> |
140 |
++ void func(member<T>*) {} |
141 |
++ |
142 |
++ void test(); |
143 |
++ |
144 |
++ void test() { |
145 |
++ func<foo>(0); |
146 |
++ } |
147 |
++ } |
148 |
++]]) |
149 |
++ |
150 |
++AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl |
151 |
++ m4_if([$1], [], [], |
152 |
++ [$1], [ext], [], |
153 |
++ [$1], [noext], [], |
154 |
++ [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl |
155 |
++ m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], |
156 |
++ [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], |
157 |
++ [$2], [optional], [ax_cxx_compile_cxx11_required=false], |
158 |
++ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) |
159 |
++ AC_LANG_PUSH([C++])dnl |
160 |
++ ac_success=no |
161 |
++ AC_CACHE_CHECK(whether $CXX supports C++11 features by default, |
162 |
++ ax_cv_cxx_compile_cxx11, |
163 |
++ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
164 |
++ [ax_cv_cxx_compile_cxx11=yes], |
165 |
++ [ax_cv_cxx_compile_cxx11=no])]) |
166 |
++ if test x$ax_cv_cxx_compile_cxx11 = xyes; then |
167 |
++ ac_success=yes |
168 |
++ fi |
169 |
++ |
170 |
++ m4_if([$1], [noext], [], [dnl |
171 |
++ if test x$ac_success = xno; then |
172 |
++ for switch in -std=gnu++11 -std=gnu++0x; do |
173 |
++ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) |
174 |
++ AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, |
175 |
++ $cachevar, |
176 |
++ [ac_save_CXXFLAGS="$CXXFLAGS" |
177 |
++ CXXFLAGS="$CXXFLAGS $switch" |
178 |
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
179 |
++ [eval $cachevar=yes], |
180 |
++ [eval $cachevar=no]) |
181 |
++ CXXFLAGS="$ac_save_CXXFLAGS"]) |
182 |
++ if eval test x\$$cachevar = xyes; then |
183 |
++ CXXFLAGS="$CXXFLAGS $switch" |
184 |
++ ac_success=yes |
185 |
++ break |
186 |
++ fi |
187 |
++ done |
188 |
++ fi]) |
189 |
++ |
190 |
++ m4_if([$1], [ext], [], [dnl |
191 |
++ if test x$ac_success = xno; then |
192 |
++ dnl HP's aCC needs +std=c++11 according to: |
193 |
++ dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf |
194 |
++ for switch in -std=c++11 -std=c++0x +std=c++11; do |
195 |
++ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) |
196 |
++ AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, |
197 |
++ $cachevar, |
198 |
++ [ac_save_CXXFLAGS="$CXXFLAGS" |
199 |
++ CXXFLAGS="$CXXFLAGS $switch" |
200 |
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
201 |
++ [eval $cachevar=yes], |
202 |
++ [eval $cachevar=no]) |
203 |
++ CXXFLAGS="$ac_save_CXXFLAGS"]) |
204 |
++ if eval test x\$$cachevar = xyes; then |
205 |
++ CXXFLAGS="$CXXFLAGS $switch" |
206 |
++ ac_success=yes |
207 |
++ break |
208 |
++ fi |
209 |
++ done |
210 |
++ fi]) |
211 |
++ AC_LANG_POP([C++]) |
212 |
++ if test x$ax_cxx_compile_cxx11_required = xtrue; then |
213 |
++ if test x$ac_success = xno; then |
214 |
++ AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) |
215 |
++ fi |
216 |
++ else |
217 |
++ if test x$ac_success = xno; then |
218 |
++ HAVE_CXX11=0 |
219 |
++ AC_MSG_NOTICE([No compiler with C++11 support was found]) |
220 |
++ else |
221 |
++ HAVE_CXX11=1 |
222 |
++ AC_DEFINE(HAVE_CXX11,1, |
223 |
++ [define if the compiler supports basic C++11 syntax]) |
224 |
++ fi |
225 |
++ |
226 |
++ AC_SUBST(HAVE_CXX11) |
227 |
++ fi |
228 |
++]) |
229 |
++ |
230 |
|
231 |
diff --git a/mate-extra/mate-system-monitor/mate-system-monitor-1.10.1.ebuild b/mate-extra/mate-system-monitor/mate-system-monitor-1.10.1.ebuild |
232 |
index 3a6b1b8..5af3ce1 100644 |
233 |
--- a/mate-extra/mate-system-monitor/mate-system-monitor-1.10.1.ebuild |
234 |
+++ b/mate-extra/mate-system-monitor/mate-system-monitor-1.10.1.ebuild |
235 |
@@ -1,4 +1,4 @@ |
236 |
-# Copyright 1999-2015 Gentoo Foundation |
237 |
+# Copyright 1999-2016 Gentoo Foundation |
238 |
# Distributed under the terms of the GNU General Public License v2 |
239 |
# $Id$ |
240 |
|
241 |
@@ -6,7 +6,7 @@ EAPI="5" |
242 |
|
243 |
GCONF_DEBUG="no" |
244 |
|
245 |
-inherit gnome2 versionator |
246 |
+inherit autotools gnome2 versionator |
247 |
|
248 |
MATE_BRANCH="$(get_version_component_range 1-2)" |
249 |
|
250 |
@@ -41,8 +41,17 @@ RDEPEND=" |
251 |
DEPEND="${RDEPEND} |
252 |
app-text/yelp-tools:0 |
253 |
>=dev-util/intltool-0.35:* |
254 |
+ mate-base/mate-common |
255 |
sys-devel/gettext:* |
256 |
>=sys-devel/autoconf-2.63:* |
257 |
virtual/pkgconfig:*" |
258 |
|
259 |
DOCS="AUTHORS ChangeLog NEWS README" |
260 |
+ |
261 |
+src_prepare() { |
262 |
+ # Add support for "smart" CXXFLAGS and C++11 switch |
263 |
+ # see https://github.com/mate-desktop/mate-system-monitor/commit/56594f |
264 |
+ epatch "${FILESDIR}/${P}-cxxflags-cpp11.patch" |
265 |
+ eautoreconf |
266 |
+ default |
267 |
+} |