[37600] trunk/dports/lang/ruby

pguyot at kallisys.net pguyot at kallisys.net
Sun Jun 15 04:23:19 PDT 2008


Revision: 37600
          http://trac.macosforge.org/projects/macports/changeset/37600
Author:   pguyot at kallisys.net
Date:     2008-06-15 04:23:17 -0700 (Sun, 15 Jun 2008)

Log Message:
-----------
lang/ruby: update to 1.8.7, added getaddrinfo patch, fixes #15177, #15231, #15528

Modified Paths:
--------------
    trunk/dports/lang/ruby/Portfile
    trunk/dports/lang/ruby/files/patch-Makefile.in
    trunk/dports/lang/ruby/files/patch-mkmf.rb
    trunk/dports/lang/ruby/files/patch-thread-hooks

Added Paths:
-----------
    trunk/dports/lang/ruby/files/patch-socket.c
    trunk/dports/lang/ruby/files/patch-test_socket.rb

Removed Paths:
-------------
    trunk/dports/lang/ruby/files/dot-darwin.diff
    trunk/dports/lang/ruby/files/etc-irbrc.diff
    trunk/dports/lang/ruby/files/ignore-gsetcontext.diff
    trunk/dports/lang/ruby/files/md5_sha1_commoncrypto.diff
    trunk/dports/lang/ruby/files/patch-configure.in
    trunk/dports/lang/ruby/files/patch-instruby.rb
    trunk/dports/lang/ruby/files/patch-lib-rexml-document.rb.diff
    trunk/dports/lang/ruby/files/patch-mkconfig.rb
    trunk/dports/lang/ruby/files/patch-ruby.c
    trunk/dports/lang/ruby/files/use-dyld.diff
    trunk/dports/lang/ruby/files/use-setreugid.diff
    trunk/dports/lang/ruby/files/words-bigendian-from-arch.diff

Modified: trunk/dports/lang/ruby/Portfile
===================================================================
--- trunk/dports/lang/ruby/Portfile	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/Portfile	2008-06-15 11:23:17 UTC (rev 37600)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name			ruby
-version			1.8.6-p114
+version			1.8.7
 
 categories		lang ruby
 maintainers		pguyot at kallisys.net
@@ -18,11 +18,13 @@
 master_sites	ruby:1.8
 				
 dist_subdir		ruby
-checksums		ruby-${version}.tar.gz \
-					md5	500a9f11613d6c8ab6dcf12bec1b3ed3 \
-                    sha1    149d19caa3059de9faef34f80630642fd61651ad \
-                    rmd160  9363ea3f3dede38dce3b26bfe69ccbf7eac00f78
-					
+checksums		ruby-${version}.tar.bz2 \
+					md5		f17f14c8d55e731b3ce1bc35c42f0a6c \
+                    sha1    297282d0e4b885176336f5b26f986f9cf5f47133 \
+                    rmd160  ea8b631de65469cb5496328e4b2dcd5a8e951d51
+
+use_bzip2		yes
+
 platforms		darwin
 
 depends_lib		port:libiconv \
@@ -32,12 +34,9 @@
 				port:ncurses
 				
 patchfiles		patch-Makefile.in \
-				patch-configure.in \
-				patch-instruby.rb \
-				patch-mkconfig.rb \
 				patch-mkmf.rb \
-				patch-ruby.c \
-				patch-lib-rexml-document.rb.diff
+				patch-socket.c \
+				patch-test_socket.rb
 
 use_autoconf	yes
 
@@ -72,16 +71,6 @@
 	configure.args-delete	--enable-pthread
 }
 
