Update to Ruby 2.1.0.preview1.

This commit is contained in:
Vít Ondruch 2013-10-07 12:30:18 +02:00
parent 3a0654b687
commit a03b2d278b
19 changed files with 480 additions and 1165 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz
/ruby-2.0.0-p0.tar.gz
/ruby-2.0.0-p195.tar.bz2
/ruby-2.0.0-p247.tar.bz2
/ruby-2.1.0-preview1.tar.bz2

View File

@ -1,4 +1,4 @@
From 796aa193a0e01f3035361f045ac66486d71f608a Mon Sep 17 00:00:00 2001
From 2089cab72b38d6d5e7ba2b596e41014209acad30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 14:37:28 +0100
Subject: [PATCH] Always use i386.
@ -8,12 +8,12 @@ Subject: [PATCH] Always use i386.
1 file changed, 2 insertions(+)
diff --git a/configure.in b/configure.in
index 418b0cb..d26fe5b 100644
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
@@ -3419,6 +3419,8 @@ AC_SUBST(vendorarchdir)dnl
configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
@@ -3647,6 +3647,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
+target_cpu=`echo $target_cpu | sed s/i.86/i386/`
+
@ -21,5 +21,5 @@ index 418b0cb..d26fe5b 100644
arch="universal-${target_os}"
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
--
1.8.1
1.8.3.1

View File

@ -1,46 +1,73 @@
From b5e9dc3683cb085aa57e7b12c35a4f21b2cc1482 Mon Sep 17 00:00:00 2001
From 94da59aafacc6a9efe829529eb51385588d6f149 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 11 Nov 2011 13:14:45 +0100
Subject: [PATCH] Allow to install RubyGems into custom location, outside of
Ruby tree.
---
configure.in | 8 ++++++++
tool/rbinstall.rb | 9 +++++++++
version.c | 4 ++++
3 files changed, 21 insertions(+)
configure.in | 5 +++++
loadpath.c | 4 ++++
template/verconf.h.in | 3 +++
tool/rbinstall.rb | 9 +++++++++
4 files changed, 21 insertions(+)
diff --git a/configure.in b/configure.in
index 1627d12..e064b2b 100644
index 03a4152..0e371e2 100644
--- a/configure.in
+++ b/configure.in
@@ -3349,6 +3349,13 @@ AC_ARG_WITH(vendorarchdir,
@@ -3621,6 +3621,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+AC_ARG_WITH(rubygemsdir,
+ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
+ [rubygemsdir=$withval])
+if test "$rubygemsdir" != ""; then
+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !<verconf>!)
+fi
+
unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME
unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix
unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix
@@ -3415,6 +3422,7 @@ AC_SUBST(sitearchdir)dnl
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -3644,6 +3648,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
+AC_SUBST(rubygemsdir)dnl
configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
diff --git a/loadpath.c b/loadpath.c
index 623dc9d..74c5d9e 100644
--- a/loadpath.c
+++ b/loadpath.c
@@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] =
RUBY_VENDOR_LIB "\0"
#endif
+#ifdef RUBYGEMS_DIR
+ RUBYGEMS_DIR "\0"
+#endif
+
RUBY_LIB "\0"
#ifdef RUBY_THINARCH
RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
diff --git a/template/verconf.h.in b/template/verconf.h.in
index 79c003e..34f2382 100644
--- a/template/verconf.h.in
+++ b/template/verconf.h.in
@@ -34,6 +34,9 @@
% if C["RUBY_SEARCH_PATH"]
#define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}"
% end
+% if C["rubygemsdir"]
+#define RUBYGEMS_DIR "${rubygemsdir}"
+% end
%
% R = {}
% R["ruby_version"] = '"RUBY_LIB_VERSION"'
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 92e54c6..c72dfb6 100755
index b47b6e1..0b99408 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"]
@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"]
sitearchlibdir = CONFIG["sitearchdir"]
vendorlibdir = CONFIG["vendorlibdir"]
vendorarchlibdir = CONFIG["vendorarchdir"]
@ -48,7 +75,7 @@ index 92e54c6..c72dfb6 100755
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
@@ -500,7 +501,15 @@ end
@@ -505,7 +506,15 @@ end
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[README* *.txt *.rdoc *.gemspec]
@ -64,21 +91,6 @@ index 92e54c6..c72dfb6 100755
end
install?(:local, :arch, :lib) do
diff --git a/version.c b/version.c
index 54c4513..d76100b 100644
--- a/version.c
+++ b/version.c
@@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] =
#endif
#endif
+#ifdef RUBYGEMS_DIR
+ RUBYGEMS_DIR "\0"
+#endif
+
RUBY_LIB "\0"
#ifdef RUBY_THINARCH
RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
--
1.8.1.2
1.8.3.1

View File

