diff options
author | Peter Levine <plevine457@gmail.com> | 2021-03-27 20:19:01 -0400 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2021-05-29 15:43:22 +0100 |
commit | cbf63d4ff309ea168dc40e7886f535cbd11c1bfa (patch) | |
tree | 6f417fe9612304d1f2b361887d643d8340da5491 /dev-libs | |
parent | dev-libs/ocl-icd: Remove ruby24 from USE_RUBY (diff) | |
download | gentoo-cbf63d4ff309ea168dc40e7886f535cbd11c1bfa.tar.gz gentoo-cbf63d4ff309ea168dc40e7886f535cbd11c1bfa.tar.bz2 gentoo-cbf63d4ff309ea168dc40e7886f535cbd11c1bfa.zip |
dev-libs/ocl-icd: Fix ruby BDEP selection
The Makefile sets RUBY=ruby. The active ruby interpreter set via
eselect may not correspond to one that satisfies ${RUBY_DEPS}. Test
for the existence of a versioned ruby from among USE_RUBY, moving from
right to left, and pass it to emake.
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild index 94aa219cb560..2fe7e214b169 100644 --- a/dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild +++ b/dev-libs/ocl-icd/ocl-icd-2.2.14-r1.ebuild @@ -36,6 +36,19 @@ multilib_src_configure() { ECONF_SOURCE="${S}" econf --enable-pthread-once --disable-official-khronos-headers } +multilib_src_compile() { + local candidates=(${USE_RUBY}) + local ruby= + for (( idx=${#candidates[@]}-1 ; idx>=0 ; idx-- )) ; do + if ${candidates[idx]} --version &> /dev/null; then + ruby=${candidates[idx]} && break + fi + done + [[ -z ${ruby} ]] && die "No ruby executable found" + + emake RUBY=${ruby} +} + multilib_src_install() { default |