Feature #5231 » 0001-Allow-to-disable-versioned-paths.patch
configure.in | ||
---|---|---|
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"
|
tool/mkconfig.rb | ||
---|---|---|
vars = {}
|
||
continued_name = nil
|
||
continued_line = nil
|
||
path_version = "/$(ruby_version)"
|
||
File.foreach "config.status" do |line|
|
||
next if /^#/ =~ line
|
||
name = nil
|
||
... | ... | |
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/
|
||
... | ... | |
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
|
version.c | ||
---|---|---|
#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
|
||
... | ... | |
RUBY_SEARCH_PATH "\0"
|
||
#endif
|
||
#ifndef NO_RUBY_SITE_LIB
|
||
#ifndef DISABLE_VERSIONED_PATHS
|
||
RUBY_SITE_LIB2 "\0"
|
||
#endif
|
||
#ifdef RUBY_SITE_THIN_ARCHLIB
|
||
RUBY_SITE_THIN_ARCHLIB "\0"
|
||
#endif
|
||
... | ... | |
#endif
|
||
#ifndef NO_RUBY_VENDOR_LIB
|
||
#ifndef DISABLE_VERSIONED_PATHS
|
||
RUBY_VENDOR_LIB2 "\0"
|
||
#endif
|
||
#ifdef RUBY_VENDOR_THIN_ARCHLIB
|
||
RUBY_VENDOR_THIN_ARCHLIB "\0"
|
||
#endif
|