dev-scheme/stklos: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/881693
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-11-17 20:36:53 +00:00
parent 0af114cd7c
commit e5bc664a82
2 changed files with 25 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
https://bugs.gentoo.org/881693
--- a/configure.ac
+++ b/configure.ac
@@ -446,8 +446,9 @@ fi
###
### See in what direction the stack grows (code stolen from Sawfish)
###
-AC_RUN_IFELSE([AC_LANG_SOURCE([[ void inner (char *foo) { char bar; exit (!(foo >= &bar)); }
- void main () { char foo; inner (&foo); } ]])],[STACK_DIRECTION="DOWN"],[STACK_DIRECTION="UP"],[echo "Stack direction is not detected when cross compiling for now"])
+AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
+ void inner (char *foo) { char bar; exit (!(foo >= &bar)); }
+ int main (void) { char foo; inner (&foo); } ]])],[STACK_DIRECTION="DOWN"],[STACK_DIRECTION="UP"],[echo "Stack direction is not detected when cross compiling for now"])

View File

@@ -5,7 +5,7 @@ EAPI="8"
inherit autotools toolchain-funcs
DESCRIPTION="fast and light Scheme implementation"
DESCRIPTION="Fast and light Scheme implementation"
HOMEPAGE="https://www.stklos.net/"
SRC_URI="https://www.${PN}.net/download/${P}.tar.gz"
@@ -20,18 +20,24 @@ RDEPEND="dev-libs/boehm-gc[threads?]
dev-libs/libpcre"
DEPEND="${RDEPEND}"
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
DOCS=( AUTHORS ChangeLog {HACKING,NEWS}.md PACKAGES-USED {PORTING-NOTES,README}.md SUPPORTED-SRFIS )
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-configure-clang16.patch
)
src_prepare() {
default
use threads || rm -f tests/srfis/216.stk
default
eautoreconf
export LD="$(tc-getCC)"
}
src_configure() {
export LD="$(tc-getCC)"
econf \
--enable-threads=$(usex threads pthreads none) \
--without-gmp-light \