summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2004-11-27 14:14:05 +0000
committertaca <taca@pkgsrc.org>2004-11-27 14:14:05 +0000
commit728fce10d1f070c57c3b0e109c521b2c2487e725 (patch)
tree2da64e428b9df23cef2d1263531b2bee217dc9bc /lang
parenta7758e413fd3fdc652a4945fb8cb677b76c267da (diff)
downloadpkgsrc-728fce10d1f070c57c3b0e109c521b2c2487e725.tar.gz
Importing ruby16 package; Ruby 1.6.8 based release.
(This is basically re-import of old ruby-base package.) These extention libraries are provided as separated packages. databases/ruby-dbm: DBM module databases/ruby-gdbm: GDBM module devel/ruby16-curses: Curses module security/ruby-digest: message digest module devel/ruby-readline: readline module x11/ruby16-tcltklib: Tcl/Tk libraries x11/ruby16-tk: Tk modules
Diffstat (limited to 'lang')
-rw-r--r--lang/ruby16/DESCR19
-rw-r--r--lang/ruby16/MESSAGE18
-rw-r--r--lang/ruby16/Makefile107
-rw-r--r--lang/ruby16/PLIST225
-rw-r--r--lang/ruby16/distinfo14
-rw-r--r--lang/ruby16/patches/patch-aa125
-rw-r--r--lang/ruby16/patches/patch-ab420
-rw-r--r--lang/ruby16/patches/patch-ac13
-rw-r--r--lang/ruby16/patches/patch-ad32
-rw-r--r--lang/ruby16/patches/patch-ae113
-rw-r--r--lang/ruby16/patches/patch-af28
-rw-r--r--lang/ruby16/patches/patch-ag13
-rw-r--r--lang/ruby16/patches/patch-ah13
-rw-r--r--lang/ruby16/patches/patch-ai12
-rw-r--r--lang/ruby16/patches/patch-aj20
15 files changed, 1172 insertions, 0 deletions
diff --git a/lang/ruby16/DESCR b/lang/ruby16/DESCR
new file mode 100644
index 00000000000..397806e5cce
--- /dev/null
+++ b/lang/ruby16/DESCR
@@ -0,0 +1,19 @@
+Ruby is the interpreted scripting language for quick and
+easy object-oriented programming. It has many features to
+process text files and to do system management tasks (as in
+Perl). It is simple, straight-forward, and extensible.
+
+Features of Ruby are shown below.
+
+ + Simple Syntax
+ + *Normal* Object-Oriented features (ex. class, method calls)
+ + *Advanced* Object-Oriented features (ex. Mix-in, Singleton-method)
+ + Operator Overloading
+ + Exception Handling
+ + Iterators and Closures
+ + Garbage Collection
+ + Dynamic Loading of Object files (on some architecture)
+ + Highly Portable (works on many UNIX machines, and on DOS,
+ Windows, Mac, BeOS etc.)
+
+This package is Ruby 1.6 based release.
diff --git a/lang/ruby16/MESSAGE b/lang/ruby16/MESSAGE
new file mode 100644
index 00000000000..a91e9f6ecdc
--- /dev/null
+++ b/lang/ruby16/MESSAGE
@@ -0,0 +1,18 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+Note that a number of packages which are installed as default with
+the Ruby 1.6.8 distribution are provided as separate packages:
+
+ databases/ruby-dbm: DBM module
+ databases/ruby-gdbm: GDBM module
+ devel/ruby16-curses: Curses module
+ security/ruby-digest: message digest module
+ devel/ruby-readline: readline module
+ x11/ruby16-tcltklib: Tcl/Tk libraries
+ x11/ruby16-tk: Tk modules
+
+Note: make sure to set "RUBY_DEFAULT_VERSION=1.6" in /etc/mk.conf to
+create Ruby 1.6.8 based packages.
+
+===========================================================================
diff --git a/lang/ruby16/Makefile b/lang/ruby16/Makefile
new file mode 100644
index 00000000000..1306e952cf7
--- /dev/null
+++ b/lang/ruby16/Makefile
@@ -0,0 +1,107 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+#
+
+DISTNAME= ${RUBY_DISTNAME}
+PKGNAME= ${RUBY_PKGPREFIX}-${RUBY_VERSION}
+CATEGORIES= lang ruby
+MASTER_SITES= ${MASTER_SITE_RUBY}
+
+MAINTAINER= taca@NetBSD.org
+HOMEPAGE= http://www.ruby-lang.org/en/
+COMMENT= Ruby programming language 1.6 based release
+
+CONFLICTS+= ruby-base-[1-9]*
+
+RUBY_VERSION= ${RUBY16_VERSION}
+USE_BUILDLINK3= yes
+GNU_CONFIGURE= yes
+TEST_TARGET= test
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ENV+= PREFIX="${PREFIX}"
+BUILD_DEFS+= USE_INET6
+
+# Ruby build process depends on config.status's content
+CONFIG_STATUS_OVERRIDE= # empty
+
+.include "../../lang/ruby/rubyversion.mk"
+
+.if !empty(RUBY_SUFFIX)
+CONFIGURE_ARGS+= --program-suffix="${RUBY_SUFFIX}"
+.endif
+.if defined(USE_INET6) && ${USE_INET6} == YES
+CONFIGURE_ARGS+= --enable-ipv6
+.endif
+
+.if ${OPSYS} == "NetBSD"
+.if empty(OS_VERSION:M1.[0-9].*)
+PTHREAD_OPTS+= native
+.include "../../mk/pthread.buildlink3.mk"
+.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "none"
+CONFIGURE_ARGS+= --disable-pthread
+.else
+CONFIGURE_ARGS+= --enable-pthread
+.endif
+.endif
+.endif
+
+.if ${OPSYS} == "IRIX"
+# X11BASE, *not* X11PREFIX: X11PREFIX == PREFIX, but we need to point
+# to the ABI-specific libraries
+CONFIGURE_ENV+= X11BASE="${X11BASE}"
+.endif
+
+DOCS= ChangeLog README README.EXT README.EXT.ja README.ja ToDo \
+ doc/NEWS doc/forwardable.rd doc/forwardable.rd.ja \
+ doc/shell.rd doc/shell.rd.ja doc/irb/irb-tools.rd.ja \
+ doc/irb/irb.rd doc/irb/irb.rd.ja doc/net/http.rd.ja \
+ doc/net/pop.rd.ja doc/net/smtp.rd.ja doc/shell.rd \
+ doc/shell.rd.ja
+EXT_DOCS= ext/etc/etc.txt ext/etc/etc.txt.ja ext/pty/README \
+ ext/pty/README.expect ext/pty/README.expect.ja \
+ ext/pty/README.ja ext/syslog/syslog.txt
+
+REPLACE_RUBY= bin/irb \
+ lib/matrix.rb sample/biorhythm.rb sample/cal.rb \
+ sample/exyacc.rb sample/from.rb sample/fullpath.rb \
+ sample/goodfriday.rb sample/less.rb \
+ sample/mine.rb sample/mpart.rb sample/observ.rb \
+ sample/pi.rb sample/rcs.rb sample/test.rb \
+ sample/time.rb sample/trojan.rb sample/uumerge.rb
+
+pre-configure:
+ ${RM} -f ${WRKSRC}/ext/curses/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/dbm/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/gdbm/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/digest/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/digest/md5/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/digest/rmd160/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/digest/sha1/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/digest/sha2/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/readline/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/tcltklib/MANIFEST
+ ${RM} -f ${WRKSRC}/ext/tk/MANIFEST
+ ${RM} -f ${WRKSRC}/sample/dbmtest.rb
+
+pre-build:
+ @${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} -f {} \;
+
+post-install:
+ ${STRIP} ${RUBY}
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/etc
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/irb
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/net
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/pty
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/syslog
+.for f in ${DOCS} ${EXT_DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${f:C/^(doc|ext)\///}
+.endfor
+ ${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/irb ${PREFIX}/bin/irb16
+ ${INSTALL_DATA} ${WRKSRC}/sample/* ${RUBY_EXAMPLESDIR}
+ ${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/pty
+ ${INSTALL_DATA} ${WRKSRC}/ext/pty/expect_sample.rb \
+ ${WRKSRC}/ext/pty/script.rb ${WRKSRC}/ext/pty/shl.rb \
+ ${RUBY_EXAMPLESDIR}/pty
+
+.include "../../lang/ruby/Makefile.common"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/ruby16/PLIST b/lang/ruby16/PLIST
new file mode 100644
index 00000000000..ed6f3864099
--- /dev/null
+++ b/lang/ruby16/PLIST
@@ -0,0 +1,225 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+bin/irb${RUBY_VER}
+bin/${RUBY_NAME}
+lib/libruby${RUBY_VER}.so
+${RUBY_NOSHLIBMAJOR}lib/libruby${RUBY_VER}.so.${RUBY_SHLIBMAJOR}
+lib/libruby${RUBY_VER}.so.${RUBY_SHLIBVER}
+${RUBY_ARCHLIBDIR}/config.h
+${RUBY_ARCHLIBDIR}/defines.h
+${RUBY_ARCHLIBDIR}/dln.h
+${RUBY_ARCHLIBDIR}/env.h
+${RUBY_ARCHLIBDIR}/etc.so
+${RUBY_ARCHLIBDIR}/fcntl.so
+${RUBY_ARCHLIBDIR}/intern.h
+${RUBY_ARCHLIBDIR}/lib${RUBY_NAME}.a
+${RUBY_ARCHLIBDIR}/nkf.so
+${RUBY_ARCHLIBDIR}/node.h
+${RUBY_ARCHLIBDIR}/pty.so
+${RUBY_ARCHLIBDIR}/rbconfig.rb
+${RUBY_ARCHLIBDIR}/re.h
+${RUBY_ARCHLIBDIR}/regex.h
+${RUBY_ARCHLIBDIR}/ruby.h
+${RUBY_ARCHLIBDIR}/rubyio.h
+${RUBY_ARCHLIBDIR}/rubysig.h
+${RUBY_ARCHLIBDIR}/sdbm.so
+${RUBY_ARCHLIBDIR}/socket.so
+${RUBY_ARCHLIBDIR}/st.h
+${RUBY_ARCHLIBDIR}/syslog.so
+${RUBY_ARCHLIBDIR}/util.h
+${RUBY_ARCHLIBDIR}/version.h
+@dirrm ${RUBY_ARCHLIBDIR}
+${RUBY_LIBDIR}/English.rb
+${RUBY_LIBDIR}/Env.rb
+${RUBY_LIBDIR}/base64.rb
+${RUBY_LIBDIR}/cgi-lib.rb
+${RUBY_LIBDIR}/cgi.rb
+${RUBY_LIBDIR}/cgi/session.rb
+@dirrm ${RUBY_LIBDIR}/cgi
+${RUBY_LIBDIR}/complex.rb
+${RUBY_LIBDIR}/date.rb
+${RUBY_LIBDIR}/date2.rb
+${RUBY_LIBDIR}/debug.rb
+${RUBY_LIBDIR}/delegate.rb
+${RUBY_LIBDIR}/e2mmap.rb
+${RUBY_LIBDIR}/eregex.rb
+${RUBY_LIBDIR}/expect.rb
+${RUBY_LIBDIR}/final.rb
+${RUBY_LIBDIR}/finalize.rb
+${RUBY_LIBDIR}/find.rb
+${RUBY_LIBDIR}/forwardable.rb
+${RUBY_LIBDIR}/ftools.rb
+${RUBY_LIBDIR}/ftplib.rb
+${RUBY_LIBDIR}/getoptlong.rb
+${RUBY_LIBDIR}/getopts.rb
+${RUBY_LIBDIR}/importenv.rb
+${RUBY_LIBDIR}/irb.rb
+${RUBY_LIBDIR}/irb/completion.rb
+${RUBY_LIBDIR}/irb/context.rb
+${RUBY_LIBDIR}/irb/extend-command.rb
+${RUBY_LIBDIR}/irb/frame.rb
+${RUBY_LIBDIR}/irb/help.rb
+${RUBY_LIBDIR}/irb/init.rb
+${RUBY_LIBDIR}/irb/input-method.rb
+${RUBY_LIBDIR}/irb/lc/error.rb
+${RUBY_LIBDIR}/irb/lc/help-message
+${RUBY_LIBDIR}/irb/lc/ja/error.rb
+${RUBY_LIBDIR}/irb/lc/ja/help-message
+@dirrm ${RUBY_LIBDIR}/irb/lc/ja
+@dirrm ${RUBY_LIBDIR}/irb/lc
+${RUBY_LIBDIR}/irb/loader.rb
+${RUBY_LIBDIR}/irb/locale.rb
+${RUBY_LIBDIR}/irb/multi-irb.rb
+${RUBY_LIBDIR}/irb/ruby-lex.rb
+${RUBY_LIBDIR}/irb/ruby-token.rb
+${RUBY_LIBDIR}/irb/slex.rb
+${RUBY_LIBDIR}/irb/version.rb
+${RUBY_LIBDIR}/irb/workspace.rb
+${RUBY_LIBDIR}/irb/ws-for-case-2.rb
+${RUBY_LIBDIR}/irb/xmp.rb
+@dirrm ${RUBY_LIBDIR}/irb
+${RUBY_LIBDIR}/jcode.rb
+${RUBY_LIBDIR}/kconv.rb
+${RUBY_LIBDIR}/mailread.rb
+${RUBY_LIBDIR}/mathn.rb
+${RUBY_LIBDIR}/matrix.rb
+${RUBY_LIBDIR}/mkmf.rb
+${RUBY_LIBDIR}/monitor.rb
+${RUBY_LIBDIR}/mutex_m.rb
+${RUBY_LIBDIR}/net/ftp.rb
+${RUBY_LIBDIR}/net/http.rb
+${RUBY_LIBDIR}/net/imap.rb
+${RUBY_LIBDIR}/net/pop.rb
+${RUBY_LIBDIR}/net/protocol.rb
+${RUBY_LIBDIR}/net/smtp.rb
+${RUBY_LIBDIR}/net/telnet.rb
+@dirrm ${RUBY_LIBDIR}/net
+${RUBY_LIBDIR}/observer.rb
+${RUBY_LIBDIR}/open3.rb
+${RUBY_LIBDIR}/ostruct.rb
+${RUBY_LIBDIR}/parsearg.rb
+${RUBY_LIBDIR}/parsedate.rb
+${RUBY_LIBDIR}/ping.rb
+${RUBY_LIBDIR}/profile.rb
+${RUBY_LIBDIR}/pstore.rb
+${RUBY_LIBDIR}/rational.rb
+${RUBY_LIBDIR}/readbytes.rb
+${RUBY_LIBDIR}/resolv-replace.rb
+${RUBY_LIBDIR}/resolv.rb
+${RUBY_LIBDIR}/shell.rb
+${RUBY_LIBDIR}/shell/builtin-command.rb
+${RUBY_LIBDIR}/shell/command-processor.rb
+${RUBY_LIBDIR}/shell/error.rb
+${RUBY_LIBDIR}/shell/filter.rb
+${RUBY_LIBDIR}/shell/process-controller.rb
+${RUBY_LIBDIR}/shell/system-command.rb
+${RUBY_LIBDIR}/shell/version.rb
+@dirrm ${RUBY_LIBDIR}/shell
+${RUBY_LIBDIR}/shellwords.rb
+${RUBY_LIBDIR}/singleton.rb
+${RUBY_LIBDIR}/sync.rb
+${RUBY_LIBDIR}/telnet.rb
+${RUBY_LIBDIR}/tempfile.rb
+${RUBY_LIBDIR}/thread.rb
+${RUBY_LIBDIR}/thwait.rb
+${RUBY_LIBDIR}/time.rb
+${RUBY_LIBDIR}/timeout.rb
+${RUBY_LIBDIR}/tracer.rb
+${RUBY_LIBDIR}/uri.rb
+${RUBY_LIBDIR}/uri/common.rb
+${RUBY_LIBDIR}/uri/ftp.rb
+${RUBY_LIBDIR}/uri/generic.rb
+${RUBY_LIBDIR}/uri/http.rb
+${RUBY_LIBDIR}/uri/https.rb
+${RUBY_LIBDIR}/uri/ldap.rb
+${RUBY_LIBDIR}/uri/mailto.rb
+@dirrm ${RUBY_LIBDIR}/uri
+${RUBY_LIBDIR}/weakref.rb
+@exec ${MKDIR} %D/${RUBY_SITEARCHLIBDIR}
+@unexec ${RMDIR} %D/${RUBY_SITEARCHLIBDIR} 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} %D/${RUBY_SITELIBDIR} 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} %D/lib/ruby/site_ruby 2>/dev/null || ${TRUE}
+@dirrm ${RUBY_LIBDIR}
+@unexec ${RMDIR} %D/lib/ruby 2>/dev/null || ${TRUE}
+man/man1/${RUBY_NAME}.1
+${RUBY_DOCDIR}/ChangeLog
+${RUBY_DOCDIR}/NEWS
+${RUBY_DOCDIR}/README
+${RUBY_DOCDIR}/README.EXT
+${RUBY_DOCDIR}/README.EXT.ja
+${RUBY_DOCDIR}/README.ja
+${RUBY_DOCDIR}/ToDo
+${RUBY_DOCDIR}/etc/etc.txt
+${RUBY_DOCDIR}/etc/etc.txt.ja
+@dirrm ${RUBY_DOCDIR}/etc
+${RUBY_DOCDIR}/forwardable.rd
+${RUBY_DOCDIR}/forwardable.rd.ja
+${RUBY_DOCDIR}/irb/irb-tools.rd.ja
+${RUBY_DOCDIR}/irb/irb.rd
+${RUBY_DOCDIR}/irb/irb.rd.ja
+@dirrm ${RUBY_DOCDIR}/irb
+${RUBY_DOCDIR}/net/http.rd.ja
+${RUBY_DOCDIR}/net/pop.rd.ja
+${RUBY_DOCDIR}/net/smtp.rd.ja
+@dirrm ${RUBY_DOCDIR}/net
+${RUBY_DOCDIR}/pty/README
+${RUBY_DOCDIR}/pty/README.expect
+${RUBY_DOCDIR}/pty/README.expect.ja
+${RUBY_DOCDIR}/pty/README.ja
+@dirrm ${RUBY_DOCDIR}/pty
+${RUBY_DOCDIR}/shell.rd
+${RUBY_DOCDIR}/shell.rd.ja
+${RUBY_DOCDIR}/syslog/syslog.txt
+@dirrm ${RUBY_DOCDIR}/syslog
+@dirrm ${RUBY_DOCDIR}
+${RUBY_EXAMPLESDIR}/README
+${RUBY_EXAMPLESDIR}/biorhythm.rb
+${RUBY_EXAMPLESDIR}/cal.rb
+${RUBY_EXAMPLESDIR}/cbreak.rb
+${RUBY_EXAMPLESDIR}/clnt.rb
+${RUBY_EXAMPLESDIR}/dir.rb
+${RUBY_EXAMPLESDIR}/dualstack-fetch.rb
+${RUBY_EXAMPLESDIR}/dualstack-httpd.rb
+${RUBY_EXAMPLESDIR}/eval.rb
+${RUBY_EXAMPLESDIR}/export.rb
+${RUBY_EXAMPLESDIR}/exyacc.rb
+${RUBY_EXAMPLESDIR}/fact.rb
+${RUBY_EXAMPLESDIR}/fib.awk
+${RUBY_EXAMPLESDIR}/fib.pl
+${RUBY_EXAMPLESDIR}/fib.py
+${RUBY_EXAMPLESDIR}/fib.rb
+${RUBY_EXAMPLESDIR}/fib.scm
+${RUBY_EXAMPLESDIR}/freq.rb
+${RUBY_EXAMPLESDIR}/from.rb
+${RUBY_EXAMPLESDIR}/fullpath.rb
+${RUBY_EXAMPLESDIR}/getopts.test
+${RUBY_EXAMPLESDIR}/goodfriday.rb
+${RUBY_EXAMPLESDIR}/less.rb
+${RUBY_EXAMPLESDIR}/list.rb
+${RUBY_EXAMPLESDIR}/list2.rb
+${RUBY_EXAMPLESDIR}/list3.rb
+${RUBY_EXAMPLESDIR}/mine.rb
+${RUBY_EXAMPLESDIR}/mkproto.rb
+${RUBY_EXAMPLESDIR}/mpart.rb
+${RUBY_EXAMPLESDIR}/mrshtest.rb
+${RUBY_EXAMPLESDIR}/observ.rb
+${RUBY_EXAMPLESDIR}/occur.pl
+${RUBY_EXAMPLESDIR}/occur.rb
+${RUBY_EXAMPLESDIR}/occur2.rb
+${RUBY_EXAMPLESDIR}/philos.rb
+${RUBY_EXAMPLESDIR}/pi.rb
+${RUBY_EXAMPLESDIR}/pty/expect_sample.rb
+${RUBY_EXAMPLESDIR}/pty/script.rb
+${RUBY_EXAMPLESDIR}/pty/shl.rb
+@dirrm ${RUBY_EXAMPLESDIR}/pty
+${RUBY_EXAMPLESDIR}/rcs.awk
+${RUBY_EXAMPLESDIR}/rcs.dat
+${RUBY_EXAMPLESDIR}/rcs.rb
+${RUBY_EXAMPLESDIR}/regx.rb
+${RUBY_EXAMPLESDIR}/sieve.rb
+${RUBY_EXAMPLESDIR}/svr.rb
+${RUBY_EXAMPLESDIR}/test.rb
+${RUBY_EXAMPLESDIR}/time.rb
+${RUBY_EXAMPLESDIR}/trojan.rb
+${RUBY_EXAMPLESDIR}/tsvr.rb
+${RUBY_EXAMPLESDIR}/uumerge.rb
+@dirrm ${RUBY_EXAMPLESDIR}
diff --git a/lang/ruby16/distinfo b/lang/ruby16/distinfo
new file mode 100644
index 00000000000..a9174c5e9a0
--- /dev/null
+++ b/lang/ruby16/distinfo
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+SHA1 (ruby/ruby-1.6.8.tar.gz) = 4b475ac1c837cd62b6dfe85359e1502a71b08cd1
+Size (ruby/ruby-1.6.8.tar.gz) = 1023403 bytes
+SHA1 (patch-aa) = 1c6d4f4c376ac666f9d70e3b556bef314450156f
+SHA1 (patch-ab) = 6709764404153b1f3c125480256b8af23c74a218
+SHA1 (patch-ac) = 19f520406a9b699a4bbe53b0e9e2b69b4eb7d96a
+SHA1 (patch-ad) = 8a3e5eb250f517f10bea7f52fbfe8b05957b7bb4
+SHA1 (patch-ae) = 2e096dcb882be923d2ff775a4271a300954a9dec
+SHA1 (patch-af) = 1070614441174b30926ba1d8a4d1a4718172ce4b
+SHA1 (patch-ag) = cf9f16f056c2f5df2493b6f04232fb62edf4448f
+SHA1 (patch-ah) = 72461b10296cb9a03fc37bba6af69650c8777741
+SHA1 (patch-ai) = 38b4293845c0078c5c5ae40d328c0ac7842fcdbc
+SHA1 (patch-aj) = 03e15c32b0865d11339f609b2e98613fc09083b4
diff --git a/lang/ruby16/patches/patch-aa b/lang/ruby16/patches/patch-aa
new file mode 100644
index 00000000000..4618d96e746
--- /dev/null
+++ b/lang/ruby16/patches/patch-aa
@@ -0,0 +1,125 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- configure.in.orig 2002-11-14 03:59:18.000000000 +0900
++++ configure.in
+@@ -324,7 +324,8 @@ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\
+ fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
+- syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h)
++ syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h\
++ pthread.h ucontext.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_TYPE_UID_T
+@@ -456,6 +457,49 @@ else
+ AC_DEFINE_UNQUOTED(FILE_COUNT, $rb_cv_fcnt)
+ fi
+
++if test "$enable_pthread" = "yes"; then
++ AC_CHECK_LIB(pthread, pthread_kill,
++ rb_with_pthread=yes, rb_with_pthread=no)
++ if test "$rb_with_pthread" = "yes"; then
++ LIBS="-lpthread $LIBS"
++ AC_DEFINE(_REENTRANT)
++ AC_DEFINE(_THREAD_SAFE)
++ AC_DEFINE(HAVE_LIBPTHREAD)
++ else
++ AC_CHECK_LIB(pthreads, pthread_kill,
++ rb_with_pthread=yes, rb_with_pthread=no)
++ if test "$rb_with_pthread" = "yes"; then
++ LIBS="-lpthreads $LIBS"
++ AC_DEFINE(_REENTRANT)
++ AC_DEFINE(_THREAD_SAFE)
++ AC_DEFINE(HAVE_LIBPTHREAD)
++ else
++ AC_CHECK_LIB(c, pthread_kill,
++ rb_with_pthread=yes, rb_with_pthread=no)
++ if test "$rb_with_pthread" = "yes"; then
++ AC_DEFINE(_REENTRANT)
++ AC_DEFINE(_THREAD_SAFE)
++ AC_DEFINE(HAVE_LIBPTHREAD)
++ else
++ AC_CHECK_LIB(c_r, pthread_kill,
++ rb_with_pthread=yes, rb_with_pthread=no)
++ if test "$rb_with_pthread" = "yes"; then
++ AC_DEFINE(_REENTRANT)
++ AC_DEFINE(_THREAD_SAFE)
++ AC_DEFINE(HAVE_LIBPTHREAD)
++ MAINLIBS="-pthread $MAINLIBS"
++ else
++ AC_MSG_WARN('Don\'t know how to find pthread library on your system -- thread support disabled')
++ fi
++ fi
++ fi
++ fi
++ AC_CHECK_FUNC(nanosleep)
++ if test "$ac_cv_func_nanosleep" = "no"; then
++ AC_CHECK_LIB(rt, nanosleep, AC_DEFINE(HAVE_NANOSLEEP))
++ fi
++fi
++
+ dnl default value for $KANJI
+ DEFAULT_KCODE="KCODE_NONE"
+
+@@ -563,7 +607,7 @@ if test "$with_dln_a_out" != yes; then
+
+ case "$target_os" in
+ hpux*) DLDFLAGS="-E"
+- LDSHARED='ld -b'
++ LDSHARED="ld -b $LDSHARED"
+ LDFLAGS="-Wl,-E"
+ rb_cv_dlopen=yes;;
+ solaris*) if test "$GCC" = yes; then
+@@ -578,7 +622,8 @@ if test "$with_dln_a_out" != yes; then
+ rb_cv_dlopen=yes;;
+ sunos*) LDSHARED='ld -assert nodefinitions'
+ rb_cv_dlopen=yes;;
+- irix*) LDSHARED='ld -shared'
++ irix*) LDSHARED='ld -shared -L${X11BASE}/lib${ABI}'
++ LDFLAGS="-L${X11BASE}/lib${ABI} ${LDFLAGS}"
+ rb_cv_dlopen=yes;;
+ sysv4*) LDSHARED='ld -G'
+ rb_cv_dlopen=yes;;
+@@ -589,6 +634,12 @@ if test "$with_dln_a_out" != yes; then
+ osf*) LDSHARED="$CC -shared"
+ rb_cv_dlopen=yes ;;
+ linux*) LDSHARED="$CC -shared"
++ if test "$rb_cv_binary_elf" = yes; then
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
++ fi
+ rb_cv_dlopen=yes ;;
+ freebsd*) LDSHARED="$CC -shared"
+ if test "$rb_cv_binary_elf" = yes; then
+@@ -601,6 +652,9 @@ if test "$with_dln_a_out" != yes; then
+ netbsd*) LDSHARED='${CC} -shared'
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="-Wl,-export-dynamic"
++ DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
+ fi
+ rb_cv_dlopen=yes ;;
+ openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
+@@ -858,6 +912,7 @@ if test "$enable_shared" = 'yes'; then
+ ;;
+ linux*)
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)'
++ LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+ LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
+ ;;
+ freebsd*)
+@@ -1071,6 +1126,10 @@ if test "$search_path" != ""; then
+ AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path")
+ fi
+
++AC_ARG_ENABLE(pthread,
++ [--enable-pthread use pthread library.],
++ [enable_pthread=$enableval], [enable_pthread=no])
++
+ if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then
+ echo "config.h unchanged"
+ else
diff --git a/lang/ruby16/patches/patch-ab b/lang/ruby16/patches/patch-ab
new file mode 100644
index 00000000000..b691eb7e68d
--- /dev/null
+++ b/lang/ruby16/patches/patch-ab
@@ -0,0 +1,420 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- configure.orig 2002-11-19 20:49:26.000000000 +0900
++++ configure
+@@ -29,6 +29,8 @@ ac_help="$ac_help
+ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]"
+ ac_help="$ac_help
+ --with-search-path=DIR specify the additional search path"
++ac_help="$ac_help
++--enable-pthread use pthread library."
+
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+@@ -2877,7 +2879,8 @@ fi
+
+ for ac_hdr in stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\
+ fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
+- syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h
++ syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h\
++ pthread.h ucontext.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -4387,6 +4390,330 @@ EOF
+
+ fi
+
++if test "$enable_pthread" = "yes"; then
++ echo $ac_n "checking for pthread_kill in -lpthread""... $ac_c" 1>&6
++echo "configure:4388: checking for pthread_kill in -lpthread" >&5
++ac_lib_var=`echo pthread'_'pthread_kill | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lpthread $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4396 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_kill();
++
++int main() {
++pthread_kill()
++; return 0; }
++EOF
++if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ rb_with_pthread=yes
++else
++ echo "$ac_t""no" 1>&6
++rb_with_pthread=no
++fi
++
++ if test "$rb_with_pthread" = "yes"; then
++ LIBS="-lpthread $LIBS"
++ cat >> confdefs.h <<\EOF
++#define _REENTRANT 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define _THREAD_SAFE 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define HAVE_LIBPTHREAD 1
++EOF
++
++ else
++ echo $ac_n "checking for pthread_kill in -lpthreads""... $ac_c" 1>&6
++echo "configure:4444: checking for pthread_kill in -lpthreads" >&5
++ac_lib_var=`echo pthreads'_'pthread_kill | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lpthreads $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4452 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_kill();
++
++int main() {
++pthread_kill()
++; return 0; }
++EOF
++if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ rb_with_pthread=yes
++else
++ echo "$ac_t""no" 1>&6
++rb_with_pthread=no
++fi
++
++ if test "$rb_with_pthread" = "yes"; then
++ LIBS="-lpthreads $LIBS"
++ cat >> confdefs.h <<\EOF
++#define _REENTRANT 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define _THREAD_SAFE 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define HAVE_LIBPTHREAD 1
++EOF
++
++ else
++ echo $ac_n "checking for pthread_kill in -lc""... $ac_c" 1>&6
++echo "configure:4500: checking for pthread_kill in -lc" >&5
++ac_lib_var=`echo c'_'pthread_kill | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lc $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4508 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_kill();
++
++int main() {
++pthread_kill()
++; return 0; }
++EOF
++if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ rb_with_pthread=yes
++else
++ echo "$ac_t""no" 1>&6
++rb_with_pthread=no
++fi
++
++ if test "$rb_with_pthread" = "yes"; then
++ cat >> confdefs.h <<\EOF
++#define _REENTRANT 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define _THREAD_SAFE 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define HAVE_LIBPTHREAD 1
++EOF
++
++ else
++ echo $ac_n "checking for pthread_kill in -lc_r""... $ac_c" 1>&6
++echo "configure:4555: checking for pthread_kill in -lc_r" >&5
++ac_lib_var=`echo c_r'_'pthread_kill | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lc_r $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4563 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_kill();
++
++int main() {
++pthread_kill()
++; return 0; }
++EOF
++if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ rb_with_pthread=yes
++else
++ echo "$ac_t""no" 1>&6
++rb_with_pthread=no
++fi
++
++ if test "$rb_with_pthread" = "yes"; then
++ cat >> confdefs.h <<\EOF
++#define _REENTRANT 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define _THREAD_SAFE 1
++EOF
++
++ cat >> confdefs.h <<\EOF
++#define HAVE_LIBPTHREAD 1
++EOF
++
++ MAINLIBS="-pthread $MAINLIBS"
++ else
++ echo "configure: warning: 'Don\'t know how to find pthread library on your system -- thread support disabled'" 1>&2
++ fi
++ fi
++ fi
++ fi
++ echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
++echo "configure:4616: checking for nanosleep" >&5
++if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ cat > conftest.$ac_ext <<EOF
++#line 4621 "configure"
++#include "confdefs.h"
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char nanosleep(); below. */
++#include <assert.h>
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char nanosleep();
++
++int main() {
++
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
++choke me
++#else
++nanosleep();
++#endif
++
++; return 0; }
++EOF
++if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_nanosleep=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_func_nanosleep=no"
++fi
++rm -f conftest*
++fi
++
++if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ :
++else
++ echo "$ac_t""no" 1>&6
++fi
++
++ if test "$ac_cv_func_nanosleep" = "no"; then
++ echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
++echo "configure:4665: checking for nanosleep in -lrt" >&5
++ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lrt $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 4673 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char nanosleep();
++
++int main() {
++nanosleep()
++; return 0; }
++EOF
++if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ cat >> confdefs.h <<\EOF
++#define HAVE_NANOSLEEP 1
++EOF
++
++else
++ echo "$ac_t""no" 1>&6
++fi
++
++ fi
++fi
++
+ DEFAULT_KCODE="KCODE_NONE"
+
+ # Check whether --with-default-kcode or --without-default-kcode was given.
+@@ -4524,7 +4851,7 @@ echo "configure:4501: checking whether O
+
+ case "$target_os" in
+ hpux*) DLDFLAGS="-E"
+- LDSHARED='ld -b'
++ LDSHARED="ld -b $LDSHARED"
+ LDFLAGS="-Wl,-E"
+ rb_cv_dlopen=yes;;
+ solaris*) if test "$GCC" = yes; then
+@@ -4539,7 +4866,8 @@ echo "configure:4501: checking whether O
+ rb_cv_dlopen=yes;;
+ sunos*) LDSHARED='ld -assert nodefinitions'
+ rb_cv_dlopen=yes;;
+- irix*) LDSHARED='ld -shared'
++ irix*) LDSHARED='ld -shared -L${X11BASE}/lib${ABI}'
++ LDFLAGS="-L${X11BASE}/lib${ABI} ${LDFLAGS}"
+ rb_cv_dlopen=yes;;
+ sysv4*) LDSHARED='ld -G'
+ rb_cv_dlopen=yes;;
+@@ -4550,6 +4878,12 @@ echo "configure:4501: checking whether O
+ osf*) LDSHARED="$CC -shared"
+ rb_cv_dlopen=yes ;;
+ linux*) LDSHARED="$CC -shared"
++ if test "$rb_cv_binary_elf" = yes; then
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
++ fi
+ rb_cv_dlopen=yes ;;
+ freebsd*) LDSHARED="$CC -shared"
+ if test "$rb_cv_binary_elf" = yes; then
+@@ -4562,6 +4896,9 @@ echo "configure:4501: checking whether O
+ netbsd*) LDSHARED='${CC} -shared'
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="-Wl,-export-dynamic"
++ DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
+ fi
+ rb_cv_dlopen=yes ;;
+ openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
+@@ -5070,6 +5407,7 @@ if test "$enable_shared" = 'yes'; then
+ ;;
+ linux*)
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)'
++ LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+ LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
+ ;;
+ freebsd*)
+@@ -5315,6 +5653,15 @@ EOF
+
+ fi
+
++# Check whether --enable-pthread or --disable-pthread was given.
++if test "${enable_pthread+set}" = set; then
++ enableval="$enable_pthread"
++ enable_pthread=$enableval
++else
++ enable_pthread=no
++fi
++
++
+ if test -f config.h && tr -d '\015' < confdefs.h | cmp -s config.h -; then
+ echo "config.h unchanged"
+ else
diff --git a/lang/ruby16/patches/patch-ac b/lang/ruby16/patches/patch-ac
new file mode 100644
index 00000000000..2758cdb712c
--- /dev/null
+++ b/lang/ruby16/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- dln.c.orig 2002-10-18 01:39:01.000000000 +0900
++++ dln.c
+@@ -1084,7 +1084,7 @@ dln_sym(name)
+ #endif /* USE_DLN_A_OUT */
+
+ #ifdef USE_DLN_DLOPEN
+-# ifdef __NetBSD__
++# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ < 105000000
+ # include <nlist.h>
+ # include <link.h>
+ # else
diff --git a/lang/ruby16/patches/patch-ad b/lang/ruby16/patches/patch-ad
new file mode 100644
index 00000000000..41003cb5b50
--- /dev/null
+++ b/lang/ruby16/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- eval.c.orig 2002-12-16 16:34:22.000000000 +0900
++++ eval.c
+@@ -3531,7 +3531,8 @@ rb_jump_tag(tag)
+ int
+ rb_block_given_p()
+ {
+- if (ruby_frame->iter) return Qtrue;
++ if (ruby_frame->iter && ruby_block)
++ return Qtrue;
+ return Qfalse;
+ }
+
+@@ -4489,7 +4490,7 @@ rb_call0(klass, recv, id, argc, argv, bo
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for %d)",
+ argc, i);
+ }
+- if (node->nd_rest == -1) {
++ if ((int)node->nd_rest == -1) {
+ int opt = i;
+ NODE *optnode = node->nd_opt;
+
+@@ -4525,7 +4526,7 @@ rb_call0(klass, recv, id, argc, argv, bo
+ rb_eval(recv, opt);
+ }
+ }
+- if (node->nd_rest >= 0) {
++ if ((int)node->nd_rest >= 0) {
+ VALUE v;
+
+ if (argc > 0)
diff --git a/lang/ruby16/patches/patch-ae b/lang/ruby16/patches/patch-ae
new file mode 100644
index 00000000000..b92f8cfa537
--- /dev/null
+++ b/lang/ruby16/patches/patch-ae
@@ -0,0 +1,113 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- ext/pty/pty.c.orig 2002-01-27 02:15:53.000000000 +0900
++++ ext/pty/pty.c
+@@ -202,17 +202,41 @@ chld_changed()
+
+ static void getDevice _((int*, int*));
+
+-static void
+-establishShell(shellname, info)
+- char *shellname;
++struct exec_info {
++ int argc;
++ VALUE *argv;
++};
++
++static VALUE
++pty_exec(arg)
++ struct exec_info *arg;
++{
++ return rb_funcall2(Qnil, rb_intern("exec"), arg->argc, arg->argv);
++}
++
++establishShell(command, info)
++ VALUE command;
+ struct pty_info *info;
+ {
+ static int i,j,master,slave,currentPid;
+ char *p,*getenv();
+ struct passwd *pwent;
+- RETSIGTYPE chld_changed();
+-
+- if (shellname[0] == '\0') {
++ VALUE v, *argv;
++ struct exec_info arg;
++ int status, argc;
++
++ if (TYPE(command) == T_ARRAY) {
++ argc = RARRAY(command)->len;
++ argv = RARRAY(command)->ptr;
++ }
++ else {
++ Check_SafeStr(command);
++ argc = RSTRING(command)->len ? 1 : 0;
++ argv = &command;
++ }
++ if (argc == 0) {
++ char *shellname;
++
+ if ((p = getenv("SHELL")) != NULL) {
+ shellname = p;
+ }
+@@ -223,18 +247,21 @@ establishShell(shellname, info)
+ else
+ shellname = "/bin/sh";
+ }
++ v = rb_str_new2(shellname);
++ argc = 1;
++ argv = &v;
+ }
+ getDevice(&master,&slave);
+
+ currentPid = getpid();
+ set_signal_action(chld_changed);
+- if((i = vfork()) < 0) {
++ if((i = fork()) < 0) {
++ close(master);
++ close(slave);
+ rb_sys_fail("fork failed");
+ }
+
+ if(i == 0) { /* child */
+- int argc;
+- char *argv[1024];
+ currentPid = getpid();
+
+ /*
+@@ -286,19 +313,10 @@ establishShell(shellname, info)
+ seteuid(getuid());
+ #endif
+
+- argc = 0;
+- for (i = 0; shellname[i];) {
+- while (isspace(shellname[i])) i++;
+- for (j = i; shellname[j] && !isspace(shellname[j]); j++);
+- argv[argc] = (char*)xmalloc(j-i+1);
+- strncpy(argv[argc],&shellname[i],j-i);
+- argv[argc][j-i] = 0;
+- i = j;
+- argc++;
+- }
+- argv[argc] = NULL;
++ arg.argc = argc;
++ arg.argv = argv;
++ rb_protect(pty_exec, (VALUE)&arg, &status);
+ execvp(argv[0],argv);
+- sleep(1);
+ _exit(1);
+ }
+
+@@ -442,11 +460,7 @@ pty_getpty(self, command)
+ OBJSETUP(wport, rb_cFile, T_FILE);
+ MakeOpenFile(wport, wfptr);
+
+- if (TYPE(command) == T_ARRAY)
+- command = rb_ary_join(command,rb_str_new2(" "));
+- Check_SafeStr(command);
+-
+- establishShell(RSTRING(command)->ptr,&info);
++ establishShell(command, &info);
+
+ rfptr->mode = rb_io_mode_flags("r");
+ rfptr->f = fdopen(info.fd, "r");
diff --git a/lang/ruby16/patches/patch-af b/lang/ruby16/patches/patch-af
new file mode 100644
index 00000000000..4db9b969c4d
--- /dev/null
+++ b/lang/ruby16/patches/patch-af
@@ -0,0 +1,28 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- ext/socket/socket.c.orig 2002-11-01 03:40:11.000000000 +0900
++++ ext/socket/socket.c
+@@ -585,6 +585,23 @@ ip_addrsetup(host, port)
+ rb_raise(rb_eSocket, "getaddrinfo: %s", gai_strerror(error));
+ }
+
++#if defined(__APPLE__) && defined(__MACH__)
++ {
++ struct addrinfo *r;
++ r = res;
++ while (r) {
++ if (! r->ai_socktype) r->ai_socktype = hints.ai_socktype;
++ if (! r->ai_protocol) {
++ if (r->ai_socktype == SOCK_DGRAM) {
++ r->ai_protocol = IPPROTO_UDP;
++ } else if (r->ai_socktype == SOCK_STREAM) {
++ r->ai_protocol = IPPROTO_TCP;
++ }
++ }
++ r = r->ai_next;
++ }
++ }
++#endif
+ return res;
+ }
+
diff --git a/lang/ruby16/patches/patch-ag b/lang/ruby16/patches/patch-ag
new file mode 100644
index 00000000000..1a89a6dbaf3
--- /dev/null
+++ b/lang/ruby16/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- lib/cgi/session.rb.orig 2002-05-01 18:36:28.000000000 +0900
++++ lib/cgi/session.rb
+@@ -116,7 +116,7 @@ class CGI
+ begin
+ @f = open(path, "r+")
+ rescue Errno::ENOENT
+- @f = open(path, "w+")
++ @f = File.open(path, File::CREAT|File::RDWR, 0600)
+ end
+ end
+
diff --git a/lang/ruby16/patches/patch-ah b/lang/ruby16/patches/patch-ah
new file mode 100644
index 00000000000..b2c03024111
--- /dev/null
+++ b/lang/ruby16/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- lib/delegate.rb.orig 2001-11-21 02:48:49.000000000 +0900
++++ lib/delegate.rb
+@@ -36,7 +36,7 @@ class Delegator
+ rescue Exception
+ $@.delete_if{|s| /:in `__getobj__'$/ =~ s} #`
+ $@.delete_if{|s| /^\\(eval\\):/ =~ s}
+- raise
++ Kernel::raise
+ end
+ end
+ EOS
diff --git a/lang/ruby16/patches/patch-ai b/lang/ruby16/patches/patch-ai
new file mode 100644
index 00000000000..75d2cf525fa
--- /dev/null
+++ b/lang/ruby16/patches/patch-ai
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- lib/irb/locale.rb.orig 2001-06-29 17:25:29.000000000 +0900
++++ lib/irb/locale.rb
+@@ -135,6 +135,7 @@ module IRB
+ end
+ lc_file.close
+ toplevel_load lc_file.path, priv
++ lc_file.close(true)
+ end
+ private :real_load
+
diff --git a/lang/ruby16/patches/patch-aj b/lang/ruby16/patches/patch-aj
new file mode 100644
index 00000000000..78b4d3d8073
--- /dev/null
+++ b/lang/ruby16/patches/patch-aj
@@ -0,0 +1,20 @@
+$NetBSD: patch-aj,v 1.1.1.1 2004/11/27 14:14:05 taca Exp $
+
+--- lib/cgi.rb.orig 2002-08-29 18:05:06.000000000 +0900
++++ lib/cgi.rb
+@@ -823,10 +823,13 @@ convert string charset, and set language
+ end
+
+ c = if bufsize < content_length
+- stdinput.read(bufsize) or ''
++ stdinput.read(bufsize)
+ else
+- stdinput.read(content_length) or ''
++ stdinput.read(content_length)
+ end
++ if c.nil?
++ raise EOFError, "bad content body"
++ end
+ buf += c
+ content_length -= c.size
+