Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/jpype/files/, dev-python/jpype/
Date: Mon, 24 Jul 2017 14:28:20
Message-Id: 1500906492.561d2af41a1662af7b81bedefc55a3f2e7f2ff70.monsieurp@gentoo
1 commit: 561d2af41a1662af7b81bedefc55a3f2e7f2ff70
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Mon Jul 24 07:26:40 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 24 14:28:12 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=561d2af4
7
8 dev-python/jpype: fix building with -Werror=terminate using GCC-6.
9
10 Gentoo-Bug: https://bugs.gentoo.org/608920
11 Package-Manager: Portage-2.3.6, Repoman-2.3.2
12 Closes: https://github.com/gentoo/gentoo/pull/5194
13
14 dev-python/jpype/files/jpype-gcc6-noexcept.patch | 57 ++++++++++++++++++++++++
15 dev-python/jpype/jpype-0.6.1.ebuild | 4 +-
16 dev-python/jpype/jpype-0.6.2.ebuild | 2 +
17 3 files changed, 62 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-python/jpype/files/jpype-gcc6-noexcept.patch b/dev-python/jpype/files/jpype-gcc6-noexcept.patch
20 new file mode 100644
21 index 00000000000..710844d3560
22 --- /dev/null
23 +++ b/dev-python/jpype/files/jpype-gcc6-noexcept.patch
24 @@ -0,0 +1,57 @@
25 +Bug: https://bugs.gentoo.org/show_bug.cgi?id=608920
26 +Upstream commit: https://github.com/originell/jpype/commit/3a4fb98938afd9c03070086d1b8fda8841410fa3
27 +
28 +From c3578c3488de35236f73b6eb27428b1f1526c45b Mon Sep 17 00:00:00 2001
29 +From: Peter-Levine <plevine457@×××××.com>
30 +Date: Sat, 11 Feb 2017 23:31:27 -0500
31 +Subject: [PATCH] Mark destructor that throws as noexcept(false) for >=C++11
32 +
33 +---
34 + native/common/include/jp_field.h | 2 +-
35 + native/common/include/jpype.h | 6 ++++++
36 + native/common/jp_field.cpp | 2 +-
37 + 3 files changed, 8 insertions(+), 2 deletions(-)
38 +
39 +diff --git a/native/common/include/jp_field.h b/native/common/include/jp_field.h
40 +index d28b795..f93752c 100644
41 +--- a/native/common/include/jp_field.h
42 ++++ b/native/common/include/jp_field.h
43 +@@ -38,7 +38,7 @@ public :
44 + /**
45 + * destructor
46 + */
47 +- virtual ~JPField();
48 ++ virtual ~JPField() NO_EXCEPT_FALSE;
49 +
50 + public :
51 + bool isStatic() const;
52 +diff --git a/native/common/include/jpype.h b/native/common/include/jpype.h
53 +index 7db5832..a492d06 100644
54 +--- a/native/common/include/jpype.h
55 ++++ b/native/common/include/jpype.h
56 +@@ -64,6 +64,12 @@
57 + #define PyUnicode_FromFormat PyString_FromFormat
58 + #endif
59 +
60 ++// Define this and use to allow destructors to throw in C++11 or later
61 ++#if __cplusplus >= 201103L
62 ++#define NO_EXCEPT_FALSE noexcept(false)
63 ++#else
64 ++#define NO_EXCEPT_FALSE
65 ++#endif
66 +
67 + #include <map>
68 + #include <string>
69 +diff --git a/native/common/jp_field.cpp b/native/common/jp_field.cpp
70 +index 8c75e58..5ef9d8c 100644
71 +--- a/native/common/jp_field.cpp
72 ++++ b/native/common/jp_field.cpp
73 +@@ -63,7 +63,7 @@ JPField::JPField(const JPField& fld)
74 + TRACE_OUT;
75 + }
76 +
77 +-JPField::~JPField()
78 ++JPField::~JPField() NO_EXCEPT_FALSE
79 + {
80 + TRACE_IN("JPField::~JPField");
81 + JPEnv::getJava()->DeleteGlobalRef(m_Field);
82
83 diff --git a/dev-python/jpype/jpype-0.6.1.ebuild b/dev-python/jpype/jpype-0.6.1.ebuild
84 index 6ab0fe49543..090ec143ecb 100644
85 --- a/dev-python/jpype/jpype-0.6.1.ebuild
86 +++ b/dev-python/jpype/jpype-0.6.1.ebuild
87 @@ -1,4 +1,4 @@
88 -# Copyright 1999-2016 Gentoo Foundation
89 +# Copyright 1999-2017 Gentoo Foundation
90 # Distributed under the terms of the GNU General Public License v2
91
92 EAPI=5
93 @@ -22,6 +22,8 @@ DEPEND="
94 dev-python/setuptools[${PYTHON_USEDEP}]
95 >=virtual/jdk-1.6"
96
97 +PATCHES=( "${FILESDIR}"/${PN}-gcc6-noexcept.patch )
98 +
99 python_compile() {
100 if ! python_is_python3; then
101 local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
102
103 diff --git a/dev-python/jpype/jpype-0.6.2.ebuild b/dev-python/jpype/jpype-0.6.2.ebuild
104 index 3ea7f1fefbc..f8dfefc0dd2 100644
105 --- a/dev-python/jpype/jpype-0.6.2.ebuild
106 +++ b/dev-python/jpype/jpype-0.6.2.ebuild
107 @@ -22,6 +22,8 @@ DEPEND="
108 dev-python/setuptools[${PYTHON_USEDEP}]
109 >=virtual/jdk-1.6"
110
111 +PATCHES=( "${FILESDIR}"/${PN}-gcc6-noexcept.patch )
112 +
113 python_compile() {
114 if ! python_is_python3; then
115 local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"