public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Akinori Hattori" <hattya@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-scheme/gauche/, dev-scheme/gauche/files/
Date: Tue, 29 Nov 2016 10:19:14 +0000 (UTC)	[thread overview]
Message-ID: <1480414638.5d11e566d57fd1102c27a9a7628a6d5b788c050d.hattya@gentoo> (raw)

commit:     5d11e566d57fd1102c27a9a7628a6d5b788c050d
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 29 10:17:18 2016 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Tue Nov 29 10:17:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d11e566

dev-scheme/gauche: fix build

Gentoo-Bug: 600976

Package-Manager: portage-2.3.0

 dev-scheme/gauche/files/gauche-0.9.5-main.patch | 116 ------------------------
 dev-scheme/gauche/gauche-0.9.5.ebuild           |  22 +++--
 2 files changed, 12 insertions(+), 126 deletions(-)

diff --git a/dev-scheme/gauche/files/gauche-0.9.5-main.patch b/dev-scheme/gauche/files/gauche-0.9.5-main.patch
deleted file mode 100644
index 20f7070..00000000
--- a/dev-scheme/gauche/files/gauche-0.9.5-main.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-commit 97196adb9dab30e7ab610daf4cc486bfc01ed403
-Author: Shiro Kawai <shiro@acm.org>
-Date:   Mon Oct 17 11:00:44 2016 -1000
-
-    Fix main.c to call 'main' proc properly
-
-    https://github.com/shirok/Gauche/issues/244
-
-diff --git a/src/core.c b/src/core.c
-index 923d116..fc01211 100644
---- a/src/core.c
-+++ b/src/core.c
-@@ -653,9 +653,14 @@ void Scm_SimpleMain(int argc, const char *argv[],
-     ScmModule *user = Scm_UserModule();
-     ScmObj mainproc = Scm_GlobalVariableRef(user, SCM_SYMBOL(SCM_INTERN("main")), 0);
-     if (SCM_PROCEDUREP(mainproc)) {
--        ScmObj r = Scm_ApplyRec1(mainproc, args);
--        if (SCM_INTP(r)) Scm_Exit(SCM_INT_VALUE(r));
--        else             Scm_Exit(70);
-+        static ScmObj run_main_proc = SCM_UNDEFINED;
-+        SCM_BIND_PROC(run_main_proc, "run-main", Scm_GaucheInternalModule());
-+        SCM_ASSERT(SCM_PROCEDUREP(run_main_proc));
-+
-+        ScmEvalPacket epak;
-+        int r = Scm_Apply(run_main_proc, SCM_LIST2(mainproc, args), &epak);
-+        SCM_ASSERT(r == 1 && SCM_INTP(epak.results[0]));
-+        Scm_Exit(SCM_INT_VALUE(epak.results[0]));
-     } else {
-         Scm_Exit(70);
-     }
-diff --git a/src/libeval.scm b/src/libeval.scm
-index 2a2c1fc..279fd7f 100644
---- a/src/libeval.scm
-+++ b/src/libeval.scm
-@@ -370,6 +370,17 @@
-        (loop1)))))
- 
- ;;;
-+;;; Kick 'main' procedure
-+;;;   Returns an integer suitable for the exit code.
-+;;;   This is mainly to display proper stack trace in case 'main'
-+;;;   raises an error.
-+(select-module gauche.internal)
-+(define (run-main main args)
-+  (guard (e [else (report-error e) 70])
-+    (let1 r (main args)
-+      (if (fixnum? r) r 70))))
-+
-+;;;
- ;;; Macros
- ;;;
- 
-diff --git a/src/main.c b/src/main.c
-index 46223a6..55660c9 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -502,22 +502,14 @@ int execute_script(const char *scriptfile, ScmObj args)
-                                          SCM_BINDING_STAY_IN_MODULE);
-     }
-     if (SCM_PROCEDUREP(mainproc)) {
--#if 0 /* Temporarily turned off due to the bug that loses stack traces. */
-+        static ScmObj run_main_proc = SCM_UNDEFINED;
-+        SCM_BIND_PROC(run_main_proc, "run-main", Scm_GaucheInternalModule());
-+        SCM_ASSERT(SCM_PROCEDUREP(run_main_proc));
-+        
-         ScmEvalPacket epak;
--        int r = Scm_Apply(mainproc, SCM_LIST1(args), &epak);
--        if (r > 0) {
--            ScmObj res = epak.results[0];
--            if (SCM_INTP(res)) return SCM_INT_VALUE(res);
--            else return 70;  /* EX_SOFTWARE, see SRFI-22. */
--        } else {
--            Scm_ReportError(epak.exception);
--            return 70;  /* EX_SOFTWARE, see SRFI-22. */
--        }
--#else
--        ScmObj r = Scm_ApplyRec1(mainproc, args);
--        if (SCM_INTP(r)) return SCM_INT_VALUE(r);
--        else             return 70;
--#endif
-+        int r = Scm_Apply(run_main_proc, SCM_LIST2(mainproc, args), &epak);
-+        SCM_ASSERT(r == 1 && SCM_INTP(epak.results[0]));
-+        return SCM_INT_VALUE(epak.results[0]);
-     }
-     return 0;
- }
-diff --git a/test/scripts.scm b/test/scripts.scm
-index 44bb44b..4e6777b 100644
---- a/test/scripts.scm
-+++ b/test/scripts.scm
-@@ -58,6 +58,25 @@
-              (process-output->string '("./gosh" "-ftest" "test.o")))
-          (delete-files "test.o")))
- 
-+;; This caused assertion failure in 0.9.5, because 'main' was called
-+;; via Scm_ApplyRec without base VM running.
-+;; See https://github.com/shirok/Gauche/issues/244
-+(test* "proper error handling of 'main'" "ok"
-+       (unwind-protect
-+           (begin
-+             (delete-files "test.o")
-+             (with-output-to-file "test.o"
-+               (^[]
-+                 (write
-+                  '(use gauche.partcont))
-+                 (write
-+                  '(define (main args)
-+                     (reset (shift k (call-with-input-file "gauche.h" k)))
-+                     (print 'ok)
-+                     0))))
-+             (process-output->string '("./gosh" "-ftest" "test.o")))
-+         (delete-files "test.o")))
-+
- ;;=======================================================================
- (test-section "gauche-config")
- 

diff --git a/dev-scheme/gauche/gauche-0.9.5.ebuild b/dev-scheme/gauche/gauche-0.9.5.ebuild
index 2e6fe55..b4bd7c8 100644
--- a/dev-scheme/gauche/gauche-0.9.5.ebuild
+++ b/dev-scheme/gauche/gauche-0.9.5.ebuild
@@ -25,17 +25,19 @@ DEPEND="${RDEPEND}
 	)"
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-rpath.patch
+	"${FILESDIR}"/${PN}-gauche.m4.patch
+	"${FILESDIR}"/${PN}-ext-ldflags.patch
+	"${FILESDIR}"/${PN}-xz-info.patch
+	"${FILESDIR}"/${PN}-rfc.tls.patch
+	"${FILESDIR}"/${P}-libressl.patch
+	"${FILESDIR}"/${P}-bsd.patch
+	"${FILESDIR}"/${P}-unicode.patch
+)
+
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-rpath.patch
-	epatch "${FILESDIR}"/${PN}-gauche.m4.patch
-	epatch "${FILESDIR}"/${PN}-ext-ldflags.patch
-	epatch "${FILESDIR}"/${PN}-xz-info.patch
-	epatch "${FILESDIR}"/${PN}-rfc.tls.patch
-	epatch "${FILESDIR}"/${P}-libressl.patch
-	epatch "${FILESDIR}"/${P}-bsd.patch
-	epatch "${FILESDIR}"/${P}-main.patch
-	epatch "${FILESDIR}"/${P}-unicode.patch
-	eapply_user
+	default
 
 	use ipv6 && sed -i "s/ -4//" ext/tls/ssltest-mod.scm
 


             reply	other threads:[~2016-11-29 10:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 10:19 Akinori Hattori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-12  6:29 [gentoo-commits] repo/gentoo:master commit in: dev-scheme/gauche/, dev-scheme/gauche/files/ Akinori Hattori
2024-03-24 13:10 Akinori Hattori
2024-02-11  6:40 Akinori Hattori
2022-01-31 13:20 Akinori Hattori
2022-01-31 13:20 Akinori Hattori
2021-01-26 14:47 Akinori Hattori
2021-01-26 14:47 Akinori Hattori
2019-09-27 14:37 Akinori Hattori
2018-07-11 13:42 Akinori Hattori
2018-06-23  6:50 Akinori Hattori
2016-11-27  7:35 Akinori Hattori
2016-11-27  7:25 Akinori Hattori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480414638.5d11e566d57fd1102c27a9a7628a6d5b788c050d.hattya@gentoo \
    --to=hattya@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox