View | Details | Raw Unified
Collapse All | Expand All

(-) gems.eclass (-1 / +2 lines)
 Lines 37-48    Link Here 
}
}
gems_src_unpack() {
gems_src_unpack() {
	#ruby_patch_mkmf
	true
	true
}
}
gems_src_install() {
gems_src_install() {
	gems_location
	gems_location
	# why placing this function in gems_src_unpack doesn't work?
	ruby_patch_rbconfig 
	if [ -z "${MY_P}" ]; then
	if [ -z "${MY_P}" ]; then
		GEM_SRC=${DISTDIR}/${P}
		GEM_SRC=${DISTDIR}/${P}
(-) ruby-gnome2.eclass (-12 / +3 lines)
 Lines 11-16    Link Here 
# Variables:
# Variables:
# PATCHES	Space delimited list of patch files.
# PATCHES	Space delimited list of patch files.
inherit ruby
EXPORT_FUNCTIONS src_compile src_install src_unpack
EXPORT_FUNCTIONS src_compile src_install src_unpack
IUSE=""
IUSE=""
 Lines 31-48    Link Here 
RDEPEND="virtual/ruby"
RDEPEND="virtual/ruby"
ruby-gnome2_src_unpack() {
ruby-gnome2_src_unpack() {
	if [ ! -x /bin/install -a -x /usr/bin/install ]; then
		cat <<END >${T}/mkmf.rb
require 'mkmf'
STDERR.puts 'patching mkmf'
CONFIG['INSTALL'] = '/usr/bin/install'
END
		# save it because rubygems needs it (for unsetting RUBYOPT)
		export GENTOO_RUBYOPT="-r${T}/mkmf.rb"
		export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}"
	fi
	unpack ${A}
	unpack ${A}
	cd ${S}
	cd ${S}
	# apply bulk patches
	# apply bulk patches
 Lines 54-59    Link Here 
}
}
ruby-gnome2_src_compile() {
ruby-gnome2_src_compile() {
	ruby_patch_rbconfig
	ruby extconf.rb || die "extconf.rb failed"
	ruby extconf.rb || die "extconf.rb failed"
	emake CC=${CC:-gcc} CXX=${CXX:-g++} || die "emake failed"
	emake CC=${CC:-gcc} CXX=${CXX:-g++} || die "emake failed"
}
}
(-) ruby.eclass (-13 / +14 lines)
 Lines 53-77    Link Here 
[[ -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
 Lines 83-88    Link Here 
}
}
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