@ -1,4 +1,4 @@
From ec16398159a161fc77436b4855d489f193b2515b Mon Sep 17 00:00:00 2001
From 28cc0749d6729aa2444661ee7b411e183fe220b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 15:14:51 +0100
Subject: [PATCH] Verbose mkmf.
@ -8,10 +8,10 @@ Subject: [PATCH] Verbose mkmf.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 4b6c52e..67a15ee 100644
index 682eb46..e6b1445 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1777,7 +1777,7 @@ SRC
@@ -1828,7 +1828,7 @@ SRC
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
@ -21,5 +21,5 @@ index 4b6c52e..67a15ee 100644
Q = $(Q1:0=@)
ECHO1 = $(V:1=@#{CONFIG['NULLCMD']})
--
1.8.1.2
1.8.3.1

View File

@ -1,5 +1,14 @@
From 2db9ad4a090d0c82e30afa44c623e3c5c99f7a37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 19 Nov 2012 14:37:28 +0100
Subject: [PATCH] Fix WEBrick tests.
---
test/runner.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/runner.rb b/test/runner.rb
index 49844c7..8e59a85 100644
index 94beb44..db4dfe9 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -2,6 +2,8 @@ require 'rbconfig'
@ -11,3 +20,6 @@ index 49844c7..8e59a85 100644
src_testdir = File.dirname(File.realpath(__FILE__))
$LOAD_PATH << src_testdir
module Gem
--
1.8.3.1

View File

@ -1,70 +1,98 @@
From e943a89efd63dcfb80a0ab8d9a4db37f523f508e Mon Sep 17 00:00:00 2001
From 35b8c14ddc7f9b38c21c15dfecefa3dff7567981 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 8 Feb 2013 22:48:41 +0100
Subject: [PATCH] Prevent duplicated paths when empty version string is
configured.
---
configure.in | 3 +++
version.c | 10 ++++++++++
2 files changed, 13 insertions(+)
configure.in | 15 +++++++++------
loadpath.c | 4 ++++
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.in b/configure.in
index 5850bbf..7604bb8 100644
index 881449e..37d9a62 100644
--- a/configure.in
+++ b/configure.in
@@ -3367,6 +3367,9 @@ unexpand_shvar exec_prefix prefix
if test ${RUBY_LIB_VERSION_STYLE+set}; then
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !<verconf>!)
else
+ if test "x${ruby_version}" = 'x'; then
+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
+ fi
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !<verconf>!)
fi
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX})
diff --git a/version.c b/version.c
index 282960d..54c4513 100644
--- a/version.c
+++ b/version.c
@@ -39,9 +39,15 @@
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
#endif
@@ -3535,8 +3535,6 @@ AC_ARG_WITH(rubylibprefix,
fi
rubylibprefix="$withval"])
AC_SUBST(rubylibprefix)
-rubylibdir='${rubylibprefix}/${ruby_version}'
-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
+#ifdef RUBY_LIB_VERSION_BLANK
+#define RUBY_LIB RUBY_LIB_PREFIX
+#define RUBY_SITE_LIB2 RUBY_SITE_LIB
+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB
+#else
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
+#endif
#ifndef RUBY_ARCH_LIB_FOR
#define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
@@ -3566,6 +3564,7 @@ AC_ARG_WITH(ruby-version,
[ruby_version=full])
unset RUBY_LIB_VERSION
unset RUBY_LIB_VERSION_STYLE
+ruby_version_suffix=/'${ruby_version}'
AS_CASE(["$ruby_version"],
[full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
[minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
@@ -3582,30 +3581,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
eval $ruby_version
elif test -z "${ruby_version}"; then
- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
+ unset ruby_version_suffix
+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
else
RUBY_LIB_VERSION="\"${ruby_version}\""
fi
AC_SUBST(RUBY_LIB_VERSION_STYLE)
AC_SUBST(RUBY_LIB_VERSION)
+rubylibdir='${rubylibprefix}'${ruby_version_suffix}
+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${multiarch-'${rubylibdir}/${arch}'}
+
AC_ARG_WITH(sitedir,
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]),
[sitedir=$withval],
[sitedir='${rubylibprefix}/site_ruby'])
-sitelibdir='${sitedir}/${ruby_version}'
+sitelibdir='${sitedir}'${ruby_version_suffix}
AC_ARG_WITH(sitearchdir,
AS_HELP_STRING([--with-sitearchdir=DIR],
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
[sitearchdir=$withval],
- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
+ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_suffix}}${multiarch-'${sitelibdir}/${sitearch}'}])
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
[vendordir=$withval],
[vendordir='${rubylibprefix}/vendor_ruby'])
-vendorlibdir='${vendordir}/${ruby_version}'
+vendorlibdir='${vendordir}'${ruby_version_suffix}
AC_ARG_WITH(vendorarchdir,
AS_HELP_STRING([--with-vendorarchdir=DIR],
diff --git a/loadpath.c b/loadpath.c
index 9160031..623dc9d 100644
--- a/loadpath.c
+++ b/loadpath.c
@@ -65,7 +65,9 @@ const char ruby_initial_load_paths[] =
RUBY_SEARCH_PATH "\0"
#endif
@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] =
#ifndef NO_RUBY_SITE_LIB
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_SITE_LIB2 "\0"
+#endif
#ifdef RUBY_THINARCH
RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif
RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_SITE_LIB "\0"
@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] =
#endif
+#endif
#ifndef NO_RUBY_VENDOR_LIB
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_VENDOR_LIB2 "\0"
@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] =
+#endif
#ifdef RUBY_THINARCH
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
+#ifndef RUBY_LIB_VERSION_BLANK
RUBY_VENDOR_LIB "\0"
#endif
+#endif
RUBY_LIB "\0"
#ifdef RUBY_THINARCH
--
1.8.1.2
1.8.3.1

View File

