summaryrefslogtreecommitdiff
path: root/lang/ruby16-base
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby16-base')
-rw-r--r--lang/ruby16-base/DESCR19
-rw-r--r--lang/ruby16-base/MESSAGE18
-rw-r--r--lang/ruby16-base/Makefile90
-rw-r--r--lang/ruby16-base/PLIST223
-rw-r--r--lang/ruby16-base/distinfo16
-rw-r--r--lang/ruby16-base/patches/patch-aa166
-rw-r--r--lang/ruby16-base/patches/patch-ab461
-rw-r--r--lang/ruby16-base/patches/patch-ac13
-rw-r--r--lang/ruby16-base/patches/patch-ad32
-rw-r--r--lang/ruby16-base/patches/patch-ae113
-rw-r--r--lang/ruby16-base/patches/patch-af28
-rw-r--r--lang/ruby16-base/patches/patch-ag13
-rw-r--r--lang/ruby16-base/patches/patch-ah13
-rw-r--r--lang/ruby16-base/patches/patch-ai12
-rw-r--r--lang/ruby16-base/patches/patch-aj20
-rw-r--r--lang/ruby16-base/patches/patch-ak16
16 files changed, 1253 insertions, 0 deletions
diff --git a/lang/ruby16-base/DESCR b/lang/ruby16-base/DESCR
new file mode 100644
index 00000000000..9fa97bc9f0b
--- /dev/null
+++ b/lang/ruby16-base/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 ${RUBY_VER} based release.
diff --git a/lang/ruby16-base/MESSAGE b/lang/ruby16-base/MESSAGE
new file mode 100644
index 00000000000..13bfaab99a1
--- /dev/null
+++ b/lang/ruby16-base/MESSAGE
@@ -0,0 +1,18 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+
+Note that a number of packages which are installed as default with
+the Ruby ${RUBY_VERSION} distribution are provided as separate packages:
+
+ databases/ruby-dbm: DBM module
+ databases/ruby-gdbm: GDBM module
+ devel/ruby16-curses: Curses module
+ devel/ruby-readline: readline module
+ security/ruby-digest: message digest module
+ x11/ruby16-tcltklib: Tcl/Tk libraries
+ x11/ruby16-tk: Tk modules
+
+Note: make sure to set "RUBY_VERSION_DEFAULT=1.6" in /etc/mk.conf
+if you use Ruby ${RUBY_VER} based packages.
+
+===========================================================================
diff --git a/lang/ruby16-base/Makefile b/lang/ruby16-base/Makefile
new file mode 100644
index 00000000000..d3c792a3d03
--- /dev/null
+++ b/lang/ruby16-base/Makefile
@@ -0,0 +1,90 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+#
+
+DISTNAME= ${RUBY_DISTNAME}
+PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION}
+CATEGORIES= lang ruby
+MASTER_SITES= ${MASTER_SITE_RUBY}
+
+MAINTAINER= taca@NetBSD.org
+HOMEPAGE= ${RUBY_HOMEPAGE}
+COMMENT= Ruby 1.6 baed release minimum package
+
+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
+
+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= etc/etc.txt etc/etc.txt.ja syslog/syslog.txt
+PTY_ROCS= README README.expect README.expect.ja README.ja
+
+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}/irb
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/net
+ ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/pty
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${f:C/^doc\///}
+.endfor
+.for f in ${EXT_DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/ext/${f} ${RUBY_DOCDIR}
+.endfor
+.for f in ${PTY_ROCS}
+ ${INSTALL_DATA} ${WRKSRC}/ext/pty/${f} ${RUBY_DOCDIR}/pty/${f}
+.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-base/PLIST b/lang/ruby16-base/PLIST
new file mode 100644
index 00000000000..0c2cec62361
--- /dev/null
+++ b/lang/ruby16-base/PLIST
@@ -0,0 +1,223 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/03/06 16:36:08 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.${RUBY_DLEXT}
+${RUBY_ARCHLIBDIR}/fcntl.${RUBY_DLEXT}
+${RUBY_ARCHLIBDIR}/intern.h
+${RUBY_ARCHLIBDIR}/lib${RUBY_NAME}.a
+${RUBY_ARCHLIBDIR}/nkf.${RUBY_DLEXT}
+${RUBY_ARCHLIBDIR}/node.h
+${RUBY_ARCHLIBDIR}/pty.${RUBY_DLEXT}
+${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.${RUBY_DLEXT}
+${RUBY_ARCHLIBDIR}/socket.${RUBY_DLEXT}
+${RUBY_ARCHLIBDIR}/st.h
+${RUBY_ARCHLIBDIR}/syslog.${RUBY_DLEXT}
+${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.txt
+${RUBY_DOCDIR}/etc.txt.ja
+${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.txt
+@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-base/distinfo b/lang/ruby16-base/distinfo
new file mode 100644
index 00000000000..efec79c954b
--- /dev/null
+++ b/lang/ruby16-base/distinfo
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+
+SHA1 (ruby/ruby-1.6.8.tar.gz) = 4b475ac1c837cd62b6dfe85359e1502a71b08cd1
+RMD160 (ruby/ruby-1.6.8.tar.gz) = be087ca8f852caf9fc7a35b51839f5af079dbbc1
+Size (ruby/ruby-1.6.8.tar.gz) = 1023403 bytes
+SHA1 (patch-aa) = b0f161d45194860cc0785f9d7961c6455824b0d9
+SHA1 (patch-ab) = 1bf657ee3facce8e3fb4909e11e03eee1aa7a121
+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
+SHA1 (patch-ak) = ce23ee5dc472ebebe0c05adcb6956a50cecc4fcd
diff --git a/lang/ruby16-base/patches/patch-aa b/lang/ruby16-base/patches/patch-aa
new file mode 100644
index 00000000000..59337e2bbf9
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-aa
@@ -0,0 +1,166 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+
+--- configure.in.orig 2002-11-13 13:59:18.000000000 -0500
++++ configure.in
+@@ -264,6 +264,8 @@ os2_emx*) LIBS="-lm $LIBS"
+ ac_cv_lib_dir_opendir=no;;
+ msdosdjgpp*) LIBS="-lm $LIBS"
+ ac_cv_func_getpgrp_void=yes;;
++interix3*) LIBS="-lm $LIBS"
++ ac_cv_func_getpgrp_void=yes;;
+ freebsd*) LIBS="-lm $LIBS"
+ AC_CACHE_CHECK([whether -lxpg4 has to be linked],
+ rb_cv_lib_xpg4_needed,
+@@ -324,7 +326,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 +459,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"
+
+@@ -549,6 +595,7 @@ if test "$with_dln_a_out" != yes; then
+ cygwin*) ;;
+ mingw*) ;;
+ netbsd*) CCDLFLAGS=-fPIC;;
++ interix3*) ;;
+ *) CCDLFLAGS=-fPIC;;
+ esac
+ else
+@@ -563,7 +610,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 +625,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 +637,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,8 +655,18 @@ 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 ;;
++ interix3*) LDSHARED='${CC} -shared'
++ LDFLAGS="-Wl,-E"
++ # use special random-slot linkage in 0x[56]XXXXXXX
++ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
++ rb_cv_dlopen=yes ;;
+ openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
+ rb_cv_dlopen=yes ;;
+ bsdi3*) case "$CC" in
+@@ -858,6 +922,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*)
+@@ -879,6 +944,14 @@ if test "$enable_shared" = 'yes'; then
+ LIBRUBY_ALIASES=""
+ fi
+ ;;
++ interix3*)
++ SOLIBS='$(LIBS)'
++ LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
++ # link explicitly to 0x48000000
++ LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
++ LIBRUBYARG='-Wl,-R -Wl,${prefix}/lib -L${prefix}/lib -L. -l$(RUBY_INSTALL_NAME)'
++ LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_INSTALL_NAME).so'
++ ;;
+ openbsd*)
+ SOLIBS='$(LIBS)'
+ ;;
+@@ -1071,6 +1144,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-base/patches/patch-ab b/lang/ruby16-base/patches/patch-ab
new file mode 100644
index 00000000000..e325eb77150
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ab
@@ -0,0 +1,461 @@
+$NetBSD: patch-ab,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+
+--- configure.orig 2002-11-19 06:49:26.000000000 -0500
++++ 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
+@@ -2324,6 +2326,8 @@ os2_emx*) LIBS="-lm $LIBS"
+ ac_cv_lib_dir_opendir=no;;
+ msdosdjgpp*) LIBS="-lm $LIBS"
+ ac_cv_func_getpgrp_void=yes;;
++interix3*) LIBS="-lm $LIBS"
++ ac_cv_func_getpgrp_void=yes;;
+ freebsd*) LIBS="-lm $LIBS"
+ echo $ac_n "checking whether -lxpg4 has to be linked""... $ac_c" 1>&6
+ echo "configure:2330: checking whether -lxpg4 has to be linked" >&5
+@@ -2877,7 +2881,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 +4392,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.
+@@ -4510,6 +4839,7 @@ echo "configure:4501: checking whether O
+ cygwin*) ;;
+ mingw*) ;;
+ netbsd*) CCDLFLAGS=-fPIC;;
++ interix3*) ;;
+ *) CCDLFLAGS=-fPIC;;
+ esac
+ else
+@@ -4524,7 +4854,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 +4869,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 +4881,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,8 +4899,18 @@ 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 ;;
++ interix3*) LDSHARED='${CC} -shared'
++ LDFLAGS="-Wl,-E"
++ # use special random-slot linkage in 0x[56]XXXXXXX
++ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
++ LIBPATHFLAG=' -L%1$-s'
++ RPATHFLAG=' -Wl,-R%1$-s'
++ rb_cv_dlopen=yes ;;
+ openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
+ rb_cv_dlopen=yes ;;
+ bsdi3*) case "$CC" in
+@@ -5070,6 +5417,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*)
+@@ -5091,6 +5439,14 @@ if test "$enable_shared" = 'yes'; then
+ LIBRUBY_ALIASES=""
+ fi
+ ;;
++ interix3*)
++ SOLIBS='$(LIBS)'
++ LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
++ # link explicitly to 0x48000000
++ LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
++ LIBRUBYARG='-Wl,-R -Wl,${prefix}/lib -L${prefix}/lib -L. -l$(RUBY_INSTALL_NAME)'
++ LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_INSTALL_NAME).so'
++ ;;
+ openbsd*)
+ SOLIBS='$(LIBS)'
+ ;;
+@@ -5315,6 +5671,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-base/patches/patch-ac b/lang/ruby16-base/patches/patch-ac
new file mode 100644
index 00000000000..95d4c11611c
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-ad b/lang/ruby16-base/patches/patch-ad
new file mode 100644
index 00000000000..2d05cf4506f
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-ae b/lang/ruby16-base/patches/patch-ae
new file mode 100644
index 00000000000..6f10f072f80
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ae
@@ -0,0 +1,113 @@
+$NetBSD: patch-ae,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-af b/lang/ruby16-base/patches/patch-af
new file mode 100644
index 00000000000..41073164851
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-af
@@ -0,0 +1,28 @@
+$NetBSD: patch-af,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-ag b/lang/ruby16-base/patches/patch-ag
new file mode 100644
index 00000000000..651f1c15787
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-ah b/lang/ruby16-base/patches/patch-ah
new file mode 100644
index 00000000000..c38f4683e71
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-ai b/lang/ruby16-base/patches/patch-ai
new file mode 100644
index 00000000000..a8681e3c0a6
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ai
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1.1.1 2005/03/06 16:36:08 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-base/patches/patch-aj b/lang/ruby16-base/patches/patch-aj
new file mode 100644
index 00000000000..e285e49a317
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-aj
@@ -0,0 +1,20 @@
+$NetBSD: patch-aj,v 1.1.1.1 2005/03/06 16:36:08 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
+
diff --git a/lang/ruby16-base/patches/patch-ak b/lang/ruby16-base/patches/patch-ak
new file mode 100644
index 00000000000..ebe0879d53f
--- /dev/null
+++ b/lang/ruby16-base/patches/patch-ak
@@ -0,0 +1,16 @@
+$NetBSD: patch-ak,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $
+
+--- ext/extmk.rb.in.orig 2005-01-21 11:23:45.000000000 -0500
++++ ext/extmk.rb.in
+@@ -423,9 +423,9 @@ CC = @CC@
+
+ CFLAGS = %s #{CFLAGS} #$CFLAGS
+ CPPFLAGS = -I$(topdir) -I$(hdrdir) %s #$CPPFLAGS
+-DLDFLAGS = #$DLDFLAGS #$LDFLAGS
++DLDFLAGS = %s #$LDFLAGS
+ LDSHARED = @LDSHARED@ #{defflag}
+-", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
++", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" "), $DLDFLAGS
+ mfile.puts "LIBPATH = #{libpath}" if libpath
+
+ mfile.puts ".SUFFIXES: .@OBJEXT@" unless "@OBJEXT@" == "o"