-platform darwin 9 {
-	patchfiles-append      	dot-darwin.diff \
-							etc-irbrc.diff \
-							ignore-gsetcontext.diff \
-							md5_sha1_commoncrypto.diff \
-							use-dyld.diff \
-							use-setreugid.diff \
-							words-bigendian-from-arch.diff
-}
-
 variant tk conflicts mactk {
 	configure.args-delete	--without-tk 
 	configure.args-append	--with-tk 

Deleted: trunk/dports/lang/ruby/files/dot-darwin.diff
===================================================================
--- trunk/dports/lang/ruby/files/dot-darwin.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/dot-darwin.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,11 +0,0 @@
---- lib/rdoc/options.rb.orig	2007-10-23 17:36:41.000000000 +0200
-+++ lib/rdoc/options.rb	2007-10-23 17:37:12.000000000 +0200
-@@ -544,7 +544,7 @@
-   # so we'll bypass the test under Windows
- 
-   def check_diagram
--    return if RUBY_PLATFORM =~ /win/
-+    return if RUBY_PLATFORM =~ /mswin32|cygwin|mingw|bccwin/
- 
-     ok = false
-     ver = nil

Deleted: trunk/dports/lang/ruby/files/etc-irbrc.diff
===================================================================
--- trunk/dports/lang/ruby/files/etc-irbrc.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/etc-irbrc.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,12 +0,0 @@
---- lib/irb/init.rb.orig	2007-10-23 17:43:49.000000000 +0200
-+++ lib/irb/init.rb	2007-10-23 17:43:03.000000000 +0200
-@@ -243,6 +243,9 @@
-     yield proc{|rc| home+"/irb#{rc.sub(/\A_?/, '.')}"}
-     yield proc{|rc| home+"/_irb#{rc}"}
-     yield proc{|rc| home+"/$irb#{rc}"}
-+    unless RUBY_PLATFORM =~ /mswin32|cygwin|mingw|bccwin/
-+      yield proc{|rc| "/etc/irb#{rc}"}
-+    end
-   end
- 
-   # loading modules

Deleted: trunk/dports/lang/ruby/files/ignore-gsetcontext.diff
===================================================================
--- trunk/dports/lang/ruby/files/ignore-gsetcontext.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/ignore-gsetcontext.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,23 +0,0 @@
---- node.h.orig	2007-10-23 17:09:10.000000000 +0200
-+++ node.h	2007-10-23 17:08:19.000000000 +0200
-@@ -374,9 +374,17 @@
- void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));
- int rb_remove_event_hook _((rb_event_hook_func_t));
- 
--#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
--#include <ucontext.h>
--#define USE_CONTEXT
-+#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT) 
-+# if defined(__APPLE__)
-+#   include <AvailabilityMacros.h>
-+#   if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
-+#     include <ucontext.h>
-+#     define USE_CONTEXT
-+#   endif
-+# else
-+#   include <ucontext.h>
-+#   define USE_CONTEXT
-+# endif
- #endif
- #include <setjmp.h>
- #include "st.h"

