Update to Ruby 1.9.3.
This commit is contained in:
parent
2272bb7315
commit
117278abd0
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz
|
||||
/ruby-1.8.7-p352.tar.bz2
|
||||
/ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz
|
||||
/ruby-1.8.7-p357.tar.bz2
|
||||
/ruby-1.9.3-p0.tar.gz
|
||||
|
70
operating_system.rb
Normal file
70
operating_system.rb
Normal file
@ -0,0 +1,70 @@
|
||||
module Gem
|
||||
class << self
|
||||
|
||||
##
|
||||
# Returns a string representing that part or the directory tree that is
|
||||
# common to all specified directories.
|
||||
|
||||
def common_path(dirs)
|
||||
paths = dirs.collect {|dir| dir.split(File::SEPARATOR)}
|
||||
uncommon_idx = paths.transpose.each_with_index.find {|dirnames, idx| dirnames.uniq.length > 1}.last
|
||||
paths[0][0 ... uncommon_idx].join(File::SEPARATOR)
|
||||
end
|
||||
private :common_path
|
||||
|
||||
##
|
||||
# Default gems locations allowed on FHS system (/usr, /usr/share).
|
||||
# The locations are derived from directories specified during build
|
||||
# configuration.
|
||||
|
||||
def default_locations
|
||||
@default_locations ||= {
|
||||
:system => common_path([ConfigMap[:vendorlibdir], ConfigMap[:vendorarchdir]]),
|
||||
:local => common_path([ConfigMap[:sitelibdir], ConfigMap[:sitearchdir]])
|
||||
}
|
||||
end
|
||||
|
||||
##
|
||||
# For each location provides set of directories for binaries (:bin_dir)
|
||||
# platform independent (:gem_dir) and dependent (:ext_dir) files.
|
||||
|
||||
def default_dirs
|
||||
@default_dirs ||= Hash[default_locations.collect do |destination, path|
|
||||
[destination, {
|
||||
:bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last),
|
||||
:gem_dir => File.join(path, ConfigMap[:datadir].split(File::SEPARATOR).last, 'gems'),
|
||||
:ext_dir => File.join(path, ConfigMap[:libdir].split(File::SEPARATOR).last, 'gems')
|
||||
}]
|
||||
end]
|
||||
end
|
||||
|
||||
##
|
||||
# RubyGems default overrides.
|
||||
|
||||
def default_dir
|
||||
if Process.uid == 0
|
||||
Gem.default_dirs[:local][:gem_dir]
|
||||
else
|
||||
Gem.user_dir
|
||||
end
|
||||
end
|
||||
|
||||
def default_path
|
||||
path = default_dirs.collect {|location, paths| paths[:gem_dir]}
|
||||
path.unshift Gem.user_dir if File.exist? Gem.user_home
|
||||
end
|
||||
|
||||
def default_bindir
|
||||
if Process.uid == 0
|
||||
Gem.default_dirs[:local][:bin_dir]
|
||||
else
|
||||
File.join [Dir.home, 'bin']
|
||||
end
|
||||
end
|
||||
|
||||
def default_ext_dir_for base_dir
|
||||
dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir}
|
||||
dirs && File.join(dirs.last[:ext_dir], 'exts')
|
||||
end
|
||||
end
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
--- ruby-1.8.7-p299/configure.in.orig 2010-06-24 16:09:00.000000000 -0400
|
||||
+++ ruby-1.8.7-p299/configure.in 2010-06-24 16:09:13.000000000 -0400
|
||||
@@ -1802,6 +1802,8 @@ AC_SUBST(vendordir)dnl
|
||||
configure_args=$ac_configure_args
|
||||
AC_SUBST(configure_args)dnl
|
||||
|
||||
+target_cpu=`echo $target_cpu | sed s/i.86/i386/`
|
||||
+
|
||||
if test "$fat_binary" != no ; then
|
||||
arch="fat-${target_os}"
|
||||
|
@ -1,228 +0,0 @@
|
||||
--- ruby-1.8.7-p249/Makefile.in.orig 2010-06-15 17:51:14.000000000 -0400
|
||||
+++ ruby-1.8.7-p249/Makefile.in 2010-06-15 17:56:54.000000000 -0400
|
||||
@@ -24,6 +24,9 @@ datadir = @datadir@
|
||||
arch = @arch@
|
||||
sitearch = @sitearch@
|
||||
sitedir = @sitedir@
|
||||
+sitearchdir = @sitearchdir@
|
||||
+vendordir = @vendordir@
|
||||
+vendorarchdir = @vendorarchdir@
|
||||
|
||||
TESTUI = console
|
||||
TESTS =
|
||||
--- ruby-1.8.7-p249/mkconfig.rb.orig2 2010-06-15 18:19:29.000000000 -0400
|
||||
+++ ruby-1.8.7-p249/mkconfig.rb 2010-06-15 18:19:33.000000000 -0400
|
||||
@@ -141,12 +141,12 @@ print(*v_fast)
|
||||
print(*v_others)
|
||||
print <<EOS
|
||||
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
|
||||
- CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
|
||||
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
||||
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
||||
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
||||
- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
|
||||
- CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
|
||||
+ CONFIG["rubylibdir"] = "$(vendordir)/$(ruby_version)"
|
||||
+ CONFIG["archdir"] = "$(libdir)/ruby/$(ruby_version)/$(sitearch)"
|
||||
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
||||
+ CONFIG["sitearchdir"] = "$(libdir)/ruby/site_ruby/$(ruby_version)/$(sitearch)"
|
||||
+ CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
|
||||
+ CONFIG["vendorarchdir"] = "$(libdir)/ruby/$(ruby_version)/$(sitearch)"
|
||||
CONFIG["topdir"] = File.dirname(__FILE__)
|
||||
MAKEFILE_CONFIG = {}
|
||||
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
||||
--- ruby-1.8.7-p249/ruby.c.orig 2010-06-15 18:22:52.000000000 -0400
|
||||
+++ ruby-1.8.7-p249/ruby.c 2010-06-23 14:05:54.000000000 -0400
|
||||
@@ -316,24 +316,27 @@ ruby_init_loadpath()
|
||||
#endif
|
||||
|
||||
incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
|
||||
-#ifdef RUBY_SITE_THIN_ARCHLIB
|
||||
- incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
|
||||
-#endif
|
||||
- incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
|
||||
- incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
|
||||
-
|
||||
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH2));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH3));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_SITE_LIB3));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH4));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH2));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH3));
|
||||
incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
|
||||
-#ifdef RUBY_VENDOR_THIN_ARCHLIB
|
||||
- incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
|
||||
-#endif
|
||||
- incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
|
||||
- incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH2));
|
||||
+ incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH3));
|
||||
+
|
||||
+ // uncomment the following when we want to support parallel
|
||||
+ // installable ruby stacks
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_SITE_ARCH));
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
|
||||
+
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH));
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH4));
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
|
||||
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB3));
|
||||
|
||||
- incpush(RUBY_RELATIVE(RUBY_LIB));
|
||||
-#ifdef RUBY_THIN_ARCHLIB
|
||||
- incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
|
||||
-#endif
|
||||
- incpush(RUBY_RELATIVE(RUBY_ARCHLIB));
|
||||
|
||||
if (rb_safe_level() == 0) {
|
||||
incpush(".");
|
||||
--- ruby-1.8.7-p299/configure.in.orig2 2010-06-24 16:10:40.000000000 -0400
|
||||
+++ ruby-1.8.7-p299/configure.in 2010-06-24 16:16:33.000000000 -0400
|
||||
@@ -58,6 +58,9 @@ fi
|
||||
if test "$TEENY" = ""; then
|
||||
AC_MSG_ERROR(could not determine TEENY number from version.h)
|
||||
fi
|
||||
+rb_mm_version="${MAJOR}.${MINOR}"
|
||||
+ruby_version="${MAJOR}.${MINOR}.${TEENY}"
|
||||
+ruby_mm_version="${rb_mm_version}"
|
||||
AC_SUBST(MAJOR)
|
||||
AC_SUBST(MINOR)
|
||||
AC_SUBST(TEENY)
|
||||
@@ -1759,6 +1762,12 @@ AC_ARG_WITH(sitedir,
|
||||
[sitedir='${libdir}/ruby/site_ruby'])
|
||||
SITE_DIR=`eval echo \\"${sitedir}\\"`
|
||||
|
||||
+AC_ARG_WITH(sitearchdir,
|
||||
+ [ --with-sitearchdir=DIR site arch. libraries in DIR [[LIBDIR/ruby/site_ruby]]],
|
||||
+ [sitearchdir=$withval],
|
||||
+ [sitearchdir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby'])
|
||||
+SITE_ARCH_DIR=`eval echo \\"${sitearchdir}\\"`
|
||||
+
|
||||
case "$target_os" in
|
||||
cygwin*|mingw*|*djgpp*|os2-emx*)
|
||||
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
@@ -1770,50 +1779,45 @@ case "$target_os" in
|
||||
;;
|
||||
esac
|
||||
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}"
|
||||
-RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}"
|
||||
|
||||
AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
|
||||
-AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
|
||||
-AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}")
|
||||
|
||||
AC_ARG_WITH(vendordir,
|
||||
[ --with-vendordir=DIR vendor libraries in DIR [[LIBDIR/ruby/vendor_ruby]]],
|
||||
[vendordir=$withval],
|
||||
[vendordir='${libdir}/ruby/vendor_ruby'])
|
||||
VENDOR_DIR=`eval echo \\"${vendordir}\\"`
|
||||
+
|
||||
+AC_ARG_WITH(vendorarchdir,
|
||||
+ [ --with-vendorarchdir=DIR vendor arch. libraries in DIR [[LIBDIR/ruby/vendor_ruby]]],
|
||||
+ [vendorarchdir=$withval],
|
||||
+ [vendorarchdir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby'])
|
||||
+VENDOR_ARCH_DIR=`eval echo \\"${vendorarchdir}\\"`
|
||||
+
|
||||
case "$target_os" in
|
||||
cygwin*|mingw*|*djgpp*|os2-emx*)
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
;;
|
||||
*)
|
||||
+ RUBY_SITE_ARCH_PATH="`eval echo \\"$SITE_ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
+ RUBY_VENDOR_ARCH_PATH="`eval echo \\"$VENDOR_ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
;;
|
||||
esac
|
||||
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}"
|
||||
|
||||
-AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH}")
|
||||
-AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")
|
||||
-
|
||||
-AC_SUBST(arch)dnl
|
||||
-AC_SUBST(sitearch)dnl
|
||||
-AC_SUBST(sitedir)dnl
|
||||
-AC_SUBST(vendordir)dnl
|
||||
-
|
||||
-configure_args=$ac_configure_args
|
||||
-AC_SUBST(configure_args)dnl
|
||||
-
|
||||
target_cpu=`echo $target_cpu | sed s/i.86/i386/`
|
||||
|
||||
if test "$fat_binary" != no ; then
|
||||
arch="fat-${target_os}"
|
||||
|
||||
AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB,
|
||||
- "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||||
+ "${RUBY_LIB_PATH}")
|
||||
|
||||
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
|
||||
- "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||||
+ "${RUBY_SITE_LIB_PATH}")
|
||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
|
||||
- "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||||
+ "${RUBY_VENDOR_LIB_PATH}")
|
||||
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
|
||||
else
|
||||
arch="${target_cpu}-${target_os}"
|
||||
@@ -1825,9 +1829,57 @@ case "$target_os" in
|
||||
*) sitearch="${arch}" ;;
|
||||
esac
|
||||
|
||||
-AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}")
|
||||
-AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}")
|
||||
-AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH2}/${sitearch}")
|
||||
+RUBY_SITE_ARCH_PATH_1="${RUBY_SITE_ARCH_PATH}/${ruby_version}"
|
||||
+RUBY_SITE_ARCH_PATH_2="${RUBY_SITE_ARCH_PATH}/${ruby_mm_version}"
|
||||
+RUBY_SITE_ARCH_PATH_3="${RUBY_SITE_ARCH_PATH}/${ruby_mm_version}/${sitearch}"
|
||||
+RUBY_SITE_ARCH_PATH_4="${RUBY_SITE_ARCH_PATH}"
|
||||
+RUBY_SITE_LIB_PATH_1="${RUBY_SITE_LIB_PATH}/${ruby_version}"
|
||||
+RUBY_SITE_LIB_PATH_2="${RUBY_SITE_LIB_PATH}/${ruby_mm_version}"
|
||||
+RUBY_SITE_LIB_PATH_3="${RUBY_SITE_LIB_PATH}"
|
||||
+RUBY_VENDOR_ARCH_PATH_1="${RUBY_VENDOR_ARCH_PATH}/${ruby_version}"
|
||||
+RUBY_VENDOR_ARCH_PATH_2="${RUBY_VENDOR_ARCH_PATH}/${ruby_mm_version}"
|
||||
+RUBY_VENDOR_ARCH_PATH_3="${RUBY_VENDOR_ARCH_PATH}/${ruby_mm_version}/${sitearch}"
|
||||
+RUBY_VENDOR_ARCH_PATH_4="${RUBY_VENDOR_ARCH_PATH}"
|
||||
+RUBY_VENDOR_LIB_PATH_1="${RUBY_VENDOR_LIB_PATH}/${ruby_version}"
|
||||
+RUBY_VENDOR_LIB_PATH_2="${RUBY_VENDOR_LIB_PATH}/${ruby_mm_version}"
|
||||
+RUBY_VENDOR_LIB_PATH_3="${RUBY_VENDOR_LIB_PATH}"
|
||||
+
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH, "${RUBY_SITE_ARCH_PATH_1}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH2, "${RUBY_SITE_ARCH_PATH_2}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH3, "${RUBY_SITE_ARCH_PATH_3}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH4, "${RUBY_SITE_ARCH_PATH_4}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH_1}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH_2}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB3, "${RUBY_SITE_LIB_PATH_3}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH, "${RUBY_VENDOR_ARCH_PATH_1}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH2, "${RUBY_VENDOR_ARCH_PATH_2}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH3, "${RUBY_VENDOR_ARCH_PATH_3}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH4, "${RUBY_VENDOR_ARCH_PATH_4}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH_1}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH_2}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB3, "${RUBY_VENDOR_LIB_PATH_3}")
|
||||
+
|
||||
+# XXX these are being added to keep compatiblity w/ the 1.8.6
|
||||
+# search path, but don't get created anywhere, are unused, and
|
||||
+# should really be removed
|
||||
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH, "${libdir}/site_ruby/${ruby_mm_version}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH2, "${libdir}/site_ruby/${ruby_mm_version}/${sitearch}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH3, "${libdir}/site_ruby")
|
||||
+
|
||||
+AC_SUBST(arch)dnl
|
||||
+AC_SUBST(sitearch)dnl
|
||||
+AC_SUBST(sitedir)dnl
|
||||
+AC_SUBST(vendordir)dnl
|
||||
+AC_SUBST(ruby_mm_version)dnl
|
||||
+AC_SUBST(sitearchdir)dnl
|
||||
+AC_SUBST(vendorarchdir)dnl
|
||||
+
|
||||
+configure_args=$ac_configure_args
|
||||
+AC_SUBST(configure_args)dnl
|
||||
+
|
||||
+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}")
|
||||
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH3}")
|
||||
|
||||
AC_ARG_WITH(search-path,
|
||||
[ --with-search-path=DIR specify the additional search path],
|
@ -1,34 +0,0 @@
|
||||
diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb
|
||||
--- ruby-1.8.7/mkconfig.rb 2008-06-06 12:39:57.000000000 +0200
|
||||
+++ ruby-1.8.7/mkconfig.rb 2010-06-21 11:17:13.839498249 +0200
|
||||
@@ -39,6 +39,7 @@ vars = {}
|
||||
has_version = false
|
||||
continued_name = nil
|
||||
continued_line = nil
|
||||
+lib_64 = ''
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
name = nil
|
||||
@@ -96,13 +97,21 @@ File.foreach "config.status" do |line|
|
||||
v_others << v
|
||||
end
|
||||
has_version = true if name == "MAJOR"
|
||||
+
|
||||
+ # If the target architecture is one of the following,
|
||||
+ # ppc64 s390x sparc64 x86_64
|
||||
+ # then use "lib64", not "lib" in prefix.
|
||||
+ if name == "target_cpu" and (/64"$/ =~ val or val == '"s390x"')
|
||||
+ lib_64 = '64'
|
||||
+ end
|
||||
end
|
||||
# break if /^CEOF/
|
||||
end
|
||||
|
||||
drive = File::PATH_SEPARATOR == ';'
|
||||
|
||||
-prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
||||
+prefix = "/lib#{lib_64}/ruby/" \
|
||||
+ + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
||||
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
|
||||
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
|
||||
print " CONFIG = {}\n"
|
@ -1,11 +0,0 @@
|
||||
--- ruby-1.8.7-p249/lib/mkmf.rb.orig 2010-06-15 12:04:06.000000000 -0400
|
||||
+++ ruby-1.8.7-p249/lib/mkmf.rb 2010-06-15 12:05:05.000000000 -0400
|
||||
@@ -319,7 +319,7 @@ def link_command(ldflags, opt="", libpat
|
||||
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
|
||||
'LIBPATH' => libpathflag(libpath),
|
||||
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
|
||||
- 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")
|
||||
+ 'LIBS' => "#$LIBRUBYARG_SHARED #{opt} #$LIBS")
|
||||
Config::expand(TRY_LINK.dup, conf)
|
||||
end
|
||||
|
@ -1,33 +0,0 @@
|
||||
--- ruby-1.8.7-p330/mkconfig.rb.multilib 2010-11-24 16:38:41.000000000 +0900
|
||||
+++ ruby-1.8.7-p330/mkconfig.rb 2010-12-26 02:16:32.000000000 +0900
|
||||
@@ -40,6 +40,7 @@
|
||||
has_patchlevel = false
|
||||
continued_name = nil
|
||||
continued_line = nil
|
||||
+lib_64 = ''
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
name = nil
|
||||
@@ -102,13 +103,21 @@
|
||||
when "PATCHLEVEL"
|
||||
has_patchlevel = true
|
||||
end
|
||||
+
|
||||
+ # If the target architecture is one of the following,
|
||||
+ # ppc64 s390x sparc64 x86_64
|
||||
+ # then use "lib64", not "lib" in prefix.
|
||||
+ if name == "target_cpu" and (/64"$/ =~ val or val == '"s390x"')
|
||||
+ lib_64 = '64'
|
||||
+ end
|
||||
end
|
||||
# break if /^CEOF/
|
||||
end
|
||||
|
||||
drive = File::PATH_SEPARATOR == ';'
|
||||
|
||||
-prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
||||
+prefix = "/lib#{lib_64}/ruby/" \
|
||||
+ + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
||||
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
|
||||
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
|
||||
print " CONFIG = {}\n"
|
@ -1,54 +0,0 @@
|
||||
--- ruby-1.8.7-p352/array.c.pathuniq 2009-02-05 08:55:33.000000000 +0900
|
||||
+++ ruby-1.8.7-p352/array.c 2011-07-16 09:44:35.000000000 +0900
|
||||
@@ -2954,7 +2954,7 @@
|
||||
* b.uniq! #=> nil
|
||||
*/
|
||||
|
||||
-static VALUE
|
||||
+GCC_VISIBILITY_HIDDEN VALUE
|
||||
rb_ary_uniq_bang(ary)
|
||||
VALUE ary;
|
||||
{
|
||||
@@ -2987,7 +2987,7 @@
|
||||
* a.uniq #=> ["a", "b", "c"]
|
||||
*/
|
||||
|
||||
-static VALUE
|
||||
+GCC_VISIBILITY_HIDDEN VALUE
|
||||
rb_ary_uniq(ary)
|
||||
VALUE ary;
|
||||
{
|
||||
--- ruby-1.8.7-p352/intern.h.pathuniq 2011-05-23 13:49:40.000000000 +0900
|
||||
+++ ruby-1.8.7-p352/intern.h 2011-07-16 09:43:10.000000000 +0900
|
||||
@@ -18,6 +18,11 @@
|
||||
*/
|
||||
|
||||
#define ID_ALLOCATOR 1
|
||||
+#ifdef __GNUC__
|
||||
+#define GCC_VISIBILITY_HIDDEN __attribute__ ((visibility("hidden")))
|
||||
+#else
|
||||
+#define GCC_VISIBILITY_HIDDEN
|
||||
+#endif
|
||||
|
||||
/* array.c */
|
||||
void rb_mem_clear _((register VALUE*, register long));
|
||||
@@ -44,6 +49,8 @@
|
||||
VALUE rb_ary_reverse _((VALUE));
|
||||
VALUE rb_ary_sort _((VALUE));
|
||||
VALUE rb_ary_sort_bang _((VALUE));
|
||||
+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq _((VALUE));
|
||||
+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq_bang _((VALUE));
|
||||
VALUE rb_ary_delete _((VALUE, VALUE));
|
||||
VALUE rb_ary_delete_at _((VALUE, long));
|
||||
VALUE rb_ary_clear _((VALUE));
|
||||
--- ruby-1.8.7-p352/ruby.c.pathuniq 2011-07-16 08:54:11.000000000 +0900
|
||||
+++ ruby-1.8.7-p352/ruby.c 2011-07-16 09:36:13.000000000 +0900
|
||||
@@ -341,6 +341,8 @@
|
||||
if (rb_safe_level() == 0) {
|
||||
incpush(".");
|
||||
}
|
||||
+
|
||||
+ rb_load_path = rb_ary_uniq(rb_load_path);
|
||||
}
|
||||
|
||||
struct req_list {
|
188
ruby-1.9.3-added-site-and-vendor-arch-flags.patch
Normal file
188
ruby-1.9.3-added-site-and-vendor-arch-flags.patch
Normal file
@ -0,0 +1,188 @@
|
||||
From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Mon, 5 Sep 2011 13:10:47 +0200
|
||||
Subject: [PATCH] Added configuration flags for site and vendor architecture
|
||||
specific directories.
|
||||
|
||||
---
|
||||
Makefile.in | 3 +++
|
||||
configure.in | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
tool/mkconfig.rb | 8 ++++++--
|
||||
version.c | 4 ++++
|
||||
4 files changed, 53 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index bcdaf5f..f57e4c4 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -34,6 +34,9 @@ datadir = @datadir@
|
||||
archdir = @archdir@
|
||||
sitearch = @sitearch@
|
||||
sitedir = @sitedir@
|
||||
+sitearchdir= @sitearchdir@
|
||||
+vendordir = @vendordir@
|
||||
+vendorarchdir = @vendorarchdir@
|
||||
ruby_version = @ruby_version@
|
||||
|
||||
TESTUI = console
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 83e5d76..31532bd 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2801,6 +2801,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
|
||||
dir="${SITE_DIR}"
|
||||
done
|
||||
|
||||
+AC_ARG_WITH(sitearchdir,
|
||||
+ AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
|
||||
+ [sitearchdir=$withval],
|
||||
+ [sitearchdir='${rubylibprefix}/site_ruby/${arch}'])
|
||||
+dir="${sitearchdir}"
|
||||
+until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do
|
||||
+ dir="${SITEARCH_DIR}"
|
||||
+done
|
||||
+
|
||||
AC_ARG_WITH(vendordir,
|
||||
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
|
||||
[vendordir=$withval],
|
||||
@@ -2810,19 +2819,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
|
||||
dir="${VENDOR_DIR}"
|
||||
done
|
||||
|
||||
+AC_ARG_WITH(vendorarchdir,
|
||||
+ AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
|
||||
+ [vendorarchdir=$withval],
|
||||
+ [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}'])
|
||||
+dir="${vendorarchdir}"
|
||||
+until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do
|
||||
+ dir="${VENDORARCH_DIR}"
|
||||
+done
|
||||
+
|
||||
if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=""
|
||||
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
+ RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
else
|
||||
RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
|
||||
RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
+ RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
fi
|
||||
|
||||
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
|
||||
@@ -2840,6 +2862,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
|
||||
[
|
||||
RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
|
||||
])
|
||||
+AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"],
|
||||
+ ["$RUBY_LIB_PREFIX/"*], [
|
||||
+ RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"'
|
||||
+ ],
|
||||
+ [
|
||||
+ RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\""
|
||||
+ ])
|
||||
AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
|
||||
["$RUBY_LIB_PREFIX/"*], [
|
||||
RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
|
||||
@@ -2847,6 +2876,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
|
||||
[
|
||||
RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
|
||||
])
|
||||
+AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"],
|
||||
+ ["$RUBY_LIB_PREFIX/"*], [
|
||||
+ RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"'
|
||||
+ ],
|
||||
+ [
|
||||
+ RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\""
|
||||
+ ])
|
||||
pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
|
||||
AS_CASE(["$RUBY_LIB_PREFIX"],
|
||||
["$RUBY_EXEC_PREFIX/"*], [
|
||||
@@ -2868,19 +2904,23 @@ if test "x$SITE_DIR" = xno; then
|
||||
AC_DEFINE(NO_RUBY_SITE_LIB)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH})
|
||||
+ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH})
|
||||
fi
|
||||
if test "x$VENDOR_DIR" = xno; then
|
||||
AC_DEFINE(NO_RUBY_VENDOR_LIB)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH})
|
||||
+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH})
|
||||
fi
|
||||
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
AC_SUBST(archdir)dnl
|
||||
AC_SUBST(sitedir)dnl
|
||||
+AC_SUBST(sitearchdir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
+AC_SUBST(vendorarchdir)dnl
|
||||
|
||||
configure_args=$ac_configure_args
|
||||
AC_SUBST(configure_args)dnl
|
||||
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index b707c4b..6230720 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
+++ b/tool/mkconfig.rb
|
||||
@@ -44,6 +44,8 @@ v_others = []
|
||||
continued_line = nil
|
||||
path_version = "/$(ruby_version)"
|
||||
archdir_override = "$(vendorlibdir)/$(sitearch)"
|
||||
+sitearchdir_override = "$(sitelibdir)/$(sitearch)"
|
||||
+vendorarchdir_override = "$(vendorlibdir)/$(sitearch)"
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
name = nil
|
||||
@@ -79,6 +81,8 @@ File.foreach "config.status" do |line|
|
||||
when /^RUBY_SO_NAME$/; next if $so_name
|
||||
when /^arch$/; if val.empty? then val = arch else arch = val end
|
||||
when /^archdir$/; archdir_override = val; next
|
||||
+ when /^sitearchdir$/; sitearchdir_override = val; next
|
||||
+ when /^vendorarchdir$/; vendorarchdir_override = val; next
|
||||
when /^sitearch/; val = '$(arch)' if val.empty?
|
||||
end
|
||||
case val
|
||||
@@ -213,11 +217,11 @@ print <<EOS
|
||||
EOS
|
||||
print <<EOS unless v_disabled["sitedir"]
|
||||
CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
|
||||
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
||||
+ CONFIG["sitearchdir"] = "#{sitearchdir_override}"
|
||||
EOS
|
||||
print <<EOS unless v_disabled["vendordir"]
|
||||
CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
|
||||
- CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
|
||||
+ CONFIG["vendorarchdir"] = "#{vendorarchdir_override}"
|
||||
EOS
|
||||
print <<EOS
|
||||
CONFIG["topdir"] = File.dirname(__FILE__)
|
||||
diff --git a/version.c b/version.c
|
||||
index 59d4e5e..2558aa0 100644
|
||||
--- a/version.c
|
||||
+++ b/version.c
|
||||
@@ -50,8 +50,12 @@
|
||||
#ifndef RUBY_ARCHLIB
|
||||
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
|
||||
#endif
|
||||
+#ifndef RUBY_SITE_ARCHLIB
|
||||
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
|
||||
+#endif
|
||||
+#ifndef RUBY_VENDOR_ARCHLIB
|
||||
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
|
||||
+#endif
|
||||
#ifdef RUBY_THINARCH
|
||||
#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH
|
||||
#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH
|
||||
--
|
||||
1.7.6.1
|
||||
|
11
ruby-1.9.3-always-use-i386.patch
Normal file
11
ruby-1.9.3-always-use-i386.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200
|
||||
+++ b/configure.in 2011-10-18 08:56:59.751593321 +0200
|
||||
@@ -2925,6 +2925,8 @@
|
||||
configure_args=$ac_configure_args
|
||||
AC_SUBST(configure_args)dnl
|
||||
|
||||
+target_cpu=`echo $target_cpu | sed s/i.86/i386/`
|
||||
+
|
||||
if test "${universal_binary-no}" = yes ; then
|
||||
arch="universal-${target_os}"
|
||||
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
|
132
ruby-1.9.3-arch-specific-dir.patch
Normal file
132
ruby-1.9.3-arch-specific-dir.patch
Normal file
@ -0,0 +1,132 @@
|
||||
From df4253a5b79b63f16f215f2c19f1b9666c4ca01e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 8 Sep 2011 15:30:05 +0200
|
||||
Subject: [PATCH] Add configuration arch specific dir flag.
|
||||
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
configure.in | 20 ++++++++++++++++++++
|
||||
tool/mkconfig.rb | 4 +++-
|
||||
version.c | 2 ++
|
||||
4 files changed, 26 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index bcdaf5f..d61b2ee 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -31,6 +31,7 @@ libexecdir = @libexecdir@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
arch = @arch@
|
||||
+archdir = @archdir@
|
||||
sitearch = @sitearch@
|
||||
sitedir = @sitedir@
|
||||
ruby_version = @ruby_version@
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 83e5d76..e6dc38c 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2783,6 +2783,15 @@ else
|
||||
RUBY_LIB_VERSION="\"${ruby_version}\""
|
||||
fi
|
||||
|
||||
+AC_ARG_WITH(archdir,
|
||||
+ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
|
||||
+ [archdir=$withval],
|
||||
+ [archdir='${rubylibprefix}/${arch}'])
|
||||
+dir="${archdir}"
|
||||
+until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do
|
||||
+ dir="${ARCH_DIR}"
|
||||
+done
|
||||
+
|
||||
AC_ARG_WITH(sitedir,
|
||||
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
|
||||
[sitedir=$withval],
|
||||
@@ -2805,16 +2814,25 @@ if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=""
|
||||
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
+ RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
else
|
||||
RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
|
||||
RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
+ RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
|
||||
fi
|
||||
|
||||
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
|
||||
+AS_CASE(["$RUBY_ARCH_LIB_PATH"],
|
||||
+ ["$RUBY_LIB_PREFIX/"*], [
|
||||
+ RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"'
|
||||
+ ],
|
||||
+ [
|
||||
+ RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\""
|
||||
+ ])
|
||||
AS_CASE(["$RUBY_SITE_LIB_PATH"],
|
||||
["$RUBY_LIB_PREFIX/"*], [
|
||||
RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
|
||||
@@ -2845,6 +2863,7 @@ else
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
|
||||
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX})
|
||||
+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH})
|
||||
if test "x$SITE_DIR" = xno; then
|
||||
AC_DEFINE(NO_RUBY_SITE_LIB)
|
||||
else
|
||||
@@ -2859,6 +2878,7 @@ fi
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
+AC_SUBST(archdir)dnl
|
||||
AC_SUBST(sitedir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
|
||||
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index b707c4b..9780ef2 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
+++ b/tool/mkconfig.rb
|
||||
@@ -43,6 +43,7 @@ v_others = []
|
||||
continued_name = nil
|
||||
continued_line = nil
|
||||
path_version = "/$(ruby_version)"
|
||||
+archdir_override = "$(vendorlibdir)/$(sitearch)"
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
name = nil
|
||||
@@ -77,6 +78,7 @@ File.foreach "config.status" do |line|
|
||||
when /^RUBY_INSTALL_NAME$/; next if $install_name
|
||||
when /^RUBY_SO_NAME$/; next if $so_name
|
||||
when /^arch$/; if val.empty? then val = arch else arch = val end
|
||||
+ when /^archdir$/; archdir_override = val; next
|
||||
when /^sitearch/; val = '$(arch)' if val.empty?
|
||||
end
|
||||
case val
|
||||
@@ -207,7 +209,7 @@ print(*v_fast)
|
||||
print(*v_others)
|
||||
print <<EOS
|
||||
CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
|
||||
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
||||
+ CONFIG["archdir"] = "#{archdir_override}"
|
||||
EOS
|
||||
print <<EOS unless v_disabled["sitedir"]
|
||||
CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
|
||||
diff --git a/version.c b/version.c
|
||||
index 59d4e5e..915a0a2 100644
|
||||
--- a/version.c
|
||||
+++ b/version.c
|
||||
@@ -47,7 +47,9 @@
|
||||
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
|
||||
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
|
||||
#endif
|
||||
+#ifndef RUBY_ARCHLIB
|
||||
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
|
||||
+#endif
|
||||
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
|
||||
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
|
||||
#ifdef RUBY_THINARCH
|
||||
--
|
||||
1.7.6.1
|
||||
|
31
ruby-1.9.3-bignum-test-fix.patch
Normal file
31
ruby-1.9.3-bignum-test-fix.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- ruby-1.9.3-p0/test/ruby/test_bignum.rb.orig 2011-11-10 09:52:59.101925465 +0100
|
||||
+++ ruby-1.9.3-p0/test/ruby/test_bignum.rb 2011-11-10 09:54:14.580798826 +0100
|
||||
@@ -378,7 +378,7 @@
|
||||
assert_equal(true, (2**32).even?)
|
||||
end
|
||||
|
||||
- def interrupt
|
||||
+ def assert_interrupt
|
||||
time = Time.now
|
||||
start_flag = false
|
||||
end_flag = false
|
||||
@@ -387,14 +387,16 @@
|
||||
yield
|
||||
end_flag = true
|
||||
end
|
||||
- sleep 1
|
||||
+ Thread.pass until start_flag
|
||||
thread.raise
|
||||
thread.join rescue nil
|
||||
- start_flag && !end_flag && Time.now - time < 10
|
||||
+ time = Time.now - time
|
||||
+ assert_equal([true, false], [start_flag, end_flag])
|
||||
+ assert_operator(time, :<, 10)
|
||||
end
|
||||
|
||||
def test_interrupt
|
||||
- assert(interrupt { (65536 ** 65536).to_s })
|
||||
+ assert_interrupt {(65536 ** 65536).to_s}
|
||||
end
|
||||
|
||||
def test_too_big_to_s
|
97
ruby-1.9.3-custom-rubygems-location.patch
Normal file
97
ruby-1.9.3-custom-rubygems-location.patch
Normal file
@ -0,0 +1,97 @@
|
||||
From 279a693ce4ef3a887ce8d4fa59e0f2616a14d91a 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/mkconfig.rb | 1 +
|
||||
tool/rbinstall.rb | 9 +++++++++
|
||||
version.c | 4 ++++
|
||||
4 files changed, 22 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index b1bc951..91c5d0d 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2828,6 +2828,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
|
||||
dir="${VENDORARCH_DIR}"
|
||||
done
|
||||
|
||||
+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")
|
||||
+fi
|
||||
+
|
||||
if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=""
|
||||
@@ -2921,6 +2928,7 @@ AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(sitearchdir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
AC_SUBST(vendorarchdir)dnl
|
||||
+AC_SUBST(rubygemsdir)dnl
|
||||
|
||||
configure_args=$ac_configure_args
|
||||
AC_SUBST(configure_args)dnl
|
||||
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index b707c4b..9fecbfb 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
+++ b/tool/mkconfig.rb
|
||||
@@ -84,6 +84,7 @@ File.foreach "config.status" do |line|
|
||||
when /^sitearchdir$/; sitearchdir_override = val; next
|
||||
when /^vendorarchdir$/; vendorarchdir_override = val; next
|
||||
when /^sitearch/; val = '$(arch)' if val.empty?
|
||||
+ when /^rubygemsdir/; next if val.empty?
|
||||
end
|
||||
case val
|
||||
when /^\$\(ac_\w+\)$/; next
|
||||
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index 6bfc73e..31dc446 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -300,6 +300,7 @@ sitelibdir = CONFIG["sitelibdir"]
|
||||
sitearchlibdir = CONFIG["sitearchdir"]
|
||||
vendorlibdir = CONFIG["vendorlibdir"]
|
||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||
+rubygemsdir = CONFIG["rubygemsdir"]
|
||||
mandir = CONFIG["mandir"]
|
||||
capidir = CONFIG["docdir"]
|
||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||
@@ -487,7 +488,15 @@ end
|
||||
install?(:local, :comm, :lib) do
|
||||
prepare "library scripts", rubylibdir
|
||||
noinst = %w[README* *.txt *.rdoc]
|
||||
+ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir
|
||||
install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
|
||||
+ if rubygemsdir
|
||||
+ noinst = %w[obsolete.rb]
|
||||
+ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode)
|
||||
+ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode)
|
||||
+ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode)
|
||||
+ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode)
|
||||
+ end
|
||||
end
|
||||
|
||||
install?(:local, :arch, :lib) do
|
||||
diff --git a/version.c b/version.c
|
||||
index 59d4e5e..12ba7e9 100644
|
||||
--- a/version.c
|
||||
+++ b/version.c
|
||||
@@ -103,6 +103,10 @@ const char ruby_initial_load_paths[] =
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifdef RUBYGEMS_DIR
|
||||
+ RUBYGEMS_DIR "\0"
|
||||
+#endif
|
||||
+
|
||||
RUBY_LIB "\0"
|
||||
#ifdef RUBY_THIN_ARCHLIB
|
||||
RUBY_THIN_ARCHLIB "\0"
|
||||
--
|
||||
1.7.7
|
||||
|
149
ruby-1.9.3-disable-versioned-paths.patch
Normal file
149
ruby-1.9.3-disable-versioned-paths.patch
Normal file
@ -0,0 +1,149 @@
|
||||
From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 25 Aug 2011 14:33:51 +0200
|
||||
Subject: [PATCH] Allow to disable versioned paths.
|
||||
|
||||
---
|
||||
configure.in | 11 +++++++++++
|
||||
tool/mkconfig.rb | 9 ++++++---
|
||||
version.c | 10 ++++++++++
|
||||
3 files changed, 27 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index e742e74..86cb68f 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2953,6 +2953,17 @@ else
|
||||
fi
|
||||
AC_SUBST(USE_RUBYGEMS)
|
||||
|
||||
+AC_ARG_ENABLE(versioned-paths,
|
||||
+ AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]),
|
||||
+ [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes])
|
||||
+if test x"$enable_versioned_paths" = xno; then
|
||||
+ AC_DEFINE(DISABLE_VERSIONED_PATHS, 1)
|
||||
+ USE_VERSIONED_PATHS=NO
|
||||
+else
|
||||
+ USE_VERSIONED_PATHS=YES
|
||||
+fi
|
||||
+AC_SUBST(USE_VERSIONED_PATHS)
|
||||
+
|
||||
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
|
||||
AS_MKDIR_P("${arch_hdrdir}")
|
||||
config_h="${arch_hdrdir}/config.h"
|
||||
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index a2221f0..47d8c8f 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
+++ b/tool/mkconfig.rb
|
||||
@@ -42,6 +42,7 @@ v_others = []
|
||||
vars = {}
|
||||
continued_name = nil
|
||||
continued_line = nil
|
||||
+path_version = "/$(ruby_version)"
|
||||
File.foreach "config.status" do |line|
|
||||
next if /^#/ =~ line
|
||||
name = nil
|
||||
@@ -138,6 +139,8 @@ File.foreach "config.status" do |line|
|
||||
case name
|
||||
when "ruby_version"
|
||||
version = val[/\A"(.*)"\z/, 1]
|
||||
+ when /^USE_VERSIONED_PATHS$/
|
||||
+ path_version = nil if /NO/ =~ val
|
||||
end
|
||||
end
|
||||
# break if /^CEOF/
|
||||
@@ -203,15 +206,15 @@ end
|
||||
print(*v_fast)
|
||||
print(*v_others)
|
||||
print <<EOS
|
||||
- CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
|
||||
+ CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
|
||||
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
||||
EOS
|
||||
print <<EOS unless v_disabled["sitedir"]
|
||||
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
||||
+ CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
|
||||
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
||||
EOS
|
||||
print <<EOS unless v_disabled["vendordir"]
|
||||
- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
|
||||
+ CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
|
||||
CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
|
||||
EOS
|
||||
print <<EOS
|
||||
diff --git a/version.c b/version.c
|
||||
index 59d4e5e..641dc33 100644
|
||||
--- a/version.c
|
||||
+++ b/version.c
|
||||
@@ -38,9 +38,15 @@
|
||||
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
|
||||
#endif
|
||||
|
||||
+#ifdef DISABLE_VERSIONED_PATHS
|
||||
+#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
|
||||
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
|
||||
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
|
||||
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
|
||||
@@ -75,8 +81,10 @@ const char ruby_initial_load_paths[] =
|
||||
RUBY_SITE_THIN_ARCHLIB "\0"
|
||||
#endif
|
||||
RUBY_SITE_ARCHLIB "\0"
|
||||
+#ifndef DISABLE_VERSIONED_PATHS
|
||||
RUBY_SITE_LIB "\0"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifndef NO_RUBY_VENDOR_LIB
|
||||
RUBY_VENDOR_LIB2 "\0"
|
||||
@@ -84,8 +92,10 @@ const char ruby_initial_load_paths[] =
|
||||
RUBY_VENDOR_THIN_ARCHLIB "\0"
|
||||
#endif
|
||||
RUBY_VENDOR_ARCHLIB "\0"
|
||||
+#ifndef DISABLE_VERSIONED_PATHS
|
||||
RUBY_VENDOR_LIB "\0"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
RUBY_LIB "\0"
|
||||
#ifdef RUBY_THIN_ARCHLIB
|
||||
--
|
||||
1.7.7.3
|
||||
diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
|
||||
index a3c65bf..0575730 100644
|
||||
--- a/lib/rdoc/ri/paths.rb
|
||||
+++ b/lib/rdoc/ri/paths.rb
|
||||
@@ -11,9 +11,9 @@ module RDoc::RI::Paths
|
||||
version = RbConfig::CONFIG['ruby_version']
|
||||
|
||||
base = if RbConfig::CONFIG.key? 'ridir' then
|
||||
- File.join RbConfig::CONFIG['ridir'], version
|
||||
+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
|
||||
else
|
||||
- File.join RbConfig::CONFIG['datadir'], 'ri', version
|
||||
+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
|
||||
end
|
||||
|
||||
SYSDIR = File.join base, "system"
|
||||
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index cec8c9f..fed14d2 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -379,7 +379,7 @@ end
|
||||
|
||||
install?(:doc, :rdoc) do
|
||||
if $rdocdir
|
||||
- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
|
||||
+ ridatadir = File.join([CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil, "system"].compact)
|
||||
prepare "rdoc", ridatadir
|
||||
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
|
||||
end
|
||||
--
|
||||
1.7.6
|
||||
|
40
ruby-1.9.3-fix-json-parser.patch
Normal file
40
ruby-1.9.3-fix-json-parser.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
|
||||
index d1d14c7..1773616 100644
|
||||
--- a/ext/json/parser/parser.c
|
||||
+++ b/ext/json/parser/parser.c
|
||||
@@ -1293,6 +1293,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
||||
{
|
||||
char *p = string, *pe = string, *unescape;
|
||||
int unescape_len;
|
||||
+ char buf[4];
|
||||
|
||||
while (pe < stringEnd) {
|
||||
if (*pe == '\\') {
|
||||
@@ -1325,7 +1326,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
||||
if (pe > stringEnd - 4) {
|
||||
return Qnil;
|
||||
} else {
|
||||
- char buf[4];
|
||||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||||
pe += 3;
|
||||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
||||
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
|
||||
index e7d47e1..33e775c 100644
|
||||
--- a/ext/json/parser/parser.rl
|
||||
+++ b/ext/json/parser/parser.rl
|
||||
@@ -393,6 +393,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
||||
{
|
||||
char *p = string, *pe = string, *unescape;
|
||||
int unescape_len;
|
||||
+ char buf[4];
|
||||
|
||||
while (pe < stringEnd) {
|
||||
if (*pe == '\\') {
|
||||
@@ -425,7 +426,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
||||
if (pe > stringEnd - 4) {
|
||||
return Qnil;
|
||||
} else {
|
||||
- char buf[4];
|
||||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||||
pe += 3;
|
||||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
12
ruby-1.9.3-fix-s390x-build.patch
Normal file
12
ruby-1.9.3-fix-s390x-build.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb
|
||||
--- ruby-1.9.3-p0/ext/tk/extconf.rb.orig 2011-06-29 16:11:19.000000000 +0200
|
||||
+++ ruby-1.9.3-p0/ext/tk/extconf.rb 2011-10-18 16:15:59.406299659 +0200
|
||||
@@ -114,7 +114,7 @@ def is_macosx?
|
||||
end
|
||||
|
||||
def maybe_64bit?
|
||||
- /64|universal/ =~ RUBY_PLATFORM
|
||||
+ /64|universal|s390x/ =~ RUBY_PLATFORM
|
||||
end
|
||||
|
||||
def check_tcltk_version(version)
|
53
ruby-1.9.3-prevent-optimizing-sp.patch
Normal file
53
ruby-1.9.3-prevent-optimizing-sp.patch
Normal file
@ -0,0 +1,53 @@
|
||||
Index: ChangeLog
|
||||
===================================================================
|
||||
--- ChangeLog (revision 34277)
|
||||
+++ ChangeLog (revision 34278)
|
||||
@@ -1,3 +1,13 @@
|
||||
+Thu Jan 12 13:51:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
+
|
||||
+ * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
|
||||
+ reserving a memory space with ALLOCA_N for restoring machine stack
|
||||
+ stored in cont->machine_stack, but clang optimized out it (and
|
||||
+ maybe #5851 is also caused by this).
|
||||
+ This affected TestContinuation#test_check_localvars.
|
||||
+
|
||||
+ * cont.c (cont_restore_1): revert workaround introduced in r32201.
|
||||
+
|
||||
Mon Oct 10 22:33:12 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* test/-ext-/old_thread_select/test_old_thread_select.rb:
|
||||
Index: cont.c
|
||||
===================================================================
|
||||
--- cont.c (revision 34277)
|
||||
+++ cont.c (revision 34278)
|
||||
@@ -669,10 +669,9 @@
|
||||
}
|
||||
#endif
|
||||
if (cont->machine_stack_src) {
|
||||
- size_t i;
|
||||
FLUSH_REGISTER_WINDOWS;
|
||||
- for (i = 0; i < cont->machine_stack_size; i++)
|
||||
- cont->machine_stack_src[i] = cont->machine_stack[i];
|
||||
+ MEMCPY(cont->machine_stack_src, cont->machine_stack,
|
||||
+ VALUE, cont->machine_stack_size);
|
||||
}
|
||||
|
||||
#ifdef __ia64
|
||||
@@ -742,7 +741,7 @@
|
||||
if (&space[0] > end) {
|
||||
# ifdef HAVE_ALLOCA
|
||||
volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end);
|
||||
- (void)sp;
|
||||
+ space[0] = *sp;
|
||||
# else
|
||||
cont_restore_0(cont, &space[0]);
|
||||
# endif
|
||||
@@ -758,7 +757,7 @@
|
||||
if (&space[STACK_PAD_SIZE] < end) {
|
||||
# ifdef HAVE_ALLOCA
|
||||
volatile VALUE *sp = ALLOCA_N(VALUE, end - &space[STACK_PAD_SIZE]);
|
||||
- (void)sp;
|
||||
+ space[0] = *sp;
|
||||
# else
|
||||
cont_restore_0(cont, &space[STACK_PAD_SIZE-1]);
|
||||
# endif
|
76
ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
Normal file
76
ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
Normal file
@ -0,0 +1,76 @@
|
||||
--- ruby-1.9.3-p0/lib/rubygems/uninstaller.rb.orig 2011-10-31 10:22:36.321579483 +0100
|
||||
+++ ruby-1.9.3-p0/lib/rubygems/uninstaller.rb 2011-10-31 10:34:25.563626119 +0100
|
||||
@@ -51,15 +51,14 @@
|
||||
@bin_dir = options[:bin_dir]
|
||||
@format_executable = options[:format_executable]
|
||||
|
||||
+ if options[:force]
|
||||
+ @force_all = true
|
||||
+ @force_ignore = true
|
||||
+ end
|
||||
+
|
||||
# only add user directory if install_dir is not set
|
||||
@user_install = false
|
||||
@user_install = options[:user_install] unless options[:install_dir]
|
||||
-
|
||||
- if @user_install then
|
||||
- Gem.use_paths Gem.user_dir, @gem_home
|
||||
- else
|
||||
- Gem.use_paths @gem_home
|
||||
- end
|
||||
end
|
||||
|
||||
##
|
||||
@@ -69,10 +68,24 @@
|
||||
def uninstall
|
||||
list = Gem::Specification.find_all_by_name(@gem, @version)
|
||||
|
||||
+ list, other_repo_specs = list.partition do |spec|
|
||||
+ @gem_home == spec.base_dir or
|
||||
+ (@user_install and spec.base_dir == Gem.user_dir)
|
||||
+ end
|
||||
+
|
||||
if list.empty? then
|
||||
- raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
|
||||
+ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if
|
||||
+ other_repo_specs.empty?
|
||||
+
|
||||
+ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq
|
||||
+
|
||||
+ message = ["#{@gem} is not installed in GEM_HOME, try:"]
|
||||
+ message.concat other_repos.map { |repo|
|
||||
+ "\tgem uninstall -i #{repo} #{@gem}"
|
||||
+ }
|
||||
|
||||
- elsif list.size > 1 and @force_all then
|
||||
+ raise Gem::InstallError, message.join("\n")
|
||||
+ elsif @force_all then
|
||||
remove_all list
|
||||
|
||||
elsif list.size > 1 then
|
||||
@@ -250,12 +263,10 @@
|
||||
msg << "\t#{spec.full_name}"
|
||||
|
||||
spec.dependent_gems.each do |dep_spec, dep, satlist|
|
||||
- msg <<
|
||||
- ("#{dep_spec.name}-#{dep_spec.version} depends on " +
|
||||
- "[#{dep.name} (#{dep.requirement})]")
|
||||
+ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}"
|
||||
end
|
||||
|
||||
- msg << 'If you remove this gems, one or more dependencies will not be met.'
|
||||
+ msg << 'If you remove this gem, one or more dependencies will not be met.'
|
||||
msg << 'Continue with Uninstall?'
|
||||
return ask_yes_no(msg.join("\n"), true)
|
||||
end
|
||||
|
||||
--- ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb.orig 2011-11-03 08:58:31.411272176 +0100
|
||||
+++ ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb 2011-11-03 08:58:43.010272351 +0100
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
uninstaller = Gem::Uninstaller.new('a')
|
||||
|
||||
- use_ui Gem::MockGemUi.new("2\n") do
|
||||
+ use_ui Gem::MockGemUi.new("2\ny\n") do
|
||||
uninstaller.uninstall
|
||||
end
|
24
ruby-1.9.3-webrick-test-fix.patch
Normal file
24
ruby-1.9.3-webrick-test-fix.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb
|
||||
index 1185316..0ef1b37 100644
|
||||
--- a/test/webrick/test_cgi.rb
|
||||
+++ b/test/webrick/test_cgi.rb
|
||||
@@ -14,6 +14,7 @@ class TestWEBrickCGI < Test::Unit::TestCase
|
||||
def req.meta_vars
|
||||
meta = super
|
||||
meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
|
||||
+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
|
||||
return meta
|
||||
end
|
||||
},
|
||||
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
|
||||
index bcdb3df..f78ba5c 100644
|
||||
--- a/test/webrick/test_filehandler.rb
|
||||
+++ b/test/webrick/test_filehandler.rb
|
||||
@@ -252,6 +252,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
|
||||
def req.meta_vars
|
||||
meta = super
|
||||
meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR)
|
||||
+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']]
|
||||
return meta
|
||||
end
|
||||
},
|
296
rubygems-1.8.11-binary-extensions.patch
Normal file
296
rubygems-1.8.11-binary-extensions.patch
Normal file
@ -0,0 +1,296 @@
|
||||
From 5a37a3489491a33f2e7011043fbbcd9a765e1777 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/6] Add dedicate extensions folder into $LOAD_PATH.
|
||||
|
||||
---
|
||||
lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++-------
|
||||
1 files changed, 30 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index 97db19e..263e7d3 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -843,6 +843,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
|
||||
|
||||
@@ -954,16 +960,16 @@ class Gem::Specification
|
||||
|
||||
def contains_requirable_file? file
|
||||
root = full_gem_path
|
||||
+ ext = ext_dir
|
||||
+
|
||||
+ require_paths.any? do |lib|
|
||||
+ base = ["#{root}/#{lib}/#{file}"]
|
||||
+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty?
|
||||
|
||||
- require_paths.each do |lib|
|
||||
- base = "#{root}/#{lib}/#{file}"
|
||||
- Gem.suffixes.each do |suf|
|
||||
- path = "#{base}#{suf}"
|
||||
- return true if File.file? path
|
||||
+ base.any? do |path|
|
||||
+ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" }
|
||||
end
|
||||
end
|
||||
-
|
||||
- return false
|
||||
end
|
||||
|
||||
##
|
||||
@@ -1273,6 +1279,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")
|
||||
+ end
|
||||
+
|
||||
+ ##
|
||||
# Deprecated and ignored, defaults to true.
|
||||
#
|
||||
# Formerly used to indicate this gem was RDoc-capable.
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
||||
From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 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/6] 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 74d803d..0063c7f 100644
|
||||
--- a/lib/rubygems/installer.rb
|
||||
+++ b/lib/rubygems/installer.rb
|
||||
@@ -499,7 +499,7 @@ TEXT
|
||||
def build_extensions
|
||||
return if spec.extensions.empty?
|
||||
say "Building native extensions. This could take a while..."
|
||||
- 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 263e7d3..d31b93b 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -1283,16 +1283,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.7.7.3
|
||||
|
||||
|
||||
From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 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/6] Simplify the extending of $LOAD_PATH for binary gems.
|
||||
|
||||
---
|
||||
lib/rubygems/specification.rb | 11 +++++------
|
||||
1 files changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index d31b93b..e65ea2d 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -843,11 +843,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
|
||||
- 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
|
||||
@@ -1291,7 +1287,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
|
||||
end
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
||||
From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 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/6] 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 0063c7f..83b8fd5 100644
|
||||
--- a/lib/rubygems/installer.rb
|
||||
+++ b/lib/rubygems/installer.rb
|
||||
@@ -499,7 +499,7 @@ TEXT
|
||||
def build_extensions
|
||||
return if spec.extensions.empty?
|
||||
say "Building native extensions. This could take a while..."
|
||||
- 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 e65ea2d..8be2ade 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -843,7 +843,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
|
||||
@@ -1279,7 +1279,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
|
||||
end
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
||||
From 6229583633802b45e5a3e5689ab9077347cd9ef7 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/6] Remove binary extensions during uninstall.
|
||||
|
||||
---
|
||||
lib/rubygems/uninstaller.rb | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
|
||||
index cc32ea4..94d78e0 100644
|
||||
--- a/lib/rubygems/uninstaller.rb
|
||||
+++ b/lib/rubygems/uninstaller.rb
|
||||
@@ -213,6 +213,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.7.7.3
|
||||
|
||||
|
||||
From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 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/6] 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 20b4198..6d8711f 100644
|
||||
--- a/lib/rubygems/defaults.rb
|
||||
+++ b/lib/rubygems/defaults.rb
|
||||
@@ -87,6 +87,17 @@ module Gem
|
||||
end
|
||||
|
||||
##
|
||||
+ # Returns binary extensions dir for specified RubyGems base dir or nil
|
||||
+ # if such directory cannot be determined.
|
||||
+ #
|
||||
+ # By default, the binary extensions are located side by side with their
|
||||
+ # Ruby counterparts, therefore nil is returned
|
||||
+
|
||||
+ def self.default_ext_dir_for base_dir
|
||||
+ nil
|
||||
+ end
|
||||
+
|
||||
+ ##
|
||||
# The default system-wide source info cache directory
|
||||
|
||||
def self.default_system_source_cache_dir
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index 8be2ade..f54210a 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -1287,10 +1287,7 @@ class Gem::Specification
|
||||
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
|
Loading…
Reference in New Issue
Block a user