summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
commit5b5df25227111ef465caf5c52bcfb66dac3219cd (patch)
tree31b713cac6188358125cbb66b8804030328740f0 /eclass
parent02e2208f46f4e2c00fb9743cbc47350bdd233bfa (diff)
gentoo resync : 19.01.2018
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin41361 -> 41351 bytes
-rw-r--r--eclass/apache-2.eclass10
-rw-r--r--eclass/check-reqs.eclass37
-rw-r--r--eclass/l10n.eclass26
-rw-r--r--eclass/linux-mod.eclass17
-rw-r--r--eclass/toolchain-autoconf.eclass18
6 files changed, 52 insertions, 56 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 8b1740739ddd..47f0f2ac95f3 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index dbd55abe8c90..7b30b48e0894 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -24,12 +24,12 @@ esac
case $(get_version_component_range 1-2) in
2.4)
DEFAULT_MPM_THREADED="event" #509922
- RDEPEND=">=dev-libs/apr-1.5.1
+ CDEPEND=">=dev-libs/apr-1.5.1:=
!www-apache/mod_macro" #492578 #477702
;;
2.2)
DEFAULT_MPM_THREADED="worker"
- RDEPEND=">=dev-libs/apr-1.4.5" #368651
+ CDEPEND=">=dev-libs/apr-1.4.5:=" #368651
;;
*)
die "Unknown MAJOR.MINOR apache version."
@@ -101,9 +101,9 @@ for mpm in ${IUSE_MPMS} ; do
IUSE="${IUSE} apache2_mpms_${mpm}"
done
-DEPEND="dev-lang/perl
- =dev-libs/apr-1*
- =dev-libs/apr-util-1*[ldap?]
+DEPEND="${CDEPEND}
+ dev-lang/perl
+ =dev-libs/apr-util-1*:=[ldap?]
dev-libs/libpcre
apache2_modules_deflate? ( sys-libs/zlib )
apache2_modules_mime? ( app-misc/mime-types )
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index fe1852213441..bad7e34fe9a7 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: check-reqs.eclass
@@ -39,8 +39,6 @@
if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then
-inherit eutils
-
# @ECLASS-VARIABLE: CHECKREQS_MEMORY
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -68,22 +66,11 @@ case "${EAPI:-0}" in
*) die "EAPI=${EAPI} is not supported" ;;
esac
-# @FUNCTION: check_reqs
-# @DESCRIPTION:
# Obsolete function executing all the checks and printing out results
check_reqs() {
- debug-print-function ${FUNCNAME} "$@"
-
- [[ ${EAPI:-0} == [012345] ]] || die "${FUNCNAME} is banned in EAPI > 5"
-
- echo
- eqawarn "Package calling old ${FUNCNAME} function."
- eqawarn "Please file a bug against the package."
- eqawarn "It should call check-reqs_pkg_pretend and check-reqs_pkg_setup"
- eqawarn "and possibly use EAPI=4 or later."
- echo
-
- check-reqs_pkg_setup "$@"
+ eerror "Package calling old ${FUNCNAME} function."
+ eerror "It should call check-reqs_pkg_pretend and check-reqs_pkg_setup."
+ die "${FUNCNAME} is banned"
}
# @FUNCTION: check-reqs_pkg_setup
@@ -176,10 +163,9 @@ check-reqs_get_kibibytes() {
local size=${1%[GMT]}
case ${unit} in
- G) echo $((1024 * 1024 * size)) ;;
M) echo $((1024 * size)) ;;
+ G) echo $((1024 * 1024 * size)) ;;
T) echo $((1024 * 1024 * 1024 * size)) ;;
- [0-9]) echo $((1024 * size)) ;;
*)
die "${FUNCNAME}: Unknown unit: ${unit}"
;;
@@ -196,17 +182,8 @@ check-reqs_get_number() {
[[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]"
- local unit=${1:(-1)}
local size=${1%[GMT]}
- local msg=eerror
- [[ ${EAPI:-0} == [012345] ]] && msg=eqawarn
-
- # Check for unset units and warn about them.
- # Backcompat.
- if [[ ${size} == ${1} ]]; then
- ${msg} "Package does not specify unit for the size check"
- ${msg} "File bug against the package. It should specify the unit."
- fi
+ [[ ${size} == ${1} ]] && die "${FUNCNAME}: Missing unit: ${1}"
echo ${size}
}
@@ -224,8 +201,8 @@ check-reqs_get_unit() {
local unit=${1:(-1)}
case ${unit} in
+ M) echo "MiB" ;;
G) echo "GiB" ;;
- [M0-9]) echo "MiB" ;;
T) echo "TiB" ;;
*)
die "${FUNCNAME}: Unknown unit: ${unit}"
diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass
index 4b0111934d72..82f4ab113f52 100644
--- a/eclass/l10n.eclass
+++ b/eclass/l10n.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: l10n.eclass
@@ -102,26 +102,22 @@ l10n_find_plocales_changes() {
# are selected, fall back on PLOCALE_BACKUP. When the disabled argument
# is given, return the disabled locales instead of the enabled ones.
l10n_get_locales() {
- local disabled_locales enabled_locales loc locs
+ local loc locs
if [[ -z ${LINGUAS+set} ]]; then
# enable all if unset
- enabled_locales=${PLOCALES}
- elif [[ -z ${LINGUAS} ]]; then
- # disable all if empty
- disabled_locales=${PLOCALES}
+ locs=${PLOCALES}
else
- for loc in ${PLOCALES}; do
- if has ${loc} ${LINGUAS}; then
- enabled_locales+="${loc} "
- else
- disabled_locales+="${loc} "
- fi
+ for loc in ${LINGUAS}; do
+ has ${loc} ${PLOCALES} && locs+="${loc} "
done
fi
+ [[ -z ${locs} ]] && locs=${PLOCALE_BACKUP}
if [[ ${1} == disabled ]]; then
- locs=${disabled_locales}
- else
- locs=${enabled_locales:-${PLOCALE_BACKUP}}
+ local disabled_locs
+ for loc in ${PLOCALES}; do
+ has ${loc} ${locs} || disabled_locs+="${loc} "
+ done
+ locs=${disabled_locs}
fi
printf "%s" "${locs}"
}
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index b3ea3e40f30f..bf580cf4cfa9 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -22,6 +22,12 @@
# A string containing the USE flag to use for making this eclass optional
# The recommended non-empty value is 'modules'
+# @ECLASS-VARIABLE: MODULES_OPTIONAL_USE_IUSE_DEFAULT
+# @DESCRIPTION:
+# A boolean to control the IUSE default state for the MODULES_OPTIONAL_USE USE
+# flag. Default value is unset (false). True represented by 1 or 'on', other
+# values including unset treated as false.
+
# @ECLASS-VARIABLE: KERNEL_DIR
# @DESCRIPTION:
# A string containing the directory of the target kernel sources. The default value is
@@ -129,7 +135,16 @@
inherit eutils linux-info multilib
EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm
-IUSE="kernel_linux ${MODULES_OPTIONAL_USE}"
+case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in
+ [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;;
+ *) _modules_optional_use_iuse_default='+' ;;
+esac
+
+[[ -n "${_modules_optional_use_iuse_default}" ]] && case ${EAPI:-0} in
+ 0) die "EAPI=${EAPI} is not supported with MODULES_OPTIONAL_USE_IUSE_DEFAULT due to lack of IUSE defaults" ;;
+esac
+
+IUSE="kernel_linux ${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}"
SLOT="0"
RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( virtual/modutils ) ${MODULES_OPTIONAL_USE:+)}"
DEPEND="${RDEPEND}
diff --git a/eclass/toolchain-autoconf.eclass b/eclass/toolchain-autoconf.eclass
index 59057b8d6ebb..18276f0b49c5 100644
--- a/eclass/toolchain-autoconf.eclass
+++ b/eclass/toolchain-autoconf.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-autoconf.eclass
@@ -9,16 +9,24 @@
# This eclass contains the common phase functions migrated from
# sys-devel/autoconf eblits.
-if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
+case ${EAPI:-0} in
+ [0-5])
+ die "${ECLASS} is banned in EAPI ${EAPI:-0}"
+ ;;
+ 6)
+ ;;
+ *)
+ die "Unknown EAPI ${EAPI:-0}"
+ ;;
+esac
-inherit eutils
+if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
EXPORT_FUNCTIONS src_prepare src_configure src_install
toolchain-autoconf_src_prepare() {
find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
-
- [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
+ default
}
toolchain-autoconf_src_configure() {