Deleted: trunk/dports/lang/ruby/files/md5_sha1_commoncrypto.diff
===================================================================
--- trunk/dports/lang/ruby/files/md5_sha1_commoncrypto.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/md5_sha1_commoncrypto.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,46 +0,0 @@
---- ext/digest/md5/extconf.rb.orig	2007-10-23 18:31:40.000000000 +0200
-+++ ext/digest/md5/extconf.rb	2007-10-23 18:26:33.000000000 +0200
-@@ -11,6 +11,7 @@
- dir_config("openssl")
- 
- if !with_config("bundled-md5") &&
-+   !have_header("CommonCrypto/CommonDigest.h") &&
-     have_library("crypto") && have_header("openssl/md5.h")
-   $objs << "md5ossl.#{$OBJEXT}"
- 
---- ext/digest/md5/md5.h.orig	2007-10-23 18:31:52.000000000 +0200
-+++ ext/digest/md5/md5.h	2007-10-23 18:28:19.000000000 +0200
-@@ -48,6 +48,10 @@
- 
- #include "defs.h"
- 
-+#if defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
-+# include <CommonCrypto/CommonDigest.h>
-+#endif
-+
- /*
-  * This code has some adaptations for the Ghostscript environment, but it
-  * will compile and run correctly in any environment with 8-bit chars and
---- ext/digest/sha1/extconf.rb.orig	2007-10-23 18:42:07.000000000 +0200
-+++ ext/digest/sha1/extconf.rb	2007-10-23 18:43:01.000000000 +0200
-@@ -11,6 +11,7 @@
- dir_config("openssl")
- 
- if !with_config("bundled-sha1") &&
-+   !have_header("CommonCrypto/CommonDigest.h") &&
-     have_library("crypto") && have_header("openssl/sha.h")
-   $objs << "sha1ossl.#{$OBJEXT}"
- else
---- ext/digest/sha1/sha1.h.orig	2007-10-23 18:42:14.000000000 +0200
-+++ ext/digest/sha1/sha1.h	2007-10-23 18:43:23.000000000 +0200
-@@ -13,6 +13,10 @@
- 
- #include "defs.h"
- 
-+#if defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
-+# include <CommonCrypto/CommonDigest.h>
-+#endif
-+
- typedef struct {
- 	uint32_t state[5];
- 	uint32_t count[2];  

Modified: trunk/dports/lang/ruby/files/patch-Makefile.in
===================================================================
--- trunk/dports/lang/ruby/files/patch-Makefile.in	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-Makefile.in	2008-06-15 11:23:17 UTC (rev 37600)
@@ -9,7 +9,7 @@
  
  TESTUI = console
  TESTS =
-@@ -98,11 +100,11 @@
+@@ -101,11 +103,11 @@
  
  miniruby$(EXEEXT):
  		@$(RM) $@

Deleted: trunk/dports/lang/ruby/files/patch-configure.in
===================================================================
--- trunk/dports/lang/ruby/files/patch-configure.in	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-configure.in	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,58 +0,0 @@
---- configure.in.orig	2006-08-07 19:37:43.000000000 -0700
-+++ configure.in	2006-09-20 16:57:30.000000000 -0700
-@@ -1575,9 +1575,28 @@
- AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
- AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}")
- 
-+AC_ARG_WITH(vendordir,
-+	    [  --with-vendordir=DIR      vendor libraries in DIR [PREFIX/lib/ruby/vendor_ruby]],
-+            [vendordir=$withval],
-+            [vendordir='${prefix}/lib/ruby/vendor_ruby'])
-+VENDOR_DIR="`eval \"echo ${vendordir}\"`"
-+case "$target_os" in
-+  cygwin*|mingw*|*djgpp*|os2_emx*)
-+    RUBY_VENDOR_LIB_PATH="`expr "$VENDOR_DIR" : "$prefix\(/.*\)"`" ||
-+    RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
-+  *)
-+    RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
-+esac
-+RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}"
-+
-+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH}")
-+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")
-+
- AC_SUBST(arch)dnl
- AC_SUBST(sitearch)dnl
-+AC_SUBST(vendorarch)dnl
- AC_SUBST(sitedir)dnl
-+AC_SUBST(vendordir)dnl
- 
- configure_args=$ac_configure_args
- AC_SUBST(configure_args)dnl
-@@ -1590,6 +1609,8 @@
- 
-     AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
-                  "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
-+    AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
-+                 "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
-     AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
- else
-     arch="${target_cpu}-${target_os}"
-@@ -1597,12 +1618,15 @@
- fi
- 
- case "$target_os" in
--  mingw*) sitearch="i386-$rb_cv_msvcrt" ;;
--  *) sitearch="${arch}" ;;
-+  mingw*) sitearch="i386-$rb_cv_msvcrt"
-+  		  vendorarch="i386-$rb_cv_msvcrt" ;;
-+  *) sitearch="${arch}"
-+     vendorarch="${arch}" ;;
- esac
- 
- AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}")
- AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}")
-+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH2}/${vendorarch}")
- 
- AC_ARG_WITH(search-path,
- 		[  --with-search-path=DIR specify the additional search path],

Deleted: trunk/dports/lang/ruby/files/patch-instruby.rb
===================================================================
--- trunk/dports/lang/ruby/files/patch-instruby.rb	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-instruby.rb	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,29 +0,0 @@
---- instruby.rb.orig	2007-03-15 13:25:14.000000000 +0900
-+++ instruby.rb	2007-03-15 13:31:29.000000000 +0900
-@@ -162,6 +162,8 @@
- archlibdir = CONFIG["archdir"]
- sitelibdir = CONFIG["sitelibdir"]
- sitearchlibdir = CONFIG["sitearchdir"]
-+vendorlibdir = CONFIG["vendorlibdir"]
-+vendorarchlibdir = CONFIG["vendorarchdir"]
- mandir = File.join(CONFIG["mandir"], "man")
- configure_args = Shellwords.shellwords(CONFIG["configure_args"])
- enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
-@@ -202,7 +204,7 @@
-   extout = "#$extout"
-   install?(:ext, :arch, :'ext-arch') do
-     puts "installing extension objects"
--    makedirs [archlibdir, sitearchlibdir]
-+    makedirs [archlibdir, sitearchlibdir, vendorarchlibdir]
-     if noinst = CONFIG["no_install_files"] and noinst.empty?
-       noinst = nil
-     end
-@@ -210,7 +212,7 @@
-   end
-   install?(:ext, :comm, :'ext-comm') do
-     puts "installing extension scripts"
--    makedirs [rubylibdir, sitelibdir]
-+    makedirs [rubylibdir, sitelibdir, vendorlibdir]
-     install_recursive("#{extout}/common", rubylibdir)
-   end
- end

Deleted: trunk/dports/lang/ruby/files/patch-lib-rexml-document.rb.diff
===================================================================
--- trunk/dports/lang/ruby/files/patch-lib-rexml-document.rb.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-lib-rexml-document.rb.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,20 +0,0 @@
---- lib/rexml/document.rb (revision 13681)
-+++ lib/rexml/document.rb (working copy)
-@@ -167,7 +167,7 @@
-     #   indentation will be twice this number of spaces, and children will be
-     #   indented an additional amount.  For a value of 3, every item will be 
-     #   indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1
--    # trans::
-+    # transitive::
-     #   If transitive is true and indent is >= 0, then the output will be
-     #   pretty-printed in such a way that the added whitespace does not affect
-     #   the absolute *value* of the document -- that is, it leaves the value
-@@ -178,7 +178,7 @@
-     #   unable to parse proper XML, we have to provide a hack to generate XML
-     #   that IE's limited abilities can handle.  This hack inserts a space 
-     #   before the /> on empty tags.  Defaults to false
--		def write( output=$stdout, indent=-1, trans=false, ie_hack=false )
-+		def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
-       if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
-         output = Output.new( output, xml_decl.encoding )
-       end

Deleted: trunk/dports/lang/ruby/files/patch-mkconfig.rb
===================================================================
--- trunk/dports/lang/ruby/files/patch-mkconfig.rb	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-mkconfig.rb	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,17 +0,0 @@
---- mkconfig.rb.orig	2005-11-10 15:22:03.000000000 -0800
-+++ mkconfig.rb	2006-01-08 08:36:13.000000000 -0800
-@@ -143,6 +143,14 @@
-   CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
-   CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
-   CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
-+  CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
-+  CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(vendorarch)"
-+  if defined?(VENDOR_SPECIFIC) && VENDOR_SPECIFIC
-+ 	CONFIG["sitearch"] = CONFIG["vendorarch"]
-+ 	CONFIG["sitedir"] = CONFIG["vendordir"]
-+ 	CONFIG["sitelibdir"] = CONFIG["vendorlibdir"]
-+ 	CONFIG["sitearchdir"] = CONFIG["vendorarchdir"]
-+  end
-   CONFIG["topdir"] = File.dirname(__FILE__)
-   MAKEFILE_CONFIG = {}
-   CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}

Modified: trunk/dports/lang/ruby/files/patch-mkmf.rb
===================================================================
--- trunk/dports/lang/ruby/files/patch-mkmf.rb	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-mkmf.rb	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,17 +1,7 @@
---- lib/mkmf.rb.orig	2007-02-28 22:23:42.000000000 +0900
-+++ lib/mkmf.rb	2007-03-15 13:39:26.000000000 +0900
-@@ -51,6 +51,9 @@
- $sitedir = CONFIG["sitedir"]
- $sitelibdir = CONFIG["sitelibdir"]
- $sitearchdir = CONFIG["sitearchdir"]
-+$vendordir = CONFIG["vendordir"]
-+$vendorlibdir = CONFIG["vendorlibdir"]
-+$vendorarchdir = CONFIG["vendorarchdir"]
+--- lib/mkmf.rb.orig	2008-05-29 13:23:36.000000000 +0200
++++ lib/mkmf.rb	2008-06-15 11:08:36.000000000 +0200
+@@ -461,7 +461,7 @@
  
- $mswin = /mswin/ =~ RUBY_PLATFORM
- $bccwin = /bccwin/ =~ RUBY_PLATFORM
-@@ -417,7 +420,7 @@
- 
  def try_func(func, libs, headers = nil, &b)
    headers = cpp_include(headers)
 -  try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b)
@@ -19,7 +9,7 @@
  #{COMMON_HEADERS}
  #{headers}
  /*top*/
