1 |
commit: 22c363fb3820b785b15631b618edec4ee3a023a1 |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 3 14:16:40 2022 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 3 14:17:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22c363fb |
7 |
|
8 |
dev-scheme/c-wrapper: fix build with >=dev-scheme/gauche-0.9.11 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/832510 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org> |
13 |
|
14 |
dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild | 3 ++- |
15 |
.../files/c-wrapper-gauche-abi-0.98.patch | 28 ++++++++++++++++++++++ |
16 |
2 files changed, 30 insertions(+), 1 deletion(-) |
17 |
|
18 |
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 |
19 |
index adbb32c8b4b9..f0e379406c0c 100644 |
20 |
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild |
21 |
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2021 Gentoo Authors |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI="8" |
28 |
@@ -21,6 +21,7 @@ BDEPEND="virtual/pkgconfig" |
29 |
|
30 |
PATCHES=( |
31 |
"${FILESDIR}"/${PN}-closure.patch |
32 |
+ "${FILESDIR}"/${PN}-gauche-abi-0.98.patch |
33 |
"${FILESDIR}"/${PN}-gcc-5.patch |
34 |
"${FILESDIR}"/${PN}-gentoo.patch |
35 |
"${FILESDIR}"/${PN}-glibc-2.25.patch |
36 |
|
37 |
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 |
38 |
new file mode 100644 |
39 |
index 000000000000..15e8b6990cc7 |
40 |
--- /dev/null |
41 |
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gauche-abi-0.98.patch |
42 |
@@ -0,0 +1,28 @@ |
43 |
+--- a/src/c-ffi.c |
44 |
++++ b/src/c-ffi.c |
45 |
+@@ -347,7 +347,11 @@ |
46 |
+ } |
47 |
+ sa = SCM_SLOT_ACCESSOR(SCM_CDR(p)); |
48 |
+ if (0 <= sa->slotNumber) { |
49 |
++#if !defined(GAUCHE_API_VERSION) || GAUCHE_API_VERSION < 98 |
50 |
+ return SCM_FFI_TYPE_DATA(Scm_InstanceSlotRef(ctype, sa->slotNumber)); |
51 |
++#else |
52 |
++ return SCM_FFI_TYPE_DATA(Scm_InstanceSlotRef(ctype, sa->slotNumber, SCM_UNBOUND)); |
53 |
++#endif |
54 |
+ } else { |
55 |
+ Scm_Error("wrong slot number: %d", sa->slotNumber); |
56 |
+ } |
57 |
+--- a/src/c-lexlib.stub |
58 |
++++ b/src/c-lexlib.stub |
59 |
+@@ -40,7 +40,11 @@ |
60 |
+ "if (nptr == endptr) {" |
61 |
+ " SCM_RETURN(SCM_FALSE);" |
62 |
+ "} else {" |
63 |
++ "#if !defined(GAUCHE_API_VERSION) || GAUCHE_API_VERSION < 98" |
64 |
+ " SCM_RETURN(Scm_MakeInteger64((ScmInt64) v));" |
65 |
++ "#else" |
66 |
++ " SCM_RETURN(Scm_MakeInteger64((int64_t) v));" |
67 |
++ "#endif" |
68 |
+ "}")) |
69 |
+ |
70 |
+ (define-cproc strtod (nptr::<const-cstring>) |