/[packages]/cauldron/ruby/pristine/SOURCES/ruby-1.9.3-added-site-and-vendor-arch-flags.patch
ViewVC logotype

Contents of /cauldron/ruby/pristine/SOURCES/ruby-1.9.3-added-site-and-vendor-arch-flags.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 391156 - (show annotations) (download)
Tue Jan 22 21:38:55 2013 UTC (7 years, 11 months ago) by schedbot
File size: 7268 byte(s)
Copying release 1.9.3.p374-2.mga3 to pristine/ directory.
1 From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3 Date: Mon, 5 Sep 2011 13:10:47 +0200
4 Subject: [PATCH] Added configuration flags for site and vendor architecture
5 specific directories.
6
7 ---
8 Makefile.in | 3 +++
9 configure.in | 40 ++++++++++++++++++++++++++++++++++++++++
10 tool/mkconfig.rb | 8 ++++++--
11 version.c | 4 ++++
12 4 files changed, 53 insertions(+), 2 deletions(-)
13
14 diff --git a/Makefile.in b/Makefile.in
15 index bcdaf5f..f57e4c4 100644
16 --- a/Makefile.in
17 +++ b/Makefile.in
18 @@ -34,6 +34,9 @@ datadir = @datadir@
19 archdir = @archdir@
20 sitearch = @sitearch@
21 sitedir = @sitedir@
22 +sitearchdir= @sitearchdir@
23 +vendordir = @vendordir@
24 +vendorarchdir = @vendorarchdir@
25 ruby_version = @ruby_version@
26
27 TESTUI = console
28 diff --git a/configure.in b/configure.in
29 index 83e5d76..31532bd 100644
30 --- a/configure.in
31 +++ b/configure.in
32 @@ -2811,6 +2811,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
33 dir="${SITE_DIR}"
34 done
35
36 +AC_ARG_WITH(sitearchdir,
37 + AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
38 + [sitearchdir=$withval],
39 + [sitearchdir='${rubylibprefix}/site_ruby/${arch}'])
40 +dir="${sitearchdir}"
41 +until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do
42 + dir="${SITEARCH_DIR}"
43 +done
44 +
45 AC_ARG_WITH(vendordir,
46 AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
47 [vendordir=$withval],
48 @@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
49 dir="${VENDOR_DIR}"
50 done
51
52 +AC_ARG_WITH(vendorarchdir,
53 + AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
54 + [vendorarchdir=$withval],
55 + [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}'])
56 +dir="${vendorarchdir}"
57 +until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do
58 + dir="${VENDORARCH_DIR}"
59 +done
60 +
61 if test "${LOAD_RELATIVE+set}"; then
62 AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
63 RUBY_EXEC_PREFIX=""
64 RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
65 RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
66 RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
67 + RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
68 RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
69 + RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
70 else
71 RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
72 RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
73 RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
74 RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
75 + RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
76 RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
77 + RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
78 fi
79
80 pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
81 @@ -2850,6 +2872,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
82 [
83 RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
84 ])
85 +AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"],
86 + ["$RUBY_LIB_PREFIX/"*], [
87 + RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"'
88 + ],
89 + [
90 + RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\""
91 + ])
92 AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
93 ["$RUBY_LIB_PREFIX/"*], [
94 RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
95 @@ -2857,6 +2886,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
96 [
97 RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
98 ])
99 +AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"],
100 + ["$RUBY_LIB_PREFIX/"*], [
101 + RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"'
102 + ],
103 + [
104 + RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\""
105 + ])
106 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
107 AS_CASE(["$RUBY_LIB_PREFIX"],
108 ["$RUBY_EXEC_PREFIX/"*], [
109 @@ -2878,19 +2914,23 @@ if test "x$SITE_DIR" = xno; then
110 AC_DEFINE(NO_RUBY_SITE_LIB)
111 else
112 AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH})
113 + AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH})
114 fi
115 if test "x$VENDOR_DIR" = xno; then
116 AC_DEFINE(NO_RUBY_VENDOR_LIB)
117 else
118 AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH})
119 + AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH})
120 fi
121
122 AC_SUBST(arch)dnl
123 AC_SUBST(sitearch)dnl
124 AC_SUBST(ruby_version)dnl
125 AC_SUBST(archdir)dnl
126 AC_SUBST(sitedir)dnl
127 +AC_SUBST(sitearchdir)dnl
128 AC_SUBST(vendordir)dnl
129 +AC_SUBST(vendorarchdir)dnl
130
131 configure_args=$ac_configure_args
132 AC_SUBST(configure_args)dnl
133 diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
134 index b707c4b..6230720 100755
135 --- a/tool/mkconfig.rb
136 +++ b/tool/mkconfig.rb
137 @@ -44,6 +44,8 @@ v_others = []
138 continued_line = nil
139 path_version = "/$(ruby_version)"
140 archdir_override = "$(vendorlibdir)/$(sitearch)"
141 +sitearchdir_override = "$(sitelibdir)/$(sitearch)"
142 +vendorarchdir_override = "$(vendorlibdir)/$(sitearch)"
143 File.foreach "config.status" do |line|
144 next if /^#/ =~ line
145 name = nil
146 @@ -79,6 +81,8 @@ File.foreach "config.status" do |line|
147 when /^RUBY_SO_NAME$/; next if $so_name
148 when /^arch$/; if val.empty? then val = arch else arch = val end
149 when /^archdir$/; archdir_override = val; next
150 + when /^sitearchdir$/; sitearchdir_override = val; next
151 + when /^vendorarchdir$/; vendorarchdir_override = val; next
152 when /^sitearch/; val = '$(arch)' if val.empty?
153 end
154 case val
155 @@ -213,11 +217,11 @@ print <<EOS
156 EOS
157 print <<EOS unless v_disabled["sitedir"]
158 CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
159 - CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
160 + CONFIG["sitearchdir"] = "#{sitearchdir_override}"
161 EOS
162 print <<EOS unless v_disabled["vendordir"]
163 CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
164 - CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
165 + CONFIG["vendorarchdir"] = "#{vendorarchdir_override}"
166 EOS
167 print <<EOS
168 CONFIG["topdir"] = File.dirname(__FILE__)
169 diff --git a/version.c b/version.c
170 index 59d4e5e..2558aa0 100644
171 --- a/version.c
172 +++ b/version.c
173 @@ -50,8 +50,12 @@
174 #ifndef RUBY_ARCHLIB
175 #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
176 #endif
177 +#ifndef RUBY_SITE_ARCHLIB
178 #define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
179 +#endif
180 +#ifndef RUBY_VENDOR_ARCHLIB
181 #define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
182 +#endif
183 #ifdef RUBY_THINARCH
184 #define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH
185 #define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH
186 --
187 1.7.6.1
188

  ViewVC Help
Powered by ViewVC 1.1.28