summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
commit2018227e9344edb9da15fc6a4a8298086cc2aa77 (patch)
treec18e1c09e605e94e2a1e93345ad25746cc9e14b9 /eclass
parent6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff)
gentoo resync : 02.06.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36805 -> 36801 bytes
-rw-r--r--eclass/kernel-2.eclass6
-rw-r--r--eclass/llvm.eclass69
-rw-r--r--eclass/meson.eclass25
-rw-r--r--eclass/mozcoreconf-v6.eclass2
-rw-r--r--eclass/postgres.eclass4
-rw-r--r--eclass/qt5-build.eclass4
-rw-r--r--eclass/rust-toolchain.eclass2
-rw-r--r--eclass/savedconfig.eclass21
-rw-r--r--eclass/toolchain.eclass8
10 files changed, 105 insertions, 36 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 30097b73516e..cd43b545c745 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 6303e3e6c499..1b2b5d3e8b60 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -656,8 +656,8 @@ if [[ ${ETYPE} == sources ]]; then
${DEBLOB_CHECK_URI}
)"
elif kernel_is lt 4 14; then
- # We have no way to deblob older kernels, so just mark them as
- # tainted with non-libre materials.
+ # Deblobbing is not available, so just mark kernels older
+ # than 4.14 as tainted with non-libre materials.
LICENSE+=" linux-firmware"
fi
fi
@@ -1227,7 +1227,7 @@ unipatch() {
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
debug-print "genpatches tarball: $tarball"
- local GCC_MAJOR_VER=$(gcc-major-version)
+ local GCC_MAJOR_VER=$(gcc-major-version)
local GCC_MINOR_VER=$(gcc-minor-version)
# optimization patch for gcc < 8.X and kernel > 4.13
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index ca10e742f1b1..d61effb5e9c6 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.eclass
@@ -6,7 +6,7 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Utility functions to build against slotted LLVM
# @DESCRIPTION:
# The llvm.eclass provides utility functions that can be used to build
@@ -17,20 +17,21 @@
# a proper dependency string yourself to guarantee that appropriate
# version of LLVM is installed.
#
-# Example use for a package supporting LLVM 3.8 to 5:
+# Example use for a package supporting LLVM 5 to 7:
# @CODE
# inherit cmake-utils llvm
#
# RDEPEND="
-# <sys-devel/llvm-6_rc:=
+# <sys-devel/llvm-8:=
# || (
+# sys-devel/llvm:7
+# sys-devel/llvm:6
# sys-devel/llvm:5
-# sys-devel/llvm:4
-# >=sys-devel/llvm-3.8:0
# )
# "
+# DEPEND=${RDEPEND}
#
-# LLVM_MAX_SLOT=5
+# LLVM_MAX_SLOT=7
#
# # only if you need to define one explicitly
# pkg_setup() {
@@ -46,11 +47,12 @@
# # note: do not use := on both clang and llvm, it can match different
# # slots then. clang pulls llvm in, so we can skip the latter.
# RDEPEND="
-# >=sys-devel/clang-4:=[llvm_targets_AMDGPU(+)]
+# >=sys-devel/clang-6:=[llvm_targets_AMDGPU(+)]
# "
+# DEPEND=${RDEPEND}
#
# llvm_check_deps() {
-# has_version "sys-devel/clang:${LLVM_SLOT}[llvm_targets_AMDGPU(+)]"
+# has_version -d "sys-devel/clang:${LLVM_SLOT}[llvm_targets_AMDGPU(+)]"
# }
# @CODE
@@ -58,7 +60,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}"
@@ -82,11 +84,19 @@ if [[ ! ${_LLVM_ECLASS} ]]; then
declare -g -r _LLVM_KNOWN_SLOTS=( 9 8 7 6 5 4 )
# @FUNCTION: get_llvm_prefix
-# @USAGE: [<max_slot>]
+# @USAGE: [-b|-d] [<max_slot>]
# @DESCRIPTION:
# Find the newest LLVM install that is acceptable for the package,
# and print an absolute path to it.
#
+# If -b is specified, the checks are performed relative to BROOT,
+# and BROOT-path is returned. This is appropriate when your package
+# calls llvm-config executable. -b is supported since EAPI 7.
+#
+# If -d is specified, the checks are performed relative to ESYSROOT,
+# and ESYSROOT-path is returned. This is appropriate when your package
+# uses CMake find_package(LLVM). -d is the default.
+#
# If <max_slot> is specified, then only LLVM versions that are not newer
# than <max_slot> will be considered. Otherwise, all LLVM versions would
# be considered acceptable. The function does not support specifying
@@ -103,6 +113,37 @@ declare -g -r _LLVM_KNOWN_SLOTS=( 9 8 7 6 5 4 )
get_llvm_prefix() {
debug-print-function ${FUNCNAME} "${@}"
+ local hv_switch=-d
+ while [[ ${1} == -* ]]; do
+ case ${1} in
+ -b|-d) hv_switch=${1};;
+ *) break;;
+ esac
+ shift
+ done
+
+ local prefix=
+ if [[ ${EAPI} != 6 ]]; then
+ case ${hv_switch} in
+ -b)
+ prefix=${BROOT}
+ ;;
+ -d)
+ prefix=${ESYSROOT}
+ ;;
+ esac
+ else
+ case ${hv_switch} in
+ -b)
+ die "${FUNCNAME} -b is not supported in EAPI ${EAPI}"
+ ;;
+ -d)
+ prefix=${EPREFIX}
+ hv_switch=
+ ;;
+ esac
+ fi
+
local max_slot=${1}
local slot
for slot in "${_LLVM_KNOWN_SLOTS[@]}"; do
@@ -120,10 +161,10 @@ get_llvm_prefix() {
llvm_check_deps || continue
else
# check if LLVM package is installed
- has_version "sys-devel/llvm:${slot}" || continue
+ has_version ${hv_switch} "sys-devel/llvm:${slot}" || continue
fi
- echo "${EPREFIX}/usr/lib/llvm/${slot}"
+ echo "${prefix}/usr/lib/llvm/${slot}"
return
done
@@ -134,8 +175,8 @@ get_llvm_prefix() {
# fallback to :0
# assume it's always <= 4 (the lower max_slot allowed)
- if has_version "sys-devel/llvm:0"; then
- echo "${EPREFIX}/usr"
+ if has_version ${hv_switch} "sys-devel/llvm:0"; then
+ echo "${prefix}/usr"
return
fi
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 65b09932a7ac..b9562376b868 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -41,7 +41,7 @@ esac
if [[ -z ${_MESON_ECLASS} ]]; then
-inherit ninja-utils python-utils-r1 toolchain-funcs
+inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs
fi
@@ -78,6 +78,12 @@ fi
# Optional meson arguments as Bash array; this should be defined before
# calling meson_src_configure.
+# @VARIABLE: emesontestargs
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Optional meson test arguments as Bash array; this should be defined before
+# calling meson_src_test.
+
read -d '' __MESON_ARRAY_PARSER <<"EOF"
import shlex
@@ -246,12 +252,27 @@ meson_src_compile() {
}
# @FUNCTION: meson_src_test
+# @USAGE: [extra meson test arguments]
# @DESCRIPTION:
# This is the meson_src_test function.
meson_src_test() {
debug-print-function ${FUNCNAME} "$@"
- eninja -C "${BUILD_DIR}" test
+ local mesontestargs=(
+ --verbose
+ -C "${BUILD_DIR}"
+ )
+ [[ -n ${NINJAOPTS} || -n ${MAKEOPTS} ]] &&
+ mesontestargs+=(
+ --num-processes "$(makeopts_jobs ${NINJAOPTS:-${MAKEOPTS}})"
+ )
+
+ # Append additional arguments from ebuild
+ mesontestargs+=("${emesontestargs[@]}")
+
+ set -- meson test "${mesontestargs[@]}" "$@"
+ echo "$@" >&2
+ "$@" || die "tests failed"
}
# @FUNCTION: meson_src_install
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index efc9a83d84f1..b844a3591c8a 100644
--- a/eclass/mozcoreconf-v6.eclass
+++ b/eclass/mozcoreconf-v6.eclass
@@ -196,7 +196,7 @@ mozconfig_init() {
fi
# Strip optimization so it does not end up in compile string
- filter-flags '-O*'
+ filter-flags '-O* -ggdb3'
# Strip over-aggressive CFLAGS
use custom-cflags || strip-flags
diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass
index b76604b1af24..ce8b6e3a992d 100644
--- a/eclass/postgres.eclass
+++ b/eclass/postgres.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
inherit user
@@ -27,7 +27,7 @@ esac
# @DESCRIPTION:
# List of versions to reverse sort POSTGRES_COMPAT slots
-_POSTGRES_ALL_VERSIONS=( 12 11 10 9.6 9.5 9.4 9.3 9.2 )
+_POSTGRES_ALL_VERSIONS=( 13 12 11 10 9.6 9.5 9.4 9.3 9.2 )
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 613af912b93a..d4f4678eed07 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -166,9 +166,9 @@ qt5-build_src_prepare() {
-e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)"
# Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake
- sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s:): \
+ sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s|)| \
${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)' \
- 'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&:" \
+ 'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&|" \
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
configure || die "sed failed (respect env for qmake build)"
sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index f3b7ab9a568c..6a559842f07f 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -4,7 +4,7 @@
# @ECLASS: rust-toolchain.eclass
# @MAINTAINER:
# Rust Project <rust@gentoo.org>
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: helps map gentoo arches to rust ABIs
# @DESCRIPTION:
# This eclass contains a src_unpack default phase function, and
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index 1e9ac6c80b4d..c4a0ccdc8fa0 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: savedconfig.eclass
@@ -33,6 +33,11 @@ inherit portability
IUSE="savedconfig"
+case ${EAPI} in
+ [4-7]) ;;
+ *) die "EAPI=${EAPI:-0} is not supported" ;;
+esac
+
# @FUNCTION: save_config
# @USAGE: <config files to save>
# @DESCRIPTION:
@@ -46,19 +51,16 @@ save_config() {
fi
[[ $# -eq 0 ]] && die "Usage: save_config <files>"
- # Be lazy in our EAPI compat
- : ${ED:=${D}}
-
local dest="/etc/portage/savedconfig/${CATEGORY}"
if [[ $# -eq 1 && -f $1 ]] ; then
# Just one file, so have the ${PF} be that config file
dodir "${dest}"
- cp "$@" "${ED}/${dest}/${PF}" || die "failed to save $*"
+ cp "$@" "${ED%/}/${dest}/${PF}" || die "failed to save $*"
else
# A dir, or multiple files, so have the ${PF} be a dir
# with all the saved stuff below it
dodir "${dest}/${PF}"
- treecopy "$@" "${ED}/${dest}/${PF}" || die "failed to save $*"
+ treecopy "$@" "${ED%/}/${dest}/${PF}" || die "failed to save $*"
fi
elog "Your configuration for ${CATEGORY}/${PF} has been saved in "
@@ -99,7 +101,7 @@ restore_config() {
use savedconfig || return
local found check configfile
- local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
+ local base=${PORTAGE_CONFIGROOT%/}/etc/portage/savedconfig
for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
configfile=${base}/${CTARGET}/${check}
[[ -r ${configfile} ]] || configfile=${base}/${CHOST}/${check}
@@ -143,10 +145,7 @@ savedconfig_pkg_postinst() {
# are worse :/.
if use savedconfig ; then
- # Be lazy in our EAPI compat
- : ${EROOT:=${ROOT}}
-
- find "${EROOT}/etc/portage/savedconfig/${CATEGORY}/${PF}" \
+ find "${EROOT%/}/etc/portage/savedconfig/${CATEGORY}/${PF}" \
-exec touch {} + 2>/dev/null
fi
}
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 9df8ecf69bea..3d997fb65819 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1112,6 +1112,9 @@ toolchain_src_configure() {
*-elf|*-eabi)
confgcc+=( --with-newlib )
;;
+ *-musl*)
+ confgcc+=( --enable-__cxa_atexit )
+ ;;
*-gnu*)
confgcc+=(
--enable-__cxa_atexit
@@ -1210,6 +1213,10 @@ toolchain_src_configure() {
is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double )
[[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double )
;;
+ riscv)
+ # Add --with-abi flags to set default ABI
+ confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
+ ;;
esac
# if the target can do biarch (-m32/-m64), enable it. overhead should
@@ -1637,6 +1644,7 @@ gcc-abi-map() {
local map=()
case ${CTARGET} in
mips*) map=("o32 32" "n32 n32" "n64 64") ;;
+ riscv*) map=("lp64d lp64d" "lp64 lp64") ;;
x86_64*) map=("amd64 m64" "x86 m32" "x32 mx32") ;;
esac