From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/klayout/files/, sci-electronics/klayout/
Date: Sun, 16 Apr 2017 18:57:54 +0000 (UTC) [thread overview]
Message-ID: <1492369034.7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc.soap@gentoo> (raw)
commit: 7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc
Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Tue Mar 21 00:05:31 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 18:57:14 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad2c402
sci-electronics/klayout: Fix "error: throw will always call terminate()" (bug #612978)
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4267
...layout-0.24.9-c++11-no-throw-in-destuctor.patch | 34 ++++++++++++++++++++++
sci-electronics/klayout/klayout-0.24.9.ebuild | 4 ++-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/sci-electronics/klayout/files/klayout-0.24.9-c++11-no-throw-in-destuctor.patch b/sci-electronics/klayout/files/klayout-0.24.9-c++11-no-throw-in-destuctor.patch
new file mode 100644
index 00000000000..4cb6473d58c
--- /dev/null
+++ b/sci-electronics/klayout/files/klayout-0.24.9-c++11-no-throw-in-destuctor.patch
@@ -0,0 +1,34 @@
+# Fixes "error: throw will always call terminate() [-Werror=terminate]". Gentoo bug 612978.
+
+--- a/src/tlAssert.h.old
++++ b/src/tlAssert.h
+@@ -27,6 +27,16 @@
+
+ #include "config.h"
+
++// For >=C++11, mark assertion_failed() with attribute [[noreturn]] and call std::terminate().
++// Or else, throw int(0) to tell the compiler that the assertion will not return.
++#if __cplusplus < 201103L
++#define ATTRIB_ASSERT KLAYOUT_DLL
++#define END_ASSERT throw int(0)
++#else
++#define ATTRIB_ASSERT [[noreturn]] KLAYOUT_DLL
++#define END_ASSERT std::terminate()
++#endif
++
+ namespace tl
+ {
+
+@@ -34,10 +44,10 @@
+ * @brief The corresponding assert macro
+ */
+
+-KLAYOUT_DLL void assertion_failed (const char *filename, unsigned int line, const char *condition);
++ATTRIB_ASSERT void assertion_failed (const char *filename, unsigned int line, const char *condition);
+
+ // the throw int(0) instruction will tell the compiler that the assertion will not return
+-#define tl_assert(COND) if (!(COND)) { tl::assertion_failed (__FILE__, __LINE__, #COND); throw int(0); }
++#define tl_assert(COND) if (!(COND)) { tl::assertion_failed (__FILE__, __LINE__, #COND); END_ASSERT; }
+
+ } // namespace tl
+
diff --git a/sci-electronics/klayout/klayout-0.24.9.ebuild b/sci-electronics/klayout/klayout-0.24.9.ebuild
index ff57ef39774..8c7ca923bbd 100644
--- a/sci-electronics/klayout/klayout-0.24.9.ebuild
+++ b/sci-electronics/klayout/klayout-0.24.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -27,6 +27,8 @@ RDEPEND="
DEPEND="${RDEPEND}"
all_ruby_prepare() {
+ epatch "${FILESDIR}"/${P}-c++11-no-throw-in-destuctor.patch
+
# now we generate the stub build configuration file for the home-brew build system
cp "${FILESDIR}/${PN}-0.23.10-Makefile.conf.linux-gentoo" "${S}/config/Makefile.conf.linux-gentoo" || die
}
next reply other threads:[~2017-04-16 18:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 18:57 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-07 9:25 [gentoo-commits] repo/gentoo:master commit in: sci-electronics/klayout/files/, sci-electronics/klayout/ Andreas Hüttel
2017-12-27 23:30 Andreas Hüttel
2017-12-28 11:43 Andreas Hüttel
2018-12-12 21:27 Andreas K. Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492369034.7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox