Project

General

Profile

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

vo.x (Vit Ondruch), 11/11/2011 10:12 PM

View differences:

configure.in
2761 2761
    dir="${VENDOR_DIR}"
2762 2762
done
2763 2763

  
2764
AC_ARG_WITH(rubygemsdir,
2765
           AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]]),
2766
            [rubygemsdir=$withval])
2767
if test "$rubygemsdir" != ""; then
2768
    AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir")
2769
fi
2770

  
2764 2771
if test "${LOAD_RELATIVE+set}"; then
2765 2772
    AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
2766 2773
    RUBY_EXEC_PREFIX=""
......
2821 2828
AC_SUBST(ruby_version)dnl
2822 2829
AC_SUBST(sitedir)dnl
2823 2830
AC_SUBST(vendordir)dnl
2831
AC_SUBST(rubygemsdir)dnl
2824 2832

  
2825 2833
configure_args=$ac_configure_args
2826 2834
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/] 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
-