diff options
author | taca <taca> | 2004-03-12 04:59:20 +0000 |
---|---|---|
committer | taca <taca> | 2004-03-12 04:59:20 +0000 |
commit | 3422d2bdeb1d7d2d13effa6efa60bd4c28a1adc4 (patch) | |
tree | 2b6514b322e2b3bdb94749b3781c6dc1d7ee115e /lang/ruby-base | |
parent | 96c1b7fba24acedb069ad92c9b27bf480b889898 (diff) | |
download | pkgsrc-3422d2bdeb1d7d2d13effa6efa60bd4c28a1adc4.tar.gz |
Update ruby-base package to 1.6.8nb3.
* Miscellaneous bug fixes.
- ruby core dumps by segmentation violation because of wrong
checking whether block was given.
- PTY module function dose not reset SIGALRM handler when child
process executing command on pty.
- There is a error for calling raise method in lib/delegate.rb.
* Try to honor PKG_SILENT and PKG_VERBOSE.
* Experimental fix for getaddrinfo(3) problem on Darwin (not tested).
Diffstat (limited to 'lang/ruby-base')
-rw-r--r-- | lang/ruby-base/Makefile | 4 | ||||
-rw-r--r-- | lang/ruby-base/Makefile.common | 18 | ||||
-rw-r--r-- | lang/ruby-base/distinfo | 6 | ||||
-rw-r--r-- | lang/ruby-base/patches/patch-al | 14 | ||||
-rw-r--r-- | lang/ruby-base/patches/patch-am | 113 | ||||
-rw-r--r-- | lang/ruby-base/patches/patch-an | 13 | ||||
-rw-r--r-- | lang/ruby-base/patches/patch-ao | 28 |
7 files changed, 184 insertions, 12 deletions
diff --git a/lang/ruby-base/Makefile b/lang/ruby-base/Makefile index 0758f3ed87b..14636d83f67 100644 --- a/lang/ruby-base/Makefile +++ b/lang/ruby-base/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2004/02/22 02:24:07 minskim Exp $ +# $NetBSD: Makefile,v 1.25 2004/03/12 04:59:20 taca Exp $ # FreeBSD Id: ports/lang/ruby/Makefile,v 1.39 2000/10/20 19:56:03 knu Exp DISTNAME= ${RUBY_DISTNAME} PKGNAME= ${RUBY_PKGNAMEPREFIX}base-${RUBY_VERSION} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_RUBY} diff --git a/lang/ruby-base/Makefile.common b/lang/ruby-base/Makefile.common index 2408c5a1bba..783b0dc163c 100644 --- a/lang/ruby-base/Makefile.common +++ b/lang/ruby-base/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.17 2004/03/07 03:33:45 taca Exp $ +# $NetBSD: Makefile.common,v 1.18 2004/03/12 04:59:20 taca Exp $ # FreeBSD: ports/Mk/bsd.ruby.mk,v 1.11 2000/11/16 17:59:40 knu Exp # Makefile.common: ruby common makefile, based on FreeBSD's bsd.ruby.mk. @@ -148,7 +148,7 @@ RUBY_DISTINFO?= ${.CURDIR}/../../lang/ruby${RUBY_SUFFIX}-base/distinfo pre-configure: replace-ruby replace-ruby: - @for s in ${REPLACE_RUBY}; do \ + ${_PKG_SILENT}${_PKG_DEBUG}for s in ${REPLACE_RUBY}; do \ case $${s} in \ /*) f=$${s};; \ *) f=${WRKSRC}/$${s};; \ @@ -177,7 +177,7 @@ do-configure: ruby-extconf-configure ruby-extconf-configure: .for d in ${RUBY_EXTCONF_SUBDIRS} @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure" - @cd ${WRKSRC}/${d}; \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} .endfor @@ -187,7 +187,7 @@ do-build: ruby-extconf-build ruby-extconf-build: .for d in ${RUBY_EXTCONF_SUBDIRS} @${ECHO_MSG} "===> Building ${d}" - @cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET} .endfor .endif @@ -197,14 +197,14 @@ do-install: ruby-extconf-install ruby-extconf-install: .for d in ${RUBY_EXTCONF_SUBDIRS} @${ECHO_MSG} "===> Installing ${d}" - @cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} .endfor .endif .else ruby-extconf-configure: @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" - @cd ${WRKSRC}; \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} .endif .endif @@ -219,7 +219,7 @@ do-configure: ruby-setup-configure ruby-setup-configure: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure" - @cd ${WRKSRC}; \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_SETUP} config ${CONFIGURE_ARGS} .endif @@ -228,7 +228,7 @@ do-build: ruby-setup-build ruby-setup-build: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to build" - @cd ${WRKSRC}; \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} setup .endif @@ -237,7 +237,7 @@ do-install: ruby-setup-install ruby-setup-install: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to ${INSTALL_TARGET}" - cd ${WRKSRC}; \ + ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_SETUP} ${INSTALL_TARGET} .endif .endif diff --git a/lang/ruby-base/distinfo b/lang/ruby-base/distinfo index 909522de977..66effa4cfc9 100644 --- a/lang/ruby-base/distinfo +++ b/lang/ruby-base/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2003/12/19 11:59:39 sketch Exp $ +$NetBSD: distinfo,v 1.12 2004/03/12 04:59:20 taca Exp $ SHA1 (ruby/ruby-1.6.8.tar.gz) = 4b475ac1c837cd62b6dfe85359e1502a71b08cd1 Size (ruby/ruby-1.6.8.tar.gz) = 1023403 bytes @@ -9,3 +9,7 @@ SHA1 (patch-ae) = 8c9925dcb7d4fdb9aad5432befbc3b21c56eb884 SHA1 (patch-af) = 33aa9f1e524e2f4a6dd2f1310ce7358744b83a8c SHA1 (patch-ag) = 4b5893b55253526af687bc81a9acea3686a00d39 SHA1 (patch-aj) = d61950c108cda41a7a5227f02c583bc6e85e43bb +SHA1 (patch-al) = 7c51627c37229d630bfa3852b2139c862b82e553 +SHA1 (patch-am) = 2e096dcb882be923d2ff775a4271a300954a9dec +SHA1 (patch-an) = 72461b10296cb9a03fc37bba6af69650c8777741 +SHA1 (patch-ao) = 1070614441174b30926ba1d8a4d1a4718172ce4b diff --git a/lang/ruby-base/patches/patch-al b/lang/ruby-base/patches/patch-al new file mode 100644 index 00000000000..fff80e67346 --- /dev/null +++ b/lang/ruby-base/patches/patch-al @@ -0,0 +1,14 @@ +$NetBSD: patch-al,v 1.1 2004/03/12 04:59:20 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; + } + diff --git a/lang/ruby-base/patches/patch-am b/lang/ruby-base/patches/patch-am new file mode 100644 index 00000000000..8f231998b79 --- /dev/null +++ b/lang/ruby-base/patches/patch-am @@ -0,0 +1,113 @@ +$NetBSD: patch-am,v 1.1 2004/03/12 04:59:20 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/ruby-base/patches/patch-an b/lang/ruby-base/patches/patch-an new file mode 100644 index 00000000000..3866b8ff83f --- /dev/null +++ b/lang/ruby-base/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1 2004/03/12 04:59:20 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/ruby-base/patches/patch-ao b/lang/ruby-base/patches/patch-ao new file mode 100644 index 00000000000..2383c99e8ef --- /dev/null +++ b/lang/ruby-base/patches/patch-ao @@ -0,0 +1,28 @@ +$NetBSD: patch-ao,v 1.1 2004/03/12 04:59:20 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; + } + |