@ -1,85 +0,0 @@
From 5617aafa2d44d0a4bc811830e225463abd01b2b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 21 May 2013 10:01:33 +0200
Subject: [PATCH] Fix build against OpenSSL with enabled ECC curves.
---
ext/openssl/ossl_pkey_ec.c | 4 ++++
test/openssl/test_pkey_ec.rb | 26 +++++++++++++-------------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 8e6d88f..29e28ca 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
+#endif
}
if (method) {
@@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
if (id == s_GFp) {
new_curve = EC_GROUP_new_curve_GFp;
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m) {
new_curve = EC_GROUP_new_curve_GF2m;
+#endif
} else {
ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb
index f151335..56f3ff7 100644
--- a/test/openssl/test_pkey_ec.rb
+++ b/test/openssl/test_pkey_ec.rb
@@ -7,28 +7,28 @@ class OpenSSL::TestEC < Test::Unit::TestCase
@data1 = 'foo'
@data2 = 'bar' * 1000 # data too long for DSA sig
- @group1 = OpenSSL::PKey::EC::Group.new('secp112r1')
- @group2 = OpenSSL::PKey::EC::Group.new('sect163k1')
- @group3 = OpenSSL::PKey::EC::Group.new('prime256v1')
+ @groups = []
+ @keys = []
- @key1 = OpenSSL::PKey::EC.new
- @key1.group = @group1
- @key1.generate_key
+ OpenSSL::PKey::EC.builtin_curves.each do |curve, comment|
+ group = OpenSSL::PKey::EC::Group.new(curve)
- @key2 = OpenSSL::PKey::EC.new(@group2.curve_name)
- @key2.generate_key
+ key = OpenSSL::PKey::EC.new(group)
+ key.generate_key
- @key3 = OpenSSL::PKey::EC.new(@group3)
- @key3.generate_key
-
- @groups = [@group1, @group2, @group3]
- @keys = [@key1, @key2, @key3]
+ @groups << group
+ @keys << key
+ end
end
def compare_keys(k1, k2)
assert_equal(k1.to_pem, k2.to_pem)
end
+ def test_builtin_curves
+ assert(!OpenSSL::PKey::EC.builtin_curves.empty?)
+ end
+
def test_curve_names
@groups.each_with_index do |group, idx|
key = @keys[idx]
--
1.8.2.1

View File

@ -1,360 +0,0 @@
diff -urN ruby-2.0.0-p0/tool/config.guess ruby-2.0.0-p0-aarch64/tool/config.guess
--- ruby-2.0.0-p0/tool/config.guess 2012-01-29 07:50:18.000000000 -0600
+++ ruby-2.0.0-p0-aarch64/tool/config.guess 2013-03-08 07:15:49.233030866 -0600
@@ -2,9 +2,9 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2011-11-11'
+timestamp='2012-09-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +200,10 @@
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +306,7 @@
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -803,6 +805,9 @@
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -863,6 +868,13 @@
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -897,16 +909,16 @@
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
- echo hexagon-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@@ -948,7 +960,7 @@
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -989,7 +1001,7 @@
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1196,6 +1208,9 @@
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1251,7 +1266,7 @@
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1320,11 +1335,11 @@
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff -urN ruby-2.0.0-p0/tool/config.sub ruby-2.0.0-p0-aarch64/tool/config.sub
--- ruby-2.0.0-p0/tool/config.sub 2012-01-29 07:50:18.000000000 -0600
+++ ruby-2.0.0-p0-aarch64/tool/config.sub 2013-03-08 07:15:49.328019902 -0600
@@ -2,9 +2,9 @@
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2011-11-11'
+timestamp='2012-10-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -76,8 +74,8 @@
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -125,13 +123,17 @@
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -154,7 +156,7 @@
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -223,6 +225,12 @@
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -247,6 +255,7 @@
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
@@ -264,7 +273,7 @@
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -319,8 +328,7 @@
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -333,7 +341,10 @@
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
-
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
@@ -356,6 +367,7 @@
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
@@ -377,7 +389,8 @@
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -719,7 +732,6 @@
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -777,9 +789,13 @@
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1341,15 +1357,15 @@
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1532,6 +1548,9 @@
c4x-* | tic4x-*)
os=-coff
;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
@@ -1559,9 +1578,6 @@
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout

View File

@ -1,4 +1,4 @@
From fb9fcc8b01d968c62577756cbfd00f20a10b5cbf Mon Sep 17 00:00:00 2001
From 541f3b85cac00e5b836e018ef8afea4342e0cd39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 9 Jul 2013 12:32:49 +0200
Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs
@ -11,10 +11,10 @@ possibly conflicting in multilib scenario.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 1063fac..fb2fcee 100755
index 0b99408..7b54966 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -592,7 +592,7 @@ module RbInstall
@@ -608,7 +608,7 @@ module RbInstall
end
def collect

View File

@ -1,70 +0,0 @@
From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 2 Jul 2013 11:51:50 +0200
Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR"
This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36.
---
lib/mkmf.rb | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index ee89198..cca487e 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -189,21 +189,21 @@ module MakeMakefile
]
elsif $configure_args.has_key?('--vendor')
dirs = [
- ['BINDIR', '$(DESTDIR)$(bindir)'],
- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'],
- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'],
- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'],
- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['BINDIR', '$(bindir)'],
+ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
+ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'],
+ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'],
+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
]
else
dirs = [
- ['BINDIR', '$(DESTDIR)$(bindir)'],
- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'],
- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'],
- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'],
- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['BINDIR', '$(bindir)'],
+ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
+ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
+ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
]
end
dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
@@ -1728,7 +1728,6 @@ SRC
end
def with_destdir(dir)
- return dir unless $extmk
dir = dir.sub($dest_prefix_pattern, '')
/\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
end
@@ -1787,8 +1786,8 @@ ECHO = $(ECHO1:0=@echo)
#### Start of system configuration section. ####
#{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}}
-topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace}
-hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace}
+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace}
+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace}
arch_hdrdir = #{$arch_hdrdir.quote}
PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
--
1.8.2.1

View File