-@@ -429,6 +435,11 @@
+@@ -473,6 +473,11 @@
  int main() { return 0; }
  int t() { #{func}(); return 0; }
  SRC
@@ -31,7 +21,7 @@
  end
  
  def try_var(var, headers = nil, &b)
-@@ -1097,6 +1105,7 @@
+@@ -1307,6 +1312,7 @@
  RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
  arch = #{CONFIG['arch']}
  sitearch = #{CONFIG['sitearch']}

Deleted: trunk/dports/lang/ruby/files/patch-ruby.c
===================================================================
--- trunk/dports/lang/ruby/files/patch-ruby.c	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-ruby.c	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,16 +0,0 @@
---- ruby.c.orig	2006-08-15 19:11:21.000000000 -0700
-+++ ruby.c	2006-09-20 17:32:18.000000000 -0700
-@@ -322,6 +32,13 @@
-     incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
-     incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
- 
-+    incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
-+#ifdef RUBY_VENDOR_THIN_ARCHLIB
-+    incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
-+#endif
-+    incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
-+    incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
-+    
-     incpush(RUBY_RELATIVE(RUBY_LIB));
- #ifdef RUBY_THIN_ARCHLIB
-     incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));

Added: trunk/dports/lang/ruby/files/patch-socket.c
===================================================================
--- trunk/dports/lang/ruby/files/patch-socket.c	                        (rev 0)
+++ trunk/dports/lang/ruby/files/patch-socket.c	2008-06-15 11:23:17 UTC (rev 37600)
@@ -0,0 +1,49 @@
+--- ext/socket/socket.c.orig	2008-06-05 23:02:57.000000000 -0700
++++ ext/socket/socket.c	2008-06-05 23:07:36.000000000 -0700
+@@ -877,6 +877,14 @@
+     }
+     else if (FIXNUM_P(port)) {
+ 	snprintf(pbuf, len, "%ld", FIX2LONG(port));
++	/* It looks like getaddrinfo changed in Mac OS X 10.5.3 so that sending "0" 
++	 * as the argument for the port number makes it return EAI_NONAME
++	 * but feeding it a port number of NULL seems to do the trick.
++	 * RSD - 2008-06-05
++	 */ 
++	if (FIX2LONG(port) == 0) {
++		return "";
++	}
+ 	return pbuf;
+     }
+     else {
+@@ -3572,6 +3580,14 @@
+     else if (FIXNUM_P(port)) {
+ 	snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
+ 	pptr = pbuf;
++	/* It looks like getaddrinfo changed in Mac OS X 10.5.3 so that sending "0" 
++	 * as the argument for the port number makes it return EAI_NONAME
++	 * but feeding it a port number of NULL seems to do the trick.
++	 * RSD - 2008-06-05
++	 */ 
++	if (FIX2LONG(port) == 0) {
++		pptr = NULL;
++	}
+     }
+     else {
+ 	strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
+@@ -3697,7 +3713,15 @@
+ 	}
+ 	else if (FIXNUM_P(port)) {
+ 	    snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
+-	    pptr = pbuf;
++		pptr = pbuf;
++		/* It looks like getaddrinfo changed in Mac OS X 10.5.3 so that sending "0" 
++		 * as the argument for the port number makes it return EAI_NONAME
++		 * but feeding it a port number of NULL seems to do the trick.
++		 * RSD - 2008-06-05
++		 */ 
++		if (NUM2LONG(port) == 0) {
++			pptr = NULL;
++		}
+ 	}
+ 	else {
+ 	    strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));

