summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /eclass
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin35853 -> 35975 bytes
-rw-r--r--eclass/ada.eclass10
-rw-r--r--eclass/cmake-multilib.eclass2
-rw-r--r--eclass/distutils-r1.eclass96
-rw-r--r--eclass/kernel-2.eclass14
-rw-r--r--eclass/kernel-install.eclass14
-rw-r--r--eclass/lua-utils.eclass7
-rw-r--r--eclass/meson-multilib.eclass131
-rw-r--r--eclass/meson.eclass3
-rw-r--r--eclass/multilib-build.eclass2
-rw-r--r--eclass/multilib-minimal.eclass4
-rw-r--r--eclass/multilib.eclass12
-rw-r--r--eclass/python-utils-r1.eclass4
-rw-r--r--eclass/rebar.eclass33
-rwxr-xr-xeclass/tests/toolchain.sh1
-rw-r--r--eclass/toolchain-glibc.eclass5
-rw-r--r--eclass/toolchain.eclass1
-rw-r--r--eclass/vala.eclass2
18 files changed, 260 insertions, 81 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 51639cd64a3c..5bf45dd64724 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index 1876a963496e..683417c6afe0 100644
--- a/eclass/ada.eclass
+++ b/eclass/ada.eclass
@@ -58,7 +58,7 @@ EXPORT_FUNCTIONS pkg_setup
# @DESCRIPTION:
# All supported Ada implementations, most preferred last.
_ADA_ALL_IMPLS=(
- gnat_2016 gnat_2017 gnat_2018 gnat_2019 gnat_2020 gnat_2021
+ gnat_2017 gnat_2018 gnat_2019 gnat_2020 gnat_2021
)
readonly _ADA_ALL_IMPLS
@@ -83,7 +83,7 @@ _ada_impl_supported() {
# keep in sync with _ADA_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
- gnat_201[6789])
+ gnat_201[789])
return 0
;;
gnat_202[01])
@@ -180,7 +180,7 @@ ada_export() {
local impl var
case "${1}" in
- gnat_201[6789])
+ gnat_201[789])
impl=${1}
shift
;;
@@ -200,10 +200,6 @@ ada_export() {
local gcc_pv
local slot
case "${impl}" in
- gnat_2016)
- gcc_pv=4.9.4
- slot=4.9.4
- ;;
gnat_2017)
gcc_pv=6.3.0
slot=6.3.0
diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
index 1266b5b42ed6..6b38d2606551 100644
--- a/eclass/cmake-multilib.eclass
+++ b/eclass/cmake-multilib.eclass
@@ -3,7 +3,7 @@
# @ECLASS: cmake-multilib.eclass
# @MAINTAINER:
-# gx86-multilib team <multilib@gentoo.org>
+# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 7
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index a02b6d059bd1..53eee173a262 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -481,7 +481,7 @@ esetup.py() {
}
# @FUNCTION: distutils_install_for_testing
-# @USAGE: [--via-root|--via-home] [<args>...]
+# @USAGE: [--via-root|--via-home|--via-venv] [<args>...]
# @DESCRIPTION:
# Install the package into a temporary location for running tests.
# Update PYTHONPATH appropriately and set TEST_DIR to the test
@@ -493,32 +493,36 @@ esetup.py() {
# PYTHONPATH) or tests rely on the results of install command.
# For most of the packages, tests built in BUILD_DIR are good enough.
#
-# The function supports two install modes. The current default is
-# --via-root mode. Previously, the function defaulted to --via-home
-# mode but it has been broken by new versions of setuptools (50.3.0+).
-# If you find that --via-root does not work but --via-home does, please
-# file a bug to let us know. Please note that proper testing sometimes
-# requires unmerging the package first.
+# The function supports three install modes. These are:
+#
+# --via-root (the default) that uses 'setup.py install --root=...'
+# combined with PYTHONPATH and is recommended for the majority
+# of packages.
+#
+# --via-venv that creates a (non-isolated) venv and installs the package
+# into it via 'setup.py install'. This mode does not use PYTHONPATH
+# but requires python to be called via PATH. It may solve a few corner
+# cases that --via-root do not support.
+#
+# --via-home that uses 'setup.py install --home=...'. This is
+# a historical mode that was mostly broken by setuptools 50.3.0+.
+# If your package does not work with the other two modes but works with
+# this one, please report a bug.
+#
+# Please note that in order to test the solution properly you need
+# to unmerge the package first.
distutils_install_for_testing() {
debug-print-function ${FUNCNAME} "${@}"
- # A few notes:
- # 1) because of namespaces, we can't use 'install --root'
- # (NB: this is probably no longer true with py3),
- # 2) 'install --home' is terribly broken on pypy, so we need
+ # A few notes about --via-home mode:
+ # 1) 'install --home' is terribly broken on pypy, so we need
# to override --install-lib and --install-scripts,
- # 3) non-root 'install' complains about PYTHONPATH and missing dirs,
+ # 2) non-root 'install' complains about PYTHONPATH and missing dirs,
# so we need to set it properly and mkdir them,
- # 4) it runs a bunch of commands which write random files to cwd,
+ # 3) it runs a bunch of commands which write random files to cwd,
# in order to avoid that, we add the necessary path overrides
# in _distutils-r1_create_setup_cfg.
- TEST_DIR=${BUILD_DIR}/test
- local bindir=${TEST_DIR}/scripts
- local libdir=${TEST_DIR}/lib
- PATH=${bindir}:${PATH}
- PYTHONPATH=${libdir}:${PYTHONPATH}
-
local install_method=root
case ${1} in
--via-home)
@@ -529,30 +533,50 @@ distutils_install_for_testing() {
install_method=root
shift
;;
+ --via-venv)
+ install_method=venv
+ shift
+ ;;
esac
- local -a add_args
- case ${install_method} in
- home)
- add_args=(
- install
+ TEST_DIR=${BUILD_DIR}/test
+ local add_args=()
+
+ if [[ ${install_method} == venv ]]; then
+ "${EPYTHON}" -m venv --system-site-packages --without-pip \
+ "${TEST_DIR}" || die
+
+ # we only do the minimal necessary subset of activate script
+ PATH=${TEST_DIR}/bin:${PATH}
+ # unset PYTHONPATH in order to prevent BUILD_DIR from overriding
+ # venv packages
+ unset PYTHONPATH
+ else
+ local bindir=${TEST_DIR}/scripts
+ local libdir=${TEST_DIR}/lib
+ PATH=${bindir}:${PATH}
+ PYTHONPATH=${libdir}:${PYTHONPATH}
+
+ case ${install_method} in
+ home)
+ add_args=(
--home="${TEST_DIR}"
--install-lib="${libdir}"
--install-scripts="${bindir}"
- )
- mkdir -p "${libdir}" || die
- ;;
- root)
- add_args=(
- install
+ )
+ mkdir -p "${libdir}" || die
+ ;;
+ root)
+ add_args=(
--root="${TEST_DIR}"
--install-lib=lib
--install-scripts=scripts
- )
- ;;
- esac
+ )
+ ;;
+ esac
+ fi
- esetup.py "${add_args[@]}" "${@}"
+ esetup.py install "${add_args[@]}" "${@}"
}
# @FUNCTION: _distutils-r1_disable_ez_setup
@@ -646,6 +670,10 @@ _distutils-r1_create_setup_cfg() {
# setuptools like to create .egg files for install --home.
[bdist_egg]
dist_dir = ${BUILD_DIR}/dist
+
+ # avoid packing up eggs in a zip as it often breaks test suites
+ [options]
+ zip_safe = False
_EOF_
# we can't refer to ${D} before src_install()
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 2d721ffca878..20c83b37c1fd 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -945,8 +945,6 @@ preinst_headers() {
# see inline comments
postinst_sources() {
- local MAKELINK=0
-
# if we have USE=symlink, then force K_SYMLINK=1
use symlink && K_SYMLINK=1
@@ -960,15 +958,11 @@ postinst_sources() {
# if we are to forcably symlink, delete it if it already exists first.
if [[ ${K_SYMLINK} -gt 0 ]]; then
- [[ -h ${EROOT%/}/usr/src/linux ]] && { rm "${EROOT%/}"/usr/src/linux || die; }
- MAKELINK=1
- fi
-
- # if the link doesnt exist, lets create it
- [[ ! -h ${EROOT%/}/usr/src/linux ]] && MAKELINK=1
+ if [[ -e ${EROOT%/}/usr/src/linux && ! -L ${EROOT%/}/usr/src/linux ]] ; then
+ die "${EROOT%/}/usr/src/linux exist and is not a symlink"
+ fi
- if [[ ${MAKELINK} == 1 ]]; then
- ln -sf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die
+ ln -snf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die
fi
# Don't forget to make directory for sysfs
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 860105feb8b8..4914a7562813 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -238,6 +238,16 @@ kernel-install_test() {
local qemu_arch=$(kernel-install_get_qemu_arch)
+ # some modules may complicate or even fail the test boot
+ local omit_mods=(
+ crypt dm dmraid lvm mdraid multipath nbd # no need for blockdev tools
+ network network-manager # no need for network
+ btrfs cifs nfs zfs zfsexpandknowledge # we don't need it
+ plymouth # hangs, or sometimes steals output
+ rngd # hangs or segfaults sometimes
+ i18n # copies all the fonts from /usr/share/consolefonts
+ )
+
# NB: if you pass a path that does not exist or is not a regular
# file/directory, dracut will silently ignore it and use the default
# https://github.com/dracutdevs/dracut/issues/1136
@@ -249,6 +259,10 @@ kernel-install_test() {
--confdir "${T}"/empty-directory \
--no-hostonly \
--kmoddir "${modules}" \
+ --force-add "qemu" \
+ --omit "${omit_mods[*]}" \
+ --nostrip \
+ --no-early-microcode \
"${T}/initrd" "${version}" || die
kernel-install_create_qemu_image "${T}/fs.img"
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 0589318ef519..ddf44f354e17 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.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: lua-utils.eclass
@@ -212,7 +212,9 @@ _lua_get_library_file() {
die "Invalid implementation: ${impl}"
;;
esac
+
libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die
+ libdir="${libdir#${ESYSROOT#${SYSROOT}}}"
debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}"
echo "${libdir}/${libname}"
@@ -274,6 +276,7 @@ _lua_export() {
local val
val=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${impl}) || die
+ val="${val#${ESYSROOT#${SYSROOT}}}"
export LUA_CMOD_DIR=${val}
debug-print "${FUNCNAME}: LUA_CMOD_DIR = ${LUA_CMOD_DIR}"
@@ -282,6 +285,7 @@ _lua_export() {
local val
val=$($(tc-getPKG_CONFIG) --variable includedir ${impl}) || die
+ val="${val#${ESYSROOT#${SYSROOT}}}"
export LUA_INCLUDE_DIR=${val}
debug-print "${FUNCNAME}: LUA_INCLUDE_DIR = ${LUA_INCLUDE_DIR}"
@@ -298,6 +302,7 @@ _lua_export() {
local val
val=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${impl}) || die
+ val="${val#${ESYSROOT#${SYSROOT}}}"
export LUA_LMOD_DIR=${val}
debug-print "${FUNCNAME}: LUA_LMOD_DIR = ${LUA_LMOD_DIR}"
diff --git a/eclass/meson-multilib.eclass b/eclass/meson-multilib.eclass
new file mode 100644
index 000000000000..01e14988463a
--- /dev/null
+++ b/eclass/meson-multilib.eclass
@@ -0,0 +1,131 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: meson-multilib.eclass
+# @MAINTAINER:
+# Author: Matt Turner <mattst88@gentoo.org>
+# @AUTHOR:
+# Author: Michał Górny <mgorny@gentoo.org>
+# Author: Matt Turner <mattst88@gentoo.org>
+# @SUPPORTED_EAPIS: 7
+# @BLURB: meson wrapper for multilib builds
+# @DESCRIPTION:
+# The meson-multilib.eclass provides a glue between meson.eclass(5)
+# and multilib-minimal.eclass(5), aiming to provide a convenient way
+# to build packages using meson for multiple ABIs.
+#
+# Inheriting this eclass sets IUSE and exports default multilib_src_*()
+# sub-phases that call meson phase functions for each ABI enabled.
+# The multilib_src_*() functions can be defined in ebuild just like
+# in multilib-minimal, yet they ought to call appropriate meson
+# phase rather than 'default'.
+
+if [[ -z ${_MESON_MULTILIB_ECLASS} ]] ; then
+_MESON_MULTILIB_ECLASS=1
+
+case ${EAPI:-0} in
+ 7) ;;
+ *) die "EAPI=${EAPI} is not supported" ;;
+esac
+
+inherit meson multilib-minimal
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
+
+# @FUNCTION: meson_native_use_bool
+# @USAGE: <USE flag> [option name]
+# @DESCRIPTION:
+# Given a USE flag and a meson project option, output a string like:
+#
+# -Doption=true
+# -Doption=false
+#
+# if building for the native ABI (multilib_is_native_abi is true). Otherwise,
+# output -Doption=false. If the project option is unspecified, it defaults
+# to the USE flag.
+meson_native_use_bool() {
+ multilib_native_usex "${1}" "-D${2-${1}}=true" "-D${2-${1}}=false"
+}
+
+# @FUNCTION: meson_native_use_feature
+# @USAGE: <USE flag> [option name]
+# @DESCRIPTION:
+# Given a USE flag and a meson project option, output a string like:
+#
+# -Doption=enabled
+# -Doption=disabled
+#
+# if building for the native ABI (multilib_is_native_abi is true). Otherwise,
+# output -Doption=disabled. If the project option is unspecified, it defaults
+# to the USE flag.
+meson_native_use_feature() {
+ multilib_native_usex "${1}" "-D${2-${1}}=enabled" "-D${2-${1}}=disabled"
+}
+
+# @FUNCTION: meson_native_enabled
+# @USAGE: <option name>
+# @DESCRIPTION:
+# Output -Doption=enabled option if executables are being built
+# (multilib_is_native_abi is true). Otherwise, output -Doption=disabled option.
+meson_native_enabled() {
+ if multilib_is_native_abi; then
+ echo "-D${1}=enabled"
+ else
+ echo "-D${1}=disabled"
+ fi
+}
+
+# @FUNCTION: meson_native_true
+# @USAGE: <option name>
+# @DESCRIPTION:
+# Output -Doption=true option if executables are being built
+# (multilib_is_native_abi is true). Otherwise, output -Doption=false option.
+meson_native_true() {
+ if multilib_is_native_abi; then
+ echo "-D${1}=true"
+ else
+ echo "-D${1}=false"
+ fi
+}
+
+meson-multilib_src_configure() {
+ local _meson_args=( "${@}" )
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ meson_src_configure "${_meson_args[@]}"
+}
+
+meson-multilib_src_compile() {
+ local _meson_args=( "${@}" )
+
+ multilib-minimal_src_compile
+}
+
+multilib_src_compile() {
+ meson_src_compile "${_meson_args[@]}"
+}
+
+meson-multilib_src_test() {
+ local _meson_args=( "${@}" )
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ meson_src_test "${_meson_args[@]}"
+}
+
+meson-multilib_src_install() {
+ local _meson_args=( "${@}" )
+
+ multilib-minimal_src_install
+}
+
+multilib_src_install() {
+ meson_src_install "${_meson_args[@]}"
+}
+
+fi
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 0acc490452f2..c9a5e0b5956d 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -420,7 +420,10 @@ meson_src_install() {
debug-print-function ${FUNCNAME} "$@"
DESTDIR="${D}" eninja -C "${BUILD_DIR}" install "$@"
+
+ pushd "${S}" > /dev/null || die
einstalldocs
+ popd > /dev/null || die
}
fi
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index e85cee1b94ce..8ba055c603be 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -3,7 +3,7 @@
# @ECLASS: multilib-build.eclass
# @MAINTAINER:
-# gx86-multilib team <multilib@gentoo.org>
+# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass
index 136ee3b741d9..8f7c7ba6fb38 100644
--- a/eclass/multilib-minimal.eclass
+++ b/eclass/multilib-minimal.eclass
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: multilib-minimal.eclass
# @MAINTAINER:
-# Multilib team <multilib@gentoo.org>
+# Michał Górny <mgorny@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
# @DESCRIPTION:
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 095e3a4f4508..93c062cb36ac 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -399,22 +399,22 @@ multilib_env() {
export CFLAGS_lp64d=${CFLAGS_lp64d--mabi=lp64d -march=rv64imafdc}
export CHOST_lp64d=${CTARGET}
export CTARGET_lp64d=${CTARGET}
- export LIBDIR_lp64d="lib64/lp64d"
+ export LIBDIR_lp64d=${LIBDIR_lp64d-lib64/lp64d}
export CFLAGS_lp64=${CFLAGS_lp64--mabi=lp64 -march=rv64imac}
export CHOST_lp64=${CTARGET}
export CTARGET_lp64=${CTARGET}
- export LIBDIR_lp64="lib64/lp64"
+ export LIBDIR_lp64=${LIBDIR_lp64-lib64/lp64}
export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d -march=rv32imafdc}
export CHOST_ilp32d=${CTARGET/riscv64/riscv32}
export CTARGET_ilp32d=${CTARGET/riscv64/riscv32}
- export LIBDIR_ilp32d="lib32/ilp32d"
+ export LIBDIR_ilp32d=${LIBDIR_ilp32d-lib32/ilp32d}
export CFLAGS_ilp32=${CFLAGS_ilp32--mabi=ilp32 -march=rv32imac}
export CHOST_ilp32=${CTARGET/riscv64/riscv32}
export CTARGET_ilp32=${CTARGET/riscv64/riscv32}
- export LIBDIR_ilp32="lib32/ilp32"
+ export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32}
: ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32}
: ${DEFAULT_ABI=lp64d}
@@ -423,12 +423,12 @@ multilib_env() {
export CFLAGS_ilp32d=${CFLAGS_ilp32d--mabi=ilp32d}
export CHOST_ilp32d=${CTARGET}
export CTARGET_ilp32d=${CTARGET}
- export LIBDIR_ilp32d="lib32/ilp32d"
+ export LIBDIR_ilp32d=${LIBDIR_ilp32d-lib32/ilp32d}
export CFLAGS_ilp32=${CFLAGS_ilp32--mabi=ilp32 -march=rv32imac}
export CHOST_ilp32=${CTARGET}
export CTARGET_ilp32=${CTARGET}
- export LIBDIR_ilp32="lib32/ilp32"
+ export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32}
: ${MULTILIB_ABIS=ilp32d ilp32}
: ${DEFAULT_ABI=ilp32d}
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0082a231f0a0..3dbf221eac5d 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -42,7 +42,7 @@ inherit toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
- python3_{7..10}
+ python3_{8..10}
)
readonly _PYTHON_ALL_IMPLS
@@ -54,7 +54,7 @@ _PYTHON_HISTORICAL_IMPLS=(
jython2_7
pypy pypy1_{8,9} pypy2_0
python2_{5..7}
- python3_{1..6}
+ python3_{1..7}
)
readonly _PYTHON_HISTORICAL_IMPLS
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 7f712905c407..82979170009d 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.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: rebar.eclass
@@ -6,7 +6,7 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Amadeusz Żołnowski <aidecoe@gentoo.org>
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Build Erlang/OTP projects using dev-util/rebar.
# @DESCRIPTION:
# An eclass providing functions to build Erlang/OTP projects using
@@ -23,7 +23,7 @@ case "${EAPI:-0}" in
0|1|2|3|4|5)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 6)
+ 6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -33,9 +33,14 @@ esac
EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
RDEPEND="dev-lang/erlang:="
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
dev-util/rebar
- >=sys-apps/gawk-4.1"
+ >=sys-apps/gawk-4.1
+"
+if [[ ${EAPI} == 6 ]]; then
+ DEPEND+="${BDEPEND}"
+fi
# @ECLASS-VARIABLE: REBAR_APP_SRC
# @DESCRIPTION:
@@ -53,19 +58,17 @@ get_erl_libs() {
# @FUNCTION: _rebar_find_dep
# @INTERNAL
# @USAGE: <project_name>
-# @RETURN: full path with EPREFIX to a Erlang package/project on success,
-# code 1 when dependency is not found and code 2 if multiple versions of
-# dependency are found.
+# @RETURN: 0 success, 1 dependency not found, 2 multiple versions found
# @DESCRIPTION:
# Find a Erlang package/project by name in Erlang lib directory. Project
# directory is usually suffixed with version. It is matched to '<project_name>'
# or '<project_name>-*'.
_rebar_find_dep() {
- local pn="$1"
+ local pn="${1}"
local p
local result
- pushd "${EPREFIX}$(get_erl_libs)" >/dev/null || return 1
+ pushd "${EPREFIX%/}/$(get_erl_libs)" >/dev/null || return 1
for p in ${pn} ${pn}-*; do
if [[ -d ${p} ]]; then
# Ensure there's at most one matching.
@@ -104,7 +107,7 @@ erebar() {
(( $# > 0 )) || die "erebar: at least one target is required"
- local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
+ local -x ERL_LIBS="${EPREFIX%/}/$(get_erl_libs)"
[[ ${1} == eunit ]] && local -x ERL_LIBS="."
rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
@@ -123,9 +126,9 @@ erebar() {
rebar_fix_include_path() {
debug-print-function ${FUNCNAME} "${@}"
- local pn="$1"
+ local pn="${1}"
local rebar_config="${2:-rebar.config}"
- local erl_libs="${EPREFIX}$(get_erl_libs)"
+ local erl_libs="${EPREFIX%/}/$(get_erl_libs)"
local p
p="$(_rebar_find_dep "${pn}")" \
@@ -214,7 +217,7 @@ rebar_src_prepare() {
rebar_src_configure() {
debug-print-function ${FUNCNAME} "${@}"
- local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
+ local -x ERL_LIBS="${EPREFIX%/}/$(get_erl_libs)"
default
}
@@ -254,7 +257,7 @@ rebar_src_install() {
[[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done
if [[ -d priv ]]; then
- cp -pR priv "${ED}${dest}/" || die "failed to install priv/"
+ cp -pR priv "${ED%/}/${dest}/" || die "failed to install priv/"
fi
einstalldocs
diff --git a/eclass/tests/toolchain.sh b/eclass/tests/toolchain.sh
index 118d68c63df4..8e070cad4b98 100755
--- a/eclass/tests/toolchain.sh
+++ b/eclass/tests/toolchain.sh
@@ -86,6 +86,7 @@ test_downgrade_arch_flags 10 "-march=native" "-march=native"
test_downgrade_arch_flags 8 "-march=znver1" "-march=znver2"
test_downgrade_arch_flags 4.2 "-march=native" "-march=native"
test_downgrade_arch_flags 4.1 "-march=nocona" "-march=native"
+test_downgrade_arch_flags 9 "-march=znver2" "-march=znver3"
test_downgrade_arch_flags 10 "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1"
test_downgrade_arch_flags 4.9 "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1" "-march=foo -mno-sha -mno-rtm -mno-avx2 -mno-avx -mno-sse4.1"
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
index f48f7050732a..ffe7b9e1fd1c 100644
--- a/eclass/toolchain-glibc.eclass
+++ b/eclass/toolchain-glibc.eclass
@@ -1240,7 +1240,6 @@ toolchain-glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# s390
s390 /lib/ld.so.1
s390x /lib/ld64.so.1
@@ -1253,12 +1252,16 @@ toolchain-glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index f41ce22c5915..3c495631a0e8 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1300,6 +1300,7 @@ downgrade_arch_flags() {
# "added" "arch" "replacement"
local archlist=(
+ 10 znver3 znver2
9 znver2 znver1
4.9 bdver4 bdver3
4.9 bonnell atom
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 7bdf0d9d0e5b..4bf15eae2684 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -27,7 +27,7 @@ esac
# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
# @DESCRIPTION:
# Minimum vala API version (e.g. 0.36).
-VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.36}
+VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.44}
# @ECLASS-VARIABLE: VALA_MAX_API_VERSION
# @DESCRIPTION: