185 lines
6.4 KiB
Diff
185 lines
6.4 KiB
Diff
|
Index: configure.in
|
||
|
===================================================================
|
||
|
--- configure.in.orig
|
||
|
+++ configure.in
|
||
|
@@ -1533,9 +1533,28 @@
|
||
|
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}\"`"
|
||
|
+case "$target_os" in
|
||
|
+ cygwin*|mingw*|*djgpp*|os2_emx*)
|
||
|
+ RUBY_VENDOR_LIB_PATH="`expr "$VENDOR_DIR" : "$prefix\(/.*\)"`" ||
|
||
|
+ RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
|
||
|
+ *)
|
||
|
+ RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
|
||
|
+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(vendorarch)dnl
|
||
|
AC_SUBST(sitedir)dnl
|
||
|
+AC_SUBST(vendordir)dnl
|
||
|
|
||
|
configure_args=$ac_configure_args
|
||
|
AC_SUBST(configure_args)dnl
|
||
|
@@ -1548,6 +1567,8 @@
|
||
|
|
||
|
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
|
||
|
"${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||
|
+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
|
||
|
+ "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||
|
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
|
||
|
else
|
||
|
arch="${target_cpu}-${target_os}"
|
||
|
@@ -1555,12 +1576,15 @@
|
||
|
fi
|
||
|
|
||
|
case "$target_os" in
|
||
|
- mingw*) sitearch="i386-$rb_cv_msvcrt" ;;
|
||
|
- *) sitearch="${arch}" ;;
|
||
|
+ mingw*) sitearch="i386-$rb_cv_msvcrt"
|
||
|
+ vendorarch="i386-$rb_cv_msvcrt" ;;
|
||
|
+ *) sitearch="${arch}"
|
||
|
+ vendorarch="${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}/${vendorarch}")
|
||
|
|
||
|
AC_ARG_WITH(search-path,
|
||
|
[ --with-search-path=DIR specify the additional search path],
|
||
|
Index: instruby.rb
|
||
|
===================================================================
|
||
|
--- instruby.rb.orig
|
||
|
+++ instruby.rb
|
||
|
@@ -99,6 +99,8 @@
|
||
|
archlibdir = with_destdir(CONFIG["archdir"])
|
||
|
sitelibdir = with_destdir(CONFIG["sitelibdir"])
|
||
|
sitearchlibdir = with_destdir(CONFIG["sitearchdir"])
|
||
|
+vendorlibdir = with_destdir(CONFIG["vendorlibdir"])
|
||
|
+vendorarchlibdir = with_destdir(CONFIG["vendorarchdir"])
|
||
|
mandir = with_destdir(File.join(CONFIG["mandir"], "man"))
|
||
|
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||
|
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||
|
@@ -106,7 +108,7 @@
|
||
|
lib = CONFIG["LIBRUBY"]
|
||
|
arc = CONFIG["LIBRUBY_A"]
|
||
|
|
||
|
-makedirs [bindir, libdir, rubylibdir, archlibdir, sitelibdir, sitearchlibdir]
|
||
|
+makedirs [bindir, libdir, rubylibdir, archlibdir, sitelibdir, sitearchlibdir, vendorlibdir, vendorarchlibdir]
|
||
|
|
||
|
install?(:bin) do
|
||
|
ruby_bin = File.join(bindir, ruby_install_name)
|
||
|
Index: Makefile.in
|
||
|
===================================================================
|
||
|
--- Makefile.in.orig
|
||
|
+++ Makefile.in
|
||
|
@@ -23,6 +23,8 @@
|
||
|
arch = @arch@
|
||
|
sitearch = @sitearch@
|
||
|
sitedir = @sitedir@
|
||
|
+vendorarch = @vendorarch@
|
||
|
+vendordir = @vendordir@
|
||
|
|
||
|
TESTUI = console
|
||
|
TESTS =
|
||
|
Index: mkconfig.rb
|
||
|
===================================================================
|
||
|
--- mkconfig.rb.orig
|
||
|
+++ mkconfig.rb
|
||
|
@@ -112,6 +112,14 @@
|
||
|
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
||
|
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
||
|
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
||
|
+ CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
|
||
|
+ CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(vendorarch)"
|
||
|
+ if defined?(VENDOR_SPECIFIC) && VENDOR_SPECIFIC
|
||
|
+ CONFIG["sitearch"] = CONFIG["vendorarch"]
|
||
|
+ CONFIG["sitedir"] = CONFIG["vendordir"]
|
||
|
+ CONFIG["sitelibdir"] = CONFIG["vendorlibdir"]
|
||
|
+ CONFIG["sitearchdir"] = CONFIG["vendorarchdir"]
|
||
|
+ end
|
||
|
CONFIG["topdir"] = File.dirname(__FILE__)
|
||
|
MAKEFILE_CONFIG = {}
|
||
|
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
||
|
Index: lib/mkmf.rb
|
||
|
===================================================================
|
||
|
--- lib/mkmf.rb.orig
|
||
|
+++ lib/mkmf.rb
|
||
|
@@ -51,6 +51,9 @@
|
||
|
$sitedir = CONFIG["sitedir"]
|
||
|
$sitelibdir = CONFIG["sitelibdir"]
|
||
|
$sitearchdir = CONFIG["sitearchdir"]
|
||
|
+$vendordir = CONFIG["vendordir"]
|
||
|
+$vendorlibdir = CONFIG["vendorlibdir"]
|
||
|
+$vendorarchdir = CONFIG["vendorarchdir"]
|
||
|
|
||
|
$mswin = /mswin/ =~ RUBY_PLATFORM
|
||
|
$bccwin = /bccwin/ =~ RUBY_PLATFORM
|
||
|
@@ -410,7 +413,7 @@
|
||
|
|
||
|
def try_func(func, libs, headers = nil, &b)
|
||
|
headers = cpp_include(headers)
|
||
|
- try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b)
|
||
|
+ try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b) or try_link(<<"SRC", libs, &b)
|
||
|
#{headers}
|
||
|
/*top*/
|
||
|
int main() { return 0; }
|
||
|
@@ -422,6 +425,11 @@
|
||
|
int main() { return 0; }
|
||
|
int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
|
||
|
SRC
|
||
|
+int #{func}();
|
||
|
+/*top*/
|
||
|
+int main() { return 0; }
|
||
|
+int t() { #{func}(); return 0; }
|
||
|
+SRC
|
||
|
end
|
||
|
|
||
|
def try_var(var, headers = nil, &b)
|
||
|
@@ -1080,6 +1088,7 @@
|
||
|
RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
|
||
|
arch = #{CONFIG['arch']}
|
||
|
sitearch = #{CONFIG['sitearch']}
|
||
|
+vendorarch = #{CONFIG['vendorarch']}
|
||
|
ruby_version = #{Config::CONFIG['ruby_version']}
|
||
|
ruby = #{$ruby}
|
||
|
RUBY = $(ruby#{sep})
|
||
|
@@ -1400,7 +1409,7 @@
|
||
|
$CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
|
||
|
$ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
|
||
|
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
||
|
- $LDFLAGS = (with_config("ldflags") || "").dup
|
||
|
+ $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup
|
||
|
$INCFLAGS = "-I$(topdir) -I$(hdrdir) -I$(srcdir)"
|
||
|
$DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
|
||
|
$LIBEXT = config['LIBEXT'].dup
|
||
|
Index: ruby.c
|
||
|
===================================================================
|
||
|
--- ruby.c.orig
|
||
|
+++ ruby.c
|
||
|
@@ -298,6 +298,13 @@
|
||
|
ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
|
||
|
ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
|
||
|
|
||
|
+ ruby_incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
|
||
|
+#ifdef RUBY_VENDOR_THIN_ARCHLIB
|
||
|
+ ruby_incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
|
||
|
+#endif
|
||
|
+ ruby_incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
|
||
|
+ ruby_incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
|
||
|
+
|
||
|
ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
|
||
|
#ifdef RUBY_THIN_ARCHLIB
|
||
|
ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
|