Added: trunk/dports/lang/ruby/files/patch-test_socket.rb
===================================================================
--- trunk/dports/lang/ruby/files/patch-test_socket.rb	                        (rev 0)
+++ trunk/dports/lang/ruby/files/patch-test_socket.rb	2008-06-15 11:23:17 UTC (rev 37600)
@@ -0,0 +1,17 @@
+--- test/socket/test_socket.rb.orig	2008-06-05 23:17:00.000000000 -0700
++++ test/socket/test_socket.rb	2008-06-05 23:17:25.000000000 -0700
+@@ -57,6 +57,14 @@
+       }
+     end
+   end
++  
++  def test_getaddrinfo_raises_no_errors_on_port_argument_of_0
++    # Added 2008-06-05 to ensure that Mac OS X 10.5.3's changes to getaddrinfo don't cause
++    # Ruby's Socket-based classes to fail.
++    # Here are two of the situations I found that were causing erroneous errors
++    assert_nothing_raised(){Socket.getaddrinfo(Socket.gethostname, 0, Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)}
++    assert_nothing_raised(){TCPServer.open('localhost', 0)}
++  end
+ 
+   def test_listen
+     s = nil

Modified: trunk/dports/lang/ruby/files/patch-thread-hooks
===================================================================
--- trunk/dports/lang/ruby/files/patch-thread-hooks	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/patch-thread-hooks	2008-06-15 11:23:17 UTC (rev 37600)
@@ -2,7 +2,7 @@
 ==================================================================
 --- ruby.h	(/trunk)	(revision 16)
 +++ ruby.h	(/branches/thread-hooks)	(revision 16)
