From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 56DBA139694 for ; Sun, 16 Apr 2017 18:58:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0166E0CD4; Sun, 16 Apr 2017 18:58:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7DBCCE0CD4 for ; Sun, 16 Apr 2017 18:57:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5229F341683 for ; Sun, 16 Apr 2017 18:57:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A60FD7419 for ; Sun, 16 Apr 2017 18:57:54 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1492369034.7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/klayout/files/, sci-electronics/klayout/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-electronics/klayout/files/klayout-0.24.9-c++11-no-throw-in-destuctor.patch sci-electronics/klayout/klayout-0.24.9.ebuild X-VCS-Directories: sci-electronics/klayout/files/ sci-electronics/klayout/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc X-VCS-Branch: master Date: Sun, 16 Apr 2017 18:57:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f1147777-0794-42eb-9891-3b915032e9f8 X-Archives-Hash: acd53726ea091234cdc3db70f5629ac4 commit: 7ad2c402e2e1a7998ea1724f7675d126b8b5b6bc Author: Peter Levine gmail com> AuthorDate: Tue Mar 21 00:05:31 2017 +0000 Commit: David Seifert gentoo 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 }