commit:     8c82b288ee7e68b6b7e949f06073a349af8b8c72
Author:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 18:31:56 2021 +0000
Commit:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 18:32:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c82b288

app-shells/heirloom-sh: fix building with glibc-2.34, EAPI 8

Bug: https://bugs.gentoo.org/806344
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>

 .../heirloom-sh/files/heirloom-sh-glibc-2.34.patch     | 18 ++++++++++++++++++
 app-shells/heirloom-sh/heirloom-sh-050706-r1.ebuild    | 10 +++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/app-shells/heirloom-sh/files/heirloom-sh-glibc-2.34.patch 
b/app-shells/heirloom-sh/files/heirloom-sh-glibc-2.34.patch
new file mode 100644
index 000000000000..35cb56552697
--- /dev/null
+++ b/app-shells/heirloom-sh/files/heirloom-sh-glibc-2.34.patch
@@ -0,0 +1,18 @@
+--- a/fault.c
++++ b/fault.c
+@@ -43,6 +43,15 @@
+ #include      <errno.h>
+ #include      <string.h>
+ 
++#if __GLIBC__ >= 2
++# undef SIGSTKSZ
++# if defined __ia64__
++#  define SIGSTKSZ 262144
++# else
++#  define SIGSTKSZ 65536
++# endif
++#endif
++
+ static        void (*psig0_func)() = SIG_ERR; /* previous signal handler for 
signal 0 */
+ static        char sigsegv_stack[SIGSTKSZ];
+ 

diff --git a/app-shells/heirloom-sh/heirloom-sh-050706-r1.ebuild 
b/app-shells/heirloom-sh/heirloom-sh-050706-r1.ebuild
index 6e939fa84091..a67c4acb2d51 100644
--- a/app-shells/heirloom-sh/heirloom-sh-050706-r1.ebuild
+++ b/app-shells/heirloom-sh/heirloom-sh-050706-r1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
 inherit flag-o-matic toolchain-funcs
 
-# slightly broken
+# no tests available
 RESTRICT="test"
 
 DESCRIPTION="Heirloom Bourne Shell, derived from OpenSolaris code SVR4/SVID3"
@@ -16,6 +16,10 @@ LICENSE="CDDL"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
+PATCHES=(
+       "${FILESDIR}/${PN}-glibc-2.34.patch"
+)
+
 src_compile() {
        append-cppflags -D_GNU_SOURCE
        emake \

Reply via email to