@ -1,8 +1,19 @@
From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 4 Oct 2013 22:13:11 +0200
Subject: [PATCH] Allow to specify addition preludes by configuration option.
---
Makefile.in | 1 +
common.mk | 2 +-
configure.in | 7 +++++++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index a93a1e6..fb30c19 100644
index 7e8ed82..7916993 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
@@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE)
@ -11,10 +22,10 @@ index a93a1e6..fb30c19 100644
#### End of system configuration section. ####
diff --git a/common.mk b/common.mk
index e5069e5..ca5e3f9 100644
index 5cfbc3d..3f0a82e 100644
--- a/common.mk
+++ b/common.mk
@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT)
@@ -110,7 +110,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
@ -24,10 +35,10 @@ index e5069e5..ca5e3f9 100644
YES_GEM_PRELUDE = $(GEM_PRELUDE)
NO_GEM_PRELUDE =
diff --git a/configure.in b/configure.in
index 7977aaf..1ef42cd 100644
index 0e371e2..d4f1dcb 100644
--- a/configure.in
+++ b/configure.in
@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl
@@ -3731,6 +3731,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl
@ -41,3 +52,6 @@ index 7977aaf..1ef42cd 100644
AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
[
--
1.8.3.1

View File

@ -0,0 +1,28 @@
From 07c666ba5c3360dd6f43605a8ac7c85c99c1721f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 1 Oct 2013 12:22:40 +0200
Subject: [PATCH] Allow to configure libruby.so placement.
---
configure.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.in b/configure.in
index 37d9a62..553d4d0 100644
--- a/configure.in
+++ b/configure.in
@@ -2956,6 +2956,11 @@ if test ${multiarch+set}; then
fi
archlibdir='${libdir}/${arch}'
+AC_ARG_WITH(archlibdir,
+ AS_HELP_STRING([--with-archlibdir=DIR],
+ [prefix for libruby [[LIBDIR/ARCH]]]),
+ [archlibdir="$withval"])
+
sitearchlibdir='${libdir}/${sitearch}'
archincludedir='${includedir}/${arch}'
sitearchincludedir='${includedir}/${sitearch}'
--
1.8.3.1

View File

@ -0,0 +1,31 @@
From cf26cdec7bcd0668b8f8347a5f29072c8b8f6e8d Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 1 Oct 2013 11:36:47 +0000
Subject: [PATCH] test_config.rb: fix library path
* test/mkmf/test_config.rb (test_dir_config): fix expected library
path. [ruby-core:57535] [Bug #8972]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
test/mkmf/test_config.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb
index b09dfd6..4a9be57 100644
--- a/test/mkmf/test_config.rb
+++ b/test/mkmf/test_config.rb
@@ -8,8 +8,9 @@ class TestMkmf < Test::Unit::TestCase
class TestConfig < Test::Unit::TestCase
def test_dir_config
bug8074 = '[Bug #8074]'
+ lib = RbConfig.expand(RbConfig::MAKEFILE_CONFIG["libdir"], "exec_prefix"=>"")
assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{
- assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump})
+ assert_equal(%w[/test/foo/include /test/foo#{lib}], dir_config("foo"), #{bug8074.dump})
}
end
end
--
1.8.3.1

View File

@ -1,7 +1,7 @@
%global major_version 2
%global minor_version 0
%global minor_version 1
%global teeny_version 0
%global patch_level 247
%global patch_level 0
%global major_minor_version %{major_version}.%{minor_version}
@ -10,7 +10,7 @@
%global ruby_release %{ruby_version}
# Specify the named version. It has precedense to revision.
#%%global milestone preview2
%global milestone preview1
# Keep the revision enabled for pre-releases from SVN.
#%%global revision 39387
@ -26,10 +26,10 @@
%endif
%global release 15
%global release 16
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%global rubygems_version 2.0.3
%global rubygems_version 2.2.0.preview.1
# The RubyGems library has to stay out of Ruby directory three, since the
# RubyGems should be share by all Ruby implementations.
@ -39,12 +39,12 @@
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version_patch_level}
%global rdoc_version 4.0.0
%global bigdecimal_version 1.2.0
%global rdoc_version 4.1.0.preview.1
%global bigdecimal_version 1.2.1
%global io_console_version 0.4.2
%global json_version 1.7.7
%global minitest_version 4.3.2
%global psych_version 2.0.0
%global minitest_version 4.7.5
%global psych_version 2.0.1
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
@ -114,52 +114,41 @@ source_macros(rpm.expand("%{SOURCE5}"))
# http://bugs.ruby-lang.org/issues/7807
Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
# Allows to override libruby.so placement. Hopefully we will be able to return
# to plain --with-rubyarchprefix.
# http://bugs.ruby-lang.org/issues/8973
Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
# Force multiarch directories for i.86 to be always named i386. This solves
# some differencies in build between Fedora and RHEL.
Patch3: ruby-1.9.3-always-use-i386.patch
# Fixes random WEBRick test failures.
# https://bugs.ruby-lang.org/issues/6573.
Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch
# https://github.com/rubygems/rubygems/pull/667
Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch
# Allows to install RubyGems into custom directory, outside of Ruby's tree.
# http://redmine.ruby-lang.org/issues/5617
Patch8: ruby-1.9.3-custom-rubygems-location.patch
# Add support for installing binary extensions according to FHS.
# https://github.com/rubygems/rubygems/issues/210
# Note that 8th patch might be resolved by
# https://bugs.ruby-lang.org/issues/7897
Patch9: rubygems-2.0.0-binary-extensions.patch
# Make mkmf verbose by default
Patch12: ruby-1.9.3-mkmf-verbose.patch
# This slightly changes behavior of "gem install --install-dir" behavior.
# Without this patch, Specifications.dirs is modified and gems installed on
# the system cannot be required anymore. This causes later issues when RDoc
# documentation should be generated, since json gem is sudenly not accessible.
# https://github.com/rubygems/rubygems/pull/452
# https://github.com/rubygems/rubygems/pull/670
Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch
# This prevents issues, when ruby configuration specifies --with-ruby-version=''.
# https://github.com/rubygems/rubygems/pull/455
Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch
# Although this does not directly affects Fedora ATM, it might be issue when
# rebuilding package on different platform (RHEL7). Please keep the patch until
# it is resolved in upstream.
# https://bugs.ruby-lang.org/issues/8384
Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch
# Adds aarch64 support.
# http://bugs.ruby-lang.org/issues/8331
# https://bugzilla.redhat.com/show_bug.cgi?id=926463
# Please note that this is the BZ patch, it might be good idea to update it
# with its upstream version when available.
Patch16: ruby-2.0.0-p195-aarch64.patch
# Adds support for '--with-prelude' configuration option. This allows to built
# in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566
Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
# Fixes issues with DESTDIR.
# https://bugs.ruby-lang.org/issues/8115
Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch
# Fixes multilib conlicts of .gemspec files.
# https://bugs.ruby-lang.org/issues/8623
Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch
# TestMkmf::TestConfig#test_dir_config fails on x86_64.
# http://bugs.ruby-lang.org/issues/8972
Patch20: ruby-2.1.0-test_config.rb-fix-library-path.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
@ -417,18 +406,17 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
%setup -q -n %{ruby_archive}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -443,6 +431,7 @@ autoconf
%configure \
--with-rubylibprefix='%{ruby_libdir}' \
--with-archlibdir='%{_libdir}' \
--with-rubyarchprefix='%{ruby_libarchdir}' \
--with-sitedir='%{ruby_sitelibdir}' \
--with-sitearchdir='%{ruby_sitearchdir}' \
@ -460,7 +449,10 @@ autoconf
--enable-multiarch \
--with-prelude=./abrt_prelude.rb \
# This avoids regeneration of sizes.c (BASERUBY is needed for that), when
# configure.in has newer timestamp the sizes.c (after patch is applied).
# http://bugs.ruby-lang.org/issues/8968
touch sizes.c
# Q= makes the build output more verbose and allows to check Fedora
# compiler options.
@ -600,6 +592,12 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS"
# the test suite).
touch abrt.rb
# Fix "./ruby: error while loading shared libraries: libruby.so.2.1: cannot open
# shared object file: No such file or directory" error.
# http://bugs.ruby-lang.org/issues/8971
# Fixed in rev43129.
sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk
make check TESTS="-v $DISABLE_TESTS"
%post libs -p /sbin/ldconfig
@ -785,6 +783,7 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libarchdir}/strscan.so
%{ruby_libarchdir}/syslog.so
%exclude %{ruby_libarchdir}/tcltklib.so
%{ruby_libarchdir}/thread.so
%exclude %{ruby_libarchdir}/tkutil.so
%{ruby_libarchdir}/zlib.so
@ -893,6 +892,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Mon Oct 07 2013 Vít Ondruch <vondruch@redhat.com> - 2.1.0.0-0.16.preview1
- Update to Ruby 2.1.0.preview1.
* Tue Jul 30 2013 Vít Ondruch <vondruch@redhat.com> - 2.0.0.247-15
- Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues
(rhbz#988490).

View File

@ -1,152 +1,29 @@
From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001
From ad80fb9ffe5ab73e05784237de8d8b7d03784867 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 13 Feb 2013 13:12:30 +0100
Subject: [PATCH 1/3] Remove duplicated check.
Date: Fri, 4 Oct 2013 22:13:11 +0200
Subject: [PATCH] Do not modify global Specification.dirs during installation.
The loaded specifications are rejected already in #gather_dependencies,
so this condition cannot trigger.
---
lib/rubygems/dependency_installer.rb | 3 ---
1 file changed, 3 deletions(-)
lib/rubygems/dependency_installer.rb | 6 ------
1 file changed, 6 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index d811f62..dffa8df 100644
index e7c489a..5123fce 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -330,9 +330,6 @@ class Gem::DependencyInstaller
@@ -74,12 +74,6 @@ class Gem::DependencyInstaller
@only_install_dir = !!options[:install_dir]
@install_dir = options[:install_dir] || Gem.dir
last = @gems_to_install.size - 1
@gems_to_install.each_with_index do |spec, index|
- # REFACTOR more current spec set hardcoding, should be abstracted?
- next if Gem::Specification.include?(spec) and index != last
-
# TODO: make this sorta_verbose so other users can benefit from it
say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose
--
1.8.1.2
From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 13 Feb 2013 15:47:47 +0100
Subject: [PATCH 2/3] Do not modify global Specification.dirs during
installation.
While gems are installed into --install-dir just fine even without
modifications of Specification.dirs, change in it makes inaccessible
gems already present on the system.
---
lib/rubygems/dependency_installer.rb | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index dffa8df..841f26a 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -57,17 +57,14 @@ class Gem::DependencyInstaller
# :build_args:: See Gem::Installer::new
def initialize(options = {})
- @install_dir = options[:install_dir] || Gem.dir
if options[:install_dir] then
- if options[:install_dir] then
- # HACK shouldn't change the global settings, needed for -i behavior
- # maybe move to the install command? See also github #442
- Gem::Specification.dirs = @install_dir
- Gem.ensure_gem_subdirectories @install_dir
+ Gem.ensure_gem_subdirectories options[:install_dir]
end
- end
-
options = DEFAULT_OPTIONS.merge options
+ @install_dir = options[:install_dir]
@bin_dir = options[:bin_dir]
@dev_shallow = options[:dev_shallow]
@development = options[:development]
@@ -92,7 +89,7 @@ class Gem::DependencyInstaller
@installed_gems = []
@toplevel_specs = nil
- @cache_dir = options[:cache_dir] || @install_dir
+ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir
# Set with any errors that SpecFetcher finds while search through
# gemspecs for a dep
@@ -202,7 +199,7 @@ class Gem::DependencyInstaller
# that this isn't dependent only on the currently installed gems
dependency_list.specs.reject! { |spec|
not keep_names.include?(spec.full_name) and
- Gem::Specification.include?(spec)
+ (!@install_dir && Gem::Specification.include?(spec))
}
unless dependency_list.ok? or @ignore_dependencies or @force then
@@ -254,7 +251,7 @@ class Gem::DependencyInstaller
to_do.push t.spec
end
- results.remove_installed! dep
+ results.remove_installed! dep unless @install_dir
@available << results
results.inject_into_list dependency_list
@@ -360,7 +357,7 @@ class Gem::DependencyInstaller
:force => @force,
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
- :install_dir => @install_dir,
+ :install_dir => (@install_dir || Gem.dir),
:security_policy => @security_policy,
:user_install => @user_install,
:wrappers => @wrappers,
--
1.8.1.2
From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 15 Feb 2013 17:02:44 +0100
Subject: [PATCH 3/3] Default to Gem.dir as late as possible.
---
lib/rubygems/dependency_installer.rb | 2 +-
lib/rubygems/installer.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 841f26a..abcfa0f 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -357,7 +357,7 @@ class Gem::DependencyInstaller
:force => @force,
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
- :install_dir => (@install_dir || Gem.dir),
+ :install_dir => @install_dir,
:security_policy => @security_policy,
:user_install => @user_install,
:wrappers => @wrappers,
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 780a88b..6543130 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -537,13 +537,13 @@ class Gem::Installer
:bin_dir => nil,
:env_shebang => false,
:force => false,
- :install_dir => Gem.dir,
:only_install_dir => false
}.merge options
@env_shebang = options[:env_shebang]
@force = options[:force]
- @gem_home = options[:install_dir]
+ @install_dir = options[:install_dir]
+ @gem_home = options[:install_dir] || Gem.dir
@ignore_dependencies = options[:ignore_dependencies]
@format_executable = options[:format_executable]
@security_policy = options[:security_policy]
--
1.8.1.2
1.8.3.1

