/[packages]/cauldron/ruby/pristine/SOURCES/ruby-1.9.3-custom-rubygems-location.patch
ViewVC logotype

Annotation of /cauldron/ruby/pristine/SOURCES/ruby-1.9.3-custom-rubygems-location.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389214 - (hide annotations) (download)
Thu Jan 17 21:30:27 2013 UTC (11 years, 3 months ago) by pterjan
Original Path: cauldron/ruby/current/SOURCES/ruby-1.9.3-custom-rubygems-location.patch
File size: 3389 byte(s)
oops
1 fwang 290007 From 279a693ce4ef3a887ce8d4fa59e0f2616a14d91a Mon Sep 17 00:00:00 2001
2     From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3     Date: Fri, 11 Nov 2011 13:14:45 +0100
4     Subject: [PATCH] Allow to install RubyGems into custom location, outside of
5     Ruby tree.
6    
7     ---
8     configure.in | 8 ++++++++
9     tool/mkconfig.rb | 1 +
10     tool/rbinstall.rb | 9 +++++++++
11     version.c | 4 ++++
12     4 files changed, 22 insertions(+), 0 deletions(-)
13    
14     diff --git a/configure.in b/configure.in
15     index b1bc951..91c5d0d 100644
16     --- a/configure.in
17     +++ b/configure.in
18     @@ -2838,6 +2838,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
19     dir="${VENDORARCH_DIR}"
20     done
21    
22     +AC_ARG_WITH(rubygemsdir,
23     + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
24     + [rubygemsdir=$withval])
25     +if test "$rubygemsdir" != ""; then
26     + AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir")
27     +fi
28     +
29     if test "${LOAD_RELATIVE+set}"; then
30     AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
31     RUBY_EXEC_PREFIX=""
32     @@ -2931,6 +2938,7 @@ AC_SUBST(sitearch)dnl
33     AC_SUBST(sitearchdir)dnl
34     AC_SUBST(vendordir)dnl
35     AC_SUBST(vendorarchdir)dnl
36     +AC_SUBST(rubygemsdir)dnl
37    
38     configure_args=$ac_configure_args
39     AC_SUBST(configure_args)dnl
40     diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
41     index b707c4b..9fecbfb 100755
42     --- a/tool/mkconfig.rb
43     +++ b/tool/mkconfig.rb
44     @@ -84,6 +84,7 @@ File.foreach "config.status" do |line|
45     when /^sitearchdir$/; sitearchdir_override = val; next
46     when /^vendorarchdir$/; vendorarchdir_override = val; next
47     when /^sitearch/; val = '$(arch)' if val.empty?
48     + when /^rubygemsdir/; next if val.empty?
49     end
50     case val
51     when /^\$\(ac_\w+\)$/; next
52     diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
53     index 6bfc73e..31dc446 100755
54     --- a/tool/rbinstall.rb
55     +++ b/tool/rbinstall.rb
56     @@ -300,6 +300,7 @@ sitelibdir = CONFIG["sitelibdir"]
57     sitearchlibdir = CONFIG["sitearchdir"]
58     vendorlibdir = CONFIG["vendorlibdir"]
59     vendorarchlibdir = CONFIG["vendorarchdir"]
60     +rubygemsdir = CONFIG["rubygemsdir"]
61     mandir = CONFIG["mandir"]
62     capidir = CONFIG["docdir"]
63     configure_args = Shellwords.shellwords(CONFIG["configure_args"])
64     @@ -487,7 +488,15 @@ end
65     install?(:local, :comm, :lib) do
66     prepare "library scripts", rubylibdir
67     noinst = %w[README* *.txt *.rdoc]
68     + noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
69     install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
70     + if rubygemsdir
71     + noinst = %w[obsolete.rb]
72     + install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode)
73     + install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode)
74     + install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode)
75     + install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode)
76     + end
77     end
78    
79     install?(:local, :arch, :lib) do
80     diff --git a/version.c b/version.c
81     index 59d4e5e..12ba7e9 100644
82     --- a/version.c
83     +++ b/version.c
84     @@ -103,6 +103,10 @@ const char ruby_initial_load_paths[] =
85     #endif
86     #endif
87    
88     +#ifdef RUBYGEMS_DIR
89     + RUBYGEMS_DIR "\0"
90     +#endif
91     +
92     RUBY_LIB "\0"
93     #ifdef RUBY_THIN_ARCHLIB
94     RUBY_THIN_ARCHLIB "\0"
95     --
96     1.7.7
97    

  ViewVC Help
Powered by ViewVC 1.1.30