# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.14 2007/01/09 23:29:17 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.15 2007/01/29 12:15:50 pclouds Exp $
#
# Author: Rob Cakebread <pythonhead@gentoo.org>
# Current Maintainer: Ruby Herd <ruby@gentoo.org>
}
gems_src_unpack() {
+ ruby_patch_mkmf
true
}
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.60 2007/01/26 16:03:48 pclouds Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.61 2007/01/29 12:15:50 pclouds Exp $
#
# Author: Mamoru KOMACHI <usata@gentoo.org>
#
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby
-ruby_src_unpack() {
+ruby_patch_mkmf() {
if [ ! -x /bin/install -a -x /usr/bin/install ]; then
+ einfo "Patching mkmf"
cat <<END >${T}/mkmf.rb
require 'mkmf'
-STDERR.puts 'patching mkmf'
+STDERR.puts 'Modified mkmf is used'
CONFIG['INSTALL'] = '/usr/bin/install'
END
# save it because rubygems needs it (for unsetting RUBYOPT)
export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}"
fi
+}
+
+ruby_src_unpack() {
+ ruby_patch_mkmf
unpack ${A}
cd ${S}
# apply bulk patches