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

Re: Darwin/pkgsrc



sakamoto@splhack.org (Kazuki Sakamoto) writes:

> ruby-baseは元々Darwin shared libraryに対応しているようなので、
> compile自体はOK。ただshared libraryの拡張子が .so ではなく .dylib。
> 実行するとなぜか
> dyld: ruby can't open library: libruby.dylib
> (No such file or directory, errno = 2)
> などといわれるので、
> setenv DYLD_LIBRARY_PATH /usr/pkg/lib
> とすると動きました。require 'socket' などしても問題なしです。

このパッチで DYLD_LIBRARY_PATH が必要なくなると思います。特に問題ない
ようならコミットして、ruby-list にもなげます。

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby-base/distinfo,v
retrieving revision 1.4
diff -u -u -r1.4 distinfo
--- distinfo	2002/03/02 09:10:54	1.4
+++ distinfo	2002/05/11 16:19:13
@@ -2,8 +2,8 @@
 
 SHA1 (ruby/ruby-1.6.7.tar.gz) = fd1523f17e64fd80741f2e6a77050fde16164053
 Size (ruby/ruby-1.6.7.tar.gz) = 998151 bytes
-SHA1 (patch-aa) = 72df10493784e1ef63c19e5963f6e8840a89bc42
-SHA1 (patch-ab) = 169f1927fafbc64ddcf1c0b91487e88a1af67dd8
+SHA1 (patch-aa) = 62f1bd7d422a1e644896fb6548f182b709d57f23
+SHA1 (patch-ab) = 75b6b2fd6fa5c472c8b2ee0cae5bab19f8edc989
 SHA1 (patch-ac) = 5b897041345ec4077fa2165e3c4c58a6671b942d
 SHA1 (patch-ae) = 294af53a7509372f0d7c17230c605d790f1e7bb2
 SHA1 (patch-af) = 0eb2fd9784b5924bcc233d3b81128821130c578c
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby-base/patches/patch-aa,v
retrieving revision 1.3
diff -u -u -r1.3 patch-aa
--- patches/patch-aa	2002/03/02 09:10:55	1.3
+++ patches/patch-aa	2002/05/11 16:19:13
@@ -1,7 +1,16 @@
-$NetBSD: patch-aa,v 1.3 2002/03/02 09:10:55 taca Exp $
+$NetBSD$
 
 --- configure.in.orig	Wed Feb  6 18:13:15 2002
 +++ configure.in
+@@ -872,7 +872,7 @@
+     darwin*)
+ 	LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib'
+ 	LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
+-	LIBRUBY_DLDFLAGS='-install_name lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
++	LIBRUBY_DLDFLAGS='-install_name $(prefix)/lib/lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
+ 	LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
+ 	;;
+     *)
 @@ -951,6 +951,7 @@
  	;;	
  esac
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby-base/patches/patch-ab,v
retrieving revision 1.2
diff -u -u -r1.2 patch-ab
--- patches/patch-ab	2002/03/02 09:10:55	1.2
+++ patches/patch-ab	2002/05/11 16:19:13
@@ -1,7 +1,16 @@
-$NetBSD: patch-ab,v 1.2 2002/03/02 09:10:55 taca Exp $
+$NetBSD$
 
 --- configure.orig	Mon Feb 11 03:05:48 2002
 +++ configure
+@@ -5054,7 +5054,7 @@
+     darwin*)
+ 	LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib'
+ 	LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
+-	LIBRUBY_DLDFLAGS='-install_name lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
++	LIBRUBY_DLDFLAGS='-install_name $(prefix)/lib/lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
+ 	LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
+ 	;;
+     *)
 @@ -5444,6 +5444,7 @@
  s%@setup@%$setup%g
  s%@MINIRUBY@%$MINIRUBY%g