|
|
|
@ -12,15 +12,15 @@ ruby_version_dir_name now specifies custom version string for versioned
|
|
|
|
|
directories, e.g. instead of default X.Y.Z, you can specify whatever
|
|
|
|
|
string.
|
|
|
|
|
---
|
|
|
|
|
configure.ac | 64 ++++++++++++++++++++++++---------------------
|
|
|
|
|
configure.ac | 66 ++++++++++++++++++++++++---------------------
|
|
|
|
|
template/ruby.pc.in | 1 +
|
|
|
|
|
2 files changed, 35 insertions(+), 30 deletions(-)
|
|
|
|
|
2 files changed, 36 insertions(+), 31 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
|
index 80b137e380..63cd3b4f8b 100644
|
|
|
|
|
--- a/configure.ac
|
|
|
|
|
+++ b/configure.ac
|
|
|
|
|
@@ -3832,9 +3832,6 @@ AS_CASE(["$target_os"],
|
|
|
|
|
@@ -4146,9 +4146,6 @@ AS_CASE(["$target_os"],
|
|
|
|
|
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|
|
|
|
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
|
|
|
|
AC_ARG_WITH(rubyarchprefix,
|
|
|
|
|
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
|
|
|
|
@@ -3857,56 +3854,62 @@ AC_ARG_WITH(ridir,
|
|
|
|
|
@@ -4171,57 +4168,63 @@ AC_ARG_WITH(ridir,
|
|
|
|
|
AC_SUBST(ridir)
|
|
|
|
|
AC_SUBST(RI_BASE_NAME)
|
|
|
|
|
|
|
|
|
@ -46,6 +46,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|
|
|
|
-AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [
|
|
|
|
|
- {
|
|
|
|
|
- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
|
|
|
|
|
- echo '@%:@include "confdefs.h"'
|
|
|
|
|
- echo '#define STRINGIZE(x) x'
|
|
|
|
|
- test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
|
|
|
|
|
- echo '#include "version.h"'
|
|
|
|
@ -61,6 +62,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|
|
|
|
+RUBY_LIB_VERSION_STYLE='3 /* full */'
|
|
|
|
|
+{
|
|
|
|
|
+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
|
|
|
|
|
+echo '@%:@include "confdefs.h"'
|
|
|
|
|
+echo '#define STRINGIZE(x) x'
|
|
|
|
|
+test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
|
|
|
|
|
+echo '#include "version.h"'
|
|
|
|
@ -120,7 +122,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|
|
|
|
|
|
|
|
|
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
|
|
|
|
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
|
|
|
|
@@ -3923,6 +3926,7 @@ AC_SUBST(sitearchincludedir)dnl
|
|
|
|
|
@@ -4238,6 +4241,7 @@ AC_SUBST(sitearchincludedir)dnl
|
|
|
|
|
AC_SUBST(arch)dnl
|
|
|
|
|
AC_SUBST(sitearch)dnl
|
|
|
|
|
AC_SUBST(ruby_version)dnl
|
|
|
|
@ -132,16 +134,14 @@ diff --git a/template/ruby.pc.in b/template/ruby.pc.in
|
|
|
|
|
index 8a2c066..c81b211 100644
|
|
|
|
|
--- a/template/ruby.pc.in
|
|
|
|
|
+++ b/template/ruby.pc.in
|
|
|
|
|
@@ -9,6 +9,7 @@ MAJOR=@MAJOR@
|
|
|
|
|
@@ -2,6 +2,7 @@ MAJOR=@MAJOR@
|
|
|
|
|
MINOR=@MINOR@
|
|
|
|
|
TEENY=@TEENY@
|
|
|
|
|
ruby_version=@ruby_version@
|
|
|
|
|
+ruby_version_dir_name=@ruby_version_dir_name@
|
|
|
|
|
RUBY_API_VERSION=@RUBY_API_VERSION@
|
|
|
|
|
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
|
|
|
|
|
RUBY_BASE_NAME=@RUBY_BASE_NAME@
|
|
|
|
|
--
|
|
|
|
|
2.1.0
|
|
|
|
|
arch=@arch@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001
|
|
|
|
@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
|
|
|
|
index d4c110e..d39c9a6 100755
|
|
|
|
|
--- a/tool/rbinstall.rb
|
|
|
|
|
+++ b/tool/rbinstall.rb
|
|
|
|
|
@@ -439,7 +439,7 @@ def CONFIG.[](name, mandatory = false)
|
|
|
|
|
@@ -453,7 +453,7 @@ def CONFIG.[](name, mandatory = false)
|
|
|
|
|
|
|
|
|
|
install?(:doc, :rdoc) do
|
|
|
|
|
if $rdocdir
|
|
|
|
@ -180,9 +180,6 @@ index d4c110e..d39c9a6 100755
|
|
|
|
|
prepare "rdoc", ridatadir
|
|
|
|
|
install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode)
|
|
|
|
|
end
|
|
|
|
|
--
|
|
|
|
|
2.23.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
From 9f0ec0233f618cbb862629816b22491c3df79578 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
|
|
|
@ -190,46 +187,39 @@ Date: Tue, 31 Mar 2015 16:37:44 +0200
|
|
|
|
|
Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
lib/rubygems/defaults.rb | 9 +++++----
|
|
|
|
|
lib/rubygems/defaults.rb | 7 ++++---
|
|
|
|
|
test/rubygems/test_gem.rb | 5 +++--
|
|
|
|
|
2 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
|
2 files changed, 7 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
|
|
|
|
|
index d4ff4a262c..3f9a5bf590 100644
|
|
|
|
|
--- a/lib/rubygems/defaults.rb
|
|
|
|
|
+++ b/lib/rubygems/defaults.rb
|
|
|
|
|
@@ -38,13 +38,13 @@ def self.default_dir
|
|
|
|
|
[
|
|
|
|
|
File.dirname(RbConfig::CONFIG['sitedir']),
|
|
|
|
|
'Gems',
|
|
|
|
|
- RbConfig::CONFIG['ruby_version'],
|
|
|
|
|
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
]
|
|
|
|
|
else
|
|
|
|
|
[
|
|
|
|
|
RbConfig::CONFIG['rubylibprefix'],
|
|
|
|
|
'gems',
|
|
|
|
|
- RbConfig::CONFIG['ruby_version'],
|
|
|
|
|
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
]
|
|
|
|
|
end
|
|
|
|
|
@@ -34,7 +34,7 @@ def self.default_spec_cache_dir
|
|
|
|
|
# specified in the environment
|
|
|
|
|
|
|
|
|
|
def self.default_dir
|
|
|
|
|
- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"])
|
|
|
|
|
+ @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"])
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@@ -117,7 +117,8 @@ def self.user_dir
|
|
|
|
|
##
|
|
|
|
|
@@ -103,7 +103,8 @@ def self.user_dir
|
|
|
|
|
gem_dir = File.join(Gem.user_home, ".gem")
|
|
|
|
|
gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir)
|
|
|
|
|
parts = [gem_dir, ruby_engine]
|
|
|
|
|
- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
|
|
|
|
|
+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
- parts << RbConfig::CONFIG["ruby_version"] unless RbConfig::CONFIG["ruby_version"].empty?
|
|
|
|
|
+ ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
+ parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
|
|
|
|
|
File.join parts
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@@ -252,7 +253,7 @@ def self.vendor_dir # :nodoc:
|
|
|
|
|
return nil unless RbConfig::CONFIG.key? 'vendordir'
|
|
|
|
|
@@ -248,7 +249,7 @@ def self.vendor_dir # :nodoc:
|
|
|
|
|
return nil unless RbConfig::CONFIG.key? "vendordir"
|
|
|
|
|
|
|
|
|
|
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
|
|
|
|
- RbConfig::CONFIG['ruby_version']
|
|
|
|
|
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
File.join RbConfig::CONFIG["vendordir"], "gems",
|
|
|
|
|
- RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
+ RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
@ -237,27 +227,25 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
|
|
|
|
|
index b25068405d..e9fef4a311 100644
|
|
|
|
|
--- a/test/rubygems/test_gem.rb
|
|
|
|
|
+++ b/test/rubygems/test_gem.rb
|
|
|
|
|
@@ -1440,7 +1440,8 @@ def test_self_use_paths
|
|
|
|
|
@@ -1337,7 +1337,8 @@ def test_self_use_paths
|
|
|
|
|
|
|
|
|
|
def test_self_user_dir
|
|
|
|
|
parts = [@userhome, '.gem', Gem.ruby_engine]
|
|
|
|
|
- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
|
|
|
|
|
+ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
parts = [@userhome, ".gem", Gem.ruby_engine]
|
|
|
|
|
- parts << RbConfig::CONFIG["ruby_version"] unless RbConfig::CONFIG["ruby_version"].empty?
|
|
|
|
|
+ ruby_version_dir_name = RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
+ parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
|
|
|
|
|
|
|
|
|
|
FileUtils.mkdir_p File.join(parts)
|
|
|
|
|
|
|
|
|
|
@@ -1516,7 +1517,7 @@ def test_self_vendor_dir
|
|
|
|
|
vendordir(File.join(@tempdir, 'vendor')) do
|
|
|
|
|
@@ -1413,7 +1414,7 @@ def test_self_vendor_dir
|
|
|
|
|
vendordir(File.join(@tempdir, "vendor")) do
|
|
|
|
|
expected =
|
|
|
|
|
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
|
|
|
|
- RbConfig::CONFIG['ruby_version']
|
|
|
|
|
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
|
|
|
|
File.join RbConfig::CONFIG["vendordir"], "gems",
|
|
|
|
|
- RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
+ RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]
|
|
|
|
|
|
|
|
|
|
assert_equal expected, Gem.vendor_dir
|
|
|
|
|
end
|
|
|
|
|
--
|
|
|
|
|
2.1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001
|
|
|
|
@ -274,7 +262,7 @@ diff --git a/configure.ac b/configure.ac
|
|
|
|
|
index a00f2b6776..999e2d6d5d 100644
|
|
|
|
|
--- a/configure.ac
|
|
|
|
|
+++ b/configure.ac
|
|
|
|
|
@@ -107,7 +107,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
|
|
|
|
|
@@ -124,7 +124,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
|
|
|
|
|
RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
|
|
|
|
|
AC_SUBST(RUBY_BASE_NAME)
|
|
|
|
|
AC_SUBST(RUBYW_BASE_NAME)
|
|
|
|
@ -283,6 +271,3 @@ index a00f2b6776..999e2d6d5d 100644
|
|
|
|
|
|
|
|
|
|
dnl checks for alternative programs
|
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
|
--
|
|
|
|
|
2.1.0
|
|
|
|
|
|
|
|
|
|