summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/apache-2.eclass70
-rw-r--r--eclass/db.eclass30
-rw-r--r--eclass/dune.eclass3
-rw-r--r--eclass/findlib.eclass3
-rw-r--r--eclass/lua-utils.eclass70
-rw-r--r--eclass/opam.eclass3
-rw-r--r--eclass/python-single-r1.eclass14
-rw-r--r--eclass/python-utils-r1.eclass61
-rw-r--r--eclass/toolchain-funcs.eclass21
-rw-r--r--eclass/vala.eclass4
10 files changed, 207 insertions, 72 deletions
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index ccfe482f528e..aac25683d99e 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -10,7 +10,7 @@
# This eclass handles apache-2.x ebuild functions such as LoadModule generation
# and inter-module dependency checking.
-inherit autotools flag-o-matic multilib ssl-cert user toolchain-funcs eapi7-ver
+inherit autotools flag-o-matic multilib ssl-cert user toolchain-funcs
[[ ${CATEGORY}/${PN} != www-servers/apache ]] \
&& die "Do not use this eclass with anything else than www-servers/apache ebuilds!"
@@ -19,14 +19,19 @@ case ${EAPI:-0} in
0|1|2|3|4|5)
die "This eclass is banned for EAPI<6"
;;
+ 6)
+ inherit eapi7-ver
+ ;;
+ *)
+ LUA_COMPAT=( lua5-{1..4} )
+ inherit lua-single
+ ;;
esac
# settings which are version specific go in here:
case $(ver_cut 1-2) in
2.4)
DEFAULT_MPM_THREADED="event" #509922
- CDEPEND=">=dev-libs/apr-1.5.1:=
- !www-apache/mod_macro" #492578 #477702
;;
*)
die "Unknown MAJOR.MINOR apache version."
@@ -88,10 +93,18 @@ SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
# built-in modules
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
-IUSE="${IUSE} debug doc gdbm ldap libressl selinux ssl static suexec threads"
+IUSE="${IUSE} debug doc gdbm ldap libressl selinux ssl static suexec +suexec-caps suexec-syslog split-usr threads"
for module in ${IUSE_MODULES} ; do
- IUSE="${IUSE} apache2_modules_${module}"
+ case ${module} in
+ # Enable http2 by default (bug #563452)
+ http2)
+ IUSE+=" +apache2_modules_${module}"
+ ;;
+ *)
+ IUSE+=" apache2_modules_${module}"
+ ;;
+ esac
done
_apache2_set_mpms() {
@@ -121,23 +134,53 @@ _apache2_set_mpms() {
_apache2_set_mpms
unset -f _apache2_set_mpms
-DEPEND="${CDEPEND}
+# Dependencies
+RDEPEND="
dev-lang/perl
+ >=dev-libs/apr-1.5.1:=
=dev-libs/apr-util-1*:=[gdbm=,ldap?]
dev-libs/libpcre
+ apache2_modules_brotli? ( >=app-arch/brotli-0.6.0:= )
apache2_modules_deflate? ( sys-libs/zlib )
+ apache2_modules_http2? (
+ >=net-libs/nghttp2-1.2.1
+ kernel_linux? ( sys-apps/util-linux )
+ )
+ apache2_modules_md? ( >=dev-libs/jansson-2.10 )
apache2_modules_mime? ( app-misc/mime-types )
+ apache2_modules_proxy_http2? (
+ >=net-libs/nghttp2-1.2.1
+ kernel_linux? ( sys-apps/util-linux )
+ )
+ apache2_modules_session_crypto? (
+ libressl? ( dev-libs/apr-util[libressl] )
+ !libressl? ( dev-libs/apr-util[openssl] )
+ )
gdbm? ( sys-libs/gdbm:= )
ldap? ( =net-nds/openldap-2* )
+ selinux? ( sec-policy/selinux-apache )
ssl? (
!libressl? ( >=dev-libs/openssl-1.0.2:0= )
libressl? ( dev-libs/libressl:0= )
+ kernel_linux? ( sys-apps/util-linux )
)
- !=www-servers/apache-1*"
-RDEPEND+=" ${DEPEND}
- selinux? ( sec-policy/selinux-apache )"
+"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ suexec? ( suexec-caps? ( sys-libs/libcap ) )
+"
+if [[ ${EAPI} == 6 ]] ; then
+ DEPEND+=" ${BDEPEND}"
+fi
PDEPEND="~app-admin/apache-tools-${PV}"
+REQUIRED_USE+="
+ apache2_modules_http2? ( ssl )
+ apache2_modules_md? ( ssl )
+"
+
S="${WORKDIR}/httpd-${PV}"
# @VARIABLE: MODULE_DEPENDS
@@ -254,7 +297,10 @@ setup_modules() {
MY_MODS=()
if use ldap ; then
- MY_CONF+=( --enable-authnz_ldap=${mod_type} --enable-ldap=${mod_type} )
+ MY_CONF+=(
+ --enable-authnz_ldap=${mod_type}
+ --enable-ldap=${mod_type}
+ )
MY_MODS+=( ldap authnz_ldap )
else
MY_CONF+=( --disable-authnz_ldap --disable-ldap )
@@ -413,6 +459,10 @@ apache-2_pkg_setup() {
fi
elog
fi
+
+ if [[ ${EAPI} != 6 ]] && use apache2_modules_lua ; then
+ lua-single_pkg_setup
+ fi
}
# @FUNCTION: apache-2_src_prepare
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 9a246d18979a..96669c6d8938 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: db.eclass
@@ -23,13 +23,15 @@ db_fix_so() {
cd "${LIB}" || die
# first clean up old symlinks
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
+ local soext=$(get_libname)
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die
+ soext=$(get_libname "[23]")
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die
find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die
# now rebuild all the correct ones
local ext
- for ext in so a; do
+ for ext in so dylib a; do
for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
target="$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -V |tail -n 1)"
[[ -n "${target}" ]] && ln -sf ${target//.\//} ${name}.${ext}
@@ -37,17 +39,17 @@ db_fix_so() {
done;
# db[23] gets some extra-special stuff
- if [[ -f libdb1.so.2 ]]; then
- ln -sf libdb1.so.2 libdb.so.2
- ln -sf libdb1.so.2 libdb1.so
- ln -sf libdb1.so.2 libdb-1.so
+ if [[ -f libdb1$(get_libname 2) ]]; then
+ ln -sf libdb1$(get_libname 2) libdb$(get_libname 2)
+ ln -sf libdb1$(get_libname 2) libdb1$(get_libname)
+ ln -sf libdb1$(get_libname 2) libdb-1$(get_libname)
fi
# what do we do if we ever get 3.3 ?
local i
for i in libdb libdb_{cxx,tcl,java,sql,stl}; do
- if [[ -f ${i}-3.2.so ]]; then
- ln -sf ${i}-3.2.so ${i}-3.so
- ln -sf ${i}-3.2.so ${i}.so.3
+ if [[ -f $i-3.2$(get_libname) ]]; then
+ ln -sf $i-3.2$(get_libname) $i-3$(get_libname)
+ ln -sf $i-3.2$(get_libname) $i$(get_libname 3)
fi
done
@@ -143,8 +145,10 @@ db_src_install_usrlibcleanup() {
mv "${LIB}/libdb_cxx.a" "${LIB}/libdb_cxx-${SLOT}.a" || die
fi
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
+ local soext=$(get_libname)
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die
+ soext=$(get_libname "[23]")
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die
einfo "removing unversioned static archives"
find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die
diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index 334fbfbf7910..da1813def533 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -23,6 +23,9 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
+
EXPORT_FUNCTIONS src_compile src_test src_install
RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?]"
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index 8fc5fd625a17..8090d6ce5c29 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -10,7 +10,8 @@
# @DESCRIPTION:
# ocamlfind (a.k.a. findlib) eclass
-
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
# From this findlib version there is proper stublibs support.
DEPEND=">=dev-ml/findlib-1.0.4-r1"
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 100be14cb08a..0589318ef519 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -344,6 +344,76 @@ _lua_export() {
done
}
+# @FUNCTION: lua_enable_tests
+# @USAGE: <test-runner> <test-directory>
+# @DESCRIPTION:
+# Set up IUSE, RESTRICT, BDEPEND and src_test() for running tests
+# with the specified test runner. Also copies the current value
+# of RDEPEND to test?-BDEPEND. The test-runner argument must be one of:
+#
+# - busted: dev-lua/busted
+#
+# Additionally, a second argument can be passed after <test-runner>,
+# so <test-runner> will use that directory to search for tests.
+# If not passed, a default directory of <test-runner> will be used.
+#
+# - busted: spec
+#
+# This function is meant as a helper for common use cases, and it only
+# takes care of basic setup. You still need to list additional test
+# dependencies manually. If you have uncommon use case, you should
+# not use it and instead enable tests manually.
+#
+# This function must be called in global scope, after RDEPEND has been
+# declared. Take care not to overwrite the variables set by it.
+lua_enable_tests() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one argument: test-runner (test-directory)"
+ local test_directory
+ local test_pkg
+ case ${1} in
+ busted)
+ test_directory="${2:-spec}"
+ test_pkg="dev-lua/busted"
+ if [[ ! ${_LUA_SINGLE_R0} ]]; then
+ eval "lua_src_test() {
+ busted --lua=\"\${ELUA}\" --output=\"plainTerminal\" \"${test_directory}\" || die \"Tests fail with \${ELUA}\"
+ }"
+ src_test() {
+ lua_foreach_impl lua_src_test
+ }
+ else
+ eval "src_test() {
+ busted --lua=\"\${ELUA}\" --output=\"plainTerminal\" \"${test_directory}\" || die \"Tests fail with \${ELUA}\"
+ }"
+ fi
+ ;;
+ *)
+ die "${FUNCNAME}: unsupported argument: ${1}"
+ esac
+
+ local test_deps=${RDEPEND}
+ if [[ -n ${test_pkg} ]]; then
+ if [[ ! ${_LUA_SINGLE_R0} ]]; then
+ test_deps+=" ${test_pkg}[${LUA_USEDEP}]"
+ else
+ test_deps+=" $(lua_gen_cond_dep "
+ ${test_pkg}[\${LUA_USEDEP}]
+ ")"
+ fi
+ fi
+ if [[ -n ${test_deps} ]]; then
+ IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
+ BDEPEND+=" test? ( ${test_deps} )"
+ fi
+
+ # we need to ensure successful return in case we're called last,
+ # otherwise Portage may wrongly assume sourcing failed
+ return 0
+}
+
# @FUNCTION: lua_get_CFLAGS
# @USAGE: [<impl>]
# @DESCRIPTION:
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 0420b99f71c5..05ebea510548 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -17,6 +17,9 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
+
# @ECLASS-VARIABLE: OPAM_INSTALLER_DEP
# @DESCRIPTION:
# Override dependency for OPAM_INSTALLER
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index b8e50dc95f88..64f9769080d2 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -79,7 +79,8 @@ EXPORT_FUNCTIONS pkg_setup
# @CODE
# @ECLASS-VARIABLE: PYTHON_COMPAT_OVERRIDE
-# @INTERNAL
+# @USER_VARIABLE
+# @DEFAULT_UNSET
# @DESCRIPTION:
# This variable can be used when working with ebuilds to override
# the in-ebuild PYTHON_COMPAT. It is a string naming the implementation
@@ -118,6 +119,7 @@ EXPORT_FUNCTIONS pkg_setup
# @CODE
# @ECLASS-VARIABLE: PYTHON_DEPS
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# This is an eclass-generated Python dependency string for all
# implementations listed in PYTHON_COMPAT.
@@ -139,6 +141,7 @@ EXPORT_FUNCTIONS pkg_setup
# @CODE
# @ECLASS-VARIABLE: PYTHON_SINGLE_USEDEP
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# This is an eclass-generated USE-dependency string which can be used to
# depend on another python-single-r1 package being built for the same
@@ -158,6 +161,7 @@ EXPORT_FUNCTIONS pkg_setup
# @CODE
# @ECLASS-VARIABLE: PYTHON_USEDEP
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# This is a placeholder variable supported by python_gen_cond_dep,
# in order to depend on python-r1 packages built for the same Python
@@ -176,11 +180,13 @@ EXPORT_FUNCTIONS pkg_setup
# @CODE
# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# This is a backwards-compatibility placeholder. Use PYTHON_USEDEP
# instead.
# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
# This is an eclass-generated required-use expression which ensures
# that exactly one PYTHON_SINGLE_TARGET value has been enabled.
@@ -265,8 +271,8 @@ unset -f _python_single_set_globals
if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
# @FUNCTION: _python_gen_usedep
-# @INTERNAL
# @USAGE: [<pattern>...]
+# @INTERNAL
# @DESCRIPTION:
# Output a USE dependency string for Python implementations which
# are both in PYTHON_COMPAT and match any of the patterns passed
@@ -284,6 +290,7 @@ _python_gen_usedep() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=(
@@ -326,6 +333,7 @@ python_gen_useflags() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=( "python_single_target_${impl}" )
@@ -375,6 +383,7 @@ python_gen_cond_dep() {
local dep=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
# substitute ${PYTHON_SINGLE_USEDEP} if used
@@ -438,6 +447,7 @@ python_gen_impl_dep() {
local PYTHON_REQ_USE=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
local PYTHON_PKG_DEP
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 8a44e28b285e..4227e06425f4 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -69,38 +69,6 @@ readonly _PYTHON_HISTORICAL_IMPLS
# which can involve revisions of this eclass that support a different
# set of Python implementations.
-# @FUNCTION: _python_impl_supported
-# @USAGE: <impl>
-# @INTERNAL
-# @DESCRIPTION:
-# Check whether the implementation <impl> (PYTHON_COMPAT-form)
-# is still supported.
-#
-# Returns 0 if the implementation is valid and supported. If it is
-# unsupported, returns 1 -- and the caller should ignore the entry.
-# If it is invalid, dies with an appopriate error messages.
-_python_impl_supported() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)."
-
- local impl=${1}
-
- # keep in sync with _PYTHON_ALL_IMPLS!
- # (not using that list because inline patterns shall be faster)
- case "${impl}" in
- python2_7|python3_[6789]|python3_10|pypy3)
- return 0
- ;;
- jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[56]|python3_[12345])
- return 1
- ;;
- *)
- [[ ${PYTHON_COMPAT_NO_STRICT} ]] && return 1
- die "Invalid implementation in PYTHON_COMPAT: ${impl}"
- esac
-}
-
# @FUNCTION: _python_verify_patterns
# @USAGE: <pattern>...
# @INTERNAL
@@ -149,10 +117,26 @@ _python_set_impls() {
if [[ $(declare -p PYTHON_COMPAT) != "declare -a"* ]]; then
die 'PYTHON_COMPAT must be an array.'
fi
- for i in "${PYTHON_COMPAT[@]}"; do
- # trigger validity checks
- _python_impl_supported "${i}"
- done
+ if [[ ! ${PYTHON_COMPAT_NO_STRICT} ]]; then
+ for i in "${PYTHON_COMPAT[@]}"; do
+ # check for incorrect implementations
+ # we're using pattern matching as an optimization
+ # please keep them in sync with _PYTHON_ALL_IMPLS
+ # and _PYTHON_HISTORICAL_IMPLS
+ case ${i} in
+ jython2_7|pypy|pypy1_[89]|pypy2_0|pypy3|python2_[5-7]|python3_[1-9]|python3_10)
+ ;;
+ *)
+ if has "${i}" "${_PYTHON_ALL_IMPLS[@]}" \
+ "${_PYTHON_HISTORICAL_IMPLS[@]}"
+ then
+ die "Mis-synced patterns in _python_set_impls: missing ${i}"
+ else
+ die "Invalid implementation in PYTHON_COMPAT: ${i}"
+ fi
+ esac
+ done
+ fi
local supp=() unsupp=()
@@ -608,6 +592,7 @@ python_optimize() {
local PYTHON=${PYTHON}
[[ ${PYTHON} ]] || _python_export PYTHON
+ [[ -x ${PYTHON} ]] || die "PYTHON (${PYTHON}) is not executable"
# default to sys.path
if [[ ${#} -eq 0 ]]; then
@@ -970,7 +955,7 @@ _python_wrapper_setup() {
"${workdir}"/pkgconfig/python${pyver}.pc || die
# Python 3.8+.
- if [[ ${EPYTHON} != python[23].[67] ]] ; then
+ if [[ ${EPYTHON} != python[23].[67] ]]; then
ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}-embed.pc \
"${workdir}"/pkgconfig/python${pyver}-embed.pc || die
fi
@@ -1200,8 +1185,8 @@ python_fix_shebang() {
# @FUNCTION: _python_check_locale_sanity
# @USAGE: <locale>
-# @INTERNAL
# @RETURN: 0 if sane, 1 otherwise
+# @INTERNAL
# @DESCRIPTION:
# Check whether the specified locale sanely maps between lowercase
# and uppercase ASCII characters.
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 4a4bb27fc084..267cf5cfce34 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1,4 +1,4 @@
-# Copyright 2002-2019 Gentoo Authors
+# Copyright 2002-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-funcs.eclass
@@ -505,12 +505,21 @@ tc-ld-is-lld() {
# If the gold linker is currently selected, configure the compilation
# settings so that we use the older bfd linker instead.
tc-ld-disable-gold() {
- if ! tc-ld-is-gold "$@" ; then
- # They aren't using gold, so nothing to do!
+ tc-ld-is-gold "$@" && tc-ld-force-bfd "$@"
+}
+
+# @FUNCTION: tc-ld-force-bfd
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# If the gold or lld linker is currently selected, configure the compilation
+# settings so that we use the bfd linker instead.
+tc-ld-force-bfd() {
+ if ! tc-ld-is-gold "$@" && ! tc-ld-is-lld "$@" ; then
+ # They aren't using gold or lld, so nothing to do!
return
fi
- ewarn "Forcing usage of the BFD linker instead of GOLD"
+ ewarn "Forcing usage of the BFD linker"
# Set up LD to point directly to bfd if it's available.
# We need to extract the first word in case there are flags appended
@@ -520,7 +529,7 @@ tc-ld-disable-gold() {
local path_ld=$(which "${bfd_ld}" 2>/dev/null)
[[ -e ${path_ld} ]] && export LD=${bfd_ld}
- # Set up LDFLAGS to select gold based on the gcc / clang version.
+ # Set up LDFLAGS to select bfd based on the gcc / clang version.
local fallback="true"
if tc-is-gcc; then
local major=$(gcc-major-version "$@")
@@ -548,7 +557,7 @@ tc-ld-disable-gold() {
ln -sf "${path_ld}" "${d}"/ld
export LDFLAGS="${LDFLAGS} -B${d}"
else
- die "unable to locate a BFD linker to bypass gold"
+ die "unable to locate a BFD linker"
fi
fi
}
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 52899f163dcf..88c5231286ab 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -102,7 +102,7 @@ vala_best_api_version() {
u=$(_vala_use_depend)
for v in $(vala_api_versions); do
- has_version "dev-lang/vala:${v}${u}" && echo "${v}" && return
+ has_version $([[ $EAPI == [1-6] ]] || echo -b) "dev-lang/vala:${v}${u}" && echo "${v}" && return
done
}
@@ -136,7 +136,7 @@ vala_src_prepare() {
fi
if [[ ${version} ]]; then
- has_version "dev-lang/vala:${version}" || die "No installed vala:${version}"
+ has_version $([[ $EAPI == [1-6] ]] || echo -b) "dev-lang/vala:${version}" || die "No installed vala:${version}"
else
version=$(vala_best_api_version)
[[ ${version} ]] || die "No installed vala in $(vala_depend)"