summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2022-02-03 23:16:40 +0900
committerAkinori Hattori <hattya@gentoo.org>2022-02-03 23:17:56 +0900
commit22c363fb3820b785b15631b618edec4ee3a023a1 (patch)
tree5abe01b7e18b229d623c97bd9b283e5b81e632e7 /dev-scheme
parentnet-mail/dovecot: remove old (diff)
downloadgentoo-22c363fb3820b785b15631b618edec4ee3a023a1.tar.gz
gentoo-22c363fb3820b785b15631b618edec4ee3a023a1.tar.bz2
gentoo-22c363fb3820b785b15631b618edec4ee3a023a1.zip
dev-scheme/c-wrapper: fix build with >=dev-scheme/gauche-0.9.11
Closes: https://bugs.gentoo.org/832510 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild3
-rw-r--r--dev-scheme/c-wrapper/files/c-wrapper-gauche-abi-0.98.patch28
2 files changed, 30 insertions, 1 deletions
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild
index adbb32c8b4b9..f0e379406c0c 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -21,6 +21,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-closure.patch
+ "${FILESDIR}"/${PN}-gauche-abi-0.98.patch
"${FILESDIR}"/${PN}-gcc-5.patch
"${FILESDIR}"/${PN}-gentoo.patch
"${FILESDIR}"/${PN}-glibc-2.25.patch
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-gauche-abi-0.98.patch b/dev-scheme/c-wrapper/files/c-wrapper-gauche-abi-0.98.patch
new file mode 100644
index 000000000000..15e8b6990cc7
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gauche-abi-0.98.patch
@@ -0,0 +1,28 @@
+--- a/src/c-ffi.c
++++ b/src/c-ffi.c
+@@ -347,7 +347,11 @@
+ }
+ sa = SCM_SLOT_ACCESSOR(SCM_CDR(p));
+ if (0 <= sa->slotNumber) {
++#if !defined(GAUCHE_API_VERSION) || GAUCHE_API_VERSION < 98
+ return SCM_FFI_TYPE_DATA(Scm_InstanceSlotRef(ctype, sa->slotNumber));
++#else
++ return SCM_FFI_TYPE_DATA(Scm_InstanceSlotRef(ctype, sa->slotNumber, SCM_UNBOUND));
++#endif
+ } else {
+ Scm_Error("wrong slot number: %d", sa->slotNumber);
+ }
+--- a/src/c-lexlib.stub
++++ b/src/c-lexlib.stub
+@@ -40,7 +40,11 @@
+ "if (nptr == endptr) {"
+ " SCM_RETURN(SCM_FALSE);"
+ "} else {"
++ "#if !defined(GAUCHE_API_VERSION) || GAUCHE_API_VERSION < 98"
+ " SCM_RETURN(Scm_MakeInteger64((ScmInt64) v));"
++ "#else"
++ " SCM_RETURN(Scm_MakeInteger64((int64_t) v));"
++ "#endif"
+ "}"))
+
+ (define-cproc strtod (nptr::<const-cstring>)