View File

@ -1,81 +0,0 @@
From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 14 Feb 2013 11:50:41 +0100
Subject: [PATCH 1/2] Use File.join insteado of manual path creation.
This prevents issues, when File.join in #new_default_spec removes
superfluous slashes while they are kept in expected paths. E.g. the test
would fail if ruby configuration specifies --with-ruby-version=''.
---
test/rubygems/test_gem_commands_contents_command.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb
index 60df53f..35c9631 100644
--- a/test/rubygems/test_gem_commands_contents_command.rb
+++ b/test/rubygems/test_gem_commands_contents_command.rb
@@ -140,10 +140,10 @@ lib/foo.rb
@cmd.execute
end
- expected = %W[
- #{Gem::ConfigMap[:bindir]}/default_command
- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb
- #{Gem::ConfigMap[:archdir]}/default_gem.so
+ expected = [
+ File.join(Gem::ConfigMap[:bindir], 'default_command'),
+ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'),
+ File.join(Gem::ConfigMap[:archdir], 'default_gem.so')
].sort.join "\n"
assert_equal expected, @ui.output.chomp
--
1.8.1.2
From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 14 Feb 2013 13:35:20 +0100
Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version
string is empty.
---
lib/rubygems/defaults.rb | 4 +++-
test/rubygems/test_gem.rb | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index ea84e5c..05c35bb 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -54,7 +54,9 @@ module Gem
# Path for gems in the user's home directory
def self.user_dir
- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version]
+ parts = [Gem.user_home, '.gem', ruby_engine]
+ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty?
+ File.join parts
end
##
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index bf77009..9ee78f7 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1198,8 +1198,10 @@ class TestGem < Gem::TestCase
end
def test_self_user_dir
- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine,
- Gem::ConfigMap[:ruby_version]), Gem.user_dir
+ parts = [@userhome, '.gem', Gem.ruby_engine]
+ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty?
+
+ assert_equal File.join(parts), Gem.user_dir
end
def test_self_user_home
--
1.8.1.2

