commit:     581973a7c1aff3201ff85b07b7004f53156ce7d0
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Tue Mar  2 20:08:06 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  3 16:51:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=581973a7

sci-geosciences/gmt: Apply gcc-10 workaround

* Fix undeclared sys_siglist issue. Thanks to hangglider <AT> gmx.de for 
providing the patch.

Thanks-to: hangglider <AT> gmx.de
Closes: https://bugs.gentoo.org/738224
Closes: https://bugs.gentoo.org/710088
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-geosciences/gmt/files/gmt-5.4.4-sighandler.patch | 14 ++++++++++++++
 sci-geosciences/gmt/gmt-5.4.4.ebuild                 |  7 ++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/sci-geosciences/gmt/files/gmt-5.4.4-sighandler.patch 
b/sci-geosciences/gmt/files/gmt-5.4.4-sighandler.patch
new file mode 100644
index 00000000000..54aecb3c0d5
--- /dev/null
+++ b/sci-geosciences/gmt/files/gmt-5.4.4-sighandler.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/738224
+Author: [email protected]
+--- a/src/common_sighandler.c
++++ b/src/common_sighandler.c
+@@ -187,7 +187,7 @@
+               return;
+       }
+       else {
+-              fprintf (stderr, "ERROR: Caught signal number %d (%s) at\n", 
sig_num, sys_siglist[sig_num]);
++              fprintf (stderr, "ERROR: Caught signal number %d (%s) at\n", 
sig_num, strsignal(sig_num));
+               backtrace_symbols_fd (array, 2, STDERR_FILENO); /* print 
function with faulting instruction */
+               size = backtrace (array, 50); /* get void*'s for all entries on 
the stack */
+               fprintf (stderr, "Stack backtrace:\n");
+

diff --git a/sci-geosciences/gmt/gmt-5.4.4.ebuild 
b/sci-geosciences/gmt/gmt-5.4.4.ebuild
index 31d9c0f5124..2b891c81bc2 100644
--- a/sci-geosciences/gmt/gmt-5.4.4.ebuild
+++ b/sci-geosciences/gmt/gmt-5.4.4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit bash-completion-r1 cmake
+inherit bash-completion-r1 cmake flag-o-matic
 
 DESCRIPTION="Powerful map generator"
 HOMEPAGE="https://gmt.soest.hawaii.edu/";
@@ -33,6 +33,8 @@ RDEPEND="${DEPEND}
        sci-geosciences/gshhg-gmt
 "
 
+PATCHES=( "${FILESDIR}"/${P}-sighandler.patch )
+
 src_prepare() {
        cmake_src_prepare
        # Rename man pages to avoid a name conflict with gmt4
@@ -57,6 +59,9 @@ src_prepare() {
 }
 
 src_configure() {
+       # https://bugs.gentoo.org/710088
+       # drop on version bump
+       append-cflags -fcommon
        local mycmakeargs=(
                -DGMT_DATADIR="share/${P}"
                -DGMT_DOCDIR="share/doc/${PF}"

Reply via email to