From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OesyS-0003Fy-Pi for garchives@archives.gentoo.org; Fri, 30 Jul 2010 17:02:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68600E0BBD for ; Fri, 30 Jul 2010 17:02:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0E773E088A for ; Fri, 30 Jul 2010 16:56:24 +0000 (UTC) Received: from corvid.gentoo.org (corvid.gentoo.org [208.92.234.79]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 76FFF1B4200 for ; Fri, 30 Jul 2010 16:56:23 +0000 (UTC) Received: by corvid.gentoo.org (Postfix, from userid 948) id 41ECC2CE15; Fri, 30 Jul 2010 16:56:22 +0000 (UTC) From: "Diego Petteno (flameeyes)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, flameeyes@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ruby-ng.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ruby-ng.eclass X-VCS-Directories: eclass X-VCS-Committer: flameeyes X-VCS-Committer-Name: Diego Petteno Content-Type: text/plain; charset=utf8 Message-Id: <20100730165622.41ECC2CE15@corvid.gentoo.org> Date: Fri, 30 Jul 2010 16:56:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 8715dede-7cb7-44b3-9e0f-aec64956ddf5 X-Archives-Hash: 49e2a213a8329f013a8df150f58cda7a flameeyes 10/07/30 16:56:22 Modified: ruby-ng.eclass Log: Apply changes to the eclass for Prefix support. Thanks to Jeremy Olexa. Closes bug #330543. Revision Changes Path 1.24 eclass/ruby-ng.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.ecl= ass?rev=3D1.24&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.ecl= ass?rev=3D1.24&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ruby-ng.ecl= ass?r1=3D1.23&r2=3D1.24 Index: ruby-ng.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ruby-ng.eclass 30 Jul 2010 15:05:08 -0000 1.23 +++ ruby-ng.eclass 30 Jul 2010 16:56:21 -0000 1.24 @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.23 2010/07/= 30 15:05:08 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.24 2010/07/= 30 16:56:21 flameeyes Exp $ # # @ECLASS: ruby-ng.eclass # @MAINTAINER: @@ -53,7 +53,7 @@ case ${EAPI} in 0|1) die "Unsupported EAPI=3D${EAPI} (too old) for ruby-ng.eclass" ;; - 2) ;; + 2|3) ;; *) die "Unknown EAPI=3D${EAPI} for ruby-ng.eclass" esac @@ -391,8 +391,14 @@ } =20 _each_ruby_check_install() { + local scancmd=3Dscanelf + # we have a Mach-O object here + [[ ${CHOST} =3D=3D *-darwin ]] && scancmd=3Dscanmacho + + has "${EAPI}" 2 && ! use prefix && EPREFIX=3D + local libruby_basename=3D$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["= LIBRUBY_SO"]') - local libruby_soname=3D$(scanelf -F "%S#F" -qS "/usr/$(get_libdir)/${li= bruby_basename}") + local libruby_soname=3D$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX= }/usr/$(get_libdir)/${libruby_basename}")) local sitedir=3D$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["sitedir"]= ') local sitelibdir=3D$(${RUBY} -rrbconfig -e 'puts Config::CONFIG["siteli= bdir"]') =20 @@ -413,7 +419,7 @@ # extensions via ruby-fakegem; make sure to check only in sitelibdir, s= ince # that's what changes between two implementations (otherwise you'd get = false # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8) - scanelf -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \ + ${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" = \ | fgrep -v "${libruby_soname}" \ > "${T}"/ruby-ng-${_ruby_implementation}-mislink.log =20 @@ -452,8 +458,10 @@ # Installs the specified file(s) into the sitelibdir of the Ruby interpr= eter in ${RUBY}. doruby() { [[ -z ${RUBY} ]] && die "\$RUBY is not set" + has "${EAPI}" 2 && ! use prefix && EPREFIX=3D ( # don't want to pollute calling env - insinto $(ruby_rbconfig_value 'sitelibdir') + sitelibdir=3D$(ruby_rbconfig_value 'sitelibdir') + insinto ${sitelibdir#${EPREFIX}} insopts -m 0644 doins "$@" ) || die "failed to install $@"