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

IPv6 ready ruby



	さっきは嘘bug reportでごめんなさい >sakamoto

	pkgsrc/lang/rubyのIPv6 ready化diffです。
	どうしてもext/socket/socket.cをstatic linkしないとうまくいかないん
	ですが、直せたひとは教えて下さい。patches/patch-adの後半で
	static linkにしています。
	うまくいくか試すには、
	% ruby work/ruby-1.4.3/samples/dualstack-fetch.rb http://www.iij.ad.jp/
	あたりでどうぞ。

	USE_INET6まわりは後で変わるかも。

itojun


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby/Makefile,v
retrieving revision 1.8
diff -c -r1.8 Makefile
*** Makefile	2000/01/15 18:46:29	1.8
--- Makefile	2000/01/20 12:17:30
***************
*** 19,26 ****
--- 19,35 ----
  DEPENDS+=	ncurses>=4.2:../../devel/ncurses
  DEPENDS+=	readline-4.0:../../devel/readline
  
+ BUILD_DEFS+=    USE_INET6
+ 
+ .include "../../mk/bsd.prefs.mk"
+ 
  GNU_CONFIGURE=	yes
  CONFIGURE_ARGS+= --enable-shared
+ .if defined(USE_INET6) && ${USE_INET6} == YES
+ CONFIGURE_ARGS= --enable-ipv6
+ .else
+ CONFIGURE_ARGS= --disable-ipv6
+ .endif
  MAKE_ENV+=	DLDFLAGS="-L${LOCALBASE}/lib -R${LOCALBASE}/lib -L${X11BASE}/lib -R${X11BASE}/lib"
  
  PLIST_SUBST=	RUBY_VERSION=1.4
Index: files/patch-sum
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby/files/patch-sum,v
retrieving revision 1.2
diff -c -r1.2 patch-sum
*** patch-sum	1999/12/14 07:16:05	1.2
--- patch-sum	2000/01/20 12:17:30
***************
*** 3,5 ****
--- 3,6 ----
  MD5 (patch-aa) = 63413152889269cdc5c2cb9f64e537e2
  MD5 (patch-ab) = e132c46af84d0969cf0e00f6ffb95bac
  MD5 (patch-ac) = b7598f85460293ac502d0d9c81260e2b
+ MD5 (patch-ad) = cc834e2e13af67c826ca65e6b29d730c
Index: patches/patch-ad
===================================================================
RCS file: patch-ad
diff -N patch-ad
*** /dev/null	Thu Jan 20 03:49:39 2000
--- patch-ad	Thu Jan 20 04:17:30 2000
***************
*** 0 ****
--- 1,41 ----
+ $NetBSD$
+ Not sure why "socket" library fails to find certain functions in libc.
+ 
+ --- ext/socket/extconf.rb-	Thu Jan 20 02:50:06 2000
+ +++ ext/socket/extconf.rb	Thu Jan 20 02:52:52 2000
+ @@ -41,6 +41,7 @@
+  $ipv6type = nil
+  $ipv6lib = nil
+  $ipv6libdir = nil
+ +$ipv6trylibc = nil
+  if $ipv6
+    if egrep_cpp("yes", <<EOF)
+  #include <netinet/in.h>
+ @@ -59,6 +60,7 @@
+      $ipv6type = "kame"
+      $ipv6lib="inet6"
+      $ipv6libdir="/usr/local/v6/lib"
+ +    $ipv6trylibc=true
+      $CFLAGS="-DINET6 "+$CFLAGS
+    elsif File.directory? "/usr/inet6"
+      $ipv6type = "linux"
+ @@ -100,7 +102,7 @@
+    if $ipv6lib
+      if File.directory? $ipv6libdir and File.exist? "#{$ipv6libdir}/lib#{$ipv6lib}.a"
+        $LOCAL_LIBS = " -L#$ipv6libdir -l#$ipv6lib"
+ -    else
+ +    elsif !$ipv6trylibc
+        print <<EOS
+  
+  Fatal: no #$ipv6lib library found.  cannot continue.
+ --- ext/Setup-	Thu Jan 20 04:15:07 2000
+ +++ ext/Setup	Thu Jan 20 04:09:20 2000
+ @@ -9,7 +9,7 @@
+  #md5
+  #pty
+  #sdbm
+ -#socket
+ +socket
+  #tkutil
+  #tcltklib
+  #gtk
Index: pkg/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby/pkg/PLIST,v
retrieving revision 1.4
diff -c -r1.4 PLIST
*** PLIST	1999/12/14 07:16:06	1.4
--- PLIST	2000/01/20 12:17:31
***************
*** 45,51 ****
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/rubyio.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/rubysig.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/sdbm.so
! lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/socket.so
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/st.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/util.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/version.h
--- 45,51 ----
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/rubyio.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/rubysig.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/sdbm.so
! @comment lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/socket.so
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/st.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/util.h
  lib/ruby/${RUBY_VERSION}/${MACHINE_ARCH}-${LOWER_OPSYS}/version.h