summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /eclass
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37148 -> 37149 bytes
-rw-r--r--eclass/acct-group.eclass4
-rw-r--r--eclass/acct-user.eclass12
-rw-r--r--eclass/font.eclass3
-rw-r--r--eclass/gnome-python-common-r1.eclass4
-rw-r--r--eclass/kde5-functions.eclass1
-rw-r--r--eclass/kde5.eclass21
-rw-r--r--eclass/kernel-2.eclass8
-rw-r--r--eclass/mount-boot.eclass2
-rw-r--r--eclass/perl-functions.eclass10
-rw-r--r--eclass/perl-module.eclass57
-rw-r--r--eclass/qmail.eclass7
-rw-r--r--eclass/savedconfig.eclass58
-rw-r--r--eclass/ssl-cert.eclass19
-rw-r--r--eclass/toolchain.eclass5
-rw-r--r--eclass/user.eclass4
-rw-r--r--eclass/xdg-utils.eclass5
-rw-r--r--eclass/xorg-3.eclass8
18 files changed, 142 insertions, 86 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 8339035d1c00..f396a1b21217 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 9eab00db690f..d5ccd209c9e3 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -59,6 +59,9 @@ readonly ACCT_GROUP_NAME
# @DESCRIPTION:
# Preferred GID for the new group. This variable is obligatory, and its
# value must be unique across all group packages.
+#
+# Overlays should set this to -1 to dynamically allocate GID. Using -1
+# in ::gentoo is prohibited by policy.
# @ECLASS-VARIABLE: ACCT_GROUP_ENFORCE_ID
# @DESCRIPTION:
@@ -87,6 +90,7 @@ acct-group_pkg_pretend() {
# verify ACCT_GROUP_ID
[[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!"
+ [[ ${ACCT_GROUP_ID} -eq -1 ]] && return
[[ ${ACCT_GROUP_ID} -ge 0 ]] || die "Ebuild errors: ACCT_GROUP_ID=${ACCT_GROUP_ID} invalid!"
# check for ACCT_GROUP_ID collisions early
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 60009643c144..fa4f9daef8f7 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -67,6 +67,9 @@ readonly ACCT_USER_NAME
# @DESCRIPTION:
# Preferred UID for the new user. This variable is obligatory, and its
# value must be unique across all user packages.
+#
+# Overlays should set this to -1 to dynamically allocate UID. Using -1
+# in ::gentoo is prohibited by policy.
# @ECLASS-VARIABLE: ACCT_USER_ENFORCE_ID
# @DESCRIPTION:
@@ -279,6 +282,7 @@ acct-user_pkg_pretend() {
# verify ACCT_USER_ID
[[ -n ${ACCT_USER_ID} ]] || die "Ebuild error: ACCT_USER_ID must be set!"
+ [[ ${ACCT_USER_ID} -eq -1 ]] && return
[[ ${ACCT_USER_ID} -ge 0 ]] || die "Ebuild errors: ACCT_USER_ID=${ACCT_USER_ID} invalid!"
# check for ACCT_USER_ID collisions early
@@ -334,6 +338,14 @@ acct-user_pkg_preinst() {
if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then
ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]}
fi
+ # Path might be missing due to INSTALL_MASK, etc.
+ # https://bugs.gentoo.org/691478
+ if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
+ eerror "Home directory is missing from the installation image:"
+ eerror " ${ACCT_USER_HOME}"
+ eerror "Check INSTALL_MASK for entries that would cause this."
+ die "${ACCT_USER_HOME} does not exist"
+ fi
fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
fi
diff --git a/eclass/font.eclass b/eclass/font.eclass
index b559b3ace370..5f3e15eafc59 100644
--- a/eclass/font.eclass
+++ b/eclass/font.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: font.eclass
# @MAINTAINER:
# fonts@gentoo.org
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
# @BLURB: Eclass to make font installation uniform
case ${EAPI:-0} in
diff --git a/eclass/gnome-python-common-r1.eclass b/eclass/gnome-python-common-r1.eclass
index 0d604425b9ca..9fe793767708 100644
--- a/eclass/gnome-python-common-r1.eclass
+++ b/eclass/gnome-python-common-r1.eclass
@@ -56,12 +56,12 @@ if [[ ${GNOME_ORG_MODULE} != "gnome-python" ]]; then
DOCS="${DOCS} MAINTAINERS"
fi
-RDEPEND="~dev-python/${GNOME_ORG_MODULE}-base-${PV}
+RDEPEND="~dev-python/${GNOME_ORG_MODULE}-base-${PV}[${PYTHON_USEDEP}]
${PYTHON_DEPS}"
DEPEND="${RDEPEND}
virtual/pkgconfig"
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
gnome-python-common-r1_src_prepare() {
gnome2_src_prepare
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index a1b930a3eba0..377f741cb28f 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -42,7 +42,6 @@ case ${CATEGORY} in
: ${FRAMEWORKS_MINIMAL:=5.57.0}
: ${QT_MINIMAL:=5.11.1}
fi
- [[ ${PV} = 5.16.3 ]] && : ${FRAMEWORKS_MINIMAL:=5.58.0}
[[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999}
;;
esac
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index a7a08f97a5e2..347182b23316 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -62,12 +62,6 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# be set depending on the value of CATEGORY.
: ${KDE_AUTODEPS:=true}
-# @ECLASS-VARIABLE: KDE_BLOCK_SLOT4
-# @DESCRIPTION:
-# This variable only has any effect when when CATEGORY = "kde-apps" and
-# KDE_AUTODEPS is also set. If set to "true", add RDEPEND block on kde-apps/${PN}:4
-: ${KDE_BLOCK_SLOT4:=true}
-
# @ECLASS-VARIABLE: KDE_DEBUG
# @DESCRIPTION:
# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and -DQT_NO_DEBUG
@@ -295,6 +289,7 @@ _calculate_src_uri() {
case ${PN} in
kdelibs4support | \
+ kdewebkit | \
khtml | \
kjs | \
kjsembed | \
@@ -302,9 +297,6 @@ _calculate_src_uri() {
kross)
_kmname="portingAids/${_kmname}"
;;
- kdewebkit)
- [[ ${PV} = 5.57.0 ]] || _kmname="portingAids/${_kmname}"
- ;;
esac
case ${CATEGORY} in
@@ -678,17 +670,6 @@ kde5_src_install() {
cmake-utils_src_install
- # We don't want QCH and tags files to be compressed, because then
- # cmake can't find the tags and qthelp viewers can't find the docs
- local p=$(best_version dev-qt/qtcore:5)
- local pv=$(echo ${p/%-r[0-9]*/} | rev | cut -d - -f 1 | rev)
- if [[ ${pv} = 5.11* ]]; then
- #todo: clean up trailing slash check when EAPI <7 is removed
- if [[ -d ${ED%/}/usr/share/doc/qt-${pv} ]]; then
- docompress -x /usr/share/doc/qt-${pv}
- fi
- fi
-
if [[ ${EAPI} = 6 ]]; then
# We don't want /usr/share/doc/HTML to be compressed,
# because then khelpcenter can't find the docs
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 1b2b5d3e8b60..95011df82d87 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -191,9 +191,7 @@
# If you do change them, there is a chance that we will not fix resulting bugs;
# that of course does not mean we're not willing to help.
-PYTHON_COMPAT=( python{2_6,2_7} )
-
-inherit toolchain-funcs python-any-r1
+inherit toolchain-funcs
[[ ${EAPI:-0} == [012345] ]] && inherit epatch
[[ ${EAPI:-0} == [0123456] ]] && inherit estack eapi7-ver
case ${EAPI:-0} in
@@ -621,6 +619,10 @@ if [[ ${ETYPE} == sources ]]; then
kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
K_DEBLOB_AVAILABLE=1
if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then
+ PYTHON_COMPAT=( python2_7 )
+
+ inherit python-any-r1
+
IUSE="${IUSE} deblob"
# Reflect that kernels contain firmware blobs unless otherwise
diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass
index 4d886c8d8475..938df6732f43 100644
--- a/eclass/mount-boot.eclass
+++ b/eclass/mount-boot.eclass
@@ -54,7 +54,7 @@ mount-boot_check_status() {
# note that /dev/BOOT is in the Gentoo default /etc/fstab file
local fstabstate=$(awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' /etc/fstab | egrep "^/boot$" )
local procstate=$(awk '$2 ~ /^\/boot$/ {print $2}' /proc/mounts)
- local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/\/boot .*,ro,/p')
+ local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts | sed -n '/^\/boot .*,ro,/p')
if [ -n "${fstabstate}" ] && [ -n "${procstate}" ] ; then
if [ -n "${proc_ro}" ] ; then
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e7775f31b8e0..e6168a075345 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: perl-functions.eclass
@@ -8,7 +8,7 @@
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Huettel <dilfridge@gentoo.org>
# Kent Fredric <kentnl@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: helper functions eclass for perl modules
# @DESCRIPTION:
# The perl-functions eclass is designed to allow easier installation of perl
@@ -19,7 +19,7 @@
[[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
case "${EAPI:-0}" in
- 5|6)
+ 5|6|7)
;;
*)
die "EAPI=${EAPI} is not supported by perl-functions.eclass"
@@ -142,7 +142,7 @@ perl_fix_packlist() {
einfo "Fixing packlist file /${f#${D}}"
# remove the temporary build dir path
- sed -i -e "s:${D}:/:g" "${f}"
+ sed -i -e "s:${D%/}/:/:g" "${f}"
# remove duplicate entries
sort -u "${f}" > "${packlist_temp}"
@@ -170,7 +170,7 @@ perl_remove_temppath() {
find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
if file "${f}" | grep -q -i " text" ; then
grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
- sed -i -e "s:${D}:/:g" "${f}"
+ sed -i -e "s:${D%/}/:/:g" "${f}"
fi
done
}
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 20b9947caca9..e1fb97df3260 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: perl-module.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Hüttel <dilfridge@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: eclass for installing Perl module distributions
# @DESCRIPTION:
# The perl-module eclass is designed to allow easier installation of Perl
@@ -23,7 +23,7 @@ case ${EAPI:-0} in
inherit eutils multiprocessing unpacker perl-functions
PERL_EXPF="src_unpack src_prepare src_configure src_compile src_test src_install"
;;
- 6)
+ 6|7)
inherit multiprocessing perl-functions
PERL_EXPF="src_prepare src_configure src_compile src_test src_install"
;;
@@ -78,7 +78,7 @@ case ${EAPI:-0} in
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes)
- DEPEND="dev-lang/perl:="
+ DEPEND="dev-lang/perl"
RDEPEND="dev-lang/perl:="
;;
noslotop)
@@ -88,17 +88,44 @@ case ${EAPI:-0} in
esac
if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
- eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6. If you don't want a slot operator"
+ eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. If you don't want a slot operator"
die "set GENTOO_DEPEND_ON_PERL=noslotop instead."
fi
if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
- eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Use perl-module.eclass if you need"
+ eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need"
die "phase functions, perl-functions.eclass if not."
fi
EXPORT_FUNCTIONS ${PERL_EXPF}
;;
+ 7)
+ [[ ${CATEGORY} == perl-core ]] && \
+ PERL_EXPF+=" pkg_postinst pkg_postrm"
+
+ case "${GENTOO_DEPEND_ON_PERL:-yes}" in
+ yes)
+ DEPEND="dev-lang/perl"
+ BDEPEND="dev-lang/perl"
+ RDEPEND="dev-lang/perl:="
+ ;;
+ noslotop)
+ DEPEND="dev-lang/perl"
+ BDEPEND="dev-lang/perl"
+ RDEPEND="dev-lang/perl"
+ ;;
+ esac
+
+ if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
+ die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later."
+ fi
+
+ if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
+ die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later."
+ fi
+
+ EXPORT_FUNCTIONS ${PERL_EXPF}
+ ;;
*)
die "EAPI=${EAPI:-0} is not supported by perl-module.eclass"
;;
@@ -108,42 +135,42 @@ LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
# @ECLASS-VARIABLE: DIST_NAME
# @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override PN for the calculation of S,
+# (EAPI=6 and later) This variable provides a way to override PN for the calculation of S,
# SRC_URI, and HOMEPAGE. Defaults to PN.
# @ECLASS-VARIABLE: DIST_VERSION
# @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override PV for the calculation of S and SRC_URI.
+# (EAPI=6 and later) This variable provides a way to override PV for the calculation of S and SRC_URI.
# Use it to provide the non-normalized, upstream version number. Defaults to PV.
# Named MODULE_VERSION in EAPI=5.
# @ECLASS-VARIABLE: DIST_A_EXT
# @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override the distfile extension for the calculation of
+# (EAPI=6 and later) This variable provides a way to override the distfile extension for the calculation of
# SRC_URI. Defaults to tar.gz. Named MODULE_A_EXT in EAPI=5.
# @ECLASS-VARIABLE: DIST_A
# @DESCRIPTION:
-# (EAPI=6) This variable provides a way to override the distfile name for the calculation of
+# (EAPI=6 and later) This variable provides a way to override the distfile name for the calculation of
# SRC_URI. Defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT} Named MODULE_A in EAPI=5.
# @ECLASS-VARIABLE: DIST_AUTHOR
# @DEFAULT_UNSET
# @DESCRIPTION:
-# (EAPI=6) This variable sets the module author name for the calculation of
+# (EAPI=6 and later) This variable sets the module author name for the calculation of
# SRC_URI. Named MODULE_AUTHOR in EAPI=5.
# @ECLASS-VARIABLE: DIST_SECTION
# @DEFAULT_UNSET
# @DESCRIPTION:
-# (EAPI=6) This variable sets the module section for the calculation of
+# (EAPI=6 and later) This variable sets the module section for the calculation of
# SRC_URI. Only required in rare cases for very special snowflakes.
# Named MODULE_SECTION in EAPI=5.
# @ECLASS-VARIABLE: DIST_EXAMPLES
# @DEFAULT_UNSET
# @DESCRIPTION:
-# (EAPI=6) This Bash array allows passing a list of example files to be installed
+# (EAPI=6 and later) This Bash array allows passing a list of example files to be installed
# in /usr/share/doc/${PF}/examples. If set before inherit, automatically adds
# a use-flag examples, if not you'll have to add the useflag in your ebuild.
# Examples are installed only if the useflag examples exists and is activated.
@@ -314,7 +341,7 @@ perl-module_src_compile() {
# @ECLASS-VARIABLE: DIST_TEST
# @DESCRIPTION:
-# (EAPI=6) Variable that controls if tests are run in the test phase
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase
# at all, and if yes under which conditions. Defaults to "do parallel"
# If neither "do" nor "parallel" is recognized, tests are skipped.
# (In EAPI=5 the variable is called SRC_TEST, defaults to "skip", and
@@ -328,7 +355,7 @@ perl-module_src_compile() {
# @ECLASS-VARIABLE: DIST_TEST_OVERRIDE
# @DEFAULT_UNSET
# @DESCRIPTION:
-# (EAPI=6) Variable that controls if tests are run in the test phase
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase
# at all, and if yes under which conditions. It is intended for use in
# make.conf or the environment by ebuild authors during testing, and
# accepts the same values as DIST_TEST. If set, it overrides DIST_TEST
diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6ebbff442c7b..150b6c00aab3 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -102,6 +102,7 @@ qmail_set_cc() {
echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.'
echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.'
+ sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh
}
# @FUNCTION: qmail_create_groups
@@ -227,12 +228,6 @@ qmail_config_install() {
qmail_man_install() {
einfo "Installing manpages and documentation"
- # those are tagged for section 8 but named for
- # section 9 (which does not exist anyway)
- for i in *.9; do
- mv ${i} ${i/.9/.8}
- done
-
into /usr
doman *.[1578]
dodoc BLURB* CHANGES FAQ INSTALL* PIC* README* REMOVE* SECURITY \
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index e0b1953d56d0..b2be715630af 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -38,6 +38,13 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
+# @ECLASS-VARIABLE: _SAVEDCONFIG_CONFIGURATION_FILE
+# @DEFAULT_UNSET
+# @INTERNAL
+# @DESCRIPTION:
+# Path of configuration file, relative to /etc/portage/savedconfig,
+# restored by restore_config() and saved by save_config().
+
# @FUNCTION: save_config
# @USAGE: <config files to save>
# @DESCRIPTION:
@@ -51,20 +58,26 @@ save_config() {
fi
[[ $# -eq 0 ]] && die "Usage: save_config <files>"
- local dest="/etc/portage/savedconfig/${CATEGORY}"
+ local configfile
+ if [[ -n ${_SAVEDCONFIG_CONFIGURATION_FILE} ]] ; then
+ configfile="/etc/portage/savedconfig/${_SAVEDCONFIG_CONFIGURATION_FILE}"
+ else
+ configfile="/etc/portage/savedconfig/${CATEGORY}/${PF}"
+ fi
+
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 $*"
+ # Just one file, so have the ${configfile} be that config file
+ dodir "${configfile%/*}"
+ cp "$@" "${ED%/}/${configfile}" || die "failed to save $*"
else
- # A dir, or multiple files, so have the ${PF} be a dir
+ # A dir, or multiple files, so have the ${configfile} be a dir
# with all the saved stuff below it
- dodir "${dest}/${PF}"
- treecopy "$@" "${ED%/}/${dest}/${PF}" || die "failed to save $*"
+ dodir "${configfile}"
+ treecopy "$@" "${ED%/}/${configfile}" || die "failed to save $*"
fi
elog "Your configuration for ${CATEGORY}/${PF} has been saved in "
- elog "/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure."
+ elog "\"${configfile}\" for your editing pleasure."
elog "You can edit these files by hand and remerge this package with"
elog "USE=savedconfig to customise the configuration."
elog "You can rename this file/directory to one of the following for"
@@ -76,7 +89,7 @@ save_config() {
# @FUNCTION: restore_config
# @USAGE: <config files to restore>
# @DESCRIPTION:
-# Restores the configuation saved ebuild previously potentially with user edits.
+# Restores the package's configuration file probably with user edits.
# You can restore a single file or a whole bunch, just make sure you call
# restore_config with all of the files to restore at the same time.
#
@@ -100,28 +113,33 @@ restore_config() {
use savedconfig || return
- local found check configfile
+ local found check checked configfile
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}
+ configfile=${base}/${CTARGET:+"${CTARGET}/"}${check}
+ [[ -r ${configfile} ]] || configfile=${base}/${CHOST:+"${CHOST}/"}${check}
[[ -r ${configfile} ]] || configfile=${base}/${check}
- einfo "Checking existence of ${configfile} ..."
- if [[ -r "${configfile}" ]]; then
- einfo "found ${configfile}"
- found=${configfile};
- break;
+ [[ "${checked}" == *"${configfile} "* ]] && continue
+ einfo "Checking existence of \"${configfile}\" ..."
+ if [[ -r "${configfile}" ]] ; then
+ einfo "Found \"${configfile}\""
+ found=${configfile}
+ _SAVEDCONFIG_CONFIGURATION_FILE=${configfile#${base}/}
+ break
fi
+
+ checked+="${configfile} "
done
+
if [[ -f ${found} ]]; then
- elog "Building using saved configfile ${found}"
+ elog "Building using saved configfile \"${found}\""
if [ $# -gt 0 ]; then
cp -pPR "${found}" "$1" || die "Failed to restore ${found} to $1"
else
die "need to know the restoration filename"
fi
elif [[ -d ${found} ]]; then
- elog "Building using saved config directory ${found}"
+ elog "Building using saved config directory \"${found}\""
local dest=${PWD}
pushd "${found}" > /dev/null
treecopy . "${dest}" || die "Failed to restore ${found} to $1"
@@ -133,7 +151,7 @@ restore_config() {
die "Reading config files failed"
fi
ewarn "No saved config to restore - please remove USE=savedconfig or"
- ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
+ ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT%/}/etc/portage/savedconfig/${CATEGORY}/${PN}"
ewarn "Your config file(s) will not be used this time"
fi
}
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index b5b4250ef226..0e7294f62299 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -5,7 +5,7 @@
# @MAINTAINER:
# @AUTHOR:
# Max Kalika <max@gentoo.org>
-# @SUPPORTED_EAPIS: 1 2 3 4 5 6
+# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
# @BLURB: Eclass for SSL certificates
# @DESCRIPTION:
# This eclass implements a standard installation procedure for installing
@@ -18,7 +18,7 @@ case "${EAPI:-0}" in
0)
die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
;;
- 1|2|3|4|5|6)
+ 1|2|3|4|5|6|7)
;;
*)
die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
@@ -42,11 +42,22 @@ esac
if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
if [[ "${SSL_CERT_MANDATORY}" == "0" ]]; then
- DEPEND="${SSL_CERT_USE}? ( || ( dev-libs/openssl:0 dev-libs/libressl:0 ) )"
+ SSL_DEPEND="${SSL_CERT_USE}? ( || ( dev-libs/openssl:0 dev-libs/libressl:0 ) )"
IUSE="${SSL_CERT_USE}"
else
- DEPEND="|| ( dev-libs/openssl:0 dev-libs/libressl:0 )"
+ SSL_DEPEND="|| ( dev-libs/openssl:0 dev-libs/libressl:0 )"
fi
+
+ case "${EAPI}" in
+ 1|2|3|4|5|6)
+ DEPEND="${SSL_DEPEND}"
+ ;;
+ *)
+ BDEPEND="${SSL_DEPEND}"
+ ;;
+ esac
+
+ unset SSL_DEPEND
fi
# @FUNCTION: gen_cnf
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6bc04b4cbfe4..d7f6f1993652 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -687,9 +687,9 @@ do_gcc_CYGWINPORTS_patches() {
[[ -n ${CYGWINPORTS_GITREV} ]] || return 0
use elibc_Cygwin || return 0
- local -a patches
local p d="${WORKDIR}/gcc-${CYGWINPORTS_GITREV}"
- readarray -t patches < <(sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport)
+ # readarray -t is available since bash-4.4 only, #690686
+ local patches=( $(sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport) )
for p in ${patches[*]}; do
epatch "${d}/${p}"
done
@@ -2373,7 +2373,6 @@ is_ada() {
is_cxx() {
gcc-lang-supported 'c++' || return 1
- ! is_crosscompile && tc_version_is_at_least 4.8 && return 0
use_if_iuse cxx
}
diff --git a/eclass/user.eclass b/eclass/user.eclass
index a3cacb6d5f10..f433d32bf7ed 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -358,7 +358,7 @@ enewgroup() {
egetusername() {
[[ $# -eq 1 ]] || die "usage: egetusername <uid>"
- id -u -n "$1"
+ egetent passwd "$1" | cut -d: -f1
}
# @FUNCTION: egetgroupname
@@ -368,7 +368,7 @@ egetusername() {
egetgroupname() {
[[ $# -eq 1 ]] || die "usage: egetgroupname <gid>"
- id -g -n "$1"
+ egetent group "$1" | cut -d: -f1
}
# @FUNCTION: egethome
diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
index f5121830d888..738df8658910 100644
--- a/eclass/xdg-utils.eclass
+++ b/eclass/xdg-utils.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 2004-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: xdg-utils.eclass
# @MAINTAINER:
# gnome@gentoo.org
+# freedesktop-bugs@gentoo.org
# @AUTHOR:
# Original author: Gilles Dartiguelongue <eva@gentoo.org>
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
@@ -85,7 +86,7 @@ xdg_icon_cache_update() {
fi
ebegin "Updating icons cache"
- local retval=0
+ local dir f retval=0
local fails=( )
for dir in "${EROOT%/}"/usr/share/icons/*
do
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index f135058fba6f..217aadecb3b3 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -89,10 +89,16 @@ fi
HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}"
+# @ECLASS-VARIABLE: XORG_TARBALL_SUFFIX
+# @DESCRIPTION:
+# Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults
+# to bz2.
+: ${XORG_TARBALL_SUFFIX:="bz2"}
+
if [[ -n ${GIT_ECLASS} ]]; then
: ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"}
elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then
- SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2"
+ SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.${XORG_TARBALL_SUFFIX}"
fi
: ${SLOT:=0}