View File

@ -1,258 +1,97 @@
From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001
From 37cd8547d23973a7ec23a004ab9b60738d67ada9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 3 Nov 2011 16:43:05 +0100
Subject: [PATCH 1/8] Add dedicate extensions folder into $LOAD_PATH.
Subject: [PATCH] Add dedicate extensions folder into $LOAD_PATH.
---
lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
lib/rubygems/basic_specification.rb | 35 ++++++++++++++++++++++++++++++++---
lib/rubygems/defaults.rb | 11 +++++++++++
lib/rubygems/ext/builder.rb | 6 +++++-
lib/rubygems/installer.rb | 1 +
lib/rubygems/specification.rb | 7 +++++++
lib/rubygems/uninstaller.rb | 1 +
6 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index cabdf8d..87b14d2 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1256,6 +1256,12 @@ class Gem::Specification
File.join full_gem_path, path
end
+ unless extensions.empty?
+ paths += require_paths.map do |path|
+ File.join ext_dir, path
+ end
+ end
+
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -1374,11 +1380,16 @@ class Gem::Specification
def contains_requirable_file? file
root = full_gem_path
+ ext = ext_dir
suffixes = Gem.suffixes
require_paths.any? do |lib|
- base = "#{root}/#{lib}/#{file}"
- suffixes.any? { |suf| File.file? "#{base}#{suf}" }
+ base = ["#{root}/#{lib}/#{file}"]
+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty?
+
+ base.any? do |path|
+ suffixes.any? { |suf| File.file? "#{path}#{suf}" }
+ end
end
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index a10eab3..da3af91 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -51,6 +51,14 @@ class Gem::BasicSpecification
File.dirname(loaded_from) == self.class.default_specifications_dir
end
@@ -1674,6 +1685,23 @@ class Gem::Specification
end
##
+ # Returns the full path to this spec's ext directory.
+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
+
+ def ext_dir
+ @gem_dir ||= File.expand_path File.join(exts_dir, full_name)
+ end
+
+ ##
+ # Returns the full path to the exts directory containing this spec's
+ # gem directory. eg: /usr/local/lib/ruby/1.8/exts
+
+ def exts_dir
+ # TODO: this logic seems terribly broken, but tests fail if just base_dir
+ @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts")
+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir
+ end
+
def find_full_gem_path # :nodoc:
# TODO: also, shouldn't it default to full_name if it hasn't been written?
path = File.expand_path File.join(gems_dir, full_name)
@@ -60,6 +68,15 @@ class Gem::BasicSpecification
private :find_full_gem_path
+ def find_full_gem_ext_path # :nodoc:
+ # TODO: skip for gems without extensions.
+ path = File.expand_path File.join(exts_dir, full_name)
+ path.untaint
+ path if File.directory? path
+ end
+
+ private :find_full_gem_ext_path
+
##
# The full path to the gem (install path + full name).
@@ -70,6 +87,13 @@ class Gem::BasicSpecification
end
##
+ # The full path to the gem binary extension (install path + full name).
+
+ def full_gem_ext_path
+ @full_gem_ext_path ||= find_full_gem_ext_path
+ end
+
+ ##
# Deprecated and ignored, defaults to true.
# Returns the full name (name-version) of this Gem. Platform information
# is included (name-version-platform) if it is specified and not the
# default Ruby platform.
@@ -88,9 +112,12 @@ class Gem::BasicSpecification
#
# Formerly used to indicate this gem was RDoc-capable.
--
1.8.1.2
From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 16 Nov 2011 13:26:48 +0100
Subject: [PATCH 2/8] Use spec's ext dir for extension installation.
---
lib/rubygems/installer.rb | 2 +-
lib/rubygems/specification.rb | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 780a88b..854c177 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -646,7 +646,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join gem_dir, spec.require_paths.first
+ dest_path = spec.ext_dir
ran_rake = false # only run rake once
spec.extensions.each do |extension|
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 87b14d2..492ddbe 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1689,16 +1689,15 @@ class Gem::Specification
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
def ext_dir
- @gem_dir ||= File.expand_path File.join(exts_dir, full_name)
+ @ext_dir ||= File.join exts_dir, full_name, require_paths.first
end
##
# Returns the full path to the exts directory containing this spec's
- # gem directory. eg: /usr/local/lib/ruby/1.8/exts
+ # gem directory. eg: /usr/local/lib/ruby/1.8/gems
def exts_dir
- # TODO: this logic seems terribly broken, but tests fail if just base_dir
- @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts")
+ @exts_dir ||= gems_dir
end
##
--
1.8.1.2
From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Wed, 16 Nov 2011 14:52:16 +0100
Subject: [PATCH 3/9] Simplify the extending of $LOAD_PATH for binary gems.
---
lib/rubygems/specification.rb | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 492ddbe..c703827 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1256,11 +1256,7 @@ class Gem::Specification
File.join full_gem_path, path
end
- unless extensions.empty?
- paths += require_paths.map do |path|
- File.join ext_dir, path
- end
def full_require_paths
- require_paths.map do |path|
- File.join full_gem_path, path
- end
+ paths << ext_dir unless extensions.empty? || paths.include?(ext_dir)
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -1697,7 +1693,10 @@ class Gem::Specification
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
def exts_dir
- @exts_dir ||= gems_dir
+ @exts_dir ||= begin
+ dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
+ dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir
+ end
+ require_paths.map do |require_path|
+ full_gem_paths = [full_gem_path, full_gem_ext_path]
+ full_gem_paths.compact!
+
+ full_gem_paths.map { |path| File.join path, require_path }
+ end.flatten
end
##
--
1.8.1.2
From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 9 Dec 2011 16:31:04 +0100
Subject: [PATCH 4/8] Fix the binary extension search path construction.
---
lib/rubygems/installer.rb | 2 +-
lib/rubygems/specification.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 854c177..f1f2ad7 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -646,7 +646,7 @@ TEXT
say "This could take a while..."
end
@@ -110,7 +137,9 @@ class Gem::BasicSpecification
@loaded_from = path && path.to_s
- dest_path = spec.ext_dir
+ dest_path = File.join spec.ext_dir, spec.require_paths.first
ran_rake = false # only run rake once
spec.extensions.each do |extension|
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index c703827..fa9ea6e 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1256,7 +1256,7 @@ class Gem::Specification
File.join full_gem_path, path
end
- paths << ext_dir unless extensions.empty? || paths.include?(ext_dir)
+ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? || (ext_dir == full_gem_path)
# gem directories must come after -I and ENV['RUBYLIB']
insert_index = Gem.load_path_insert_index
@@ -1685,7 +1685,7 @@ class Gem::Specification
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
def ext_dir
- @ext_dir ||= File.join exts_dir, full_name, require_paths.first
+ @ext_dir ||= File.join exts_dir, full_name
@full_gem_path = nil
+ @full_gem_ext_path = nil
@gems_dir = nil
+ @exts_dir = nil
@base_dir = nil
end
##
--
1.8.1.2
From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 13 Dec 2011 12:14:54 +0100
Subject: [PATCH 5/8] Remove binary extensions during uninstall.
---
lib/rubygems/uninstaller.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index d672b9d..5c31a0c 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -246,6 +246,7 @@ class Gem::Uninstaller
File.writable?(spec.base_dir)
FileUtils.rm_rf spec.full_gem_path
+ FileUtils.rm_rf spec.ext_dir
# TODO: should this be moved to spec?... I vote eww (also exists in docmgr)
old_platform_name = [spec.name,
--
1.8.1.2
From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 13 Dec 2011 14:27:14 +0100
Subject: [PATCH 6/8] Avoid dependency on customized operating_system.rb.
---
lib/rubygems/defaults.rb | 11 +++++++++++
lib/rubygems/specification.rb | 5 +----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index ea84e5c..b221954 100644
index 591580b..8ed474f 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -101,6 +101,17 @@ module Gem
@@ -111,6 +111,17 @@ module Gem
end
##
@ -270,75 +109,71 @@ index ea84e5c..b221954 100644
# A wrapper around RUBY_ENGINE const that may not be defined
def self.ruby_engine
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index fa9ea6e..2b10499 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1693,10 +1693,7 @@ class Gem::Specification
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 8c05723..75d5fc2 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -170,7 +170,7 @@ EOF
say "This could take a while..."
end
def exts_dir
- @exts_dir ||= begin
- dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
- dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir
- end
+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir
- dest_path = File.join @gem_dir, @spec.require_paths.first
+ dest_path = File.join(@only_install_dir ? @gem_dir : @spec.ext_dir, @spec.require_paths.first)
@ran_rake = false # only run rake once
@@ -181,5 +181,9 @@ EOF
end
end
+ def only_install_dir= only_install_dir
+ @only_install_dir = only_install_dir
+ end
+
end
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 261af89..a6aca5d 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -662,6 +662,7 @@ TEXT
def build_extensions
builder = Gem::Ext::Builder.new spec, @build_args
+ builder.only_install_dir = @only_install_dir
builder.build_extensions
end
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index deac343..b630fa3 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1612,6 +1612,13 @@ class Gem::Specification < Gem::BasicSpecification
@executables = Array(value)
end
+ # Returns the full path to this spec's ext directory.
+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
+
+ def ext_dir
+ @ext_dir ||= File.expand_path File.join(exts_dir, full_name)
+ end
+
##
# Sets extensions to +extensions+, ensuring it is an array. Don't
# use this, push onto the array instead.
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index 143ab6d..f81a23d 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -247,6 +247,7 @@ class Gem::Uninstaller
File.writable?(spec.base_dir)
FileUtils.rm_rf spec.full_gem_path
+ FileUtils.rm_rf spec.ext_dir
# TODO: should this be moved to spec?... I vote eww (also exists in docmgr)
old_platform_name = [spec.name,
--
1.8.1.2
From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 7 Feb 2013 13:07:34 +0100
Subject: [PATCH 7/8] Fix binary extensions installation when --install-dir is
specified.
---
lib/rubygems/installer.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index f1f2ad7..e1577fc 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -646,7 +646,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join spec.ext_dir, spec.require_paths.first
+ dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first)
ran_rake = false # only run rake once
spec.extensions.each do |extension|
--
1.8.1.2
From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 15 Feb 2013 17:07:07 +0100
Subject: [PATCH 8/8] Use correct option.
---
lib/rubygems/installer.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index e1577fc..1492c68 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -646,7 +646,7 @@ TEXT
say "This could take a while..."
end
- dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first)
+ dest_path = File.join(@install_dir ? gem_dir : spec.ext_dir, spec.require_paths.first)
ran_rake = false # only run rake once
spec.extensions.each do |extension|
--
1.8.1.2
1.8.3.1

