小松です。

In the message of [ruby-list:21861] Re: site_ruby & Linux distribution
    on 2000/4/11 23:53:56 matz / netlab.co.jp (Yukihiro Matsumoto) wrote:
>もう一度パッチ全体を出してもらえませんか?

はい、出しなおします。
[ruby-list:21854]に比べると、configure.inの
    sitedir='${prefix}/lib/ruby/site_ruby'
が
    sitedir="${prefix}/lib/ruby/site_ruby"
になっただけです。

Tue Apr 11 21:14:42 2000 Katsuyuki Komatsu <komatsu / sarion.co.jp> * config_s.dj: add @sitedir@. * configure.in: add --with-sitedir=DIR option. * instruby.rb: use CONFIG["sitedir"]. * lib/mkmf.rb: support 'make site-install'. * win32/config.status: add @sitedir@.
diff -ru2p ruby-1.4.4.dist/config_s.dj ruby-1.4.4/config_s.dj --- ruby-1.4.4.dist/config_s.dj Wed Dec 8 14:35:55 1999 +++ ruby-1.4.4/config_s.dj Tue Apr 11 21:14:42 2000 @@ -54,3 +54,4 @@ s%@SOLIBS@%%g s%@srcdir%.%g s%@arch@%i386-djgpp%g +s%@sitedir@%${prefix}/lib/ruby/site_ruby%g ac_given_srcdir=. diff -ru2p ruby-1.4.4.dist/configure.in ruby-1.4.4/configure.in --- ruby-1.4.4.dist/configure.in Thu Mar 23 13:14:11 2000 +++ ruby-1.4.4/configure.in Tue Apr 11 22:11:25 2000 @@ -777,6 +777,10 @@ RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_ RUBY_LIB_PREFIX="${prefix}/lib/ruby" RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" -RUBY_SITE_LIB_PATH="${RUBY_LIB_PREFIX}/site_ruby" -RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" +sitedir="${prefix}/lib/ruby/site_ruby" +AC_ARG_WITH(sitedir, + [--with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], + [sitedir=$withval]) +RUBY_SITE_LIB_PATH="${sitedir}" +RUBY_SITE_LIB_PATH2="${sitedir}/${MAJOR}.${MINOR}" AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") @@ -785,4 +789,5 @@ AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RU AC_SUBST(arch)dnl +AC_SUBST(sitedir)dnl configure_args=$ac_configure_args diff -ru2p ruby-1.4.4.dist/instruby.rb ruby-1.4.4/instruby.rb --- ruby-1.4.4.dist/instruby.rb Tue Mar 14 15:56:32 2000 +++ ruby-1.4.4/instruby.rb Tue Apr 11 21:14:42 2000 @@ -25,5 +25,5 @@ libdir = destdir+CONFIG["libdir"] rubylibdir = destdir+CONFIG["prefix"]+"/lib/ruby"+version archlibdir = rubylibdir+arch -sitelibdir = destdir+CONFIG["prefix"]+"/lib/ruby/site_ruby"+version +sitelibdir = destdir+CONFIG["sitedir"]+version sitearchlibdir = sitelibdir+arch mandir = destdir+CONFIG["mandir"] + "/man1" diff -ru2p ruby-1.4.4.dist/lib/mkmf.rb ruby-1.4.4/lib/mkmf.rb --- ruby-1.4.4.dist/lib/mkmf.rb Mon Apr 10 14:48:43 2000 +++ ruby-1.4.4/lib/mkmf.rb Tue Apr 11 21:14:42 2000 @@ -14,4 +14,6 @@ $srcdir = CONFIG["srcdir"] $libdir = CONFIG["libdir"]+"/ruby/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"] $archdir = $libdir+"/"+CONFIG["arch"] +$sitelibdir = CONFIG["sitedir"]+"/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"] +$sitearchdir = $sitelibdir+"/"+CONFIG["arch"] if File.exist? $archdir + "/ruby.h" @@ -108,5 +110,5 @@ def try_run(src, opt="") end -def install_rb(mfile, srcdir = nil) +def install_rb(mfile, dest, srcdir = nil) libdir = "lib" libdir = srcdir + "/" + libdir if srcdir @@ -121,8 +123,8 @@ def install_rb(mfile, srcdir = nil) for f in dir next if f == "." - mfile.printf "\t@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(libdir)/%s\n", f + mfile.printf "\t@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' %s/%s\n", dest, f end for f in path - mfile.printf "\t@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' lib/%s $(libdir)/%s\n", f, f + mfile.printf "\t@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' lib/%s %s/%s\n", f, dest, f end end @@ -374,4 +376,6 @@ exec_prefix = #{CONFIG["exec_prefix"]} libdir = #{$libdir} archdir = #{$archdir} +sitelibdir = #{$sitelibdir} +sitearchdir = #{$sitearchdir} #### End of system configuration section. #### @@ -399,9 +403,19 @@ realclean: clean install: $(archdir)/$(DLLIB) +site-install: $(sitearchdir)/$(DLLIB) + $(archdir)/$(DLLIB): $(DLLIB) @$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(libdir) $(archdir) @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)' $(DLLIB) $(archdir)/$(DLLIB) EOMF - install_rb(mfile) + install_rb(mfile, "$(libdir)") + mfile.printf "\n" + + mfile.printf <<EOMF +$(sitearchdir)/$(DLLIB): $(DLLIB) + @$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(libdir) $(sitearchdir) + @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)' $(DLLIB) $(sitearchdir)/$(DLLIB) +EOMF + install_rb(mfile, "$(sitelibdir)") mfile.printf "\n" diff -ru2p ruby-1.4.4.dist/win32/config.status ruby-1.4.4/win32/config.status --- ruby-1.4.4.dist/win32/config.status Tue Mar 14 15:56:34 2000 +++ ruby-1.4.4/win32/config.status Tue Apr 11 21:14:42 2000 @@ -60,4 +60,5 @@ s%@LIBRUBYARG@%libruby.lib%g s%@SOLIBS@%%g s%@arch@%i386-mswin32%g +s%@sitedir@%${prefix}/lib/ruby/site_ruby%g s%@configure_args@%--with-make-prog=nmake%g s%@configure_input@%$configure_input%g -- 小松克行 / Katsuyuki Komatsu <komatsu / sarion.co.jp>