pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby-base Update ruby-base package to 1.6.8nb3.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da2cc1125174
branches:  trunk
changeset: 470829:da2cc1125174
user:      taca <taca%pkgsrc.org@localhost>
date:      Fri Mar 12 04:59:20 2004 +0000

description:
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:

 lang/ruby-base/Makefile         |    4 +-
 lang/ruby-base/Makefile.common  |   18 +++---
 lang/ruby-base/distinfo         |    6 +-
 lang/ruby-base/patches/patch-al |   14 ++++
 lang/ruby-base/patches/patch-am |  113 ++++++++++++++++++++++++++++++++++++++++
 lang/ruby-base/patches/patch-an |   13 ++++
 lang/ruby-base/patches/patch-ao |   28 +++++++++
 7 files changed, 184 insertions(+), 12 deletions(-)

diffs (296 lines):

diff -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/Makefile
--- a/lang/ruby-base/Makefile   Fri Mar 12 04:56:49 2004 +0000
+++ b/lang/ruby-base/Makefile   Fri Mar 12 04:59:20 2004 +0000
@@ -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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/Makefile.common
--- a/lang/ruby-base/Makefile.common    Fri Mar 12 04:56:49 2004 +0000
+++ b/lang/ruby-base/Makefile.common    Fri Mar 12 04:59:20 2004 +0000
@@ -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 @@
 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 @@
 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 @@
 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 @@
 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 @@
 
 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 @@
 
 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 @@
 
 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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/distinfo
--- a/lang/ruby-base/distinfo   Fri Mar 12 04:56:49 2004 +0000
+++ b/lang/ruby-base/distinfo   Fri Mar 12 04:59:20 2004 +0000
@@ -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-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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/patches/patch-al
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby-base/patches/patch-al   Fri Mar 12 04:59:20 2004 +0000
@@ -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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/patches/patch-am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby-base/patches/patch-am   Fri Mar 12 04:59:20 2004 +0000
@@ -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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby-base/patches/patch-an   Fri Mar 12 04:59:20 2004 +0000
@@ -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 -r f2f0416e5820 -r da2cc1125174 lang/ruby-base/patches/patch-ao
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby-base/patches/patch-ao   Fri Mar 12 04:59:20 2004 +0000
@@ -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;
+ }
+ 



Home | Main Index | Thread Index | Old Index