View File

@ -0,0 +1,71 @@
From 02f94e96ea6a9e0fe37341eccd83ffb63549ead5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 3 Oct 2013 14:15:59 +0200
Subject: [PATCH] DRY: Use full_require_paths on yet another place.
---
lib/rubygems/basic_specification.rb | 16 +++++++++++++---
lib/rubygems/specification.rb | 11 -----------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index 24bb4bc..a10eab3 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -38,11 +38,10 @@ class Gem::BasicSpecification
# Return true if this spec can require +file+.
def contains_requirable_file? file
- root = full_gem_path
suffixes = Gem.suffixes
- require_paths.any? do |lib|
- base = "#{root}/#{lib}/#{file}"
+ full_require_paths.any? do |path|
+ base = "#{path}/#{file}"
suffixes.any? { |suf| File.file? "#{base}#{suf}" }
end
end
@@ -84,6 +83,17 @@ class Gem::BasicSpecification
end
##
+ # Full paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
+ # activated.
+ #
+
+ def full_require_paths
+ require_paths.map do |path|
+ File.join full_gem_path, path
+ end
+ end
+
+ ##
# Returns the full path to the gems directory containing this spec's
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 6de8c3b..deac343 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -2015,17 +2015,6 @@ class Gem::Specification < Gem::BasicSpecification
end
##
- # Full paths in the gem to add to <code>$LOAD_PATH</code> when this gem is
- # activated.
- #
-
- def full_require_paths
- require_paths.map do |path|
- File.join full_gem_path, path
- end
- end
-
- ##
# The RubyGems version required by this gem
def required_rubygems_version= req
--
1.8.3.1

View File

@ -1 +1 @@
60913f3eec0c4071f44df42600be2604 ruby-2.0.0-p247.tar.bz2
d32d1ea23988399afadbd21c5a7a37fc ruby-2.1.0-preview1.tar.bz2