summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2021-01-26 23:46:13 +0900
committerAkinori Hattori <hattya@gentoo.org>2021-01-26 23:47:33 +0900
commit63c1a2e9e670131d4f16b96ee08991ab239cf003 (patch)
treeb5cf90cd915b8e9352face0a0bf1f1f702233d8c /dev-scheme/gauche
parentdev-scheme/gauche: rename patch (diff)
downloadgentoo-63c1a2e9e670131d4f16b96ee08991ab239cf003.tar.gz
gentoo-63c1a2e9e670131d4f16b96ee08991ab239cf003.tar.bz2
gentoo-63c1a2e9e670131d4f16b96ee08991ab239cf003.zip
dev-scheme/gauche: new upstream release
Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'dev-scheme/gauche')
-rw-r--r--dev-scheme/gauche/Manifest1
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.10-srfi-134.patch56
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.10-sys-ctermid.patch27
-rw-r--r--dev-scheme/gauche/files/gauche-xz-info.patch31
-rw-r--r--dev-scheme/gauche/gauche-0.9.10.ebuild63
5 files changed, 178 insertions, 0 deletions
diff --git a/dev-scheme/gauche/Manifest b/dev-scheme/gauche/Manifest
index 1e800470dbd4..2e14732c353f 100644
--- a/dev-scheme/gauche/Manifest
+++ b/dev-scheme/gauche/Manifest
@@ -1 +1,2 @@
+DIST Gauche-0.9.10.tgz 7701616 BLAKE2B ecffc8cbffdbbea53a52468bcc190c57eede51ade78ccafd323299458f333794cc613bbfa11090d261993908020ccf8d42c2142da5996e1e55188f28e03cc28b SHA512 f014ec00903fc91b90da8dbdaace04a64d12695c631e923d5cdca3574aaf6701374f5adbed20c395881b047bb5a448352614d4ce7f16b6e38f69382bf8e66ed0
DIST Gauche-0.9.9.tgz 7244347 BLAKE2B 843fe0c7341c7020ad9130edfc41f02eeda0bc2e1f8983f83faf443f69073e132a9a2f37e6a6260334ab9aacc3e976a2df68d4c43f17f6ea07531c14e783efec SHA512 ff6fdc80bd14c4a5dc57b5a6ac9558078a557cd30c2efe98146c3817a7830ef2b3f5bb6184ce6b8ac9b1b9cb636f041643fa761b2f99e6dd0602e13e7928e210
diff --git a/dev-scheme/gauche/files/gauche-0.9.10-srfi-134.patch b/dev-scheme/gauche/files/gauche-0.9.10-srfi-134.patch
new file mode 100644
index 000000000000..1e9da832083e
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.10-srfi-134.patch
@@ -0,0 +1,56 @@
+commit 8582c68d127b0127f15e1a7f74265e3c0e9f3d87
+Author: Shiro Kawai <shiro@acm.org>
+Date: Tue Dec 22 10:34:09 2020 -1000
+
+ Incorporate upstream fixes
+
+ https://github.com/scheme-requests-for-implementation/srfi-134/commit/2bfd4b585c8140c25f4fdd9adef84ab3ceca67b3
+
+diff --git a/lib/data/ideque.scm b/lib/data/ideque.scm
+index 484ca52b4..e4894e2d0 100644
+--- a/lib/data/ideque.scm
++++ b/lib/data/ideque.scm
+@@ -231,12 +231,12 @@
+ (define (%ideque-drop dq n) ; n is within the range
+ (match-let1 ($ <ideque> lenf f lenr r) dq
+ (if (<= n lenf)
+- (check n (drop f n) lenr r)
++ (check (- lenf n) (drop f n) lenr r)
+ (let1 lenr. (- lenr (- n lenf))
+ (check 0 '() lenr. (take r lenr.))))))
+
+ (define (%check-length dq n)
+- (unless (<= 0 n (- (ideque-length dq) 1))
++ (unless (<= 0 n (ideque-length dq))
+ (error "argument is out of range:" n)))
+
+ ;; API [srfi-134]
+diff --git a/test/include/ideque-tests.scm b/test/include/ideque-tests.scm
+index 63f3f73a0..5e4c9e023 100644
+--- a/test/include/ideque-tests.scm
++++ b/test/include/ideque-tests.scm
+@@ -50,6 +50,12 @@
+ (test-assert (ideque-empty? (ideque-remove-back (ideque 1))))
+ (test 0 (ideque-front (ideque-add-front (ideque 1 2 3) 0)))
+ (test 0 (ideque-back (ideque-add-back (ideque 1 2 3) 0)))
++ ;; loss of front ideque
++ (let ((id (ideque #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f)))
++ (set! id (ideque-remove-front (ideque-add-back id 1)))
++ (set! id (ideque-remove-front (ideque-add-back id 1)))
++ (set! id (ideque-remove-front (ideque-add-back id 1)))
++ (test #f (ideque-front (ideque-take-right id 12))))
+ )
+
+ (test-group "ideque/other-accessors"
+@@ -63,7 +69,11 @@
+ (map ideque->list xs))))
+ lis)))
+ (check 'ideque-take ideque-take take 7)
++ (test '(1 2 3 4) (ideque->list (ideque-take (ideque 1 2 3 4) 4)))
++ (test '(1 2 3 4) (ideque->list (ideque-take-right (ideque 1 2 3 4) 4)))
+ (check 'ideque-drop ideque-drop drop 6)
++ (test '() (ideque->list (ideque-drop (ideque 1 2 3 4) 4)))
++ (test '() (ideque->list (ideque-drop-right (ideque 1 2 3 4) 4)))
+ (check 'ideque-split-at ideque-split-at split-at 8)
+ ;; out-of-range conditions
+ (test-error (ideque->list (ideque-take (ideque 1 2 3 4 5 6 7) 10)))
diff --git a/dev-scheme/gauche/files/gauche-0.9.10-sys-ctermid.patch b/dev-scheme/gauche/files/gauche-0.9.10-sys-ctermid.patch
new file mode 100644
index 000000000000..18e4d5d2295d
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.10-sys-ctermid.patch
@@ -0,0 +1,27 @@
+commit f3b4beb18f256e733a4c699e96118d47a2191b74
+Author: Shiro Kawai <shiro@acm.org>
+Date: Wed Dec 23 16:22:10 2020 -1000
+
+ Fix sys-ctermid out-of-extent memory access bug
+
+ https://github.com/shirok/Gauche/issues/740
+
+diff --git a/src/libsys.scm b/src/libsys.scm
+index f253c08a4..7f433c184 100644
+--- a/src/libsys.scm
++++ b/src/libsys.scm
+@@ -460,11 +460,11 @@
+ (define-cproc sys-mkdtemp (template::<string>) Scm_SysMkdtemp)
+
+ ;; ctermid
+-(define-cproc sys-ctermid () ::<const-cstring>
++(define-cproc sys-ctermid ()
+ (.if "defined(GAUCHE_WINDOWS)"
+- (return "CON")
++ (return '"CON")
+ (let* ([buf::(.array char [(+ L_ctermid 1)])])
+- (return (ctermid buf)))))
++ (return (SCM_MAKE_STR_COPYING (ctermid buf))))))
+
+ ;;---------------------------------------------------------------------
+ ;; stdlib.h
diff --git a/dev-scheme/gauche/files/gauche-xz-info.patch b/dev-scheme/gauche/files/gauche-xz-info.patch
new file mode 100644
index 000000000000..5ca77a8d583d
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-xz-info.patch
@@ -0,0 +1,31 @@
+--- a/lib/gauche/interactive/info.scm
++++ b/lib/gauche/interactive/info.scm
+@@ -113,7 +113,8 @@
+ :paths (get-info-paths)
+ :pred (^p (or (file-is-readable? p)
+ (file-is-readable? #"~|p|.gz")
+- (file-is-readable? #"~|p|.bz2")))))
++ (file-is-readable? #"~|p|.bz2")
++ (file-is-readable? #"~|p|.xz")))))
+
+ (define (handle-ambiguous-name entry-name)
+ (let* ([keys (map x->string (hash-table-keys (~ (get-info)'index)))]
+--- a/lib/text/info.scm
++++ b/lib/text/info.scm
+@@ -67,6 +67,7 @@
+
+ ;; Find bzip2 location
+ (define bzip2 (find-file-in-paths "bzip2"))
++(define xz (find-file-in-paths "xz"))
+
+ (cond-expand
+ [gauche.sys.zlib]
+@@ -90,6 +91,8 @@
+ (with-input-from-process #"~gzip -c -d ~|file|.gz" thunk)])]
+ [(and bzip2 (file-exists? #"~|file|.bz2"))
+ (with-input-from-process #"~bzip2 -c -d ~|file|.bz2" thunk)]
++ [(and xz (file-exists? #"~|file|.xz"))
++ (with-input-from-process #"~xz -c -d ~|file|.xz" thunk)]
+ [else (error "can't find info file" file)]))
+ (with-input-from-info
+ (^[]
diff --git a/dev-scheme/gauche/gauche-0.9.10.ebuild b/dev-scheme/gauche/gauche-0.9.10.ebuild
new file mode 100644
index 000000000000..a5c71f6e454e
--- /dev/null
+++ b/dev-scheme/gauche/gauche-0.9.10.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools
+
+MY_P="${P^g}"
+
+DESCRIPTION="A Unix system friendly Scheme Interpreter"
+HOMEPAGE="http://practical-scheme.net/gauche/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0/$(ver_cut 1-2)7"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="ipv6 libressl mbedtls test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-libs/gdbm
+ mbedtls? ( net-libs/mbedtls:= )"
+DEPEND="${RDEPEND}
+ test? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl:0 )
+ )"
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-ext-ldflags.patch
+ "${FILESDIR}"/${PN}-gauche.m4.patch
+ "${FILESDIR}"/${PN}-info.patch
+ "${FILESDIR}"/${PN}-rfc.tls.patch
+ "${FILESDIR}"/${PN}-xz-info.patch
+ "${FILESDIR}"/${P}-srfi-134.patch
+ "${FILESDIR}"/${P}-sys-ctermid.patch
+)
+DOCS=( AUTHORS ChangeLog HACKING.adoc README.adoc )
+
+src_prepare() {
+ default
+ use ipv6 && sed -i "s/ -4//" ext/tls/ssltest-mod.scm
+
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt \
+ --with-libatomic-ops=no \
+ --with-slib="${EPREFIX}"/usr/share/slib \
+ --with-tls=axtls$(usex mbedtls ',mbedtls' '')
+}
+
+src_test() {
+ emake -j1 -s check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-pkg install-doc
+ einstalldocs
+}