Lines 53-77
Link Here
|
53 |
|
53 |
|
54 |
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby |
54 |
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby |
55 |
|
55 |
|
56 |
ruby_patch_mkmf() { |
56 |
ruby_patch_rbconfig() { |
57 |
|
57 |
local rbconfig |
58 |
if [ ! -x /bin/install -a -x /usr/bin/install ]; then |
58 |
if [ ! -x /bin/install -a -x /usr/bin/install ]; then |
59 |
einfo "Patching mkmf" |
59 |
einfo "Shadowing rbconfig.rb" |
60 |
cat <<END >${T}/mkmf.rb |
60 |
mkdir "${T}/ruby" |
61 |
require 'mkmf' |
61 |
rbconfig=$(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')/rbconfig.rb |
62 |
|
62 |
[ -f "${rbconfig}" ] || die "File ${rbconfig} not found. Please report" |
63 |
STDERR.puts 'Modified mkmf is used' |
63 |
sed 's,/bin/install,/usr/bin/install,g' "$rbconfig" > "${T}/ruby/rbconfig.rb" |
64 |
CONFIG['INSTALL'] = '/usr/bin/install' |
64 |
export GENTOO_RUBYLIB="${T}/ruby" |
65 |
END |
65 |
if [ -n "${RUBYLIB}" ]; then |
66 |
# save it because rubygems needs it (for unsetting RUBYOPT) |
66 |
export RUBYLIB="${GENTOO_RUBYLIB}:${RUBYLIB}" |
67 |
export GENTOO_RUBYOPT="-r${T}/mkmf.rb" |
67 |
else |
68 |
export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}" |
68 |
export RUBYLIB="${GENTOO_RUBYLIB}" |
|
|
69 |
fi |
69 |
fi |
70 |
fi |
70 |
|
71 |
|
71 |
} |
72 |
} |
72 |
|
73 |
|
73 |
ruby_src_unpack() { |
74 |
ruby_src_unpack() { |
74 |
#ruby_patch_mkmf |
|
|
75 |
unpack ${A} |
75 |
unpack ${A} |
76 |
cd ${S} |
76 |
cd ${S} |
77 |
# apply bulk patches |
77 |
# apply bulk patches |
Lines 83-88
Link Here
|
83 |
} |
83 |
} |
84 |
|
84 |
|
85 |
ruby_econf() { |
85 |
ruby_econf() { |
|
|
86 |
ruby_patch_rbconfig |
86 |
|
87 |
|
87 |
RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}" |
88 |
RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}" |
88 |
if [ -f configure ] ; then |
89 |
if [ -f configure ] ; then |