/[packages]/cauldron/ruby/pristine/SOURCES/ruby-1.9.3-arch-specific-dir.patch
ViewVC logotype

Contents of /cauldron/ruby/pristine/SOURCES/ruby-1.9.3-arch-specific-dir.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 397523 - (show annotations) (download)
Sat Feb 9 10:13:29 2013 UTC (7 years, 3 months ago) by schedbot
File size: 4835 byte(s)
Copying release 1.9.3.p374-5.mga3 to pristine/ directory.
1 From df4253a5b79b63f16f215f2c19f1b9666c4ca01e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
3 Date: Thu, 8 Sep 2011 15:30:05 +0200
4 Subject: [PATCH] Add configuration arch specific dir flag.
5
6 ---
7 Makefile.in | 1 +
8 configure.in | 20 ++++++++++++++++++++
9 tool/mkconfig.rb | 4 +++-
10 version.c | 2 ++
11 4 files changed, 26 insertions(+), 1 deletions(-)
12
13 diff --git a/Makefile.in b/Makefile.in
14 index bcdaf5f..d61b2ee 100644
15 --- a/Makefile.in
16 +++ b/Makefile.in
17 @@ -31,6 +31,7 @@ libexecdir = @libexecdir@
18 datarootdir = @datarootdir@
19 datadir = @datadir@
20 arch = @arch@
21 +archdir = @archdir@
22 sitearch = @sitearch@
23 sitedir = @sitedir@
24 ruby_version = @ruby_version@
25 diff --git a/configure.in b/configure.in
26 index 83e5d76..e6dc38c 100644
27 --- a/configure.in
28 +++ b/configure.in
29 @@ -2793,6 +2793,15 @@ else
30 RUBY_LIB_VERSION="\"${ruby_version}\""
31 fi
32
33 +AC_ARG_WITH(archdir,
34 + AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
35 + [archdir=$withval],
36 + [archdir='${rubylibprefix}/${arch}'])
37 +dir="${archdir}"
38 +until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do
39 + dir="${ARCH_DIR}"
40 +done
41 +
42 AC_ARG_WITH(sitedir,
43 AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
44 [sitedir=$withval],
45 @@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then
46 AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
47 RUBY_EXEC_PREFIX=""
48 RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
49 + RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
50 RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
51 RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
52 else
53 RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
54 RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
55 + RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
56 RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
57 RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
58 fi
59
60 pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
61 +AS_CASE(["$RUBY_ARCH_LIB_PATH"],
62 + ["$RUBY_LIB_PREFIX/"*], [
63 + RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"'
64 + ],
65 + [
66 + RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\""
67 + ])
68 AS_CASE(["$RUBY_SITE_LIB_PATH"],
69 ["$RUBY_LIB_PREFIX/"*], [
70 RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
71 @@ -2855,6 +2873,7 @@ else
72 fi
73 AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
74 AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX})
75 +AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH})
76 if test "x$SITE_DIR" = xno; then
77 AC_DEFINE(NO_RUBY_SITE_LIB)
78 else
79 @@ -2869,6 +2888,7 @@ fi
80 AC_SUBST(arch)dnl
81 AC_SUBST(sitearch)dnl
82 AC_SUBST(ruby_version)dnl
83 +AC_SUBST(archdir)dnl
84 AC_SUBST(sitedir)dnl
85 AC_SUBST(vendordir)dnl
86
87 diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
88 index b707c4b..9780ef2 100755
89 --- a/tool/mkconfig.rb
90 +++ b/tool/mkconfig.rb
91 @@ -43,6 +43,7 @@ v_others = []
92 continued_name = nil
93 continued_line = nil
94 path_version = "/$(ruby_version)"
95 +archdir_override = "$(vendorlibdir)/$(sitearch)"
96 File.foreach "config.status" do |line|
97 next if /^#/ =~ line
98 name = nil
99 @@ -77,6 +78,7 @@ File.foreach "config.status" do |line|
100 when /^RUBY_INSTALL_NAME$/; next if $install_name
101 when /^RUBY_SO_NAME$/; next if $so_name
102 when /^arch$/; if val.empty? then val = arch else arch = val end
103 + when /^archdir$/; archdir_override = val; next
104 when /^sitearch/; val = '$(arch)' if val.empty?
105 end
106 case val
107 @@ -207,7 +209,7 @@ print(*v_fast)
108 print(*v_others)
109 print <<EOS
110 CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
111 - CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
112 + CONFIG["archdir"] = "#{archdir_override}"
113 EOS
114 print <<EOS unless v_disabled["sitedir"]
115 CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
116 diff --git a/version.c b/version.c
117 index 59d4e5e..915a0a2 100644
118 --- a/version.c
119 +++ b/version.c
120 @@ -47,7 +47,9 @@
121 #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
122 #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
123 #endif
124 +#ifndef RUBY_ARCHLIB
125 #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
126 +#endif
127 #define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
128 #define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
129 #ifdef RUBY_THINARCH
130 --
131 1.7.6.1
132

  ViewVC Help
Powered by ViewVC 1.1.28