summaryrefslogtreecommitdiff
path: root/dev-scheme/gauche/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-scheme/gauche/files')
-rw-r--r--dev-scheme/gauche/files/gauche-0.9-ext-ldflags.patch11
-rw-r--r--dev-scheme/gauche/files/gauche-0.9-gauche.m4.patch19
-rw-r--r--dev-scheme/gauche/files/gauche-0.9-rfc.tls.patch12
-rw-r--r--dev-scheme/gauche/files/gauche-0.9-rpath.patch10
-rw-r--r--dev-scheme/gauche/files/gauche-0.9-xz-info.patch31
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.3.3-file.util.patch21
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.patch120
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.5-bsd.patch25
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.5-libressl.patch19
-rw-r--r--dev-scheme/gauche/files/gauche-0.9.5-unicode.patch19
-rw-r--r--dev-scheme/gauche/files/gauche-ext-ldflags.patch11
-rw-r--r--dev-scheme/gauche/files/gauche-gauche.m4.patch18
-rw-r--r--dev-scheme/gauche/files/gauche-rfc.tls.patch12
-rw-r--r--dev-scheme/gauche/files/gauche-rpath.patch10
-rw-r--r--dev-scheme/gauche/files/gauche-xz-info.patch31
15 files changed, 369 insertions, 0 deletions
diff --git a/dev-scheme/gauche/files/gauche-0.9-ext-ldflags.patch b/dev-scheme/gauche/files/gauche-0.9-ext-ldflags.patch
new file mode 100644
index 000000000000..a9de4114d2bf
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9-ext-ldflags.patch
@@ -0,0 +1,11 @@
+--- Gauche-0.9.1.orig/ext/Makefile.ext.in
++++ Gauche-0.9.1/ext/Makefile.ext.in
+@@ -22,7 +22,7 @@
+ LIBS = $(XLIBS) @LIBS@
+ CFLAGS = @CFLAGS@ @SHLIB_SO_CFLAGS@ $(XCFLAGS)
+ CPPFLAGS = @CPPFLAGS@ $(XCPPFLAGS)
+-LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @SHLIB_SO_LDFLAGS@
++LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @LDFLAGS@ @SHLIB_SO_LDFLAGS@
+
+ # These are set by configure
+ DEFS = @DEFS@
diff --git a/dev-scheme/gauche/files/gauche-0.9-gauche.m4.patch b/dev-scheme/gauche/files/gauche-0.9-gauche.m4.patch
new file mode 100644
index 000000000000..8c4d3180836a
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9-gauche.m4.patch
@@ -0,0 +1,19 @@
+--- Gauche-0.9.4.orig/m4/gauche.m4
++++ Gauche-0.9.4/m4/gauche.m4
+@@ -103,15 +103,11 @@
+ i686-*) I686OPT="-DUSE_I686_PREFETCH";;
+ esac
+ case "$CC" in
+- gcc*) # some systems may have gcc-2.95, gcc-3, etc.
++ *gcc*) # some systems may have gcc-2.95, gcc-3, etc.
+ case "$target" in
+ *mingw*) ;;
+ *) GCCOPT="-fomit-frame-pointer";;
+ esac
+- case "$target" in
+- i586-*) GCCOPT="$GCCOPT -march=i586";;
+- i686-*) GCCOPT="$GCCOPT -march=i686";;
+- esac
+ ;;
+ esac
+ OPTFLAGS="$GCCOPT $I686OPT"
diff --git a/dev-scheme/gauche/files/gauche-0.9-rfc.tls.patch b/dev-scheme/gauche/files/gauche-0.9-rfc.tls.patch
new file mode 100644
index 000000000000..0bce39ad9929
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9-rfc.tls.patch
@@ -0,0 +1,12 @@
+--- Gauche-0.9.3.2.orig/ext/tls/Makefile.in
++++ Gauche-0.9.3.2/ext/tls/Makefile.in
+@@ -77,6 +77,9 @@
+ @sed -e "s@\.\./ssl/@../../$(srcdir)/axTLS/ssl/@g" \
+ -e "s/system/safe_system/g" \
+ -e "s@openssl @sh ../../$(srcdir)/kick_openssl @g" \
++ -e "/do_reneg = 1;/i#if 0" \
++ -e "/do_reneg = 0;/a#endif" \
++ -e "/SSL_server_test(/,/)/s/ -tls1//" \
+ $(srcdir)/axTLS/ssl/test/ssltest.c >> $(SSLTEST_GENERATED)
+ @cat $(srcdir)/system-fix.c >> $(SSLTEST_GENERATED)
+
diff --git a/dev-scheme/gauche/files/gauche-0.9-rpath.patch b/dev-scheme/gauche/files/gauche-0.9-rpath.patch
new file mode 100644
index 000000000000..ca76cb831234
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9-rpath.patch
@@ -0,0 +1,10 @@
+--- Gauche-0.9.1.orig/configure.ac
++++ Gauche-0.9.1/configure.ac
+@@ -709,7 +709,6 @@
+ fi
+ if test "$RPATH_FLAG" != ""; then
+ RPATH_TMP=$RPATH_FLAG'`pwd`'
+- RPATH_REAL=$RPATH_FLAG'$(LIB_INSTALL_DIR)'
+ fi
+ fi
+ AC_SUBST(RPATH_FLAG)
diff --git a/dev-scheme/gauche/files/gauche-0.9-xz-info.patch b/dev-scheme/gauche/files/gauche-0.9-xz-info.patch
new file mode 100644
index 000000000000..809879c4cbd8
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9-xz-info.patch
@@ -0,0 +1,31 @@
+--- Gauche-0.9.1.orig/lib/gauche/interactive/info.scm
++++ Gauche-0.9.1/lib/gauche/interactive/info.scm
+@@ -84,7 +84,8 @@
+ :pred (lambda (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"))))
+ (errorf "couldn't find info file ~s in paths: ~s" *info-file* paths))
+ ))
+
+--- Gauche-0.9.1.orig/lib/text/info.scm
++++ Gauche-0.9.1/lib/text/info.scm
+@@ -63,6 +63,7 @@
+ ;; Find gunzip location
+ (define gunzip (find-file-in-paths "gunzip"))
+ (define bzip2 (find-file-in-paths "bzip2"))
++(define xz (find-file-in-paths "xz"))
+
+ ;; Read an info file FILE, and returns a list of strings splitted by ^_ (#\x1f)
+ ;; If FILE is not found, look for compressed one.
+@@ -74,6 +75,8 @@
+ (with-input-from-process #`",gunzip -c ,file" 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
+ (lambda ()
diff --git a/dev-scheme/gauche/files/gauche-0.9.3.3-file.util.patch b/dev-scheme/gauche/files/gauche-0.9.3.3-file.util.patch
new file mode 100644
index 000000000000..1e4cd5d19521
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.3.3-file.util.patch
@@ -0,0 +1,21 @@
+commit 15fb279dccb83d66d7e866a0e6f4e3f9ff64fd8d
+Author: Shiro Kawai <shiro@acm.org>
+Date: Thu Nov 29 23:17:55 2012 -1000
+
+ Fix file.util test
+
+ The current test may fail when a size of a directory happens to
+ 100. Patch from NIIBE Yutaka.
+
+--- a/ext/file/test.scm
++++ b/ext/file/test.scm
+@@ -290,7 +290,8 @@
+ (reverse
+ (directory-fold "test.out"
+ (^[path result]
+- (if (= (file-size path) 100)
++ (if (and (file-is-regular? path)
++ (= (file-size path) 100))
+ (cons path result)
+ result))
+ '()
diff --git a/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.patch b/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.patch
new file mode 100644
index 000000000000..a44ee75b8d1a
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.3.3-gauche.threads.patch
@@ -0,0 +1,120 @@
+commit 60d82dd56c15a533562cf28111af5d3365d5d354
+Author: Shiro Kawai <shiro@acm.org>
+Date: Thu May 31 15:23:22 2012 -1000
+
+ Fixed thread-terminate! bug that SEGVs when applied on non-running threads
+
+--- a/ext/threads/test.scm
++++ b/ext/threads/test.scm
+@@ -100,6 +100,18 @@
+ (thread-terminate! t1)
+ (thread-join! t1))))
+
++;; this SEGVs on 0.9.3.3. test code from @cryks.
++(test* "thread termination before running" 'terminated
++ (let1 t1 (make-thread (^[] #f))
++ (thread-terminate! t1)
++ (thread-state t1)))
++
++(test* "thread termination while being stopped" 'terminated
++ (let1 t1 (thread-start! (make-thread (^[] (let loop () (loop)))))
++ (thread-stop! t1)
++ (thread-terminate! t1)
++ (thread-state t1)))
++
+ ;;---------------------------------------------------------------------
+ (test-section "thread and error")
+
+--- a/ext/threads/threads.c
++++ b/ext/threads/threads.c
+@@ -432,36 +432,41 @@ ScmObj Scm_ThreadTerminate(ScmVM *target)
+ }
+
+ (void)SCM_INTERNAL_MUTEX_LOCK(target->vmlock);
+- do {
+- /* This ensures only the first call of thread-terminate! on a thread
+- is in effect. */
+- if (target->canceller == NULL) {
+- target->canceller = vm;
+-
+- /* First try */
+- target->stopRequest = SCM_VM_REQUEST_TERMINATE;
+- target->attentionRequest = TRUE;
+- if (wait_for_termination(target)) break;
+-
+- /* Second try */
++ if (target->state == SCM_VM_RUNNABLE || target->state == SCM_VM_STOPPED) {
++ do {
++ /* This ensures only the first call of thread-terminate! on a
++ thread is in effect. */
++ if (target->canceller == NULL) {
++ target->canceller = vm;
++
++ /* First try */
++ target->stopRequest = SCM_VM_REQUEST_TERMINATE;
++ target->attentionRequest = TRUE;
++ if (wait_for_termination(target)) break;
++
++ /* Second try */
++ SCM_ASSERT(target->thread);
+ #if defined(GAUCHE_USE_PTHREADS)
+ # if defined(GAUCHE_PTHREAD_SIGNAL)
+- pthread_kill(target->thread, GAUCHE_PTHREAD_SIGNAL);
++ pthread_kill(target->thread, GAUCHE_PTHREAD_SIGNAL);
+ # endif /*defined(GAUCHE_PTHREAD_SIGNAL)*/
+ #elif defined(GAUCHE_USE_WTHREADS)
+- /* TODO: implement signal mechanism using an event */
++ /* TODO: implement signal mechanism using an event */
+ #endif /* defined(GAUCHE_USE_WTHREADS) */
+- if (wait_for_termination(target)) break;
++ if (wait_for_termination(target)) break;
+
+- /* Last resort */
+- thread_cleanup_inner(target);
++ /* Last resort */
++ thread_cleanup_inner(target);
+ #if defined(GAUCHE_USE_PTHREADS)
+- pthread_cancel(target->thread);
++ pthread_cancel(target->thread);
+ #elif defined(GAUCHE_USE_WTHREADS)
+- TerminateThread(target->thread, 0);
++ TerminateThread(target->thread, 0);
+ #endif
+- }
+- } while (0);
++ }
++ } while (0);
++ }
++ /* target either is terminated or hasn't been run */
++ target->state = SCM_VM_TERMINATED;
+ (void)SCM_INTERNAL_MUTEX_UNLOCK(target->vmlock);
+ return SCM_UNDEFINED;
+ }
+--- a/test/control.scm
++++ b/test/control.scm
+@@ -72,7 +72,7 @@
+ ;;
+
+ (cond-expand
+- [gauche.sys.pthreads
++ [gauche.sys.threads
+ (test-section "control.thread-pool")
+ (use control.thread-pool)
+ (test-module 'control.thread-pool)
+@@ -173,7 +173,15 @@
+ (let1 xjob (add-job! pool work)
+ (terminate-all! pool :force-timeout 0.05)
+ (job-status xjob))))
+- ]
++
++ ;; This SEGVs on 0.9.3.3 (test code by @cryks)
++ (test* "thread pool termination" 'terminated
++ (let ([t (thread-start! (make-thread (cut undefined)))]
++ [pool (make-thread-pool 10)])
++ (terminate-all! pool)
++ (thread-terminate! t)
++ (thread-state t)))
++ ] ; gauche.sys.pthreads
+ [else])
+
+ (test-end)
diff --git a/dev-scheme/gauche/files/gauche-0.9.5-bsd.patch b/dev-scheme/gauche/files/gauche-0.9.5-bsd.patch
new file mode 100644
index 000000000000..615020df8dfe
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.5-bsd.patch
@@ -0,0 +1,25 @@
+commit da2ea76503e8f1784d0f0be26435d4c8e0d1b12f
+Author: Shiro Kawai <shiro@acm.org>
+Date: Sat Oct 15 11:44:28 2016 -1000
+
+ Avoid preprocessor symbols redefinition on OpenBSD
+
+ https://sourceforge.net/p/gauche/mailman/message/35429549/
+
+diff --git a/ext/net/gauche-net.h b/ext/net/gauche-net.h
+index d4f1dcd..decba64 100644
+--- a/ext/net/gauche-net.h
++++ b/ext/net/gauche-net.h
+@@ -362,8 +362,12 @@ extern ScmObj Scm_GetAddrinfo(const char *nodename,
+ struct addrinfo *hints);
+ extern ScmObj Scm_GetNameinfo(ScmSockAddr *addr, int flags);
+
++#ifndef NI_MAXHOST
+ #define NI_MAXHOST 1025
++#endif
++#ifndef NI_MAXSERV
+ #define NI_MAXSERV 32
++#endif
+
+ #endif /* HAVE_IPV6 */
+
diff --git a/dev-scheme/gauche/files/gauche-0.9.5-libressl.patch b/dev-scheme/gauche/files/gauche-0.9.5-libressl.patch
new file mode 100644
index 000000000000..7b4c839dccb8
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.5-libressl.patch
@@ -0,0 +1,19 @@
+commit c26a4836e767807dd8c98d280c4d9e742b759edd
+Author: Shiro Kawai <shiro@acm.org>
+Date: Sun Oct 9 02:04:19 2016 -1000
+
+ rfc.tls - Detect LibreSSL as well
+
+diff --git a/ext/tls/test.scm b/ext/tls/test.scm
+index 63a1d04..efbfbca 100644
+--- a/ext/tls/test.scm
++++ b/ext/tls/test.scm
+@@ -37,7 +37,7 @@
+ [(not gauche.os.windows)
+ (guard (e [(<process-abnormal-exit> e)
+ (no-openssl "couldn't run openssl command")])
+- (if-let1 m ($ #/OpenSSL\s+([\d\.]+\w*)/
++ (if-let1 m ($ #/(?:OpenSSL|LibreSSL)\s+([\d\.]+\w*)/
+ $ process-output->string `(,openssl-cmd "version"))
+ (let1 vers (m 1)
+ (unless (version>=? vers "1.0.1")
diff --git a/dev-scheme/gauche/files/gauche-0.9.5-unicode.patch b/dev-scheme/gauche/files/gauche-0.9.5-unicode.patch
new file mode 100644
index 000000000000..a87ca5d7c39c
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-0.9.5-unicode.patch
@@ -0,0 +1,19 @@
+commit d31eb5c02b65514e695b45c0c01cbd45a36bac4a
+Author: OOHASHI Daichi <dico.leque.comicron@gmail.com>
+Date: Thu Oct 20 10:48:17 2016 +0900
+
+ (char-general-category #\x20000) should be Lo
+
+diff --git a/src/gauche/char_utf_8.h b/src/gauche/char_utf_8.h
+index 082e764..5f92d13 100644
+--- a/src/gauche/char_utf_8.h
++++ b/src/gauche/char_utf_8.h
+@@ -294,7 +294,7 @@ static inline unsigned char Scm__LookupCharCategory(ScmChar ch)
+ {
+ if (ch == SCM_CHAR_INVALID || ch >= 0x10ffff) {
+ return SCM_CHAR_CATEGORY_Cn;
+- } else if (ch <= 0x20000) {
++ } else if (ch < 0x20000) {
+ return ucs_general_category_00000[ch];
+ } else {
+ return ucs_general_category_20000(ch);
diff --git a/dev-scheme/gauche/files/gauche-ext-ldflags.patch b/dev-scheme/gauche/files/gauche-ext-ldflags.patch
new file mode 100644
index 000000000000..b4aedef2a316
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-ext-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/ext/Makefile.ext.in
++++ b/ext/Makefile.ext.in
+@@ -22,7 +22,7 @@
+ LIBS = $(XLIBS) @LIBS@
+ CFLAGS = @CFLAGS@ @SHLIB_SO_CFLAGS@ $(XCFLAGS)
+ CPPFLAGS = @CPPFLAGS@ $(XCPPFLAGS)
+-LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @SHLIB_SO_LDFLAGS@
++LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @LDFLAGS@ @SHLIB_SO_LDFLAGS@
+
+ # These are set by configure
+ DEFS = @DEFS@
diff --git a/dev-scheme/gauche/files/gauche-gauche.m4.patch b/dev-scheme/gauche/files/gauche-gauche.m4.patch
new file mode 100644
index 000000000000..1b9947cf5798
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-gauche.m4.patch
@@ -0,0 +1,18 @@
+--- a/m4/gauche.m4
++++ b/m4/gauche.m4
+@@ -103,13 +103,10 @@
+ AS_CASE(["$target"],
+ [i686-*], [I686OPT="-DUSE_I686_PREFETCH"])
+ AS_CASE(["$CC"],
+- [gcc*], [ dnl some systems may have gcc-2.95, gcc-3, etc.
++ [*gcc*], [ dnl some systems may have gcc-2.95, gcc-3, etc.
+ AS_CASE(["$target"],
+ [*mingw*], [],
+- [GCCOPT="-fomit-frame-pointer"])
+- AS_CASE(["$target"],
+- [i586-*], [GCCOPT="$GCCOPT -march=i586"],
+- [i686-*], [GCCOPT="$GCCOPT -march=i686"])])])
++ [GCCOPT="-fomit-frame-pointer"])])])
+ OPTFLAGS="$GCCOPT $I686OPT"
+ AC_SUBST(OPTFLAGS)
+ ])
diff --git a/dev-scheme/gauche/files/gauche-rfc.tls.patch b/dev-scheme/gauche/files/gauche-rfc.tls.patch
new file mode 100644
index 000000000000..1e5ef71b6c91
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-rfc.tls.patch
@@ -0,0 +1,12 @@
+--- a/ext/tls/ssltest-mod.scm
++++ b/ext/tls/ssltest-mod.scm
+@@ -53,7 +53,8 @@
+ ($ format #t "~a\n" $ regexp-replace-all* line
+ #/\.\.\/ssl\// srcpath-replace
+ #/openssl / kicker-replace
+- #/system/ "safe_system")))
++ #/system/ "safe_system"
++ #/(s_server) / "\\1 -4 ")))
+
+ (p "#include <errno.h>"
+ "int safe_system(const char *commands)"
diff --git a/dev-scheme/gauche/files/gauche-rpath.patch b/dev-scheme/gauche/files/gauche-rpath.patch
new file mode 100644
index 000000000000..8774bac7be13
--- /dev/null
+++ b/dev-scheme/gauche/files/gauche-rpath.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -709,7 +709,6 @@
+ fi
+ if test "$RPATH_FLAG" != ""; then
+ RPATH_TMP=$RPATH_FLAG'`pwd`'
+- RPATH_REAL=$RPATH_FLAG'$(LIB_INSTALL_DIR)'
+ fi
+ fi
+ AC_SUBST(RPATH_FLAG)
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..e55f53606005
--- /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
+@@ -137,7 +137,8 @@
+ :paths 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"))))
+ (errorf "couldn't find info file ~s in paths: ~s" *info-file* paths))
+ ))
+
+--- a/lib/text/info.scm
++++ b/lib/text/info.scm
+@@ -64,6 +64,7 @@
+
+ ;; Find bzip2 location
+ (define bzip2 (find-file-in-paths "bzip2"))
++(define xz (find-file-in-paths "xz"))
+
+ ;; Read an info file FILE, and returns a list of strings splitted by ^_ (#\u001f)
+ ;; If FILE is not found, look for compressed one.
+@@ -78,6 +79,8 @@
+ (close-input-port zp)))))]
+ [(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
+ (lambda ()