summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2017-09-19 12:31:42 -0700
committerZac Medico <zmedico@gentoo.org>2017-09-19 12:37:31 -0700
commit107da21cdbb7f32f52206dd9f46a9eb0b2553588 (patch)
treef9eeb678f6bc86501bc408e735bc442fa524d993 /dev-util
parentdev-perl/Net-DNS: stable 1.100.0 for ia64, bug #622992 (diff)
downloadgentoo-107da21cdbb7f32f52206dd9f46a9eb0b2553588.tar.gz
gentoo-107da21cdbb7f32f52206dd9f46a9eb0b2553588.tar.bz2
gentoo-107da21cdbb7f32f52206dd9f46a9eb0b2553588.zip
dev-util/android-tools: detect rubygems interpreter for bug 631398
Fixes: https://bugs.gentoo.org/631398 Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/android-tools/android-tools-6.0.1_p79.ebuild14
1 files changed, 11 insertions, 3 deletions
diff --git a/dev-util/android-tools/android-tools-6.0.1_p79.ebuild b/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
index 954e418c5629..c08ea80eb0dd 100644
--- a/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
+++ b/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
@@ -29,7 +29,7 @@ RDEPEND="sys-libs/zlib:=
dev-libs/libpcre"
# dev-lang/ruby is necessary for build script generation.
DEPEND="${RDEPEND}
- dev-lang/ruby:*"
+ virtual/rubygems"
S=${WORKDIR}
@@ -61,8 +61,16 @@ src_prepare() {
}
src_compile() {
- chmod +x ./generate_build.rb || die
- ./generate_build.rb > build.sh || die
+ # Dynamically detect rubygems interpreter (bug 631398).
+ local ruby_bin=$(type -P ruby) ruby_error_log=${T}/generate_build.rb.log success=
+ for ruby_bin in "${ruby_bin}" "${ruby_bin}"[[:digit:]][[:digit:]]; do
+ "${ruby_bin}" ./generate_build.rb 1> build.sh 2> "${ruby_error_log}" && \
+ { success=1; break; }
+ done
+ if [[ -z ${success} ]]; then
+ cat "${ruby_error_log}" >&2
+ die "${ruby_bin} ./generate_build.rb failed"
+ fi
sed -e 's:^gcc:${CC}:' -e 's:^g++:${CXX}:' -i build.sh || die
chmod +x build.sh || die
tc-export CC CXX