]> git.pld-linux.org Git - packages/ruby.git/blame - duplicated-paths.patch
- unconditional noarch subpackages
[packages/ruby.git] / duplicated-paths.patch
CommitLineData
1a83bc11 1From e24d97c938c481450ed80ec83e5399595946c1ae Mon Sep 17 00:00:00 2001
c0484a8d
ER
2From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3Date: Fri, 8 Feb 2013 22:48:41 +0100
4Subject: [PATCH] Prevent duplicated paths when empty version string is
5 configured.
6
7---
2798ed3c 8 configure.ac | 3 ++-
1a83bc11
ER
9 loadpath.c | 12 ++++++++++++
10 tool/mkconfig.rb | 2 +-
6b9c4b92 11 3 files changed, 15 insertions(+), 2 deletions(-)
c0484a8d 12
2798ed3c 13diff --git a/configure.ac b/configure.ac
14index 999e2d6d5d..11fc237552 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -3710,7 +3710,8 @@ AS_CASE(["$ruby_version_dir_name"],
6b9c4b92 18 ruby_version_dir=/'${ruby_version_dir_name}'
1a83bc11 19
6b9c4b92 20 if test -z "${ruby_version_dir_name}"; then
1a83bc11 21- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
6b9c4b92 22+ unset ruby_version_dir
1a83bc11 23+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
c0484a8d 24 fi
1a83bc11 25
6b9c4b92 26 rubylibdir='${rubylibprefix}'${ruby_version_dir}
1a83bc11
ER
27diff --git a/loadpath.c b/loadpath.c
28index 9160031..0d4d953 100644
29--- a/loadpath.c
30+++ b/loadpath.c
2798ed3c 31@@ -65,21 +65,33 @@ const char ruby_initial_load_paths[] =
1a83bc11
ER
32 RUBY_SEARCH_PATH "\0"
33 #endif
34 #ifndef NO_RUBY_SITE_LIB
c0484a8d 35+#ifdef RUBY_LIB_VERSION_BLANK
1a83bc11 36+ RUBY_SITE_LIB "\0"
c0484a8d 37+#else
1a83bc11 38 RUBY_SITE_LIB2 "\0"
c0484a8d 39+#endif
1a83bc11 40 #ifdef RUBY_THINARCH
c0484a8d
ER
41 RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
42 #endif
43 RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
44+#ifndef RUBY_LIB_VERSION_BLANK
45 RUBY_SITE_LIB "\0"
46 #endif
47+#endif
48
49 #ifndef NO_RUBY_VENDOR_LIB
1a83bc11
ER
50+#ifdef RUBY_LIB_VERSION_BLANK
51+ RUBY_VENDOR_LIB "\0"
52+#else
c0484a8d 53 RUBY_VENDOR_LIB2 "\0"
1a83bc11
ER
54+#endif
55 #ifdef RUBY_THINARCH
c0484a8d
ER
56 RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
57 #endif
58 RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
59+#ifndef RUBY_LIB_VERSION_BLANK
60 RUBY_VENDOR_LIB "\0"
c0484a8d 61+#endif
2798ed3c 62 #endif
c0484a8d
ER
63
64 RUBY_LIB "\0"
1a83bc11
ER
65diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
66index 07076d4..35e6c3c 100755
67--- a/tool/mkconfig.rb
68+++ b/tool/mkconfig.rb
2798ed3c 69@@ -114,7 +114,7 @@
1a83bc11
ER
70 val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
71 case name
72 when /^prefix$/
73- val = "(TOPDIR || DESTDIR + #{val})"
74+ val = "(((TOPDIR && TOPDIR.empty?) ? nil : TOPDIR) || DESTDIR + #{val})"
75 when /^ARCH_FLAG$/
76 val = "arch_flag || #{val}" if universal
77 when /^UNIVERSAL_ARCHNAMES$/
c0484a8d 78--
1a83bc11 791.9.0
c0484a8d 80
This page took 0.044304 seconds and 4 git commands to generate.