diff options
Diffstat (limited to 'meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch')
-rw-r--r-- | meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch new file mode 100644 index 000000000..e11febc75 --- /dev/null +++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | 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(+) | ||
13 | |||
14 | --- a/configure.in | ||
15 | +++ b/configure.in | ||
16 | @@ -2801,6 +2801,13 @@ | ||
17 | dir="${VENDOR_DIR}" | ||
18 | done | ||
19 | |||
20 | +AC_ARG_WITH(rubygemsdir, | ||
21 | + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), | ||
22 | + [rubygemsdir=$withval]) | ||
23 | +if test "$rubygemsdir" != ""; then | ||
24 | + AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir") | ||
25 | +fi | ||
26 | + | ||
27 | if test "${LOAD_RELATIVE+set}"; then | ||
28 | AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) | ||
29 | RUBY_EXEC_PREFIX="" | ||
30 | @@ -2921,6 +2928,7 @@ | ||
31 | AC_SUBST(rubyhdrdir)dnl | ||
32 | AC_SUBST(sitehdrdir)dnl | ||
33 | AC_SUBST(vendorhdrdir)dnl | ||
34 | +AC_SUBST(rubygemsdir)dnl | ||
35 | |||
36 | AC_ARG_WITH(opt-dir, | ||
37 | AS_HELP_STRING([--with-opt-dir=DIR], [add optional headers and libraries DIR])) | ||
38 | --- a/tool/mkconfig.rb | ||
39 | +++ b/tool/mkconfig.rb | ||
40 | @@ -78,6 +78,7 @@ | ||
41 | when /^RUBY_SO_NAME$/; next if $so_name | ||
42 | when /^arch$/; if val.empty? then val = arch else arch = val end | ||
43 | when /^sitearch/; val = '$(arch)' if val.empty? | ||
44 | + when /^rubygemsdir/; next if val.empty? | ||
45 | end | ||
46 | case val | ||
47 | when /^\$\(ac_\w+\)$/; next | ||
48 | --- a/tool/rbinstall.rb | ||
49 | +++ b/tool/rbinstall.rb | ||
50 | @@ -300,6 +300,7 @@ | ||
51 | sitearchlibdir = CONFIG["sitearchdir"] | ||
52 | vendorlibdir = CONFIG["vendorlibdir"] | ||
53 | vendorarchlibdir = CONFIG["vendorarchdir"] | ||
54 | +rubygemsdir = CONFIG["rubygemsdir"] | ||
55 | mandir = CONFIG["mandir"] | ||
56 | capidir = CONFIG["docdir"] | ||
57 | configure_args = Shellwords.shellwords(CONFIG["configure_args"]) | ||
58 | @@ -487,7 +488,15 @@ | ||
59 | install?(:local, :comm, :lib) do | ||
60 | prepare "library scripts", rubylibdir | ||
61 | noinst = %w[README* *.txt *.rdoc] | ||
62 | + noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir | ||
63 | install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) | ||
64 | + if rubygemsdir | ||
65 | + noinst = %w[obsolete.rb] | ||
66 | + install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) | ||
67 | + install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) | ||
68 | + install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) | ||
69 | + install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) | ||
70 | + end | ||
71 | end | ||
72 | |||
73 | install?(:local, :arch, :lib) do | ||
74 | --- a/version.c | ||
75 | +++ b/version.c | ||
76 | @@ -97,6 +97,10 @@ | ||
77 | #endif | ||
78 | #endif | ||
79 | |||
80 | +#ifdef RUBYGEMS_DIR | ||
81 | + RUBYGEMS_DIR "\0" | ||
82 | +#endif | ||
83 | + | ||
84 | RUBY_LIB "\0" | ||
85 | #ifdef RUBY_THIN_ARCHLIB | ||
86 | RUBY_THIN_ARCHLIB "\0" | ||