* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2018-07-11 14:39 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2018-07-11 14:39 UTC (permalink / raw
To: gentoo-commits
commit: ee0c8fbd905fd91c6933f6da1c2a5fcecaed9eb6
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 11 14:29:33 2018 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed Jul 11 14:39:28 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee0c8fbd
dev-scheme/c-wrapper: respect CFLAGS
Package-Manager: Portage-2.3.40, Repoman-2.3.9
dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild | 2 +-
dev-scheme/c-wrapper/files/c-wrapper-gentoo.patch | 51 ++++++++++++++++++++++
.../c-wrapper/files/c-wrapper-system-libffi.patch | 33 --------------
3 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
index 974fab71041..864680e0294 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
@@ -18,7 +18,7 @@ RDEPEND="dev-scheme/gauche
virtual/libffi"
DEPEND="${RDEPEND}"
-PATCHES=( "${FILESDIR}"/${PN}-system-libffi.patch )
+PATCHES=( "${FILESDIR}"/${PN}-gentoo.patch )
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
src_prepare() {
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-gentoo.patch b/dev-scheme/c-wrapper/files/c-wrapper-gentoo.patch
new file mode 100644
index 00000000000..e94d55fa0d2
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gentoo.patch
@@ -0,0 +1,51 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,7 @@
+
+ dnl Check for libraries
+ dnl Add your macro calls to check required libraries, if you have any.
++PKG_CHECK_MODULES([FFI], [libffi])
+
+ dnl Platform-dependent configuration.
+ AC_ARG_ENABLE(objc, [ --enable-objc turn on Objective-C support])
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -20,9 +20,10 @@
+ GAUCHE_PACKAGE = @GAUCHE_PACKAGE@
+ INSTALL = @GAUCHE_INSTALL@
+
+-CPPFLAGS = -I./libffi/include -DGAUCHE_API_0_8_8 @CPPFLAGS@
++CPPFLAGS = -DGAUCHE_API_0_8_8 @FFI_CFLAGS@ @CPPFLAGS@
++CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = libffi/.libs/libffi.a @LIBS@
++LIBS = @FFI_LIBS@ @LIBS@
+
+ YACC = @YACC@
+
+@@ -38,7 +39,7 @@
+ SCMFILES =
+ HEADERS =
+
+-TARGET = libffi/.libs/libffi.a $(ARCHFILES)
++TARGET = $(ARCHFILES)
+ GENERATED = libffi
+ CONFIG_GENERATED = libffi/Makefile Makefile cwcompile
+
+@@ -62,13 +63,13 @@
+ cd libffi; $(MAKE)
+
+ c-ffi.$(SOEXT): $(ffi_SRCS)
+- $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS)" --verbose c-ffi $(ffi_SRCS)
++ $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --cflags="$(CFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS)" --verbose c-ffi $(ffi_SRCS)
+
+ c-lex.$(SOEXT): $(clex_SRCS)
+- $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS)" --verbose c-lex $(clex_SRCS)
++ $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --cflags="$(CFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS)" --verbose c-lex $(clex_SRCS)
+
+ c-parser.$(SOEXT): $(cparser_SRCS) y.tab.c
+- $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS) $(cparser_LIBS)" --verbose c-parser $(cparser_SRCS)
++ $(GAUCHE_PACKAGE) compile --cppflags="$(CPPFLAGS)" --cflags="$(CFLAGS)" --ldflags="$(LDFLAGS)" --libs="$(LIBS) $(cparser_LIBS)" --verbose c-parser $(cparser_SRCS)
+
+ c-grammar.y: c-grammar.scm genyacc.scm
+ $(GOSH) genyacc.scm --outfile=c-grammar.y $<
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.patch b/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.patch
deleted file mode 100644
index 7f79f642cd0..00000000000
--- a/dev-scheme/c-wrapper/files/c-wrapper-system-libffi.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,6 +53,7 @@
-
- dnl Check for libraries
- dnl Add your macro calls to check required libraries, if you have any.
-+PKG_CHECK_MODULES([FFI], [libffi])
-
- dnl Platform-dependent configuration.
- AC_ARG_ENABLE(objc, [ --enable-objc turn on Objective-C support])
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -20,9 +20,9 @@
- GAUCHE_PACKAGE = @GAUCHE_PACKAGE@
- INSTALL = @GAUCHE_INSTALL@
-
--CPPFLAGS = -I./libffi/include -DGAUCHE_API_0_8_8 @CPPFLAGS@
-+CPPFLAGS = -DGAUCHE_API_0_8_8 @FFI_CFLAGS@ @CPPFLAGS@
- LDFLAGS = @LDFLAGS@
--LIBS = libffi/.libs/libffi.a @LIBS@
-+LIBS = @FFI_LIBS@ @LIBS@
-
- YACC = @YACC@
-
-@@ -38,7 +38,7 @@
- SCMFILES =
- HEADERS =
-
--TARGET = libffi/.libs/libffi.a $(ARCHFILES)
-+TARGET = $(ARCHFILES)
- GENERATED = libffi
- CONFIG_GENERATED = libffi/Makefile Makefile cwcompile
-
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2018-07-11 14:39 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2018-07-11 14:39 UTC (permalink / raw
To: gentoo-commits
commit: a87a1d38d3df77636fcd39600bd54e2b047c0de3
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 11 14:33:20 2018 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed Jul 11 14:39:29 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a87a1d38
dev-scheme/c-wrapper: fix finalizer of ffi_closure
Package-Manager: Portage-2.3.40, Repoman-2.3.9
.../{c-wrapper-0.6.1.ebuild => c-wrapper-0.6.1-r1.ebuild} | 5 ++++-
dev-scheme/c-wrapper/files/c-wrapper-closure.patch | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
similarity index 89%
rename from dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
rename to dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
index 864680e0294..709c8c2eb64 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
@@ -18,7 +18,10 @@ RDEPEND="dev-scheme/gauche
virtual/libffi"
DEPEND="${RDEPEND}"
-PATCHES=( "${FILESDIR}"/${PN}-gentoo.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-closure.patch
+ "${FILESDIR}"/${PN}-gentoo.patch
+)
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
src_prepare() {
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-closure.patch b/dev-scheme/c-wrapper/files/c-wrapper-closure.patch
new file mode 100644
index 00000000000..24be1d052fd
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-closure.patch
@@ -0,0 +1,10 @@
+--- a/src/closure_alloc.c
++++ b/src/closure_alloc.c
+@@ -100,6 +100,7 @@
+ ++(node->n);
+ return;
+ }
++ node = node->next;
+ }
+
+ node = malloc(sizeof(FreeNode));
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2018-07-11 14:39 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2018-07-11 14:39 UTC (permalink / raw
To: gentoo-commits
commit: a978300051b39f7dbdf54e5d09ca8c084ec61187
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 11 14:36:37 2018 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed Jul 11 14:39:29 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9783000
dev-scheme/c-wrapper: fix for >=sys-devel/gcc-5
Package-Manager: Portage-2.3.40, Repoman-2.3.9
dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild | 1 +
dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch | 45 ++++++++++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
index 709c8c2eb64..c47ed5ad71e 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-closure.patch
+ "${FILESDIR}"/${PN}-gcc-5.patch
"${FILESDIR}"/${PN}-gentoo.patch
)
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch b/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch
new file mode 100644
index 00000000000..091b1e2da10
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch
@@ -0,0 +1,45 @@
+--- a/src/c-parser.c
++++ b/src/c-parser.c
+@@ -1668,6 +1668,7 @@
+ {
+ static ScmObj trigger_line = SCM_FALSE;
+ ScmObj line_str;
++ ScmObj regexp = Scm_RegComp(SCM_STRING(SCM_MAKE_STR_IMMUTABLE("^#\\s+\\d+\\s+\"<stdin>\"")), 0);
+
+ /* skip the first line '# 1 "<stdin>"' */
+ Scm_ReadLineUnsafe(SCM_PORT(in));
+@@ -1682,16 +1683,26 @@
+ }
+ }
+
+- while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
+- if (SCM_NULLP(macro_list)) {
++ line_str = SCM_NIL;
++ while (!SCM_NULLP(macro_list)) {
++ ScmObj body_str = line_str;
++ if (SCM_NULLP(body_str)
++ && SCM_EOFP(body_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
+ Scm_Error("[bug] lost macro body");
+- } else {
+- ScmObj pos_name_args = SCM_CDAR(macro_list);
+- macro_list = SCM_CDR(macro_list);
+- Scm_FilenameSet(SCM_CAAR(pos_name_args));
+- Scm_LineNumberSet(SCM_INT_VALUE(SCM_CDAR(pos_name_args)));
+- parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), line_str);
+ }
++ while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))
++ && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(regexp), SCM_STRING(line_str)))) {
++ if (SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
++ Scm_Error("[bug] unexpected EOF while parsing macro body");
++ }
++ body_str = Scm_StringAppend2(SCM_STRING(body_str), SCM_STRING(line_str));
++ line_str = SCM_NIL;
++ }
++ ScmObj pos_name_args = SCM_CDAR(macro_list);
++ macro_list = SCM_CDR(macro_list);
++ Scm_FilenameSet(SCM_CAAR(pos_name_args));
++ Scm_LineNumberSet(SCM_INT_VALUE(SCM_CDAR(pos_name_args)));
++ parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), body_str);
+ }
+
+ SCM_RETURN(SCM_UNDEFINED);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2018-07-11 14:39 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2018-07-11 14:39 UTC (permalink / raw
To: gentoo-commits
commit: 93dd144b582fb7ecfad95b1654125510d1d7aee5
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 11 14:38:29 2018 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed Jul 11 14:39:30 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93dd144b
dev-scheme/c-wrapper: fix for >=sys-libs/glibc-2.25
Package-Manager: Portage-2.3.40, Repoman-2.3.9
dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild | 1 +
dev-scheme/c-wrapper/files/c-wrapper-glibc-2.25.patch | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
index c47ed5ad71e..cd0348a0133 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
@@ -22,6 +22,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-closure.patch
"${FILESDIR}"/${PN}-gcc-5.patch
"${FILESDIR}"/${PN}-gentoo.patch
+ "${FILESDIR}"/${PN}-glibc-2.25.patch
)
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-glibc-2.25.patch b/dev-scheme/c-wrapper/files/c-wrapper-glibc-2.25.patch
new file mode 100644
index 00000000000..0776b255bba
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-glibc-2.25.patch
@@ -0,0 +1,13 @@
+--- a/lib/c-wrapper/c-parser.scm
++++ b/lib/c-wrapper/c-parser.scm
+@@ -1115,7 +1115,9 @@
+ (raise e))))
+ (call-with-gcc-io include-dirs headers options
+ (lambda (in out)
+- (let ((macro-list (queue->list (macro-queue))))
++ (let ((macro-list (filter (lambda (m)
++ (not (string-prefix? "__glibc_macro_warning" (car m))))
++ (queue->list (macro-queue)))))
+ (for-each (lambda (macro-def)
+ (display (car macro-def) out)
+ (newline out))
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2019-09-14 9:28 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2019-09-14 9:28 UTC (permalink / raw
To: gentoo-commits
commit: c78b67307906419f4febc6edc43de86ea08d2c15
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 14 09:27:25 2019 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sat Sep 14 09:27:25 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c78b6730
dev-scheme/c-wrapper: do not compress info files
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild | 1 +
dev-scheme/c-wrapper/files/c-wrapper-info.patch | 66 +++++++++++++++++++++++++
2 files changed, 67 insertions(+)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
index 8636a7b9e7f..4bf3c117c0b 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-gcc-5.patch
"${FILESDIR}"/${PN}-gentoo.patch
"${FILESDIR}"/${PN}-glibc-2.25.patch
+ "${FILESDIR}"/${PN}-info.patch
)
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-info.patch b/dev-scheme/c-wrapper/files/c-wrapper-info.patch
new file mode 100644
index 00000000000..fed41c6aa2e
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-info.patch
@@ -0,0 +1,66 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,7 +47,6 @@
+ AC_PROG_CC
+ AC_PROG_YACC
+ AC_CHECK_PROGS(MAKEINFO, makeinfo)
+-AC_CHECK_PROGS(GZIP_PROGRAM, gzip)
+ AC_CHECK_PROGS(SED, sed)
+ AC_PATH_PROG([LDCONFIG], [ldconfig], [], [$PATH:/sbin:/usr/sbin])
+
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -11,7 +11,6 @@
+ GAUCHE_CONFIG = @GAUCHE_CONFIG@
+ INSTALL = @GAUCHE_INSTALL@
+ MAKEINFO = @MAKEINFO@
+-GZIP_PROGRAM = @GZIP_PROGRAM@
+
+ TEXIS = c-wrapper-ref.texi
+
+@@ -22,7 +21,7 @@
+ all: info
+
+ install: all
+- if test -f c-wrapper-refe.info.gz -o -f c-wrapper-refj.info.gz; then \
++ if test -f c-wrapper-refe.info -o -f c-wrapper-refj.info; then \
+ for info in *.info*; do \
+ $(INSTALL) -m 444 -T $(infodir) $$info; \
+ done; \
+@@ -47,7 +46,7 @@
+
+ pdf : c-wrapper-refe.pdf
+
+-info : c-wrapper-refe.info.gz c-wrapper-refj.info.gz
++info : c-wrapper-refe.info c-wrapper-refj.info
+
+ c-wrapper-refe.html : c-wrapper-refe.texi
+ texi2html -number c-wrapper-refe.texi
+@@ -64,11 +63,9 @@
+ c-wrapper-refe.texi : $(TEXIS) extract
+ $(GOSH) ./extract -en -o c-wrapper-refe.texi c-wrapper-ref.texi
+
+-c-wrapper-refe.info.gz : c-wrapper-refe.texi
+- if test X$(MAKEINFO) != X -a X$(GZIP_PROGRAM) != X; then \
++c-wrapper-refe.info : c-wrapper-refe.texi
++ if test X$(MAKEINFO) != X; then \
+ $(MAKEINFO) --no-warn c-wrapper-refe.texi; \
+- rm -rf c-wrapper-refe.info*.gz; \
+- $(GZIP_PROGRAM) c-wrapper-refe.info; \
+ fi
+
+ c-wrapper-refj.html : c-wrapper-refj.texi
+@@ -91,11 +88,9 @@
+ c-wrapper-refj.texi : $(TEXIS) extract
+ $(GOSH) ./extract -jp -o c-wrapper-refj.texi c-wrapper-ref.texi
+
+-c-wrapper-refj.info.gz : c-wrapper-refj.texi
+- if test X$(MAKEINFO) != X -a X$(GZIP_PROGRAM) != X; then \
++c-wrapper-refj.info : c-wrapper-refj.texi
++ if test X$(MAKEINFO) != X; then \
+ $(MAKEINFO) --no-warn c-wrapper-refj.texi; \
+- rm -rf c-wrapper-refj.info*.gz; \
+- $(GZIP_PROGRAM) c-wrapper-refj.info ; \
+ fi
+
+ clean:
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2021-10-02 13:20 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2021-10-02 13:20 UTC (permalink / raw
To: gentoo-commits
commit: fe43c9966c9f7e1b0c4ecc741e7ef49c1a20f8db
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 2 13:19:39 2021 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sat Oct 2 13:20:16 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe43c996
dev-scheme/c-wrapper: fix tests with Clang
Closes: https://bugs.gentoo.org/738814
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild | 3 +-
dev-scheme/c-wrapper/files/c-wrapper-clang.patch | 71 ++++++++++++++++++++++++
2 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
index f0b7aece565..35882c4965d 100644
--- a/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
+++ b/dev-scheme/c-wrapper/c-wrapper-0.6.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -26,6 +26,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-glibc-2.25.patch
"${FILESDIR}"/${PN}-info.patch
"${FILESDIR}"/${PN}-texinfo-6.7.patch
+ "${FILESDIR}"/${PN}-clang.patch
)
HTML_DOCS=( doc/${PN}-ref{e,j}.html )
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-clang.patch b/dev-scheme/c-wrapper/files/c-wrapper-clang.patch
new file mode 100644
index 00000000000..ba39e74df9c
--- /dev/null
+++ b/dev-scheme/c-wrapper/files/c-wrapper-clang.patch
@@ -0,0 +1,71 @@
+--- a/src/c-parser.c
++++ b/src/c-parser.c
+@@ -1667,14 +1667,25 @@
+ ScmObj Scm_ParseMacroCode(ScmObj in, ScmObj macro_list)
+ {
+ static ScmObj trigger_line = SCM_FALSE;
++ static ScmObj is_gcc = SCM_TRUE;
+ ScmObj line_str;
+ ScmObj rx;
++ int n = 0;
++ int i;
+
+ /* skip the first line '# 1 "<stdin>"' */
+ Scm_ReadLineUnsafe(SCM_PORT(in));
+
+ if (SCM_FALSEP(trigger_line)) {
+- trigger_line = SCM_MAKE_STR_IMMUTABLE("# 1 \"<stdin>\"");
++ ScmObj gcc = Scm_GlobalVariableRef(SCM_FIND_MODULE(CPARSER_MODULE_NAME, TRUE), SCM_SYMBOL(SCM_INTERN("GCC")), 0);
++ if (SCM_INTP(Scm_StringScanRight(SCM_STRING(gcc), SCM_STRING(SCM_MAKE_STR_IMMUTABLE("gcc")), SCM_STRING_SCAN_INDEX))) {
++ trigger_line = SCM_MAKE_STR_IMMUTABLE("# 1 \"<stdin>\"");
++ } else if (SCM_INTP(Scm_StringScanRight(SCM_STRING(gcc), SCM_STRING(SCM_MAKE_STR_IMMUTABLE("clang")), SCM_STRING_SCAN_INDEX))) {
++ trigger_line = SCM_MAKE_STR_IMMUTABLE("# 1 \"<stdin>\" 2");
++ is_gcc = SCM_FALSE;
++ } else {
++ Scm_Error("unknown compiler");
++ }
+ }
+
+ while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
+@@ -1683,22 +1694,33 @@
+ }
+ }
+
+- rx = Scm_RegComp(SCM_STRING(SCM_MAKE_STR_IMMUTABLE("^#\\s+\\d+\\s+\"<stdin>\"")), 0);
++ rx = Scm_RegComp(SCM_STRING(SCM_MAKE_STR_IMMUTABLE("^#\\s+(\\d+)\\s+\"<stdin>\"")), 0);
+ line_str = Scm_ReadLineUnsafe(SCM_PORT(in));
+- while (!SCM_EOFP(line_str)) {
+- ScmObj body_str = line_str;
++ for (i = 1; !SCM_EOFP(line_str); i++) {
++ ScmObj body_str;
++ ScmObj rm;
++ if (i < n) {
++ body_str = SCM_MAKE_STR_IMMUTABLE("");
++ goto parse;
++ }
++ body_str = line_str;
+ while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))
+ && SCM_STRING_LENGTH(line_str) >= 13
+ #ifdef SCM_REGEXP_MULTI_LINE
+- && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str), SCM_UNDEFINED, SCM_UNDEFINED))) {
++ && SCM_REGMATCHP(rm = Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str), SCM_UNDEFINED, SCM_UNDEFINED))) {
+ #else
+- && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str)))) {
++ && SCM_REGMATCHP(rm = Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str)))) {
+ #endif
+- if (SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
+- Scm_Error("[bug] unexpected EOF while parsing macro body");
++ if (SCM_TRUEP(is_gcc)) {
++ if (SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
++ Scm_Error("[bug] unexpected EOF while parsing macro body");
++ }
++ body_str = Scm_StringAppend2(SCM_STRING(body_str), SCM_STRING(line_str));
++ } else {
++ n = SCM_INT_VALUE(Scm_StringToNumber(SCM_STRING(Scm_RegMatchSubstr(SCM_REGMATCH(rm), SCM_MAKE_INT(1))), 10, 0));
+ }
+- body_str = Scm_StringAppend2(SCM_STRING(body_str), SCM_STRING(line_str));
+ }
++parse:
+ if (SCM_NULLP(macro_list)) {
+ Scm_Error("[bug] lost macro body");
+ } else {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/
@ 2022-02-03 14:18 Akinori Hattori
0 siblings, 0 replies; 7+ messages in thread
From: Akinori Hattori @ 2022-02-03 14:18 UTC (permalink / raw
To: gentoo-commits
commit: 22c363fb3820b785b15631b618edec4ee3a023a1
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 3 14:16:40 2022 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Thu Feb 3 14:17:56 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22c363fb
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 <AT> gentoo.org>
dev-scheme/c-wrapper/c-wrapper-0.6.1-r2.ebuild | 3 ++-
.../files/c-wrapper-gauche-abi-0.98.patch | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
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>)
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-03 14:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 14:18 [gentoo-commits] repo/gentoo:master commit in: dev-scheme/c-wrapper/, dev-scheme/c-wrapper/files/ Akinori Hattori
-- strict thread matches above, loose matches on Subject: below --
2021-10-02 13:20 Akinori Hattori
2019-09-14 9:28 Akinori Hattori
2018-07-11 14:39 Akinori Hattori
2018-07-11 14:39 Akinori Hattori
2018-07-11 14:39 Akinori Hattori
2018-07-11 14:39 Akinori Hattori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox