Project

General

Profile

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

Patch with !<verconf>! - vo.x (Vit Ondruch), 06/06/2012 09:18 PM

View differences:

configure.in
3012 3012
    dir="${VENDOR_DIR}"
3013 3013
done
3014 3014

  
3015
AC_ARG_WITH(rubygemsdir,
3016
           AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
3017
            [rubygemsdir=$withval])
3018
if test "$rubygemsdir" != ""; then
3019
    AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !<verconf>!)
3020
fi
3021

  
3015 3022
if test "${LOAD_RELATIVE+set}"; then
3016 3023
    AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
3017 3024
    RUBY_EXEC_PREFIX=""
......
3072 3079
AC_SUBST(ruby_version)dnl
3073 3080
AC_SUBST(sitedir)dnl
3074 3081
AC_SUBST(vendordir)dnl
3082
AC_SUBST(rubygemsdir)dnl
3075 3083

  
3076 3084
configure_args=$ac_configure_args
3077 3085
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
311 311
sitearchlibdir = CONFIG["sitearchdir"]
312 312
vendorlibdir = CONFIG["vendorlibdir"]
313 313
vendorarchlibdir = CONFIG["vendorarchdir"]
314
rubygemsdir = CONFIG["rubygemsdir"]
314 315
mandir = CONFIG["mandir", true]
315 316
docdir = CONFIG["docdir", true]
316 317
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
......
498 499
install?(:local, :comm, :lib) do
499 500
  prepare "library scripts", rubylibdir
500 501
  noinst = %w[README* *.txt *.rdoc]
502
  noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
501 503
  install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
504
  if rubygemsdir
505
    noinst = %w[obsolete.rb]
506
    install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode)
507
    install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode)
508
    install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode)
509
    install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode)
510
  end
502 511
end
503 512

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

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

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