|
|
| |
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby | [[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby |
| |
ruby_patch_mkmf() { |
ruby_patch_rbconfig() { |
|
local rbconfig |
if [ ! -x /bin/install -a -x /usr/bin/install ]; then | if [ ! -x /bin/install -a -x /usr/bin/install ]; then |
einfo "Patching mkmf" |
einfo "Shadowing rbconfig.rb" |
cat <<END >${T}/mkmf.rb |
mkdir "${T}/ruby" |
require 'mkmf' |
rbconfig=$(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')/rbconfig.rb |
|
[ -f "${rbconfig}" ] || die "File ${rbconfig} not found. Please report" |
STDERR.puts 'Modified mkmf is used' |
sed 's,/bin/install,/usr/bin/install,g' "$rbconfig" > "${T}/ruby/rbconfig.rb" |
CONFIG['INSTALL'] = '/usr/bin/install' |
export GENTOO_RUBYLIB="${T}/ruby" |
END |
if [ -n "${RUBYLIB}" ]; then |
# save it because rubygems needs it (for unsetting RUBYOPT) |
export RUBYLIB="${GENTOO_RUBYLIB}:${RUBYLIB}" |
export GENTOO_RUBYOPT="-r${T}/mkmf.rb" |
else |
export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}" |
export RUBYLIB="${GENTOO_RUBYLIB}" |
|
fi |
fi | fi |
| |
} | } |
| |
ruby_src_unpack() { | ruby_src_unpack() { |
#ruby_patch_mkmf |
|
unpack ${A} | unpack ${A} |
cd ${S} | cd ${S} |
# apply bulk patches | # apply bulk patches |
|
|
} | } |
| |
ruby_econf() { | ruby_econf() { |
|
ruby_patch_rbconfig |
| |
RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}" | RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}" |
if [ -f configure ] ; then | if [ -f configure ] ; then |