From 287ce804221e527c5001511134733ee4049f14ab Mon Sep 17 00:00:00 2001 From: Nguyen Thai Ngoc Duy Date: Mon, 29 Jan 2007 12:15:50 +0000 Subject: [PATCH] Separating mkmf patching code and reuse it in gems.eclass --- eclass/gems.eclass | 3 ++- eclass/ruby.eclass | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/eclass/gems.eclass b/eclass/gems.eclass index 58302696d165..5c2381ea9383 100644 --- a/eclass/gems.eclass +++ b/eclass/gems.eclass @@ -1,6 +1,6 @@ # 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 # Current Maintainer: Ruby Herd @@ -37,6 +37,7 @@ gems_location() { } gems_src_unpack() { + ruby_patch_mkmf true } diff --git a/eclass/ruby.eclass b/eclass/ruby.eclass index e11aa5c56338..792e27e42917 100644 --- a/eclass/ruby.eclass +++ b/eclass/ruby.eclass @@ -1,6 +1,6 @@ # 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 # @@ -53,13 +53,14 @@ fi [[ -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 <${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) @@ -67,6 +68,10 @@ END export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}" fi +} + +ruby_src_unpack() { + ruby_patch_mkmf unpack ${A} cd ${S} # apply bulk patches -- 2.26.2