2013-02-14 14:26:28 +00:00
|
|
|
From 1e109d1a0265dfdde2324a6a97e4225eb4343efc Mon Sep 17 00:00:00 2001
|
2013-02-08 23:54:37 +00:00
|
|
|
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(+)
|
|
|
|
|
|
|
|
diff --git a/configure.in b/configure.in
|
2013-02-14 14:26:28 +00:00
|
|
|
index e83cfb4..d6af000 100644
|
2013-02-08 23:54:37 +00:00
|
|
|
--- a/configure.in
|
|
|
|
+++ b/configure.in
|
2013-02-14 14:26:28 +00:00
|
|
|
@@ -3308,6 +3308,9 @@ shvar_to_cpp RIDIR "${ridir}"
|
2013-02-08 23:54:37 +00:00
|
|
|
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
|
2013-02-14 14:26:28 +00:00
|
|
|
index 6ba6453..c78f609 100644
|
2013-02-08 23:54:37 +00:00
|
|
|
--- a/version.c
|
|
|
|
+++ b/version.c
|
|
|
|
@@ -39,9 +39,15 @@
|
|
|
|
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#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
|
|
|
|
#endif
|
2013-02-14 14:26:28 +00:00
|
|
|
@@ -79,8 +85,10 @@ const char ruby_initial_load_paths[] =
|
2013-02-08 23:54:37 +00:00
|
|
|
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"
|
|
|
|
#endif
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#ifndef NO_RUBY_VENDOR_LIB
|
|
|
|
RUBY_VENDOR_LIB2 "\0"
|
2013-02-14 14:26:28 +00:00
|
|
|
@@ -88,8 +96,10 @@ const char ruby_initial_load_paths[] =
|
2013-02-08 23:54:37 +00:00
|
|
|
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
|
|
|
|
--
|
2013-02-14 14:26:28 +00:00
|
|
|
1.8.1.2
|
2013-02-08 23:54:37 +00:00
|
|
|
|