Project

General

Profile

Feature #5617 ยป Allow-to-install-RubyGems-into-custom-location-outsi.patch

vo.x (Vit Ondruch), 01/12/2012 07:01 PM

View differences:

configure.in
2822 2822
    dir="${VENDOR_DIR}"
2823 2823
done
2824 2824

  
2825
AC_ARG_WITH(rubygemsdir,
2826
           AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
2827
            [rubygemsdir=$withval])
2828
if test "$rubygemsdir" != ""; then
2829
    AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir")
2830
fi
2831

  
2825 2832
if test "${LOAD_RELATIVE+set}"; then
2826 2833
    AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
2827 2834
    RUBY_EXEC_PREFIX=""
......
2882 2889
AC_SUBST(ruby_version)dnl
2883 2890
AC_SUBST(sitedir)dnl
2884 2891
AC_SUBST(vendordir)dnl
2892
AC_SUBST(rubygemsdir)dnl
2885 2893

  
2886 2894
configure_args=$ac_configure_args
2887 2895
AC_SUBST(configure_args)dnl
tool/mkconfig.rb
77 77
    when /^RUBY_SO_NAME$/; next if $so_name
78 78
    when /^arch$/; if val.empty? then val = arch else arch = val end
79 79
    when /^sitearch/; val = '$(arch)' if val.empty?
80
    when /^rubygemsdir/; next if val.empty?
80 81
    end
81 82
    case val
82 83
    when /^\$\(ac_\w+\)$/; next
tool/rbinstall.rb
302 302
sitearchlibdir = CONFIG["sitearchdir"]
303 303
vendorlibdir = CONFIG["vendorlibdir"]
304 304
vendorarchlibdir = CONFIG["vendorarchdir"]
305
rubygemsdir = CONFIG["rubygemsdir"]
305 306
mandir = CONFIG["mandir"]
306 307
capidir = CONFIG["docdir"]
307 308
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
......
489 490
install?(:local, :comm, :lib) do
490 491
  prepare "library scripts", rubylibdir
491 492
  noinst = %w[README* *.txt *.rdoc]
493
  noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
492 494
  install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
495
  if rubygemsdir
496
    noinst = %w[obsolete.rb]
497
    install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode)
498
    install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode)
499
    install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode)
500
    install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode)
501
  end
493 502
end
494 503

  
495 504
install?(:local, :arch, :lib) do
version.c
87 87
    RUBY_VENDOR_LIB "\0"
88 88
#endif
89 89

  
90
#ifdef RUBYGEMS_DIR
91
    RUBYGEMS_DIR "\0"
92
#endif
93

  
90 94
    RUBY_LIB "\0"
91 95
#ifdef RUBY_THIN_ARCHLIB
92 96
    RUBY_THIN_ARCHLIB "\0"
93
-