-@@ -749,6 +749,19 @@
+@@ -766,6 +766,19 @@
  void ruby_native_thread_kill _((int));
  #endif
  
@@ -26,7 +26,7 @@
 ==================================================================
 --- eval.c	(/trunk)	(revision 16)
 +++ eval.c	(/branches/thread-hooks)	(revision 16)
-@@ -218,6 +218,25 @@
+@@ -215,6 +215,25 @@
  
  #include <sys/stat.h>
  
@@ -52,7 +52,7 @@
  VALUE rb_cProc;
  VALUE rb_cBinding;
  static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
-@@ -10167,6 +10186,8 @@
+@@ -10474,6 +10493,8 @@
  thread_free(th)
      rb_thread_t th;
  {
@@ -60,8 +60,8 @@
 +
      if (th->stk_ptr) free(th->stk_ptr);
      th->stk_ptr = 0;
- #ifdef __ia64__
-@@ -10219,6 +10240,8 @@
+ #ifdef __ia64
+@@ -10526,6 +10547,8 @@
      VALUE *pos;
      int len;
      static VALUE tval;
@@ -70,16 +70,16 @@
  
      len = ruby_stack_length(&pos);
      th->stk_len = 0;
-@@ -10418,6 +10441,8 @@
+@@ -10725,6 +10748,8 @@
+ #define STACK_PAD_SIZE 1024
+     VALUE space[STACK_PAD_SIZE];
  
-     if (!th->stk_ptr) rb_bug("unsaved context");
- 
 +    EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_RESTORE,th->thread);
 +
  #if STACK_GROW_DIRECTION < 0
-     if (&v > th->stk_pos) stack_extend(th, exit);
+     if (addr_in_prev_frame > th->stk_pos) stack_extend(th, exit, &space[0]);
  #elif STACK_GROW_DIRECTION > 0
-@@ -10534,6 +10559,41 @@
+@@ -10841,6 +10866,41 @@
      rb_thread_main_jump(e, RESTORE_RAISE);
  }
  
@@ -121,7 +121,7 @@
  static void
  copy_fds(dst, src, max)
      fd_set *dst, *src;
-@@ -11770,6 +11830,8 @@
+@@ -12068,6 +12128,8 @@
      THREAD_ALLOC(th);
      th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
  

