commit:     0a5ec4376205dea9d57bc699cf9385477ea22dfd
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Jan 18 19:58:01 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb  9 23:47:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a5ec437

dev-scheme/c-wrapper: fix build with GCC 15

Closes: https://bugs.gentoo.org/943982
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/19
Merges: https://codeberg.org/gentoo/gentoo/pulls/19
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-scheme/c-wrapper/c-wrapper-0.6.1-r3.ebuild    | 54 +++++++++++++++++++++++
 dev-scheme/c-wrapper/files/c-wrapper-gcc-15.patch | 24 ++++++++++
 2 files changed, 78 insertions(+)

diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r3.ebuild 
b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r3.ebuild
new file mode 100644
index 000000000000..5b4ff185032a
--- /dev/null
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit autotools
+
+DESCRIPTION="Foreign function interface for C and Objective-C libraries"
+HOMEPAGE="http://www.koguro.net/prog/c-wrapper/";
+SRC_URI="http://www.koguro.net/prog/${PN}/${P}.tgz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="dev-scheme/gauche:=
+       dev-libs/libffi:="
+DEPEND="${RDEPEND}"
+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
+       "${FILESDIR}"/${PN}-info.patch
+       "${FILESDIR}"/${PN}-texinfo-6.7.patch
+       "${FILESDIR}"/${PN}-clang.patch
+       "${FILESDIR}"/${PN}-float128.patch
+       "${FILESDIR}"/${PN}-local-typedef.patch
+       "${FILESDIR}"/${PN}-extend-parser.patch
+       "${FILESDIR}"/${PN}-gcc-15.patch
+)
+HTML_DOCS=( doc/${PN}-ref{e,j}.html )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_test() {
+       emake -j1 -s check
+}
+
+src_install() {
+       default
+
+       if use examples; then
+               docompress -x /usr/share/doc/${PF}/examples
+               dodoc -r examples
+       fi
+}

diff --git a/dev-scheme/c-wrapper/files/c-wrapper-gcc-15.patch 
b/dev-scheme/c-wrapper/files/c-wrapper-gcc-15.patch
new file mode 100644
index 000000000000..9f6128b0c76c
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gcc-15.patch
@@ -0,0 +1,24 @@
+Fix build with GCC 15
+
+https://bugs.gentoo.org/943982
+
+--- a/src/c-lex.c
++++ b/src/c-lex.c
+@@ -887,7 +887,7 @@ static inline int backslash(int c)
+         case 'x':
+             c1 = buffer_peek_char();
+             if (is_hex_digit_char(c1)) {
+-                return readx(c1);
++                return readx();
+             } else {
+                 Scm_Error("\\x must be followed by hex-digit, but got '%c'", 
c1);
+             }
+@@ -934,7 +934,7 @@ static inline int backslash(int c)
+                         SCM_LIST1(SCM_MAKE_CHAR(c)));
+                 return c;
+             } else {
+-                return buffer_read_char(c);
++                return buffer_read_char();
+             }
+         }
+     } else {

Reply via email to