-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruby-1.8.7-lib-paths.patch
228 lines (215 loc) · 9.42 KB
/
ruby-1.8.7-lib-paths.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
--- ruby-1.8.7-p249/Makefile.in.orig 2010-06-15 17:51:14.000000000 -0400
+++ ruby-1.8.7-p249/Makefile.in 2010-06-15 17:56:54.000000000 -0400
@@ -24,6 +24,9 @@ datadir = @datadir@
arch = @arch@
sitearch = @sitearch@
sitedir = @sitedir@
+sitearchdir = @sitearchdir@
+vendordir = @vendordir@
+vendorarchdir = @vendorarchdir@
TESTUI = console
TESTS =
--- ruby-1.8.7-p249/mkconfig.rb.orig2 2010-06-15 18:19:29.000000000 -0400
+++ ruby-1.8.7-p249/mkconfig.rb 2010-06-15 18:19:33.000000000 -0400
@@ -141,12 +141,12 @@ print(*v_fast)
print(*v_others)
print <<EOS
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
- CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
- CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
+ CONFIG["rubylibdir"] = "$(vendordir)/$(ruby_version)"
+ CONFIG["archdir"] = "$(libdir)/ruby/$(ruby_version)/$(sitearch)"
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
+ CONFIG["sitearchdir"] = "$(libdir)/ruby/site_ruby/$(ruby_version)/$(sitearch)"
+ CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
+ CONFIG["vendorarchdir"] = "$(libdir)/ruby/$(ruby_version)/$(sitearch)"
CONFIG["topdir"] = File.dirname(__FILE__)
MAKEFILE_CONFIG = {}
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
--- ruby-1.8.7-p249/ruby.c.orig 2010-06-15 18:22:52.000000000 -0400
+++ ruby-1.8.7-p249/ruby.c 2010-06-23 14:05:54.000000000 -0400
@@ -316,24 +316,27 @@ ruby_init_loadpath()
#endif
incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
-#ifdef RUBY_SITE_THIN_ARCHLIB
- incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
-#endif
- incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
- incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
-
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH2));
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH3));
+ incpush(RUBY_RELATIVE(RUBY_SITE_LIB3));
+ incpush(RUBY_RELATIVE(RUBY_SITE_ARCH4));
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH));
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH2));
+ incpush(RUBY_RELATIVE(RUBY_ALT_SITE_ARCH3));
incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
-#ifdef RUBY_VENDOR_THIN_ARCHLIB
- incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
-#endif
- incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
- incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
+ incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH2));
+ incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH3));
+
+ // uncomment the following when we want to support parallel
+ // installable ruby stacks
+ //incpush(RUBY_RELATIVE(RUBY_SITE_ARCH));
+ //incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
+
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH));
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCH4));
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
+ //incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB3));
- incpush(RUBY_RELATIVE(RUBY_LIB));
-#ifdef RUBY_THIN_ARCHLIB
- incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
-#endif
- incpush(RUBY_RELATIVE(RUBY_ARCHLIB));
if (rb_safe_level() == 0) {
incpush(".");
--- ruby-1.8.7-p299/configure.in.orig2 2010-06-24 16:10:40.000000000 -0400
+++ ruby-1.8.7-p299/configure.in 2010-06-24 16:16:33.000000000 -0400
@@ -58,6 +58,9 @@ fi
if test "$TEENY" = ""; then
AC_MSG_ERROR(could not determine TEENY number from version.h)
fi
+rb_mm_version="${MAJOR}.${MINOR}"
+ruby_version="${MAJOR}.${MINOR}.${TEENY}"
+ruby_mm_version="${rb_mm_version}"
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(TEENY)
@@ -1759,6 +1762,12 @@ AC_ARG_WITH(sitedir,
[sitedir='${libdir}/ruby/site_ruby'])
SITE_DIR=`eval echo \\"${sitedir}\\"`
+AC_ARG_WITH(sitearchdir,
+ [ --with-sitearchdir=DIR site arch. libraries in DIR [[LIBDIR/ruby/site_ruby]]],
+ [sitearchdir=$withval],
+ [sitearchdir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby'])
+SITE_ARCH_DIR=`eval echo \\"${sitearchdir}\\"`
+
case "$target_os" in
cygwin*|mingw*|*djgpp*|os2-emx*)
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
@@ -1770,50 +1779,45 @@ case "$target_os" in
;;
esac
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}"
-RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}"
AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
-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}\\"`
+
+AC_ARG_WITH(vendorarchdir,
+ [ --with-vendorarchdir=DIR vendor arch. libraries in DIR [[LIBDIR/ruby/vendor_ruby]]],
+ [vendorarchdir=$withval],
+ [vendorarchdir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby'])
+VENDOR_ARCH_DIR=`eval echo \\"${vendorarchdir}\\"`
+
case "$target_os" in
cygwin*|mingw*|*djgpp*|os2-emx*)
RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
;;
*)
+ RUBY_SITE_ARCH_PATH="`eval echo \\"$SITE_ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_VENDOR_ARCH_PATH="`eval echo \\"$VENDOR_ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
;;
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(sitedir)dnl
-AC_SUBST(vendordir)dnl
-
-configure_args=$ac_configure_args
-AC_SUBST(configure_args)dnl
-
target_cpu=`echo $target_cpu | sed s/i.86/i386/`
if test "$fat_binary" != no ; then
arch="fat-${target_os}"
AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB,
- "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
+ "${RUBY_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
- "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
+ "${RUBY_SITE_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
- "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
+ "${RUBY_VENDOR_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
else
arch="${target_cpu}-${target_os}"
@@ -1825,9 +1829,57 @@ case "$target_os" in
*) sitearch="${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}/${sitearch}")
+RUBY_SITE_ARCH_PATH_1="${RUBY_SITE_ARCH_PATH}/${ruby_version}"
+RUBY_SITE_ARCH_PATH_2="${RUBY_SITE_ARCH_PATH}/${ruby_mm_version}"
+RUBY_SITE_ARCH_PATH_3="${RUBY_SITE_ARCH_PATH}/${ruby_mm_version}/${sitearch}"
+RUBY_SITE_ARCH_PATH_4="${RUBY_SITE_ARCH_PATH}"
+RUBY_SITE_LIB_PATH_1="${RUBY_SITE_LIB_PATH}/${ruby_version}"
+RUBY_SITE_LIB_PATH_2="${RUBY_SITE_LIB_PATH}/${ruby_mm_version}"
+RUBY_SITE_LIB_PATH_3="${RUBY_SITE_LIB_PATH}"
+RUBY_VENDOR_ARCH_PATH_1="${RUBY_VENDOR_ARCH_PATH}/${ruby_version}"
+RUBY_VENDOR_ARCH_PATH_2="${RUBY_VENDOR_ARCH_PATH}/${ruby_mm_version}"
+RUBY_VENDOR_ARCH_PATH_3="${RUBY_VENDOR_ARCH_PATH}/${ruby_mm_version}/${sitearch}"
+RUBY_VENDOR_ARCH_PATH_4="${RUBY_VENDOR_ARCH_PATH}"
+RUBY_VENDOR_LIB_PATH_1="${RUBY_VENDOR_LIB_PATH}/${ruby_version}"
+RUBY_VENDOR_LIB_PATH_2="${RUBY_VENDOR_LIB_PATH}/${ruby_mm_version}"
+RUBY_VENDOR_LIB_PATH_3="${RUBY_VENDOR_LIB_PATH}"
+
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH, "${RUBY_SITE_ARCH_PATH_1}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH2, "${RUBY_SITE_ARCH_PATH_2}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH3, "${RUBY_SITE_ARCH_PATH_3}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH4, "${RUBY_SITE_ARCH_PATH_4}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH_1}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH_2}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_LIB3, "${RUBY_SITE_LIB_PATH_3}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH, "${RUBY_VENDOR_ARCH_PATH_1}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH2, "${RUBY_VENDOR_ARCH_PATH_2}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH3, "${RUBY_VENDOR_ARCH_PATH_3}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH4, "${RUBY_VENDOR_ARCH_PATH_4}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH_1}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH_2}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB3, "${RUBY_VENDOR_LIB_PATH_3}")
+
+# XXX these are being added to keep compatiblity w/ the 1.8.6
+# search path, but don't get created anywhere, are unused, and
+# should really be removed
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH, "${libdir}/site_ruby/${ruby_mm_version}")
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH2, "${libdir}/site_ruby/${ruby_mm_version}/${sitearch}")
+AC_DEFINE_UNQUOTED(RUBY_ALT_SITE_ARCH3, "${libdir}/site_ruby")
+
+AC_SUBST(arch)dnl
+AC_SUBST(sitearch)dnl
+AC_SUBST(sitedir)dnl
+AC_SUBST(vendordir)dnl
+AC_SUBST(ruby_mm_version)dnl
+AC_SUBST(sitearchdir)dnl
+AC_SUBST(vendorarchdir)dnl
+
+configure_args=$ac_configure_args
+AC_SUBST(configure_args)dnl
+
+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}")
+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}")
+AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH3}")
AC_ARG_WITH(search-path,
[ --with-search-path=DIR specify the additional search path],