Deleted: trunk/dports/lang/ruby/files/use-dyld.diff
===================================================================
--- trunk/dports/lang/ruby/files/use-dyld.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/use-dyld.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,35 +0,0 @@
---- dln.c.orig	2007-10-23 19:59:39.000000000 +0200
-+++ dln.c	2007-10-23 20:06:45.000000000 +0200
-@@ -87,13 +87,21 @@
- 
- #ifndef NO_DLN_LOAD
- 
--#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
-+#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(_UNICOSMP)
- /* dynamic load with dlopen() */
- # define USE_DLN_DLOPEN
- #endif
- 
-+#if defined(USE_DLN_DLOPEN) && defined(__APPLE__)
-+/* Mac OS X system lesser than 10.4 should use the NSSymbol APIs instead of dlopen/dlsym. */
-+# include <AvailabilityMacros.h>
-+# if MAC_OS_X_VERSION_MAX_ALLOWED < 1040
-+#  undef USE_DLN_DLOPEN
-+# endif
-+#endif
-+
- #ifndef FUNCNAME_PATTERN
--# if defined(__hp9000s300) ||  (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
-+# if defined(__hp9000s300) ||  (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || (defined(__APPLE__) && !defined(USE_DLN_DLOPEN))
- #  define FUNCNAME_PATTERN "_Init_%s"
- # else
- #  define FUNCNAME_PATTERN "Init_%s"
-@@ -1403,7 +1411,7 @@
-     }
- #endif /* _AIX */
- 
--#if defined(NeXT) || defined(__APPLE__)
-+#if defined(NeXT) || (defined(__APPLE__) && !defined(USE_DLN_DLOPEN))
- #define DLN_DEFINED
- /*----------------------------------------------------
-    By SHIROYAMA Takayuki Psi at fortune.nest.or.jp

Deleted: trunk/dports/lang/ruby/files/use-setreugid.diff
===================================================================
--- trunk/dports/lang/ruby/files/use-setreugid.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/use-setreugid.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,22 +0,0 @@
---- process.c.orig	2007-10-23 18:50:29.000000000 +0200
-+++ process.c	2007-10-23 19:08:01.000000000 +0200
-@@ -96,9 +96,16 @@
- #undef HAVE_SETRGID
- #endif
- 
--#if defined(__MacOS_X__) || defined(__bsdi__)
--#define BROKEN_SETREUID 1
--#define BROKEN_SETREGID 1
-+#if defined(__APPLE__)
-+# include <AvailabilityMacros.h>
-+/* setreuid/setregid were broken in Mac OS X <= 10.4, but were fixed since. */
-+# if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
-+#  define BROKEN_SETREUID 1
-+#  define BROKEN_SETREGID 1
-+# endif
-+#elif defined(__bsdi__)
-+# define BROKEN_SETREUID 1
-+# define BROKEN_SETREGID 1
- #endif
- 
- #if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)

Deleted: trunk/dports/lang/ruby/files/words-bigendian-from-arch.diff
===================================================================
--- trunk/dports/lang/ruby/files/words-bigendian-from-arch.diff	2008-06-15 10:46:43 UTC (rev 37599)
+++ trunk/dports/lang/ruby/files/words-bigendian-from-arch.diff	2008-06-15 11:23:17 UTC (rev 37600)
@@ -1,33 +0,0 @@
---- defines.h.orig	2007-10-23 19:48:41.000000000 +0200
-+++ defines.h	2007-10-23 19:49:23.000000000 +0200
-@@ -102,6 +102,16 @@
- #endif
- #endif
- 
-+#if defined(__NeXT__) || defined(__APPLE__)
-+/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
-+   result in a different endian.  Instead trust __BIG_ENDIAN__ and
-+   __LITTLE_ENDIAN__ which are set correctly by -arch. */
-+#undef WORDS_BIGENDIAN
-+#ifdef __BIG_ENDIAN__
-+#define WORDS_BIGENDIAN
-+#endif
-+#endif
-+
- #ifdef __NeXT__
- /* NextStep, OpenStep, Rhapsody */
- #ifndef S_IRUSR
-@@ -155,13 +165,6 @@
- #ifndef S_ISREG
- #define S_ISREG(mode)  (((mode) & (0170000)) == (0100000))
- #endif
--/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
--   result in a different endian.  Instead trust __BIG_ENDIAN__ and
--   __LITTLE_ENDIAN__ which are set correctly by -arch. */
--#undef WORDS_BIGENDIAN
--#ifdef __BIG_ENDIAN__
--#define WORDS_BIGENDIAN
--#endif
- #ifndef __APPLE__
- /* NextStep, OpenStep (but not Rhapsody) */
- #ifndef GETPGRP_VOID

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080615/57716dc6/attachment-0001.htm 


More information about the macports-changes mailing list