summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2012-10-16 08:34:42 +0000
committerEric Bénard <eric@eukrea.com>2013-03-03 15:41:56 +0100
commitd67152106edf6e93d01e776413a82e7fccafaa45 (patch)
tree5335a2d6baed14389461b137c6a37d84c96fea06
parent14196a18a8bcc47fc59d9d2c1319939727c83ee6 (diff)
downloadmeta-openembedded-d67152106edf6e93d01e776413a82e7fccafaa45.tar.gz
ruby: update to 1.9.3-194
I sent this to oe-core but was told that it's not the right place and was suggested to send here. Most of the 1.9.3 patches originate from ruby-1.9.3.194-10.1.fc17.src.rpm Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Eric Bénard <eric@eukrea.com>
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby.inc27
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch11
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-always-use-i386.patch11
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-bignum-test-fix.patch31
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-custom-rubygems-location.patch86
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-disable-versioned-paths.patch149
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-fix-s390x-build.patch12
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-install-cross.patch16
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-mkmf-verbose.patch11
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch76
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-webrick-test-fix.patch24
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby/rubygems-1.8.11-binary-extensions.patch296
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby_1.8.7-p302.bb12
-rw-r--r--meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p194.bb50
14 files changed, 781 insertions, 31 deletions
diff --git a/meta-ruby/recipes-devtools/ruby/ruby.inc b/meta-ruby/recipes-devtools/ruby/ruby.inc
index a70f95151..894e3e6a9 100644
--- a/meta-ruby/recipes-devtools/ruby/ruby.inc
+++ b/meta-ruby/recipes-devtools/ruby/ruby.inc
@@ -1,19 +1,26 @@
1DESCRIPTION = "Ruby is an interpreted scripting language \ 1SUMMARY = "An interpreter of object-oriented scripting language"
2for quick and easy object-oriented programming." 2DESCRIPTION = "Ruby is an interpreted scripting language for quick \
3and easy object-oriented programming. It has many features to process \
4text files and to do system management tasks (as in Perl). \
5It is simple, straight-forward, and extensible. \
6"
7HOMEPAGE = "http://www.ruby-lang.org/"
3SECTION = "devel/ruby" 8SECTION = "devel/ruby"
4LICENSE = "GPLv2 & LGPLv2+ & BSD" 9LICENSE = "Ruby | BSD | GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=99f88e67b65504d289a0326c59f9c148 \ 10LIC_FILES_CHKSUM = "\
6 file://LEGAL;md5=7d502ae3b621dc406b220dadddb72e16 \ 11 file://COPYING;md5=837b32593517ae48b9c3b5c87a5d288c \
7 file://LGPL;md5=7fbc338309ac38fefcd64b04bb903e34 \ 12 file://BSDL;md5=3949e007205deef714bd225e1ee4a8ea \
13 file://GPL;md5=393a5ca445f6965873eca0259a17f833 \
14 file://LEGAL;md5=e88686821918c0b6d2b1b8328116cec5 \
8" 15"
9 16
10DEPENDS = "ruby-native zlib openssl" 17DEPENDS = "ruby-native zlib openssl tcl"
11DEPENDS_virtclass-native = "" 18DEPENDS_virtclass-native = ""
12 19
13INC_PR = "r0" 20INC_PR = "r1"
14 21
15SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" 22SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
16SRC_URI = "ftp://ftp.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ 23SRC_URI = "http://ftp.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
17 file://extmk_run.patch \ 24 file://extmk_run.patch \
18 file://extmk.patch \ 25 file://extmk.patch \
19" 26"
@@ -22,8 +29,6 @@ S = "${WORKDIR}/ruby-${PV}"
22 29
23inherit autotools 30inherit autotools
24 31
25# fix building of socket extension
26EXTRA_OECONF = "--enable-wide-getaddrinfo"
27 32
28# This snippet lets compiled extensions which rely on external libraries, 33# This snippet lets compiled extensions which rely on external libraries,
29# such as zlib, compile properly. If we don't do this, then when extmk.rb 34# such as zlib, compile properly. If we don't do this, then when extmk.rb
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch b/meta-ruby/recipes-devtools/ruby/ruby/0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
index 64f093a4f..712602ace 100644
--- a/meta-ruby/recipes-devtools/ruby/ruby/0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
+++ b/meta-ruby/recipes-devtools/ruby/ruby/0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
@@ -8,13 +8,11 @@ Without this the socket extension doesn't build correctly
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> 8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9--- 9---
10 ext/socket/extconf.rb | 5 +++++ 10 ext/socket/extconf.rb | 5 +++++
11 1 files changed, 5 insertions(+), 0 deletions(-) 11 1 file changed, 5 insertions(+)
12 12
13diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
14index ece6158..5fba46c 100644
15--- a/ext/socket/extconf.rb 13--- a/ext/socket/extconf.rb
16+++ b/ext/socket/extconf.rb 14+++ b/ext/socket/extconf.rb
17@@ -222,6 +222,11 @@ main() 15@@ -356,6 +356,11 @@
18 exit(EXIT_FAILURE); 16 exit(EXIT_FAILURE);
19 } 17 }
20 EOF 18 EOF
@@ -23,9 +21,6 @@ index ece6158..5fba46c 100644
23+# everything is OK. 21+# everything is OK.
24+getaddr_info_ok = true 22+getaddr_info_ok = true
25+ 23+
26 end
27 if ipv6 and not getaddr_info_ok 24 if ipv6 and not getaddr_info_ok
28 abort <<EOS 25 abort <<EOS
29-- 26
301.6.6.1
31
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-always-use-i386.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-always-use-i386.patch
new file mode 100644
index 000000000..f5a8c3de3
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-always-use-i386.patch
@@ -0,0 +1,11 @@
1--- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200
2+++ b/configure.in 2011-10-18 08:56:59.751593321 +0200
3@@ -2935,6 +2935,8 @@
4 configure_args=$ac_configure_args
5 AC_SUBST(configure_args)dnl
6
7+target_cpu=`echo $target_cpu | sed s/i.86/i386/`
8+
9 if test "${universal_binary-no}" = yes ; then
10 arch="universal-${target_os}"
11 AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-bignum-test-fix.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-bignum-test-fix.patch
new file mode 100644
index 000000000..cb3682d5e
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-bignum-test-fix.patch
@@ -0,0 +1,31 @@
1--- ruby-1.9.3-p0/test/ruby/test_bignum.rb.orig 2011-11-10 09:52:59.101925465 +0100
2+++ ruby-1.9.3-p0/test/ruby/test_bignum.rb 2011-11-10 09:54:14.580798826 +0100
3@@ -378,7 +378,7 @@
4 assert_equal(true, (2**32).even?)
5 end
6
7- def interrupt
8+ def assert_interrupt
9 time = Time.now
10 start_flag = false
11 end_flag = false
12@@ -387,14 +387,16 @@
13 yield
14 end_flag = true
15 end
16- sleep 1
17+ Thread.pass until start_flag
18 thread.raise
19 thread.join rescue nil
20- start_flag && !end_flag && Time.now - time < 10
21+ time = Time.now - time
22+ assert_equal([true, false], [start_flag, end_flag])
23+ assert_operator(time, :<, 10)
24 end
25
26 def test_interrupt
27- assert(interrupt { (65536 ** 65536).to_s })
28+ assert_interrupt {(65536 ** 65536).to_s}
29 end
30
31 def test_too_big_to_s
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 @@
1From 279a693ce4ef3a887ce8d4fa59e0f2616a14d91a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3Date: Fri, 11 Nov 2011 13:14:45 +0100
4Subject: [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"
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-disable-versioned-paths.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-disable-versioned-paths.patch
new file mode 100644
index 000000000..6d0c5e1ac
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-disable-versioned-paths.patch
@@ -0,0 +1,149 @@
1From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3Date: Thu, 25 Aug 2011 14:33:51 +0200
4Subject: [PATCH] Allow to disable versioned paths.
5
6---
7 configure.in | 11 +++++++++++
8 tool/mkconfig.rb | 9 ++++++---
9 version.c | 10 ++++++++++
10 3 files changed, 27 insertions(+), 3 deletions(-)
11
12diff --git a/configure.in b/configure.in
13index e742e74..86cb68f 100644
14--- a/configure.in
15+++ b/configure.in
16@@ -2963,6 +2963,17 @@ else
17 fi
18 AC_SUBST(USE_RUBYGEMS)
19
20+AC_ARG_ENABLE(versioned-paths,
21+ AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]),
22+ [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes])
23+if test x"$enable_versioned_paths" = xno; then
24+ AC_DEFINE(DISABLE_VERSIONED_PATHS, 1)
25+ USE_VERSIONED_PATHS=NO
26+else
27+ USE_VERSIONED_PATHS=YES
28+fi
29+AC_SUBST(USE_VERSIONED_PATHS)
30+
31 arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
32 AS_MKDIR_P("${arch_hdrdir}")
33 config_h="${arch_hdrdir}/config.h"
34diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
35index a2221f0..47d8c8f 100755
36--- a/tool/mkconfig.rb
37+++ b/tool/mkconfig.rb
38@@ -42,6 +42,7 @@ v_others = []
39 vars = {}
40 continued_name = nil
41 continued_line = nil
42+path_version = "/$(ruby_version)"
43 File.foreach "config.status" do |line|
44 next if /^#/ =~ line
45 name = nil
46@@ -138,6 +139,8 @@ File.foreach "config.status" do |line|
47 case name
48 when "ruby_version"
49 version = val[/\A"(.*)"\z/, 1]
50+ when /^USE_VERSIONED_PATHS$/
51+ path_version = nil if /NO/ =~ val
52 end
53 end
54 # break if /^CEOF/
55@@ -203,15 +206,15 @@ end
56 print(*v_fast)
57 print(*v_others)
58 print <<EOS
59- CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
60+ CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
61 CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
62 EOS
63 print <<EOS unless v_disabled["sitedir"]
64- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
65+ CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
66 CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
67 EOS
68 print <<EOS unless v_disabled["vendordir"]
69- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
70+ CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
71 CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
72 EOS
73 print <<EOS
74diff --git a/version.c b/version.c
75index 59d4e5e..641dc33 100644
76--- a/version.c
77+++ b/version.c
78@@ -38,9 +38,15 @@
79 #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
80 #endif
81
82+#ifdef DISABLE_VERSIONED_PATHS
83+#define RUBY_LIB RUBY_LIB_PREFIX
84+#define RUBY_SITE_LIB2 RUBY_SITE_LIB
85+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB
86+#else
87 #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
88 #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
89 #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
90+#endif
91 #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
92 #define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
93 #define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
94@@ -75,8 +81,10 @@ const char ruby_initial_load_paths[] =
95 RUBY_SITE_THIN_ARCHLIB "\0"
96 #endif
97 RUBY_SITE_ARCHLIB "\0"
98+#ifndef DISABLE_VERSIONED_PATHS
99 RUBY_SITE_LIB "\0"
100 #endif
101+#endif
102
103 #ifndef NO_RUBY_VENDOR_LIB
104 RUBY_VENDOR_LIB2 "\0"
105@@ -84,8 +92,10 @@ const char ruby_initial_load_paths[] =
106 RUBY_VENDOR_THIN_ARCHLIB "\0"
107 #endif
108 RUBY_VENDOR_ARCHLIB "\0"
109+#ifndef DISABLE_VERSIONED_PATHS
110 RUBY_VENDOR_LIB "\0"
111 #endif
112+#endif
113
114 RUBY_LIB "\0"
115 #ifdef RUBY_THIN_ARCHLIB
116--
1171.7.7.3
118diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
119index a3c65bf..0575730 100644
120--- a/lib/rdoc/ri/paths.rb
121+++ b/lib/rdoc/ri/paths.rb
122@@ -11,9 +11,9 @@ module RDoc::RI::Paths
123 version = RbConfig::CONFIG['ruby_version']
124
125 base = if RbConfig::CONFIG.key? 'ridir' then
126- File.join RbConfig::CONFIG['ridir'], version
127+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
128 else
129- File.join RbConfig::CONFIG['datadir'], 'ri', version
130+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
131 end
132
133 SYSDIR = File.join base, "system"
134diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
135index cec8c9f..fed14d2 100755
136--- a/tool/rbinstall.rb
137+++ b/tool/rbinstall.rb
138@@ -379,7 +379,7 @@ end
139
140 install?(:doc, :rdoc) do
141 if $rdocdir
142- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
143+ ridatadir = File.join([CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil, "system"].compact)
144 prepare "rdoc", ridatadir
145 install_recursive($rdocdir, ridatadir, :mode => $data_mode)
146 end
147--
1481.7.6
149
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-fix-s390x-build.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-fix-s390x-build.patch
new file mode 100644
index 000000000..d0ade91a4
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-fix-s390x-build.patch
@@ -0,0 +1,12 @@
1diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb
2--- ruby-1.9.3-p0/ext/tk/extconf.rb.orig 2011-06-29 16:11:19.000000000 +0200
3+++ ruby-1.9.3-p0/ext/tk/extconf.rb 2011-10-18 16:15:59.406299659 +0200
4@@ -114,7 +114,7 @@ def is_macosx?
5 end
6
7 def maybe_64bit?
8- /64|universal/ =~ RUBY_PLATFORM
9+ /64|universal|s390x/ =~ RUBY_PLATFORM
10 end
11
12 def check_tcltk_version(version)
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-install-cross.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-install-cross.patch
new file mode 100644
index 000000000..9515ece83
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-install-cross.patch
@@ -0,0 +1,16 @@
1---
2 Makefile.in | 3 ++-
3 1 file changed, 2 insertions(+), 1 deletion(-)
4
5--- a/Makefile.in
6+++ b/Makefile.in
7@@ -210,7 +210,8 @@
8 @$(RM) fake.rb fake-rbconfig.rb
9 $(INSTALL_DATA) $(arch_hdrdir)/ruby/config.h $(XRUBY_RUBYHDRDIR)/$(arch)/ruby
10 $(INSTALL_DATA) $(top_srcdir)/include/ruby/win32.h $(XRUBY_RUBYHDRDIR)/ruby
11- $(INSTALL_DATA) $(LIBRUBY) $(LIBRUBY_A) $(XRUBY_RUBYLIBDIR)/$(arch)
12+ $(INSTALL_DATA) $(LIBRUBY) $(XRUBY_RUBYLIBDIR)/$(arch)
13+ $(INSTALL_DATA) $(LIBRUBY_A) $(XRUBY_RUBYLIBDIR)/$(arch)
14 $(INSTALL_PROGRAM) $(LIBRUBY_SO) $(XRUBY_RUBYLIBDIR)/$(arch)
15
16 Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-mkmf-verbose.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-mkmf-verbose.patch
new file mode 100644
index 000000000..7da66c8e6
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-mkmf-verbose.patch
@@ -0,0 +1,11 @@
1--- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900
2+++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900
3@@ -1638,7 +1638,7 @@
4 SHELL = /bin/sh
5
6 # V=0 quiet, V=1 verbose. other values don't work.
7-V = 0
8+V = 1
9 Q1 = $(V:1=)
10 Q = $(Q1:0=@)
11 n=$(NULLCMD)
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
new file mode 100644
index 000000000..af1cff250
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
@@ -0,0 +1,76 @@
1--- ruby-1.9.3-p0/lib/rubygems/uninstaller.rb.orig 2011-10-31 10:22:36.321579483 +0100
2+++ ruby-1.9.3-p0/lib/rubygems/uninstaller.rb 2011-10-31 10:34:25.563626119 +0100
3@@ -51,15 +51,14 @@
4 @bin_dir = options[:bin_dir]
5 @format_executable = options[:format_executable]
6
7+ if options[:force]
8+ @force_all = true
9+ @force_ignore = true
10+ end
11+
12 # only add user directory if install_dir is not set
13 @user_install = false
14 @user_install = options[:user_install] unless options[:install_dir]
15-
16- if @user_install then
17- Gem.use_paths Gem.user_dir, @gem_home
18- else
19- Gem.use_paths @gem_home
20- end
21 end
22
23 ##
24@@ -69,10 +68,24 @@
25 def uninstall
26 list = Gem::Specification.find_all_by_name(@gem, @version)
27
28+ list, other_repo_specs = list.partition do |spec|
29+ @gem_home == spec.base_dir or
30+ (@user_install and spec.base_dir == Gem.user_dir)
31+ end
32+
33 if list.empty? then
34- raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
35+ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if
36+ other_repo_specs.empty?
37+
38+ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq
39+
40+ message = ["#{@gem} is not installed in GEM_HOME, try:"]
41+ message.concat other_repos.map { |repo|
42+ "\tgem uninstall -i #{repo} #{@gem}"
43+ }
44
45- elsif list.size > 1 and @force_all then
46+ raise Gem::InstallError, message.join("\n")
47+ elsif @force_all then
48 remove_all list
49
50 elsif list.size > 1 then
51@@ -250,12 +263,10 @@
52 msg << "\t#{spec.full_name}"
53
54 spec.dependent_gems.each do |dep_spec, dep, satlist|
55- msg <<
56- ("#{dep_spec.name}-#{dep_spec.version} depends on " +
57- "[#{dep.name} (#{dep.requirement})]")
58+ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}"
59 end
60
61- msg << 'If you remove this gems, one or more dependencies will not be met.'
62+ msg << 'If you remove this gem, one or more dependencies will not be met.'
63 msg << 'Continue with Uninstall?'
64 return ask_yes_no(msg.join("\n"), true)
65 end
66
67--- ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb.orig 2011-11-03 08:58:31.411272176 +0100
68+++ ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb 2011-11-03 08:58:43.010272351 +0100
69@@ -225,7 +225,7 @@
70
71 uninstaller = Gem::Uninstaller.new('a')
72
73- use_ui Gem::MockGemUi.new("2\n") do
74+ use_ui Gem::MockGemUi.new("2\ny\n") do
75 uninstaller.uninstall
76 end
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-webrick-test-fix.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-webrick-test-fix.patch
new file mode 100644
index 000000000..c6eb3fa40
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-1.9.3-webrick-test-fix.patch
@@ -0,0 +1,24 @@
1diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb
2index 1185316..0ef1b37 100644
3--- a/test/webrick/test_cgi.rb
4+++ b/test/webrick/test_cgi.rb
5@@ -14,6 +14,7 @@ class TestWEBrickCGI < Test::Unit::TestCase
6 def req.meta_vars
7 meta = super
8 meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
9+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
10 return meta
11 end
12 },
13diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
14index bcdb3df..f78ba5c 100644
15--- a/test/webrick/test_filehandler.rb
16+++ b/test/webrick/test_filehandler.rb
17@@ -252,6 +252,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
18 def req.meta_vars
19 meta = super
20 meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
21+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
22 return meta
23 end
24 },
diff --git a/meta-ruby/recipes-devtools/ruby/ruby/rubygems-1.8.11-binary-extensions.patch b/meta-ruby/recipes-devtools/ruby/ruby/rubygems-1.8.11-binary-extensions.patch
new file mode 100644
index 000000000..5a3bfb451
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby/rubygems-1.8.11-binary-extensions.patch
@@ -0,0 +1,296 @@
1From 5a37a3489491a33f2e7011043fbbcd9a765e1777 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3Date: Thu, 3 Nov 2011 16:43:05 +0100
4Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH.
5
6---
7 lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++-------
8 1 files changed, 30 insertions(+), 7 deletions(-)
9
10diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
11index 97db19e..263e7d3 100644
12--- a/lib/rubygems/specification.rb
13+++ b/lib/rubygems/specification.rb
14@@ -843,6 +843,12 @@ class Gem::Specification
15 File.join full_gem_path, path
16 end
17
18+ unless extensions.empty?
19+ paths += require_paths.map do |path|
20+ File.join ext_dir, path
21+ end
22+ end
23+
24 # gem directories must come after -I and ENV['RUBYLIB']
25 insert_index = Gem.load_path_insert_index
26
27@@ -954,16 +960,16 @@ class Gem::Specification
28
29 def contains_requirable_file? file
30 root = full_gem_path
31+ ext = ext_dir
32+
33+ require_paths.any? do |lib|
34+ base = ["#{root}/#{lib}/#{file}"]
35+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty?
36
37- require_paths.each do |lib|
38- base = "#{root}/#{lib}/#{file}"
39- Gem.suffixes.each do |suf|
40- path = "#{base}#{suf}"
41- return true if File.file? path
42+ base.any? do |path|
43+ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" }
44 end
45 end
46-
47- return false
48 end
49
50 ##
51@@ -1273,6 +1279,23 @@ class Gem::Specification
52 end
53
54 ##
55+ # Returns the full path to this spec's ext directory.
56+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
57+
58+ def ext_dir
59+ @gem_dir ||= File.expand_path File.join(exts_dir, full_name)
60+ end
61+
62+ ##
63+ # Returns the full path to the exts directory containing this spec's
64+ # gem directory. eg: /usr/local/lib/ruby/1.8/exts
65+
66+ def exts_dir
67+ # TODO: this logic seems terribly broken, but tests fail if just base_dir
68+ @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts")
69+ end
70+
71+ ##
72 # Deprecated and ignored, defaults to true.
73 #
74 # Formerly used to indicate this gem was RDoc-capable.
75--
761.7.7.3
77
78
79From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001
80From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
81Date: Wed, 16 Nov 2011 13:26:48 +0100
82Subject: [PATCH 2/6] Use spec's ext dir for extension installation.
83
84---
85 lib/rubygems/installer.rb | 2 +-
86 lib/rubygems/specification.rb | 7 +++----
87 2 files changed, 4 insertions(+), 5 deletions(-)
88
89diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
90index 74d803d..0063c7f 100644
91--- a/lib/rubygems/installer.rb
92+++ b/lib/rubygems/installer.rb
93@@ -499,7 +499,7 @@ TEXT
94 def build_extensions
95 return if spec.extensions.empty?
96 say "Building native extensions. This could take a while..."
97- dest_path = File.join gem_dir, spec.require_paths.first
98+ dest_path = spec.ext_dir
99 ran_rake = false # only run rake once
100
101 spec.extensions.each do |extension|
102diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
103index 263e7d3..d31b93b 100644
104--- a/lib/rubygems/specification.rb
105+++ b/lib/rubygems/specification.rb
106@@ -1283,16 +1283,15 @@ class Gem::Specification
107 # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
108
109 def ext_dir
110- @gem_dir ||= File.expand_path File.join(exts_dir, full_name)
111+ @ext_dir ||= File.join exts_dir, full_name, require_paths.first
112 end
113
114 ##
115 # Returns the full path to the exts directory containing this spec's
116- # gem directory. eg: /usr/local/lib/ruby/1.8/exts
117+ # gem directory. eg: /usr/local/lib/ruby/1.8/gems
118
119 def exts_dir
120- # TODO: this logic seems terribly broken, but tests fail if just base_dir
121- @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts")
122+ @exts_dir ||= gems_dir
123 end
124
125 ##
126--
1271.7.7.3
128
129
130From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001
131From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
132Date: Wed, 16 Nov 2011 14:52:16 +0100
133Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems.
134
135---
136 lib/rubygems/specification.rb | 11 +++++------
137 1 files changed, 5 insertions(+), 6 deletions(-)
138
139diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
140index d31b93b..e65ea2d 100644
141--- a/lib/rubygems/specification.rb
142+++ b/lib/rubygems/specification.rb
143@@ -843,11 +843,7 @@ class Gem::Specification
144 File.join full_gem_path, path
145 end
146
147- unless extensions.empty?
148- paths += require_paths.map do |path|
149- File.join ext_dir, path
150- end
151- end
152+ paths << ext_dir unless extensions.empty? || paths.include?(ext_dir)
153
154 # gem directories must come after -I and ENV['RUBYLIB']
155 insert_index = Gem.load_path_insert_index
156@@ -1291,7 +1287,10 @@ class Gem::Specification
157 # gem directory. eg: /usr/local/lib/ruby/1.8/gems
158
159 def exts_dir
160- @exts_dir ||= gems_dir
161+ @exts_dir ||= begin
162+ dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
163+ dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir
164+ end
165 end
166
167 ##
168--
1691.7.7.3
170
171
172From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001
173From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
174Date: Fri, 9 Dec 2011 16:31:04 +0100
175Subject: [PATCH 4/6] Fix the binary extension search path construction.
176
177---
178 lib/rubygems/installer.rb | 2 +-
179 lib/rubygems/specification.rb | 4 ++--
180 2 files changed, 3 insertions(+), 3 deletions(-)
181
182diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
183index 0063c7f..83b8fd5 100644
184--- a/lib/rubygems/installer.rb
185+++ b/lib/rubygems/installer.rb
186@@ -499,7 +499,7 @@ TEXT
187 def build_extensions
188 return if spec.extensions.empty?
189 say "Building native extensions. This could take a while..."
190- dest_path = spec.ext_dir
191+ dest_path = File.join spec.ext_dir, spec.require_paths.first
192 ran_rake = false # only run rake once
193
194 spec.extensions.each do |extension|
195diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
196index e65ea2d..8be2ade 100644
197--- a/lib/rubygems/specification.rb
198+++ b/lib/rubygems/specification.rb
199@@ -843,7 +843,7 @@ class Gem::Specification
200 File.join full_gem_path, path
201 end
202
203- paths << ext_dir unless extensions.empty? || paths.include?(ext_dir)
204+ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? || (ext_dir == full_gem_path)
205
206 # gem directories must come after -I and ENV['RUBYLIB']
207 insert_index = Gem.load_path_insert_index
208@@ -1279,7 +1279,7 @@ class Gem::Specification
209 # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
210
211 def ext_dir
212- @ext_dir ||= File.join exts_dir, full_name, require_paths.first
213+ @ext_dir ||= File.join exts_dir, full_name
214 end
215
216 ##
217--
2181.7.7.3
219
220
221From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001
222From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
223Date: Tue, 13 Dec 2011 12:14:54 +0100
224Subject: [PATCH 5/6] Remove binary extensions during uninstall.
225
226---
227 lib/rubygems/uninstaller.rb | 1 +
228 1 files changed, 1 insertions(+), 0 deletions(-)
229
230diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
231index cc32ea4..94d78e0 100644
232--- a/lib/rubygems/uninstaller.rb
233+++ b/lib/rubygems/uninstaller.rb
234@@ -213,6 +213,7 @@ class Gem::Uninstaller
235 File.writable?(spec.base_dir)
236
237 FileUtils.rm_rf spec.full_gem_path
238+ FileUtils.rm_rf spec.ext_dir
239
240 # TODO: should this be moved to spec?... I vote eww (also exists in docmgr)
241 old_platform_name = [spec.name,
242--
2431.7.7.3
244
245
246From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001
247From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
248Date: Tue, 13 Dec 2011 14:27:14 +0100
249Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb.
250
251---
252 lib/rubygems/defaults.rb | 11 +++++++++++
253 lib/rubygems/specification.rb | 5 +----
254 2 files changed, 12 insertions(+), 4 deletions(-)
255
256diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
257index 20b4198..6d8711f 100644
258--- a/lib/rubygems/defaults.rb
259+++ b/lib/rubygems/defaults.rb
260@@ -87,6 +87,17 @@ module Gem
261 end
262
263 ##
264+ # Returns binary extensions dir for specified RubyGems base dir or nil
265+ # if such directory cannot be determined.
266+ #
267+ # By default, the binary extensions are located side by side with their
268+ # Ruby counterparts, therefore nil is returned
269+
270+ def self.default_ext_dir_for base_dir
271+ nil
272+ end
273+
274+ ##
275 # The default system-wide source info cache directory
276
277 def self.default_system_source_cache_dir
278diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
279index 8be2ade..f54210a 100644
280--- a/lib/rubygems/specification.rb
281+++ b/lib/rubygems/specification.rb
282@@ -1287,10 +1287,7 @@ class Gem::Specification
283 # gem directory. eg: /usr/local/lib/ruby/1.8/gems
284
285 def exts_dir
286- @exts_dir ||= begin
287- dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
288- dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir
289- end
290+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir
291 end
292
293 ##
294--
2951.7.7.3
296
diff --git a/meta-ruby/recipes-devtools/ruby/ruby_1.8.7-p302.bb b/meta-ruby/recipes-devtools/ruby/ruby_1.8.7-p302.bb
deleted file mode 100644
index 299187ca6..000000000
--- a/meta-ruby/recipes-devtools/ruby/ruby_1.8.7-p302.bb
+++ /dev/null
@@ -1,12 +0,0 @@
1require ruby.inc
2PR = "${INC_PR}.0"
3
4SRC_URI += "file://0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch"
5
6SRC_URI[md5sum] = "f446550dfde0d8162a6ed8d5a38b3ac2"
7SRC_URI[sha256sum] = "5883df5204de70762602ce885b18c8bf6c856d33298c35df9151031b2ce044a1"
8
9FILES_${PN}-dbg += "${libdir}/ruby/1.8/*/.debug \
10 ${libdir}/ruby/1.8/*/*/.debug"
11BBCLASSEXTEND = "native"
12
diff --git a/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p194.bb b/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p194.bb
new file mode 100644
index 000000000..b9f7915d9
--- /dev/null
+++ b/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p194.bb
@@ -0,0 +1,50 @@
1require ruby.inc
2PR = "${INC_PR}.0"
3
4DEPENDS += "libyaml"
5
6SRC_URI += "\
7 file://0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch \
8 file://ruby-1.9.3-always-use-i386.patch \
9 file://ruby-1.9.3-disable-versioned-paths.patch \
10 file://ruby-1.9.3-fix-s390x-build.patch \
11 file://ruby-1.9.3-rubygems-1.8.11-uninstaller.patch \
12 file://ruby-1.9.3-webrick-test-fix.patch \
13 file://ruby-1.9.3-bignum-test-fix.patch \
14 file://ruby-1.9.3-custom-rubygems-location.patch \
15 file://rubygems-1.8.11-binary-extensions.patch \
16 file://ruby-1.9.3-mkmf-verbose.patch \
17 file://ruby-1.9.3-install-cross.patch \
18"
19
20SRC_URI[md5sum] = "bc0c715c69da4d1d8bd57069c19f6c0e"
21SRC_URI[sha256sum] = "46e2fa80be7efed51bd9cdc529d1fe22ebc7567ee0f91db4ab855438cf4bd8bb"
22
23EXTRA_OECONF = "\
24 --enable-wide-getaddrinfo \
25 --with-rubygemsdir=${datadir}/rubygems \
26 --disable-versioned-paths \
27 --disable-rpath \
28 --enable-shared \
29"
30
31EXTRA_OEMAKE = " \
32 LIBRUBYARG='-lruby-static' \
33"
34
35do_install() {
36 if [ ${PN} = "ruby" ]; then
37 oe_runmake 'DESTDIR=${D}' install install-cross
38 else
39 oe_runmake 'DESTDIR=${D}' install
40 fi
41}
42
43FILES_${PN} += "${datadir}/rubygems \
44 ${datadir}/ri"
45
46FILES_${PN}-dbg += "${libdir}/ruby/*/.debug \
47 ${libdir}/ruby/*/*/.debug \
48 ${libdir}/ruby/*/*/*/.debug"
49
50BBCLASSEXTEND = "native"