summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
commit38423c67c8a23f6a1bc42038193182e2da3116eb (patch)
tree04e2cf4bd43601b77daa79fe654e409187093c5e /eclass
parent623ee73d661e5ed8475cb264511f683407d87365 (diff)
gentoo resync : 25.04.2020
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36452 -> 36142 bytes
-rw-r--r--eclass/distutils-r1.eclass2
-rw-r--r--eclass/ecm.eclass58
-rw-r--r--eclass/fcaps.eclass99
-rw-r--r--eclass/font.eclass2
-rw-r--r--eclass/kde.org.eclass9
-rw-r--r--eclass/kde5-functions.eclass244
-rw-r--r--eclass/kde5.eclass439
-rw-r--r--eclass/meson.eclass55
-rw-r--r--eclass/mozextension.eclass16
-rw-r--r--eclass/python-single-r1.eclass22
-rw-r--r--eclass/python-utils-r1.eclass10
-rw-r--r--eclass/rpm.eclass5
-rw-r--r--eclass/rust-toolchain.eclass28
-rwxr-xr-xeclass/tests/python-utils-r1.sh14
-rw-r--r--eclass/texlive-module.eclass33
16 files changed, 178 insertions, 858 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index d45340dacba2..809d5b660b6e 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index fd6c0193d12e..51e99a009df1 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -873,7 +873,7 @@ distutils-r1_python_install() {
local root=${D%/}/_${EPYTHON}
[[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D%/}
- esetup.py install --root="${root}" "${args[@]}"
+ esetup.py install --skip-build --root="${root}" "${args[@]}"
local forbidden_package_names=( examples test tests .pytest_cache )
local p
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 0e3c64b0a2ad..12b31e4ef327 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -74,8 +74,8 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_po
# @ECLASS-VARIABLE: ECM_DEBUG
# @DESCRIPTION:
-# Add "debug" to IUSE. If !debug, add -DNDEBUG (via cmake_src_configure)
-# and -DQT_NO_DEBUG to CPPFLAGS. If set to "false", do nothing.
+# Add "debug" to IUSE. If !debug, add -DQT_NO_DEBUG to CPPFLAGS. If set to
+# "false", do nothing.
: ${ECM_DEBUG:=true}
# @ECLASS-VARIABLE: ECM_DESIGNERPLUGIN
@@ -173,17 +173,10 @@ case ${ECM_NONGUI} in
true) ;;
false)
# gui applications need breeze or oxygen for basic iconset, bug #564838
- if [[ -n ${_KDE5_ECLASS} ]] ; then
- RDEPEND+=" || (
- >=kde-frameworks/breeze-icons-${KFMIN}:${KFSLOT}
- kde-frameworks/oxygen-icons:*
- )"
- else
- RDEPEND+=" || (
- kde-frameworks/breeze-icons:*
- kde-frameworks/oxygen-icons:*
- )"
- fi
+ RDEPEND+=" || (
+ kde-frameworks/breeze-icons:*
+ kde-frameworks/oxygen-icons:*
+ )"
;;
*)
eerror "Unknown value for \${ECM_NONGUI}"
@@ -205,11 +198,7 @@ esac
case ${ECM_DESIGNERPLUGIN} in
true)
IUSE+=" designer"
- if [[ -n ${_KDE5_ECLASS} ]] ; then
- BDEPEND+=" designer? ( >=dev-qt/designer-5.12.3:${KFSLOT} )"
- else
- BDEPEND+=" designer? ( dev-qt/designer:${KFSLOT} )"
- fi
+ BDEPEND+=" designer? ( dev-qt/designer:${KFSLOT} )"
;;
false) ;;
*)
@@ -244,14 +233,11 @@ esac
case ${ECM_QTHELP} in
true)
IUSE+=" doc"
- if [[ -n ${_KDE5_ECLASS} ]] ; then
- COMMONDEPEND+=" doc? ( >=dev-qt/qt-docs-5.12.3:${KFSLOT} )"
- BDEPEND+=" doc? ( >=dev-qt/qthelp-5.12.3:${KFSLOT} )"
- else
- COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${KFSLOT} )"
- BDEPEND+=" doc? ( dev-qt/qthelp:${KFSLOT} )"
- fi
- BDEPEND+=" doc? ( >=app-doc/doxygen-1.8.13-r1 )"
+ COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${KFSLOT} )"
+ BDEPEND+=" doc? (
+ >=app-doc/doxygen-1.8.13-r1
+ dev-qt/qthelp:${KFSLOT}
+ )"
;;
false) ;;
*)
@@ -263,11 +249,7 @@ esac
case ${ECM_TEST} in
true|optional|forceoptional|forceoptional-recursive)
IUSE+=" test"
- if [[ -n ${_KDE5_ECLASS} ]] ; then
- DEPEND+=" test? ( >=dev-qt/qttest-5.12.3:${KFSLOT} )"
- else
- DEPEND+=" test? ( dev-qt/qttest:${KFSLOT} )"
- fi
+ DEPEND+=" test? ( dev-qt/qttest:${KFSLOT} )"
RESTRICT+=" !test? ( test )"
;;
false) ;;
@@ -279,11 +261,7 @@ esac
BDEPEND+=" >=kde-frameworks/extra-cmake-modules-${KFMIN}:${KFSLOT}"
RDEPEND+=" >=kde-frameworks/kf-env-4"
-if [[ -n ${_KDE5_ECLASS} ]] ; then
- COMMONDEPEND+=" >=dev-qt/qtcore-5.12.3:${KFSLOT}"
-else
- COMMONDEPEND+=" dev-qt/qtcore:${KFSLOT}"
-fi
+COMMONDEPEND+=" dev-qt/qtcore:${KFSLOT}"
DEPEND+=" ${COMMONDEPEND}"
RDEPEND+=" ${COMMONDEPEND}"
@@ -445,11 +423,8 @@ ecm_src_prepare() {
done
fi
- # don't change behaviour for kde5.eclass consumers
- # for ported ebuilds, limit playing field of this to kde-*/ categories
- if [[ -n ${_KDE5_ECLASS} ]] ; then
- _ecm_strip_handbook_translations # TODO: kde5.eclass cleanup
- elif [[ ${CATEGORY} = kde-* ]] ; then
+ # limit playing field of locale stripping to kde-*/ categories
+ if [[ ${CATEGORY} = kde-* ]] ; then
# always install unconditionally for kconfigwidgets - if you use
# language X as system language, and there is a combobox with language
# names, the translated language name for language Y is taken from
@@ -501,7 +476,6 @@ ecm_src_prepare() {
ecm_src_configure() {
debug-print-function ${FUNCNAME} "$@"
- # we rely on cmake.eclass to append -DNDEBUG too
if in_iuse debug && ! use debug; then
append-cppflags -DQT_NO_DEBUG
fi
diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass
index 0bb23f8cca70..4bef00d40ac7 100644
--- a/eclass/fcaps.eclass
+++ b/eclass/fcaps.eclass
@@ -33,10 +33,15 @@ _FCAPS_ECLASS=1
IUSE="+filecaps"
-# We can't use libcap-ng atm due to #471414.
+# Since it is needed in pkg_postinst() it must be in RDEPEND
case "${EAPI:-0}" in
- [0-6]) DEPEND="filecaps? ( sys-libs/libcap )" ;;
- *) BDEPEND="filecaps? ( sys-libs/libcap )" ;;
+ [0-6])
+ RDEPEND="filecaps? ( sys-libs/libcap )"
+ ;;
+ *)
+ BDEPEND="filecaps? ( sys-libs/libcap )"
+ RDEPEND="${BDEPEND}"
+ ;;
esac
# @ECLASS-VARIABLE: FILECAPS
@@ -134,69 +139,31 @@ fcaps() {
# by people.
chmod ${caps_mode} "${file}" || die
- # Set/verify funcs for sys-libs/libcap.
- _libcap() { setcap "${caps}" "${file}" ; }
- _libcap_verify() { setcap -v "${caps}" "${file}" >/dev/null ; }
-
- # Set/verify funcs for sys-libs/libcap-ng.
- # Note: filecap only supports =ep mode.
- # It also expects a different form:
- # setcap cap_foo,cap_bar
- # filecap foo bar
- _libcap_ng() {
- local caps=",${caps%=ep}"
- filecap "${file}" "${caps//,cap_}"
- }
- _libcap_ng_verify() {
- # libcap-ng has a crappy interface
- local rcaps icaps caps=",${caps%=ep}"
- rcaps=$(filecap "${file}" | \
- sed -nr \
- -e "s:^.{${#file}} +::" \
- -e 's:, +:\n:g' \
- -e 2p | \
- LC_ALL=C sort)
- [[ ${PIPESTATUS[0]} -eq 0 ]] || return 1
- icaps=$(echo "${caps//,cap_}" | LC_ALL=C sort)
- [[ ${rcaps} == ${icaps} ]]
- }
-
- local out cmd notfound=0
- for cmd in _libcap _libcap_ng ; do
- if ! out=$(LC_ALL=C ${cmd} 2>&1) ; then
- case ${out} in
- *"command not found"*)
- : $(( ++notfound ))
- continue
- ;;
- # ENOTSUP and EOPNOTSUPP might be the same value which means
- # strerror() on them is unstable -- we can get both. #559608
- *"Not supported"*|\
- *"Operation not supported"*)
- local fstype=$(stat -f -c %T "${file}")
- ewarn "Could not set caps on '${file}' due to missing filesystem support:"
- ewarn "* enable XATTR support for '${fstype}' in your kernel (if configurable)"
- ewarn "* mount the fs with the user_xattr option (if not the default)"
- ewarn "* enable the relevant FS_SECURITY option (if configurable)"
- break
- ;;
- *)
- eerror "Setting caps '${caps}' on file '${file}' failed:"
- eerror "${out}"
- die "could not set caps"
- ;;
- esac
- else
- # Sanity check that everything took.
- ${cmd}_verify || die "Checking caps '${caps}' on '${file}' failed"
-
- # Everything worked. Move on to the next file.
- continue 2
- fi
- done
- if [[ ${notfound} -eq 2 ]] && [[ -z ${_FCAPS_WARNED} ]] ; then
- _FCAPS_WARNED="true"
- ewarn "Could not find cap utils; make sure libcap or libcap-ng is available."
+ if ! out=$(LC_ALL=C setcap "${caps}" "${file}" 2>&1) ; then
+ case ${out} in
+ # ENOTSUP and EOPNOTSUPP might be the same value which means
+ # strerror() on them is unstable -- we can get both. #559608
+ *"Not supported"*|\
+ *"Operation not supported"*)
+ local fstype=$(stat -f -c %T "${file}")
+ ewarn "Could not set caps on '${file}' due to missing filesystem support:"
+ ewarn "* enable XATTR support for '${fstype}' in your kernel (if configurable)"
+ ewarn "* mount the fs with the user_xattr option (if not the default)"
+ ewarn "* enable the relevant FS_SECURITY option (if configurable)"
+ ;;
+ *)
+ eerror "Setting caps '${caps}' on file '${file}' failed:"
+ eerror "${out}"
+ die "could not set caps"
+ ;;
+ esac
+ else
+ # Sanity check that everything took.
+ setcap -v "${caps}" "${file}" >/dev/null \
+ || die "Checking caps '${caps}' on '${file}' failed"
+
+ # Everything worked. Move on to the next file.
+ continue
fi
fi
diff --git a/eclass/font.eclass b/eclass/font.eclass
index bf24701f12fc..e9e448a8155b 100644
--- a/eclass/font.eclass
+++ b/eclass/font.eclass
@@ -170,7 +170,7 @@ font_src_install() {
font_xfont_config "${dir}"
popd > /dev/null || die
done
- elif [[ ${FONT_S/ } != "${FONT_S}" ]]; then
+ elif [[ ${FONT_S/[[:space:]]} != "${FONT_S}" ]]; then
# backwards compatibility code, can be removed after 2021-02-14
eqawarn "Using a space-separated list for FONT_S is deprecated."
eqawarn "Use a bash array instead if there are multiple directories."
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index bb9bd618eb2e..f2e6f03b22b1 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -250,11 +250,10 @@ kde.org_pkg_nofetch() {
kde.org_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
- if [[ ${KDE_BUILD_TYPE} = live ]]; then
- git-r3_src_unpack
- else
- default
- fi
+ case ${KDE_BUILD_TYPE} in
+ live) git-r3_src_unpack ;&
+ *) default ;;
+ esac
}
fi
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
deleted file mode 100644
index df63e517bef8..000000000000
--- a/eclass/kde5-functions.eclass
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: kde5-functions.eclass
-# @MAINTAINER:
-# kde@gentoo.org
-# @SUPPORTED_EAPIS: 7
-# @BLURB: Common ebuild functions for packages based on KDE Frameworks 5.
-# @DESCRIPTION:
-# This eclass contains functions shared by the other KDE eclasses and forms
-# part of their public API.
-#
-# This eclass must not be inherited directly by an ebuild.
-
-if [[ -z ${_KDE5_FUNCTIONS_ECLASS} ]]; then
-_KDE5_FUNCTIONS_ECLASS=1
-
-if [[ -z ${_KDE5_ECLASS} ]]; then
- eerror "This DEAD eclass must not be inherited directly by an ebuild."
- die "Removal due on 2020-04-16."
-fi
-
-case ${EAPI} in
- 7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: QT_MINIMAL
-# @DESCRIPTION:
-# Minimum version of Qt to require. This affects add_qt_dep.
-: ${QT_MINIMAL:=5.12.3}
-
-# @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL
-# @DESCRIPTION:
-# Minimum version of Frameworks to require. This affects add_frameworks_dep.
-: ${FRAMEWORKS_MINIMAL:=5.60.0}
-
-# @ECLASS-VARIABLE: PLASMA_MINIMAL
-# @DESCRIPTION:
-# Minimum version of Plasma to require. This affects add_plasma_dep.
-: ${PLASMA_MINIMAL:=5.15.5}
-
-# @ECLASS-VARIABLE: KDE_APPS_MINIMAL
-# @DESCRIPTION:
-# Minimum version of KDE Applications to require. This affects add_kdeapps_dep.
-: ${KDE_APPS_MINIMAL:=19.04.3}
-
-# @FUNCTION: _add_category_dep
-# @INTERNAL
-# @DESCRIPTION:
-# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep,
-# and finally, add_qt_dep.
-_add_category_dep() {
- debug-print-function ${FUNCNAME} "$@"
-
- local category=${1}
- local package=${2}
- local use=${3}
- local version=${4}
- local slot=${5}
-
- if [[ -n ${use} ]] ; then
- local use="[${use}]"
- fi
-
- if [[ -n ${version} ]] ; then
- local operator=">="
- local version="-${version}"
- fi
-
- if [[ -n ${slot} ]] ; then
- slot=":${slot}"
- elif [[ ${SLOT%\/*} = 5 ]] ; then
- slot=":${SLOT%\/*}"
- fi
-
- echo " ${operator}${category}/${package}${version}${slot}${use}"
-}
-
-# @FUNCTION: add_frameworks_dep
-# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
-# @DESCRIPTION:
-# Create proper dependency for kde-frameworks/ dependencies.
-# This takes 1 to 4 arguments. The first being the package name, the optional
-# second is additional USE flags to append, and the optional third is the
-# version to use instead of the automatic version (use sparingly). In addition,
-# the optional fourth argument defines slot+operator instead of automatic slot
-# (use even more sparingly).
-# The output of this should be added directly to DEPEND/RDEPEND, and may be
-# wrapped in a USE conditional (but not an || conditional without an extra set
-# of parentheses).
-# PORTING: no replacement
-add_frameworks_dep() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ $# -gt 4 ]]; then
- die "${FUNCNAME} was called with too many arguments"
- fi
-
- local version
-
- if [[ -n ${3} ]]; then
- version=${3}
- elif [[ ${CATEGORY} = kde-frameworks ]]; then
- version=$(ver_cut 1-2)
- elif [[ -z ${3} ]] ; then
- version=${FRAMEWORKS_MINIMAL}
- fi
-
- _add_category_dep kde-frameworks "${1}" "${2}" "${version}" "${4}"
-}
-
-# @FUNCTION: add_plasma_dep
-# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
-# @DESCRIPTION:
-# Create proper dependency for kde-plasma/ dependencies.
-# This takes 1 to 4 arguments. The first being the package name, the optional
-# second is additional USE flags to append, and the optional third is the
-# version to use instead of the automatic version (use sparingly). In addition,
-# the optional fourth argument defines slot+operator instead of automatic slot
-# (use even more sparingly).
-# The output of this should be added directly to DEPEND/RDEPEND, and may be
-# wrapped in a USE conditional (but not an || conditional without an extra set
-# of parentheses).
-# PORTING: no replacement
-add_plasma_dep() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ $# -gt 4 ]]; then
- die "${FUNCNAME} was called with too many arguments"
- fi
-
- local version
-
- if [[ -n ${3} ]]; then
- version=${3}
- elif [[ ${CATEGORY} = kde-plasma ]]; then
- version=$(ver_cut 1-3)
- elif [[ -z ${3} ]] ; then
- version=${PLASMA_MINIMAL}
- fi
-
- _add_category_dep kde-plasma "${1}" "${2}" "${version}" "${4}"
-}
-
-# @FUNCTION: add_kdeapps_dep
-# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
-# @DESCRIPTION:
-# Create proper dependency for kde-apps/ dependencies.
-# This takes 1 to 4 arguments. The first being the package name, the optional
-# second is additional USE flags to append, and the optional third is the
-# version to use instead of the automatic version (use sparingly). In addition,
-# the optional fourth argument defines slot+operator instead of automatic slot
-# (use even more sparingly).
-# The output of this should be added directly to DEPEND/RDEPEND, and may be
-# wrapped in a USE conditional (but not an || conditional without an extra set
-# of parentheses).
-# PORTING: no replacement
-add_kdeapps_dep() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ $# -gt 4 ]]; then
- die "${FUNCNAME} was called with too many arguments"
- fi
-
- local version
-
- if [[ -n ${3} ]]; then
- version=${3}
- elif [[ ${CATEGORY} = kde-apps ]]; then
- version=$(ver_cut 1-3)
- elif [[ -z ${3} ]] ; then
- version=${KDE_APPS_MINIMAL}
- fi
-
- _add_category_dep kde-apps "${1}" "${2}" "${version}" "${4}"
-}
-
-# @FUNCTION: add_qt_dep
-# @USAGE: <package name> [USE flags] [minimum version] [slot + operator]
-# @DESCRIPTION:
-# Create proper dependency for dev-qt/ dependencies.
-# This takes 1 to 4 arguments. The first being the package name, the optional
-# second is additional USE flags to append, and the optional third is the
-# version to use instead of the automatic version (use sparingly). In addition,
-# the optional fourth argument defines slot+operator instead of automatic slot
-# (use even more sparingly).
-# The output of this should be added directly to DEPEND/RDEPEND, and may be
-# wrapped in a USE conditional (but not an || conditional without an extra set
-# of parentheses).
-# PORTING: no replacement
-add_qt_dep() {
- debug-print-function ${FUNCNAME} "$@"
-
- if [[ $# -gt 4 ]]; then
- die "${FUNCNAME} was called with too many arguments"
- fi
-
- local version=${3}
- local slot=${4}
-
- if [[ -z ${version} ]]; then
- version=${QT_MINIMAL}
- fi
- if [[ -z ${slot} ]]; then
- slot="5"
- fi
-
- _add_category_dep dev-qt "${1}" "${2}" "${version}" "${slot}"
-}
-
-# @FUNCTION: punt_bogus_dep
-# @USAGE: <prefix> <dependency>
-# @DESCRIPTION:
-# Removes a specified dependency from a find_package call with multiple components.
-# PORTING: Use ecm_punt_bogus_dep from ecm.eclass instead.
-punt_bogus_dep() {
- local prefix=${1}
- local dep=${2}
-
- if [[ ! -e "CMakeLists.txt" ]]; then
- return
- fi
-
- pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
-
- # pcregrep returns non-zero on no matches/error
- if [[ $? != 0 ]] ; then
- return
- fi
-
- local length=$(wc -l "${T}/bogus${dep}" | cut -d " " -f 1)
- local first=$(head -n 1 "${T}/bogus${dep}" | cut -d ":" -f 1)
- local last=$(( ${length} + ${first} - 1))
-
- sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
-
- if [[ ${length} = 1 ]] ; then
- sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by kde5-functions.eclass - /" -i CMakeLists.txt || die
- fi
-}
-
-fi
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
deleted file mode 100644
index 0b8aa82ecf70..000000000000
--- a/eclass/kde5.eclass
+++ /dev/null
@@ -1,439 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: kde5.eclass
-# @MAINTAINER:
-# kde@gentoo.org
-# @SUPPORTED_EAPIS: 7
-# @BLURB: Support eclass for packages that follow KDE packaging conventions.
-# @DESCRIPTION:
-# This eclass is *deprecated*. Please read the PORTING notes for switching to
-# ecm.eclass in case the package is using extra-cmake-modules, otherwise just
-# use cmake.eclass instead. For projects hosted on kde.org infrastructure,
-# inherit kde.org.eclass to fetch and unpack sources independent of the build
-# system being used.
-#
-# This eclass unconditionally inherits kde5-functions.eclass and all its public
-# functions and variables may be considered as part of this eclass's API.
-#
-# This eclass unconditionally inherits kde.org.eclass and either ecm.eclass if
-# KDE_AUTODEPS=true (default) or cmake.eclass if KDE_AUTODEPS=false.
-# All their public variables and helper functions (not phase functions) may
-# be considered as part of this eclass's API.
-#
-# This eclass's phase functions are not intended to be mixed and matched, so if
-# any phase functions are overridden the version here should also be called.
-
-if [[ -z ${_KDE5_ECLASS} ]]; then
-_KDE5_ECLASS=1
-
-# Propagate KMNAME to kde.org.eclass
-# PORTING: Use KDE_ORG_NAME from kde.org.eclass instead
-if [[ -z ${KDE_ORG_NAME} ]]; then
- KDE_ORG_NAME=${KMNAME:=$PN}
-fi
-
-inherit flag-o-matic kde.org kde5-functions xdg
-
-# @ECLASS-VARIABLE: KDE_AUTODEPS
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# For any other value, add dependencies on dev-qt/qtcore:5, kde-frameworks/kf-env
-# and kde-frameworks/extra-cmake-modules:5. Additionally, required blockers may
-# be set depending on the value of CATEGORY.
-# PORTING: no replacement
-: ${KDE_AUTODEPS:=true}
-
-# @ECLASS-VARIABLE: KDE_DEBUG
-# @DESCRIPTION:
-# If set to "false", add -DNDEBUG (via cmake_src_configure) and -DQT_NO_DEBUG
-# to CPPFLAGS.
-# Otherwise, add debug to IUSE.
-# PORTING: ECM_DEBUG in ecm.eclass
-: ${KDE_DEBUG:=true}
-
-# @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# Otherwise, add "designer" to IUSE to toggle build of designer plugins
-# and add the necessary DEPENDs.
-# PORTING: ECM_DESIGNERPLUGIN in ecm.eclass
-: ${KDE_DESIGNERPLUGIN:=false}
-
-# @ECLASS-VARIABLE: KDE_EXAMPLES
-# @DESCRIPTION:
-# If set to "false", unconditionally ignore a top-level examples subdirectory.
-# Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
-# PORTING: ECM_EXAMPLES in ecm.eclass
-: ${KDE_EXAMPLES:=false}
-
-# @ECLASS-VARIABLE: KDE_HANDBOOK
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
-# generate and install KDE handbook.
-# If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
-# when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
-# If set to "forceoptional", remove a KF5DocTools dependency from the root
-# CMakeLists.txt in addition to the above.
-# PORTING: ECM_HANDBOOK in ecm.eclass
-: ${KDE_HANDBOOK:=false}
-
-# @ECLASS-VARIABLE: KDE_DOC_DIR
-# @DESCRIPTION:
-# Specifies the location of the KDE handbook if not the default.
-# PORTING: ECM_HANDBOOK_DIR in ecm.eclass
-: ${KDE_DOC_DIR:=doc}
-
-# @ECLASS-VARIABLE: KDE_PO_DIRS
-# @DESCRIPTION:
-# Specifies the possible locations of KDE l10n files if not the default.
-# PORTING: ECM_PO_DIRS in ecm.eclass
-: ${KDE_PO_DIRS:="po poqm"}
-
-# @ECLASS-VARIABLE: KDE_QTHELP
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# Otherwise, add "doc" to IUSE, add the appropriate dependency, generate
-# and install Qt compressed help files with -DBUILD_QCH=ON when USE=doc.
-# PORTING: ECM_QTHELP in ecm.eclass
-if [[ ${CATEGORY} = kde-frameworks ]]; then
- : ${KDE_QTHELP:=true}
-fi
-: ${KDE_QTHELP:=false}
-
-# @ECLASS-VARIABLE: KDE_TEST
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
-# If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
-# when USE=!test.
-# If set to "forceoptional", remove a Qt5Test dependency and comment test
-# subdirs from the root CMakeLists.txt in addition to the above.
-# If set to "forceoptional-recursive", remove Qt5Test dependencies and make
-# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in ${S}
-# and below conditional on BUILD_TESTING. This is always meant as a short-term
-# fix and creates ${T}/${P}-tests-optional.patch to refine and submit upstream.
-# PORTING: ECM_TEST in ecm.eclass
-if [[ ${CATEGORY} = kde-frameworks ]]; then
- : ${KDE_TEST:=true}
-fi
-: ${KDE_TEST:=false}
-
-# @ECLASS-VARIABLE: KDE_SUBSLOT
-# @DESCRIPTION:
-# If set to "false", do nothing.
-# If set to "true", add a subslot to the package, where subslot is either
-# defined as major.minor version for kde-*/ categories or ${PV} if other.
-# For any other value, that value will be used as subslot.
-# PORTING: no replacement, define in ebuild
-: ${KDE_SUBSLOT:=false}
-
-# PORTING: LICENSE no longer set by eclass, define in ebuild
-LICENSE="GPL-2"
-# PORTING: SLOT no longer set by eclass except for kde-frameworks
-[[ ${CATEGORY} = kde-frameworks ]] || SLOT=5
-
-case ${KDE_SUBSLOT} in
- false) ;;
- true)
- case ${CATEGORY} in
- kde-frameworks | \
- kde-plasma | \
- kde-apps)
- SLOT+="/$(ver_cut 1-2)"
- ;;
- *)
- SLOT+="/${PV}"
- ;;
- esac
- ;;
- *)
- SLOT+="/${KDE_SUBSLOT}"
- ;;
-esac
-
-case ${KDE_AUTODEPS} in
- false)
- inherit cmake
- # @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS
- # @DESCRIPTION:
- # If set to "false", do nothing.
- # For any other value, assume the package is using KDEInstallDirs macro and switch
- # KDE_INSTALL_USE_QT_SYS_PATHS to ON.
- : ${ECM_KDEINSTALLDIRS:=true}
-
- case ${KDE_DEBUG} in
- false) ;;
- *)
- IUSE+=" debug"
- ;;
- esac
-
- case ${KDE_TEST} in
- false) ;;
- *)
- IUSE+=" test"
- DEPEND+=" test? ( dev-qt/qttest:5 )"
- ;;
- esac
- ;;
- *)
- # all packages need breeze/oxygen icons for basic iconset, bug #564838
- if [[ ${PN} != breeze-icons && ${PN} != oxygen-icons ]]; then
- ECM_NONGUI=false
- fi
- # propagate deprecated variables to ecm.eclass
- if [[ -z ${ECM_DESIGNERPLUGIN} && ${CATEGORY} != kde-apps ]]; then
- ECM_DESIGNERPLUGIN=${KDE_DESIGNERPLUGIN}
- KDE_DESIGNERPLUGIN=false # use fallback var only for kde-apps
- fi
- [[ -z ${ECM_DEBUG} ]] && ECM_DEBUG=${KDE_DEBUG}
- [[ -z ${ECM_EXAMPLES} ]] && ECM_EXAMPLES=${KDE_EXAMPLES}
- [[ -z ${ECM_HANDBOOK} ]] && ECM_HANDBOOK=${KDE_HANDBOOK}
- [[ -z ${ECM_HANDBOOK_DIR} ]] && ECM_HANDBOOK_DIR=${KDE_DOC_DIR}
- [[ -z ${ECM_PO_DIRS} ]] && ECM_PO_DIRS=${KDE_PO_DIRS}
- [[ -z ${ECM_QTHELP} ]] && ECM_QTHELP=${KDE_QTHELP}
- [[ -z ${ECM_TEST} ]] && ECM_TEST=${KDE_TEST}
- [[ -z ${KFMIN} ]] && KFMIN=${FRAMEWORKS_MINIMAL}
- inherit ecm
- ;;
-esac
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
-
-# @FUNCTION: _kde5_strip_handbook_translations
-# @INTERNAL
-# @DESCRIPTION:
-# If LINGUAS is defined, enable only the requested translations when required.
-_kde5_strip_handbook_translations() {
- if ! [[ -v LINGUAS ]]; then
- return
- fi
-
- local lang po
- for po in ${ECM_PO_DIRS}; do
- if [[ -d ${po} ]] ; then
- pushd ${po} > /dev/null || die
- local lang
- for lang in *; do
- if [[ -e ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
- case ${lang} in
- cmake_modules | \
- CMakeLists.txt | \
- ${PN}.pot) ;;
- *) rm -r ${lang} || die ;;
- esac
- if [[ -e CMakeLists.txt ]] ; then
- cmake_comment_add_subdirectory ${lang}
- sed -e "/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
- -i CMakeLists.txt || die
- fi
- fi
- done
- popd > /dev/null || die
- fi
- done
-}
-
-# @FUNCTION: cmake_use_find_package
-# @USAGE: <USE flag> <package name>
-# @DESCRIPTION:
-# Compatibility alias for cmake-utils.eclass -> cmake.eclass
-cmake-utils_use_find_package() {
- cmake_use_find_package "$@" ;
-}
-
-_kde5_really_dead() {
- eqawarn "${CATEGORY}/${PN} is using DEAD kde5.eclass that will be removed"
- eqawarn "on 2020-04-16. Read PORTING notes inside kde5.eclass and kde5-functions.eclass."
-}
-
-# @FUNCTION: kde5_pkg_pretend
-# @DESCRIPTION:
-# Checks if the active compiler meets the minimum version requirements.
-# phase function is only exported if KDE_GCC_MINIMAL is defined.
-kde5_pkg_pretend() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) ;;
- *) ecm_pkg_pretend ;;
- esac
-}
-
-# @FUNCTION: kde5_pkg_setup
-# @DESCRIPTION:
-# Checks if the active compiler meets the minimum version requirements.
-kde5_pkg_setup() {
- debug-print-function ${FUNCNAME} "$@"
- _kde5_really_dead
- case ${KDE_AUTODEPS} in
- false) ;;
- *) ecm_pkg_setup ;;
- esac
-}
-
-# @FUNCTION: kde5_src_unpack
-# @DESCRIPTION:
-# Unpack the sources, automatically handling both release and live ebuilds.
-kde5_src_unpack() {
- debug-print-function ${FUNCNAME} "$@"
- kde.org_src_unpack
-}
-
-# @FUNCTION: kde5_src_prepare
-# @DESCRIPTION:
-# Wrapper for cmake_src_prepare with lots of extra logic for magic
-# handling of linguas, tests, handbook etc.
-kde5_src_prepare() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false)
- cmake_src_prepare
-
- _kde5_strip_handbook_translations
-
- # only build unit tests when required
- if ! { in_iuse test && use test; } ; then
- if [[ ${KDE_TEST} = forceoptional ]] ; then
- punt_bogus_dep Qt5 Test
- # if forceoptional, also cover non-kde categories
- cmake_comment_add_subdirectory autotests test tests
- elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
- cmake_comment_add_subdirectory autotests test tests
- fi
- fi
- # in frameworks, tests = manual tests so never build them
- if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
- cmake_comment_add_subdirectory tests
- fi
- ;;
- *) ecm_src_prepare ;;
- esac
-
- # PORTING: bogus, overzealous 'en' docbook disabling is not carried over
- if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
- if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
- pushd ${KDE_DOC_DIR} > /dev/null || die
- local lang
- for lang in *; do
- if ! has ${lang} ${LINGUAS} ; then
- cmake_comment_add_subdirectory ${lang}
- fi
- done
- popd > /dev/null || die
- fi
- fi
-}
-
-# @FUNCTION: kde5_src_configure
-# @DESCRIPTION:
-# Wrapper for cmake_src_configure with extra logic for magic handling of
-# handbook, tests etc.
-kde5_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false)
- # we rely on cmake.eclass to append -DNDEBUG too
- if in_iuse debug && ! use debug; then
- append-cppflags -DQT_NO_DEBUG
- fi
-
- local cmakeargs
-
- if in_iuse test && ! use test ; then
- cmakeargs+=( -DBUILD_TESTING=OFF )
-
- if [[ ${KDE_TEST} = optional ]] ; then
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
- fi
- fi
- if [[ ${ECM_KDEINSTALLDIRS} != false ]] ; then
- cmakeargs+=(
- # install mkspecs in the same directory as qt stuff
- -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
- # move handbook outside of doc dir, bug 667138
- -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help"
- )
- fi
-
- # allow the ebuild to override what we set here
- mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
-
- cmake_src_configure
- ;;
- *) ecm_src_configure ;;
- esac
-}
-
-# @FUNCTION: kde5_src_compile
-# @DESCRIPTION:
-# Wrapper for cmake_src_compile. Currently doesn't do anything extra, but
-# is included as part of the API just in case it's needed in the future.
-kde5_src_compile() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) cmake_src_compile ;;
- *) ecm_src_compile ;;
- esac
-}
-
-# @FUNCTION: kde5_src_test
-# @DESCRIPTION:
-# Wrapper for cmake_src_test with extra logic for magic handling of dbus
-# and virtualx.
-kde5_src_test() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) cmake_src_test ;;
- *) ecm_src_test ;;
- esac
-}
-
-# @FUNCTION: kde5_src_install
-# @DESCRIPTION:
-# Wrapper for cmake_src_install. Currently doesn't do anything extra.
-kde5_src_install() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) cmake_src_install ;;
- *) ecm_src_install ;;
- esac
-}
-
-# @FUNCTION: kde5_pkg_preinst
-# @DESCRIPTION:
-# Sets up environment variables required in kde5_pkg_postinst.
-kde5_pkg_preinst() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) xdg_pkg_preinst ;;
- *) ecm_pkg_preinst ;;
- esac
-}
-
-# @FUNCTION: kde5_pkg_postinst
-# @DESCRIPTION:
-# Updates the various XDG caches (icon, desktop, mime) if necessary.
-kde5_pkg_postinst() {
- debug-print-function ${FUNCNAME} "$@"
- _kde5_really_dead
- case ${KDE_AUTODEPS} in
- false) xdg_pkg_postinst ;;
- *) ecm_pkg_postinst ;;
- esac
-}
-
-# @FUNCTION: kde5_pkg_postrm
-# @DESCRIPTION:
-# Updates the various XDG caches (icon, desktop, mime) if necessary.
-kde5_pkg_postrm() {
- debug-print-function ${FUNCNAME} "$@"
- case ${KDE_AUTODEPS} in
- false) xdg_pkg_postrm ;;
- *) ecm_pkg_postrm ;;
- esac
-}
-
-fi
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 16e17dd4a384..423a497e840c 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -23,9 +23,9 @@
#
# src_configure() {
# local emesonargs=(
-# -Dqt4=$(usex qt4 true false)
-# -Dthreads=$(usex threads true false)
-# -Dtiff=$(usex tiff true false)
+# $(meson_use qt4)
+# $(meson_feature threads)
+# $(meson_use bindist official_branding)
# )
# meson_src_configure
# }
@@ -84,6 +84,11 @@ fi
# Optional meson test arguments as Bash array; this should be defined before
# calling meson_src_test.
+# @VARIABLE: MYMESONARGS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# User-controlled environment variable containing arguments to be passed to
+# meson in meson_src_configure.
read -d '' __MESON_ARRAY_PARSER <<"EOF"
import shlex
@@ -177,6 +182,8 @@ _meson_create_cross_file() {
objcpp_args = $(_meson_env_array "${OBJCXXFLAGS} ${CPPFLAGS}")
objcpp_link_args = $(_meson_env_array "${OBJCXXFLAGS} ${LDFLAGS}")
needs_exe_wrapper = ${needs_exe_wrapper}
+ sys_root = '${SYSROOT}'
+ pkg_config_libdir = '${PKG_CONFIG_LIBDIR-${EPREFIX}/usr/$(get_libdir)/pkgconfig}'
[host_machine]
system = '${system}'
@@ -219,32 +226,54 @@ meson_feature() {
meson_src_configure() {
debug-print-function ${FUNCNAME} "$@"
- # Common args
local mesonargs=(
+ meson setup
--buildtype plain
--libdir "$(get_libdir)"
--localstatedir "${EPREFIX}/var/lib"
--prefix "${EPREFIX}/usr"
--sysconfdir "${EPREFIX}/etc"
--wrap-mode nodownload
- )
+ --pkg-config-path="${PKG_CONFIG_PATH-${EPREFIX}/usr/share/pkgconfig}"
+ )
if tc-is-cross-compiler || [[ ${ABI} != ${DEFAULT_ABI-${ABI}} ]]; then
_meson_create_cross_file || die "unable to write meson cross file"
mesonargs+=( --cross-file "${T}/meson.${CHOST}.${ABI}" )
fi
+ BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
+
+ # Handle quoted whitespace
+ eval "local -a MYMESONARGS=( ${MYMESONARGS} )"
+
+ mesonargs+=(
+ # Arguments from ebuild
+ "${emesonargs[@]}"
+
+ # Arguments passed to this function
+ "$@"
+
+ # Arguments from user
+ "${MYMESONARGS[@]}"
+
+ # Source directory
+ "${EMESON_SOURCE:-${S}}"
+
+ # Build directory
+ "${BUILD_DIR}"
+ )
+
+ # Used by symbolextractor.py
+ # https://bugs.gentoo.org/717720
+ tc-export NM
+ tc-getPROG READELF readelf >/dev/null
+
# https://bugs.gentoo.org/625396
python_export_utf8_locale
- # Append additional arguments from ebuild
- mesonargs+=("${emesonargs[@]}")
-
- BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
- set -- meson "${mesonargs[@]}" "$@" \
- "${EMESON_SOURCE:-${S}}" "${BUILD_DIR}"
- echo "$@"
- tc-env_build "$@" || die
+ echo "${mesonargs[@]}" >&2
+ tc-env_build "${mesonargs[@]}" || die
}
# @FUNCTION: meson_src_compile
diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass
index 68f401ee8661..ea4f1eb143e9 100644
--- a/eclass/mozextension.eclass
+++ b/eclass/mozextension.eclass
@@ -72,11 +72,11 @@ xpi_install() {
#cd ${x}
# determine id for extension
if [[ -f "${x}"/install.rdf ]]; then
- emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
- || die "failed to determine extension id from install.rdf"
+ emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)"
+ [[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf"
elif [[ -f "${x}"/manifest.json ]]; then
- emid="$( sed -n 's/.*"id": "\(.*\)",/\1/p' "${x}"/manifest.json )" \
- || die "failed to determine extension id from manifest.json"
+ emid="$( sed -n 's/.*"id": "\(.*\)".*/\1/p' "${x}"/manifest.json )"
+ [[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json"
else
die "failed to determine extension id"
fi
@@ -101,11 +101,11 @@ xpi_copy() {
#cd ${x}
# determine id for extension
if [[ -f "${x}"/install.rdf ]]; then
- emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
- || die "failed to determine extension id from install.rdf"
+ emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)"
+ [[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf"
elif [[ -f "${x}"/manifest.json ]]; then
- emid="$( sed -n 's/.*"id": "\([^"]*\)",.*/\1/p' "${x}"/manifest.json )" \
- || die "failed to determine extension id from manifest.json"
+ emid="$(sed -n 's/.*"id": "\([^"]*\)".*/\1/p' "${x}"/manifest.json)"
+ [[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json"
else
die "failed to determine extension id"
fi
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index ab3df94dcf11..d516e3629696 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -22,7 +22,7 @@
# The eclass exports PYTHON_SINGLE_USEDEP that is suitable for depending
# on other packages using the eclass. Dependencies on packages using
# python-r1 should be created via python_gen_cond_dep() function,
-# using PYTHON_MULTI_USEDEP placeholder.
+# using PYTHON_USEDEP placeholder.
#
# Please note that packages support multiple Python implementations
# (using python-r1 eclass) can not depend on packages not supporting
@@ -146,7 +146,7 @@ EXPORT_FUNCTIONS pkg_setup
# Python implementations.
#
# If you need to depend on a multi-impl (python-r1) package, use
-# python_gen_cond_dep with PYTHON_MULTI_USEDEP placeholder instead.
+# python_gen_cond_dep with PYTHON_USEDEP placeholder instead.
#
# Example use:
# @CODE
@@ -158,7 +158,7 @@ EXPORT_FUNCTIONS pkg_setup
# python_single_target_python3_4(-)?
# @CODE
-# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP
+# @ECLASS-VARIABLE: PYTHON_USEDEP
# @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
@@ -167,7 +167,7 @@ EXPORT_FUNCTIONS pkg_setup
# Example use:
# @CODE
# RDEPEND="$(python_gen_cond_dep '
-# dev-python/foo[${PYTHON_MULTI_USEDEP}]
+# dev-python/foo[${PYTHON_USEDEP}]
# ')"
# @CODE
#
@@ -176,6 +176,11 @@ EXPORT_FUNCTIONS pkg_setup
# python_targets_python3_4(-)
# @CODE
+# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP
+# @DESCRIPTION:
+# This is a backwards-compatibility placeholder. Use PYTHON_USEDEP
+# instead.
+
# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE
# @DESCRIPTION:
# This is an eclass-generated required-use expression which ensures
@@ -249,7 +254,7 @@ _python_single_set_globals() {
else
PYTHON_DEPS=${deps}
PYTHON_REQUIRED_USE=${requse}
- PYTHON_USEDEP='%PYTHON_USEDEP-HAS-BEEN-REMOVED%'
+ PYTHON_USEDEP='%PYTHON_USEDEP-NEEDS-TO-BE-USED-IN-PYTHON_GEN_COND_DEP%'
PYTHON_SINGLE_USEDEP=${single_usedep}
readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_SINGLE_USEDEP \
PYTHON_USEDEP
@@ -345,7 +350,7 @@ python_gen_useflags() {
# to prevent accidental shell filename expansion.
#
# In order to enforce USE constraints on the packages, verbatim
-# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_MULTI_USEDEP}' (quoted!) may
+# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_USEDEP}' (quoted!) may
# be placed in the dependency specification. It will get expanded within
# the function into a proper USE dependency string.
#
@@ -353,7 +358,7 @@ python_gen_useflags() {
# @CODE
# PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy )
# RDEPEND="$(python_gen_cond_dep \
-# 'dev-python/unittest2[${PYTHON_MULTI_USEDEP}]' python2_7 pypy )"
+# 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy )"
# @CODE
#
# It will cause the variable to look like:
@@ -382,8 +387,9 @@ python_gen_cond_dep() {
fi
local multi_usedep="python_targets_${impl}(-)"
+ local subdep=${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}}
matches+=( "python_single_target_${impl}? (
- ${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} )" )
+ ${subdep//\$\{PYTHON_USEDEP\}/${multi_usedep}} )" )
fi
done
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 77982c9b9c76..e85aefda792a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -341,10 +341,14 @@ _python_export() {
local val
case "${impl}" in
- python*)
- # python-2.7, python-3.2, etc.
+ python2*|python3.6|python3.7*)
+ # python* up to 3.7
val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die
;;
+ python*)
+ # python3.8+
+ val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}-embed) || die
+ ;;
*)
die "${impl}: obtaining ${var} not supported"
;;
@@ -378,7 +382,7 @@ _python_export() {
python3.6)
PYTHON_PKG_DEP=">=dev-lang/python-3.6.10:3.6";;
python3.7)
- PYTHON_PKG_DEP=">=dev-lang/python-3.7.6:3.7";;
+ PYTHON_PKG_DEP=">=dev-lang/python-3.7.7-r1:3.7";;
python3.8)
PYTHON_PKG_DEP=">=dev-lang/python-3.8.2:3.8";;
pypy3)
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index 3a29c7e9f765..d27f0a386c7f 100644
--- a/eclass/rpm.eclass
+++ b/eclass/rpm.eclass
@@ -8,7 +8,10 @@
inherit estack eutils
-DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
+case "${EAPI:-0}" in
+ [0-6]) DEPEND=">=app-arch/rpm2targz-9.0.0.3g" ;;
+ *) BDEPEND=">=app-arch/rpm2targz-9.0.0.3g" ;;
+esac
# @FUNCTION: rpm_unpack
# @USAGE: <rpms>
diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 66266a5b5447..9d7360ed1c4b 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -104,19 +104,19 @@ rust_arch_uri() {
rust_all_arch_uris()
{
local uris=""
- uris+="amd64? ( elibc_glibc? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") )
- elibc_musl? ( $(rust_arch_uri x86_64-unknown-linux-musl "$@") ) ) "
- uris+="arm? ( $(rust_arch_uri arm-unknown-linux-gnueabi "$@")
- $(rust_arch_uri arm-unknown-linux-gnueabihf "$@")
- $(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") ) "
- uris+="arm64? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) "
- uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@")
- $(rust_arch_uri mipsel-unknown-linux-gnu "$@")
- $(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) "
- uris+="ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) "
- uris+="ppc64? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@")
- $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") ) "
- uris+="s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) "
- uris+="x86? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) "
+ uris+="abi_x86_64? ( elibc_glibc? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") )
+ elibc_musl? ( $(rust_arch_uri x86_64-unknown-linux-musl "$@") ) ) "
+ uris+="arm? ( $(rust_arch_uri arm-unknown-linux-gnueabi "$@")
+ $(rust_arch_uri arm-unknown-linux-gnueabihf "$@")
+ $(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") ) "
+ uris+="arm64? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) "
+ uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@")
+ $(rust_arch_uri mipsel-unknown-linux-gnu "$@")
+ $(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) "
+ uris+="ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) "
+ uris+="ppc64? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@")
+ $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") ) "
+ uris+="s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) "
+ uris+="abi_x86_32? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) "
echo "${uris}"
}
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 377bb474a3ac..192c1183e800 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -101,6 +101,20 @@ fi
test_var PYTHON_PKG_DEP python3_7 '*dev-lang/python*:3.7'
test_var PYTHON_SCRIPTDIR python3_7 /usr/lib/python-exec/python3.7
+test_var EPYTHON python3_8 python3.8
+test_var PYTHON python3_8 /usr/bin/python3.8
+if [[ -x /usr/bin/python3.8 ]]; then
+ abiflags=$(/usr/bin/python3.8 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
+ test_var PYTHON_SITEDIR python3_8 "/usr/lib/python3.8/site-packages"
+ test_var PYTHON_INCLUDEDIR python3_8 "/usr/include/python3.8${abiflags}"
+ test_var PYTHON_LIBPATH python3_8 "/usr/lib*/libpython3.8${abiflags}$(get_libname)"
+ test_var PYTHON_CONFIG python3_8 "/usr/bin/python3.8${abiflags}-config"
+ test_var PYTHON_CFLAGS python3_8 "*-I/usr/include/python3.8*"
+ test_var PYTHON_LIBS python3_8 "*-lpython3.8*"
+fi
+test_var PYTHON_PKG_DEP python3_8 '*dev-lang/python*:3.8'
+test_var PYTHON_SCRIPTDIR python3_8 /usr/lib/python-exec/python3.8
+
test_var EPYTHON pypy3 pypy3
test_var PYTHON pypy3 /usr/bin/pypy3
if [[ -x /usr/bin/pypy3 ]]; then
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index a415205e035f..0ebf3565c0b3 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -86,6 +86,9 @@ IUSE="source"
# Starting from TeX Live 2009, upstream provides .tar.xz modules.
PKGEXT=tar.xz
+# Now where should we get these files?
+TEXLIVE_DEVS=${TEXLIVE_DEVS:- zlogene dilfridge }
+
# We do not need anything from SYSROOT:
# Everything is built from the texlive install in /
# Generated files are noarch
@@ -93,13 +96,17 @@ BDEPEND="${COMMON_DEPEND}
app-arch/xz-utils"
for i in ${TEXLIVE_MODULE_CONTENTS}; do
- SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}"
+ for tldev in ${TEXLIVE_DEVS}; do
+ SRC_URI="${SRC_URI} https://dev.gentoo.org/~${tldev}/distfiles/texlive/texlive-module-${i}-${PV}.${PKGEXT}"
+ done
done
# Forge doc SRC_URI
[[ -n ${TEXLIVE_MODULE_DOC_CONTENTS} ]] && SRC_URI="${SRC_URI} doc? ("
for i in ${TEXLIVE_MODULE_DOC_CONTENTS}; do
- SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}"
+ for tldev in ${TEXLIVE_DEVS}; do
+ SRC_URI="${SRC_URI} https://dev.gentoo.org/~${tldev}/distfiles/texlive/texlive-module-${i}-${PV}.${PKGEXT}"
+ done
done
[[ -n ${TEXLIVE_MODULE_DOC_CONTENTS} ]] && SRC_URI="${SRC_URI} )"
@@ -107,7 +114,9 @@ done
if [[ -n ${TEXLIVE_MODULE_SRC_CONTENTS} ]] ; then
SRC_URI="${SRC_URI} source? ("
for i in ${TEXLIVE_MODULE_SRC_CONTENTS}; do
- SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}"
+ for tldev in ${TEXLIVE_DEVS}; do
+ SRC_URI="${SRC_URI} https://dev.gentoo.org/~${tldev}/distfiles/texlive/texlive-module-${i}-${PV}.${PKGEXT}"
+ done
done
SRC_URI="${SRC_URI} )"
fi
@@ -140,16 +149,14 @@ RELOC_TARGET=texmf-dist
texlive-module_src_unpack() {
unpack ${A}
- grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist" || die
- { for i in $(<"${T}/reloclist"); do dirname ${i}; done; } | uniq > "${T}/dirlist"
- for i in $(<"${T}/dirlist"); do
- if [[ ! -d ${RELOC_TARGET}/${i} ]]; then
- mkdir -p "${RELOC_TARGET}/${i}" || die
- fi
- done
- for i in $(<"${T}/reloclist"); do
- mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
- done
+ sed -n -e 's:\s*RELOC/::p' tlpkg/tlpobj/* > "${T}/reloclist" || die
+ sed -e 's/\/[^/]*$//' -e "s:^:${RELOC_TARGET}/:" "${T}/reloclist" |
+ sort -u |
+ xargs mkdir -p || die
+ local i
+ while read i; do
+ mv "${i}" "${RELOC_TARGET}/${i%/*}" || die
+ done < "${T}/reloclist"
}
# @FUNCTION: texlive-module_add_format