diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /eclass | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'eclass')
104 files changed, 901 insertions, 1134 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 4251a6a3bb90..e2e0fd0940e9 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass index 79f14d81b134..e83326314261 100644 --- a/eclass/alternatives.eclass +++ b/eclass/alternatives.eclass @@ -1,9 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: alternatives.eclass +# @MAINTAINER: +# maintainer-needed@gentoo.org # @AUTHOR: -# Original author: Alastair Tse <liquidx@gentoo.org> (03 Oct 2003) +# Alastair Tse <liquidx@gentoo.org> (03 Oct 2003) # @BLURB: Creates symlink to the latest version of multiple slotted packages. # @DESCRIPTION: # When a package is SLOT'ed, very often we need to have a symlink to the diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass index 42f801a84d70..ea347fd706af 100644 --- a/eclass/ant-tasks.eclass +++ b/eclass/ant-tasks.eclass @@ -1,4 +1,4 @@ -# Copyright 2007-2020 Gentoo Authors +# Copyright 2007-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ant-tasks.eclass @@ -33,12 +33,14 @@ inherit java-pkg-2 java-ant-2 EXPORT_FUNCTIONS src_unpack src_compile src_install # @ECLASS-VARIABLE: ANT_TASK_JDKVER +# @PRE_INHERIT # @DESCRIPTION: # Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.8, can # be overridden from ebuild BEFORE inheriting this eclass. ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.8} # @ECLASS-VARIABLE: ANT_TASK_JREVER +# @PRE_INHERIT # @DESCRIPTION: # Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.8, can # be overridden from ebuild BEFORE inheriting this eclass. @@ -51,6 +53,7 @@ ANT_TASK_JREVER=${ANT_TASK_JREVER-1.8} ANT_TASK_NAME="${PN#ant-}" # @ECLASS-VARIABLE: ANT_TASK_DEPNAME +# @PRE_INHERIT # @DESCRIPTION: # Specifies JAVA_PKG_NAME (PN{-SLOT} used with java-pkg_jar-from) of the package # that this one depends on. Defaults to the name of ant task, ebuild can @@ -60,12 +63,14 @@ ANT_TASK_NAME="${PN#ant-}" ANT_TASK_DEPNAME=${ANT_TASK_DEPNAME-${ANT_TASK_NAME}} # @ECLASS-VARIABLE: ANT_TASK_DISABLE_VM_DEPS +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # If set, no JDK/JRE deps are added. # @VARIABLE: ANT_TASK_PV # @INTERNAL +# @DESCRIPTION: # Version of ant-core this task is intended to register and thus load with. ANT_TASK_PV="${PV}" @@ -80,7 +85,7 @@ MY_P="apache-ant-${MY_PV}" # Default values for standard ebuild variables, can be overridden from ebuild. DESCRIPTION="Apache Ant's optional tasks depending on ${ANT_TASK_DEPNAME}" -HOMEPAGE="http://ant.apache.org/" +HOMEPAGE="https://ant.apache.org/" SRC_URI="${UPSTREAM_PREFIX}/${MY_P}-src.tar.bz2 ${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2" LICENSE="Apache-2.0" diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass index 4d0e64ed4e79..24bc5ff27996 100644 --- a/eclass/aspell-dict-r1.eclass +++ b/eclass/aspell-dict-r1.eclass @@ -15,6 +15,7 @@ # Support for aspell-0.60 has been added by Sergey Ulanov. # @ECLASS-VARIABLE: ASPELL_LANG +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # Pure cleartext string that is included into DESCRIPTION. @@ -28,6 +29,7 @@ readonly ASPELL_SPELLANG=${PN/aspell-/} # @ECLASS-VARIABLE: ASPELL_VERSION +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # What major version of Aspell is this dictionary for? Valid values are 5, 6 or undefined. diff --git a/eclass/autotools-multilib.eclass b/eclass/autotools-multilib.eclass deleted file mode 100644 index ae400b885a7c..000000000000 --- a/eclass/autotools-multilib.eclass +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# @ECLASS: autotools-multilib.eclass -# @MAINTAINER: -# gx86-multilib team <multilib@gentoo.org> -# @AUTHOR: -# Author: Michał Górny <mgorny@gentoo.org> -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: autotools-utils wrapper for multilib builds -# @DEPRECATED: multilib-minimal -# @DESCRIPTION: -# The autotools-multilib.eclass provides a glue between -# autotools-utils.eclass(5) and multilib-minimal.eclass(5), aiming -# to provide a convenient way to build packages using autotools -# for multiple ABIs. -# -# Inheriting this eclass sets IUSE and exports default multilib_src_*() -# sub-phases that call autotools-utils phase functions for each ABI -# enabled. The multilib_src_*() functions can be defined in ebuild just -# like in multilib-minimal. - -# EAPI=4 is required for meaningful MULTILIB_USEDEP. -case ${EAPI:-0} in - 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; - 4|5) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -inherit autotools-utils eutils ltprune multilib-build multilib-minimal - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install - -# Note: _at_args[@] passing is a backwards compatibility measure. -# Don't use it in new packages. - -autotools-multilib_src_prepare() { - autotools-utils_src_prepare "${@}" - - [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && multilib_copy_sources -} - -multilib_src_configure() { - [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && local ECONF_SOURCE=${BUILD_DIR} - autotools-utils_src_configure "${_at_args[@]}" -} - -autotools-multilib_src_configure() { - local _at_args=( "${@}" ) - - multilib-minimal_src_configure -} - -multilib_src_compile() { - emake "${_at_args[@]}" -} - -autotools-multilib_src_compile() { - local _at_args=( "${@}" ) - - multilib-minimal_src_compile -} - -multilib_src_test() { - autotools-utils_src_test "${_at_args[@]}" -} - -autotools-multilib_src_test() { - local _at_args=( "${@}" ) - - multilib-minimal_src_test -} - -multilib_src_install() { - emake DESTDIR="${D}" "${_at_args[@]}" install -} - -multilib_src_install_all() { - einstalldocs - - # Remove libtool files and unnecessary static libs - local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES} - if [[ ${prune_ltfiles} != none ]]; then - prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}} - fi -} - -autotools-multilib_src_install() { - local _at_args=( "${@}" ) - - multilib-minimal_src_install -} diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass deleted file mode 100644 index 3fcaa79f80ab..000000000000 --- a/eclass/autotools-utils.eclass +++ /dev/null @@ -1,385 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: autotools-utils.eclass -# @MAINTAINER: -# Maciej Mrozowski <reavertm@gentoo.org> -# Michał Górny <mgorny@gentoo.org> -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: common ebuild functions for autotools-based packages -# @DEPRECATED: out-of-source -# @DESCRIPTION: -# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper -# providing all inherited features along with econf arguments as Bash array, -# out of source build with overridable build dir location, static archives -# handling, libtool files removal. -# -# Please note that autotools-utils does not support mixing of its phase -# functions with regular econf/emake calls. If necessary, please call -# autotools-utils_src_compile instead of the latter. -# -# @EXAMPLE: -# Typical ebuild using autotools-utils.eclass: -# -# @CODE -# EAPI="2" -# -# inherit autotools-utils -# -# DESCRIPTION="Foo bar application" -# HOMEPAGE="http://example.org/foo/" -# SRC_URI="mirror://sourceforge/foo/${P}.tar.bz2" -# -# LICENSE="LGPL-2.1" -# KEYWORDS="" -# SLOT="0" -# IUSE="debug doc examples qt4 static-libs tiff" -# -# CDEPEND=" -# media-libs/libpng:0 -# qt4? ( -# dev-qt/qtcore:4 -# dev-qt/qtgui:4 -# ) -# tiff? ( media-libs/tiff:0 ) -# " -# RDEPEND="${CDEPEND} -# !media-gfx/bar -# " -# DEPEND="${CDEPEND} -# doc? ( app-doc/doxygen ) -# " -# -# # bug 123456 -# AUTOTOOLS_IN_SOURCE_BUILD=1 -# -# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO) -# -# PATCHES=( -# "${FILESDIR}/${P}-gcc44.patch" # bug 123458 -# "${FILESDIR}/${P}-as-needed.patch" -# "${FILESDIR}/${P}-unbundle_libpng.patch" -# ) -# -# src_configure() { -# local myeconfargs=( -# $(use_enable debug) -# $(use_with qt4) -# $(use_enable threads multithreading) -# $(use_with tiff) -# ) -# autotools-utils_src_configure -# } -# -# src_compile() { -# autotools-utils_src_compile -# use doc && autotools-utils_src_compile docs -# } -# -# src_install() { -# use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/") -# autotools-utils_src_install -# if use examples; then -# dobin "${BUILD_DIR}"/foo_example{1,2,3} \\ -# || die 'dobin examples failed' -# fi -# } -# -# @CODE - -# Keep variable names synced with cmake-utils and the other way around! - -case ${EAPI:-0} in - 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; - 4|5) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -# @ECLASS-VARIABLE: AUTOTOOLS_AUTORECONF -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set to a non-empty value before calling inherit to enable running autoreconf -# in src_prepare() and adding autotools dependencies. -# -# This is usually necessary when using live sources or applying patches -# modifying configure.ac or Makefile.am files. Note that in the latter case -# setting this variable is obligatory even though the eclass will work without -# it (to add the necessary dependencies). -# -# The eclass will try to determine the correct autotools to run including a few -# external tools: gettext, glib-gettext, intltool, gtk-doc, gnome-doc-prepare. -# If your tool is not supported, please open a bug and we'll add support for it. -# -# Note that dependencies are added for autoconf, automake and libtool only. -# If your package needs one of the external tools listed above, you need to add -# appropriate packages to DEPEND yourself. -[[ ${AUTOTOOLS_AUTORECONF} ]] || : ${AUTOTOOLS_AUTO_DEPEND:=no} - -# eutils for eqawarn, path_exists -inherit autotools epatch eutils libtool ltprune - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test - -# @ECLASS-VARIABLE: BUILD_DIR -# @DEFAULT_UNSET -# @DESCRIPTION: -# Build directory, location where all autotools generated files should be -# placed. For out of source builds it defaults to ${WORKDIR}/${P}_build. -# -# This variable has been called AUTOTOOLS_BUILD_DIR formerly. -# It is set under that name for compatibility. - -# @ECLASS-VARIABLE: AUTOTOOLS_IN_SOURCE_BUILD -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set to enable in-source build. - -# @ECLASS-VARIABLE: ECONF_SOURCE -# @DEFAULT_UNSET -# @DESCRIPTION: -# Specify location of autotools' configure script. By default it uses ${S}. - -# @ECLASS-VARIABLE: DOCS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array containing documents passed to dodoc command. -# -# In EAPIs 4+, can list directories as well. -# -# Example: -# @CODE -# DOCS=( NEWS README ) -# @CODE - -# @ECLASS-VARIABLE: HTML_DOCS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array containing documents passed to dohtml command. -# -# Example: -# @CODE -# HTML_DOCS=( doc/html/ ) -# @CODE - -# @ECLASS-VARIABLE: PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# PATCHES array variable containing all various patches to be applied. -# -# Example: -# @CODE -# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch ) -# @CODE - -# @ECLASS-VARIABLE: AUTOTOOLS_PRUNE_LIBTOOL_FILES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Sets the mode of pruning libtool files. The values correspond to -# prune_libtool_files parameters, with leading dashes stripped. -# -# Defaults to pruning the libtool files when static libraries are not -# installed or can be linked properly without them. Libtool files -# for modules (plugins) will be kept in case plugin loader needs them. -# -# If set to 'modules', the .la files for modules will be removed -# as well. This is often the preferred option. -# -# If set to 'all', all .la files will be removed unconditionally. This -# option is discouraged and shall be used only if 'modules' does not -# remove the files. -# -# If set to 'none', no .la files will be pruned ever. Use in corner -# cases only. - -# Determine using IN or OUT source build -_check_build_dir() { - : ${ECONF_SOURCE:=${S}} - # Respect both the old variable and the new one, depending - # on which one was set by the ebuild. - if [[ ! ${BUILD_DIR} && ${AUTOTOOLS_BUILD_DIR} ]]; then - eqawarn "The AUTOTOOLS_BUILD_DIR variable has been renamed to BUILD_DIR." - eqawarn "Please migrate the ebuild to use the new one." - - # In the next call, both variables will be set already - # and we'd have to know which one takes precedence. - _RESPECT_AUTOTOOLS_BUILD_DIR=1 - fi - - if [[ ${_RESPECT_AUTOTOOLS_BUILD_DIR} ]]; then - BUILD_DIR=${AUTOTOOLS_BUILD_DIR:-${WORKDIR}/${P}_build} - else - if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then - : ${BUILD_DIR:=${ECONF_SOURCE}} - else - : ${BUILD_DIR:=${WORKDIR}/${P}_build} - fi - fi - - # Backwards compatibility for getting the value. - AUTOTOOLS_BUILD_DIR=${BUILD_DIR} - echo ">>> Working in BUILD_DIR: \"${BUILD_DIR}\"" -} - -# @FUNCTION: autotools-utils_src_prepare -# @DESCRIPTION: -# The src_prepare function. -# -# Supporting PATCHES array and user patches. See base.eclass(5) for reference. -autotools-utils_src_prepare() { - debug-print-function ${FUNCNAME} "$@" - - local want_autoreconf=${AUTOTOOLS_AUTORECONF} - - [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" - - at_checksum() { - find '(' -name 'Makefile.am' \ - -o -name 'configure.ac' \ - -o -name 'configure.in' ')' \ - -exec cksum {} + | sort -k2 - } - - [[ ! ${want_autoreconf} ]] && local checksum=$(at_checksum) - epatch_user - if [[ ! ${want_autoreconf} ]]; then - if [[ ${checksum} != $(at_checksum) ]]; then - einfo 'Will autoreconfigure due to user patches applied.' - want_autoreconf=yep - fi - fi - - [[ ${want_autoreconf} ]] && eautoreconf - elibtoolize --patch-only -} - -# @FUNCTION: autotools-utils_src_configure -# @DESCRIPTION: -# The src_configure function. For out of source build it creates build -# directory and runs econf there. Configuration parameters defined -# in myeconfargs are passed here to econf. Additionally following USE -# flags are known: -# -# IUSE="static-libs" passes --enable-shared and either --disable-static/--enable-static -# to econf respectively. - -# @VARIABLE: myeconfargs -# @DEFAULT_UNSET -# @DESCRIPTION: -# Optional econf arguments as Bash array. Should be defined before calling src_configure. -# @CODE -# src_configure() { -# local myeconfargs=( -# --disable-readline -# --with-confdir="/etc/nasty foo confdir/" -# $(use_enable debug cnddebug) -# $(use_enable threads multithreading) -# ) -# autotools-utils_src_configure -# } -# @CODE -autotools-utils_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \ - || die 'autotools-utils.eclass: myeconfargs has to be an array.' - - # Common args - local econfargs=() - - _check_build_dir - if "${ECONF_SOURCE}"/configure --help 2>&1 | grep -q '^ *--docdir='; then - econfargs+=( - --docdir="${EPREFIX}"/usr/share/doc/${PF} - ) - fi - - # Handle static-libs found in IUSE, disable them by default - if in_iuse static-libs; then - econfargs+=( - --enable-shared - $(use_enable static-libs static) - ) - fi - - # Append user args - econfargs+=("${myeconfargs[@]}") - - mkdir -p "${BUILD_DIR}" || die - pushd "${BUILD_DIR}" > /dev/null || die - econf "${econfargs[@]}" "$@" - popd > /dev/null || die -} - -# @FUNCTION: autotools-utils_src_compile -# @DESCRIPTION: -# The autotools src_compile function, invokes emake in specified BUILD_DIR. -autotools-utils_src_compile() { - debug-print-function ${FUNCNAME} "$@" - - _check_build_dir - pushd "${BUILD_DIR}" > /dev/null || die - emake "$@" || die 'emake failed' - popd > /dev/null || die -} - -# @FUNCTION: autotools-utils_src_install -# @DESCRIPTION: -# The autotools src_install function. Runs emake install, unconditionally -# removes unnecessary static libs (based on shouldnotlink libtool property) -# and removes unnecessary libtool files when static-libs USE flag is defined -# and unset. -# -# DOCS and HTML_DOCS arrays are supported. See base.eclass(5) for reference. -autotools-utils_src_install() { - debug-print-function ${FUNCNAME} "$@" - - _check_build_dir - pushd "${BUILD_DIR}" > /dev/null || die - emake DESTDIR="${D}" "$@" install || die "emake install failed" - popd > /dev/null || die - - # XXX: support installing them from builddir as well? - if declare -p DOCS &>/dev/null; then - # an empty list == don't install anything - if [[ ${DOCS[@]} ]]; then - # dies by itself - dodoc -r "${DOCS[@]}" - fi - else - local f - # same list as in PMS - for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \ - THANKS BUGS FAQ CREDITS CHANGELOG; do - if [[ -s ${f} ]]; then - dodoc "${f}" || die "(default) dodoc ${f} failed" - fi - done - fi - if [[ ${HTML_DOCS} ]]; then - dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" - fi - - # Remove libtool files and unnecessary static libs - local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES} - if [[ ${prune_ltfiles} != none ]]; then - prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}} - fi -} - -# @FUNCTION: autotools-utils_src_test -# @DESCRIPTION: -# The autotools src_test function. Runs emake check in build directory. -autotools-utils_src_test() { - debug-print-function ${FUNCNAME} "$@" - - _check_build_dir - pushd "${BUILD_DIR}" > /dev/null || die - - if make -ni check "${@}" &>/dev/null; then - emake check "${@}" || die 'emake check failed.' - elif make -ni test "${@}" &>/dev/null; then - emake test "${@}" || die 'emake test failed.' - fi - - popd > /dev/null || die -} diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index 4ae360aa24d4..b386654c8328 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -4,7 +4,7 @@ # @ECLASS: autotools.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Regenerates auto* build scripts # @DESCRIPTION: # This eclass is for safely handling autotooled software packages that need to @@ -19,31 +19,38 @@ if [[ ${__AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then # eclass at that point, but that adds overhead, and it's trivial # to re-order inherit in eclasses/ebuilds instead. #409611 if [[ ${__AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then - die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit autotools.eclass first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}" + die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}" fi fi -if [[ -z ${_AUTOTOOLS_ECLASS} ]]; then +if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then _AUTOTOOLS_ECLASS=1 -case ${EAPI:-0} in - 0|1|2|3|4|5|6|7) ;; +case ${EAPI} in + 5|6) + # Needed for eqawarn + inherit eutils + ;; + 7) ;; *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; esac -inherit libtool +inherit gnuconfig libtool # @ECLASS-VARIABLE: WANT_AUTOCONF +# @PRE_INHERIT # @DESCRIPTION: # The major version of autoconf your package needs : ${WANT_AUTOCONF:=latest} # @ECLASS-VARIABLE: WANT_AUTOMAKE +# @PRE_INHERIT # @DESCRIPTION: # The major version of automake your package needs : ${WANT_AUTOMAKE:=latest} # @ECLASS-VARIABLE: WANT_LIBTOOL +# @PRE_INHERIT # @DESCRIPTION: # Do you want libtool? Valid values here are "latest" and "none". : ${WANT_LIBTOOL:=latest} @@ -61,9 +68,9 @@ inherit libtool # version. # If a newer slot is stable on any arch, and is NOT reflected in this list, # then circular dependencies may arise during emerge @system bootstraps. -# -# See bug 312315 and 465732 for further information and context. -# +# +# See bug #312315 and bug #465732 for further information and context. +# # Do NOT change this variable in your ebuilds! # If you want to force a newer minor version, you can specify the correct # WANT value by using a colon: <PV>:<WANT_AUTOMAKE> @@ -71,21 +78,14 @@ _LATEST_AUTOMAKE=( 1.16.2-r1:1.16 ) _automake_atom="sys-devel/automake" _autoconf_atom="sys-devel/autoconf" -if [[ -n ${WANT_AUTOMAKE} ]]; then +if [[ -n ${WANT_AUTOMAKE} ]] ; then case ${WANT_AUTOMAKE} in # Even if the package doesn't use automake, we still need to depend # on it because we run aclocal to process m4 macros. This matches - # the autoreconf tool, so this requirement is correct. #401605 + # the autoreconf tool, so this requirement is correct, bug #401605. none) ;; - latest) - # Use SLOT deps if we can. For EAPI=0, we get pretty close. - if [[ ${EAPI:-0} != 0 ]] ; then - _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" - else - _automake_atom="|| ( `printf '>=sys-devel/automake-%s ' ${_LATEST_AUTOMAKE[@]/%:*}` )" - fi - ;; - *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" ;; + latest) _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" ;; + *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*";; esac export WANT_AUTOMAKE fi @@ -111,20 +111,26 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then export WANT_LIBTOOL fi +# @ECLASS-VARIABLE: AUTOTOOLS_DEPEND +# @INTERNAL +# @DESCRIPTION: +# Contains the combination of requested automake/autoconf/libtool +# versions in *DEPEND format. AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}" RDEPEND="" # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND +# @PRE_INHERIT # @DESCRIPTION: # Set to 'no' to disable automatically adding to DEPEND. This lets # ebuilds form conditional depends by using ${AUTOTOOLS_DEPEND} in # their own DEPEND string. : ${AUTOTOOLS_AUTO_DEPEND:=yes} if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then - case ${EAPI:-0} in - 0|1|2|3|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;; + case ${EAPI} in + 5|6) DEPEND=${AUTOTOOLS_DEPEND} ;; 7) BDEPEND=${AUTOTOOLS_DEPEND} ;; esac fi @@ -137,12 +143,14 @@ unset _automake_atom _autoconf_atom # @DESCRIPTION: # Additional options to pass to automake during # eautoreconf call. +: ${AM_OPTS:=} # @ECLASS-VARIABLE: AT_NOEAUTOHEADER # @DEFAULT_UNSET # @DESCRIPTION: # Don't run eautoheader command if set to 'yes'; only used to work around # packages that don't want their headers being modified. +: ${AT_NOEAUTOHEADER:=} # @ECLASS-VARIABLE: AT_NOEAUTOMAKE # @DEFAULT_UNSET @@ -150,6 +158,7 @@ unset _automake_atom _autoconf_atom # Don't run eautomake command if set to 'yes'; only used to workaround # broken packages. Generally you should, instead, fix the package to # not call AM_INIT_AUTOMAKE if it doesn't actually use automake. +: ${AT_NOEAUTOMAKE:=} # @ECLASS-VARIABLE: AT_NOELIBTOOLIZE # @DEFAULT_UNSET @@ -157,13 +166,16 @@ unset _automake_atom _autoconf_atom # Don't run elibtoolize command if set to 'yes', # useful when elibtoolize needs to be ran with # particular options +: ${AT_NOELIBTOOLIZE:=} # @ECLASS-VARIABLE: AT_M4DIR +# @DEFAULT_UNSET # @DESCRIPTION: # Additional director(y|ies) aclocal should search : ${AT_M4DIR:=} # @ECLASS-VARIABLE: AT_SYS_M4DIR +# @DEFAULT_UNSET # @INTERNAL # @DESCRIPTION: # For system integrators, a list of additional aclocal search paths. @@ -182,13 +194,13 @@ unset _automake_atom _autoconf_atom eautoreconf() { local x g - # Subdirs often share a common build dir #529404. If so, we can't safely + # Subdirs often share a common build dir, bug #529404. If so, we can't safely # run in parallel because many tools clobber the content in there. Libtool # and automake both `rm && cp` while aclocal reads the output. We might be # able to handle this if we split the steps and grab locks on the dirs the # tools actually write to. Then we'd run all the common tools that use # those inputs. Doing this in bash does not scale easily. - # If we do re-enable parallel support, make sure #426512 is handled. + # If we do re-enable parallel support, make sure bug #426512 is handled. if [[ -z ${AT_NO_RECURSIVE} ]] ; then # Take care of subdirs for x in $(autotools_check_macro_val AC_CONFIG_SUBDIRS) ; do @@ -239,7 +251,7 @@ eautoreconf() { done ${rerun_aclocal} && eaclocal - if [[ ${WANT_AUTOCONF} = 2.1 ]] ; then + if [[ ${WANT_AUTOCONF} == "2.1" ]] ; then eautoconf else eautoconf --force @@ -259,6 +271,7 @@ eautoreconf() { # @FUNCTION: _at_uses_pkg # @USAGE: <macros> # @INTERNAL +# @DESCRIPTION: # See if the specified macros are enabled. _at_uses_pkg() { if [[ -n $(autotools_check_macro "$@") ]] ; then @@ -294,8 +307,8 @@ eaclocal_amflags() { [[ -e ${amflags_file} ]] || continue # setup the env in case the pkg does something crazy # in their ACLOCAL_AMFLAGS. like run a shell script - # which turns around and runs autotools. #365401 - # or split across multiple lines. #383525 + # which turns around and runs autotools (bug #365401) + # or split across multiple lines (bug #383525) autotools_env_setup aclocal_opts=$(sed -n \ "/^ACLOCAL_AMFLAGS[[:space:]]*=/{ \ @@ -317,7 +330,7 @@ eaclocal_amflags() { # specified parametes. The name of the tool run is the same of the function # without e prefix. # They also force installing the support files for safety. -# Respects AT_M4DIR for additional directories to search for macro's. +# Respects AT_M4DIR for additional directories to search for macros. eaclocal() { [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) @@ -331,7 +344,7 @@ eaclocal() { _elibtoolize() { local LIBTOOLIZE=${LIBTOOLIZE:-$(type -P glibtoolize > /dev/null && echo glibtoolize || echo libtoolize)} - if [[ $1 == "--auto-ltdl" ]] ; then + if [[ ${1} == "--auto-ltdl" ]] ; then shift _at_uses_libltdl && set -- "$@" --ltdl fi @@ -359,6 +372,7 @@ eautoconf() { echo die "No configure.{ac,in} present!" fi + if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then eqawarn "This package has a configure.in file which has long been deprecated. Please" eqawarn "update it to use configure.ac instead as newer versions of autotools will die" @@ -366,16 +380,8 @@ eautoconf() { fi # Install config.guess and config.sub which are required by many macros - # in Autoconf >=2.70. - local _gnuconfig - case ${EAPI:-0} in - 0|1|2|3|4|5|6) - _gnuconfig="${EPREFIX}/usr/share/gnuconfig" - ;; - *) - _gnuconfig="${BROOT}/usr/share/gnuconfig" - ;; - esac + # in autoconf >=2.70. + local _gnuconfig=$(gnuconfig_findnewest) cp "${_gnuconfig}"/config.{guess,sub} . || die autotools_run_tool --at-m4flags autoconf "$@" @@ -403,7 +409,7 @@ eautomake() { if [[ -z ${makefile_name} ]] ; then _at_uses_automake || return 0 - elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then + elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]] ; then local used_automake local installed_automake @@ -411,7 +417,7 @@ eautomake() { used_automake=$(head -n 1 < ${makefile_name%.am}.in | \ sed -e 's:.*by automake \(.*\) from .*:\1:') - if [[ ${installed_automake} != ${used_automake} ]]; then + if [[ ${installed_automake} != ${used_automake} ]] ; then ewarn "Automake used for the package (${used_automake}) differs from" \ "the installed version (${installed_automake})." ewarn "Forcing a full rebuild of the autotools to workaround." @@ -424,10 +430,10 @@ eautomake() { || extra_opts+=( --foreign ) # Older versions of automake do not support --force-missing. But we want - # to use this whenever possible to update random bundled files #133489. + # to use this whenever possible to update random bundled files, bug #133489. case $(_automake_version) in - 1.4|1.4[.-]*) ;; - *) extra_opts+=( --force-missing ) ;; + 1.4|1.4[.-]*) ;; + *) extra_opts+=( --force-missing ) ;; esac autotools_run_tool automake --add-missing --copy "${extra_opts[@]}" "$@" @@ -449,8 +455,8 @@ eautopoint() { config_rpath_update() { local dst src - case ${EAPI:-0} in - 0|1|2|3|4|5|6) + case ${EAPI} in + 5|6) src="${EPREFIX}/usr/share/gettext/config.rpath" ;; *) @@ -475,12 +481,12 @@ config_rpath_update() { autotools_env_setup() { # We do the "latest" → version switch here because it solves # possible order problems, see bug #270010 as an example. - if [[ ${WANT_AUTOMAKE} == "latest" ]]; then + if [[ ${WANT_AUTOMAKE} == "latest" ]] ; then local pv for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do # Break on first hit to respect _LATEST_AUTOMAKE order. local hv_args="" - case ${EAPI:-0} in + case ${EAPI} in 5|6) hv_args="--host-root" ;; @@ -505,30 +511,30 @@ autotools_env_setup() { autotools_run_tool() { # Process our own internal flags first local autofail=true m4flags=false missing_ok=false return_output=false - while [[ -n $1 ]] ; do - case $1 in - --at-no-fail) autofail=false;; - --at-m4flags) m4flags=true;; - --at-missing) missing_ok=true;; - --at-output) return_output=true;; - # whatever is left goes to the actual tool - *) break;; + while [[ -n ${1} ]] ; do + case ${1} in + --at-no-fail) autofail=false ;; + --at-m4flags) m4flags=true ;; + --at-missing) missing_ok=true ;; + --at-output) return_output=true ;; + # whatever is left goes to the actual tool + *) break ;; esac shift done - if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then - ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase" + if [[ ${EBUILD_PHASE_FUNC} != "src_unpack" && ${EBUILD_PHASE_FUNC} != "src_prepare" ]] ; then + eqawarn "Running '${1}' in ${EBUILD_PHASE_FUNC} phase" fi if ${missing_ok} && ! type -P ${1} >/dev/null ; then - einfo "Skipping '$*' due $1 not installed" + einfo "Skipping '$*' because '${1}' not installed" return 0 fi autotools_env_setup - # Allow people to pass in full paths. #549268 + # Allow people to pass in full paths, bug #549268 local STDERR_TARGET="${T}/${1##*/}.out" # most of the time, there will only be one run, but if there are # more, make sure we get unique log filenames @@ -551,19 +557,19 @@ autotools_run_tool() { return fi - printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" + printf "***** ${1} *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" - ebegin "Running $@" + ebegin "Running '$@'" "$@" >> "${STDERR_TARGET}" 2>&1 if ! eend $? && ${autofail} ; then echo - eerror "Failed Running $1 !" + eerror "Failed running '${1}'!" eerror - eerror "Include in your bugreport the contents of:" + eerror "Include in your bug report the contents of:" eerror eerror " ${STDERR_TARGET}" echo - die "Failed Running $1 !" + die "Failed running '${1}'!" fi } @@ -636,7 +642,7 @@ _autotools_m4dir_include() { # We handle it below -${flag}) ;; *) - [[ ! -d ${x} ]] && ewarn "autotools.eclass: '${x}' does not exist" + [[ ! -d ${x} ]] && ewarn "${ECLASS}: '${x}' does not exist" include_opts+=" -${flag} ${x}" ;; esac diff --git a/eclass/base.eclass b/eclass/base.eclass index 0f9a2e576b78..3a81fb76ccf1 100644 --- a/eclass/base.eclass +++ b/eclass/base.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 # DEPRECATED @@ -17,6 +17,7 @@ # base_src_install() - default # base_src_install_docs() - einstalldocs from eutils.eclass +# @DEAD # @ECLASS: base.eclass # @MAINTAINER: # QA Team <qa@gentoo.org> diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass index 70d40a25969e..80f2d5fcd32a 100644 --- a/eclass/bash-completion-r1.eclass +++ b/eclass/bash-completion-r1.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: bash-completion-r1.eclass @@ -93,7 +93,7 @@ get_bashhelpersdir() { # @FUNCTION: dobashcomp # @USAGE: <file> [...] # @DESCRIPTION: -# Install bash-completion files passed as args. Has EAPI-dependant failure +# Install bash-completion files passed as args. Has EAPI-dependent failure # behavior (like doins). dobashcomp() { debug-print-function ${FUNCNAME} "${@}" @@ -108,7 +108,7 @@ dobashcomp() { # @FUNCTION: newbashcomp # @USAGE: <file> <newname> # @DESCRIPTION: -# Install bash-completion file under a new name. Has EAPI-dependant failure +# Install bash-completion file under a new name. Has EAPI-dependent failure # behavior (like newins). newbashcomp() { debug-print-function ${FUNCNAME} "${@}" diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index e763ac3468c5..e2894b4588b6 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.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: cargo.eclass @@ -204,7 +204,6 @@ cargo_src_unpack() { # @FUNCTION: cargo_live_src_unpack # @DESCRIPTION: # Runs 'cargo fetch' and vendors downloaded crates for offline use, used in live ebuilds - cargo_live_src_unpack() { debug-print-function ${FUNCNAME} "$@" @@ -316,7 +315,6 @@ cargo_live_src_unpack() { # In some cases crates may need '--no-default-features' option, # as there is no way to disable single feature, except disabling all. # It can be passed directly to cargo_src_configure(). - cargo_src_configure() { debug-print-function ${FUNCNAME} "$@" @@ -361,7 +359,6 @@ cargo_src_compile() { # In come case workspaces need alternative --path parameter # default is '--path ./' if nothing specified. # '--path ./somedir' can be passed directly to cargo_src_install() - cargo_src_install() { debug-print-function ${FUNCNAME} "$@" diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass index 4bbe6aa31759..623a19867d42 100644 --- a/eclass/cdrom.eclass +++ b/eclass/cdrom.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: cdrom.eclass @@ -21,6 +21,7 @@ inherit portability # @ECLASS-VARIABLE: CDROM_OPTIONAL # @DEFAULT_UNSET +# @PRE_INHERIT # @DESCRIPTION: # By default, the eclass sets PROPERTIES="interactive" on the assumption # that people will be using these. If your package optionally supports @@ -229,13 +230,13 @@ cdrom_load_next_cd() { if [[ ${showedmsg} -eq 0 ]] ; then if [[ ${CDROM_NUM_CDS} -eq 1 ]] ; then - einfo "Please insert+mount the ${CDROM_NAME:-CD for ${PN}} now !" + einfo "Please insert+mount the ${CDROM_NAME:-CD for ${PN}} now!" else local var="CDROM_NAME_${CDROM_CURRENT_CD}" if [[ -z ${!var} ]] ; then - einfo "Please insert+mount CD #${CDROM_CURRENT_CD} for ${PN} now !" + einfo "Please insert+mount CD #${CDROM_CURRENT_CD} for ${PN} now!" else - einfo "Please insert+mount the ${!var} now !" + einfo "Please insert+mount the ${!var} now!" fi fi showedmsg=1 diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index a45cbd15fee7..5c4a420ee06e 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2020 Gentoo Authors +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: check-reqs.eclass @@ -350,8 +350,8 @@ check-reqs_unsatisfied() { ${msg} "There is NOT at least ${sizeunit} ${location}" # @ECLASS-VARIABLE: CHECKREQS_FAILED - # @DESCRIPTION: # @INTERNAL + # @DESCRIPTION: # If set the checks failed and eclass should abort the build. # Internal, do not set yourself. CHECKREQS_FAILED="true" diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass index e6d8fe64a02f..1266b5b42ed6 100644 --- a/eclass/cmake-multilib.eclass +++ b/eclass/cmake-multilib.eclass @@ -20,6 +20,7 @@ # phase rather than 'default'. # @ECLASS-VARIABLE: CMAKE_ECLASS +# @PRE_INHERIT # @DESCRIPTION: # Default is "cmake-utils" for compatibility in EAPI-7. Specify "cmake" for # ebuilds that ported to cmake.eclass already. Future EAPI is "cmake" only. diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 8127a66c2b52..8a4405bef86c 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cmake-utils.eclass @@ -11,6 +11,7 @@ # Original author: Zephyrus (zephyrus@mirach.it) # @SUPPORTED_EAPIS: 5 6 7 # @BLURB: common ebuild functions for cmake-based packages +# @DEPRECATED: cmake.eclass # @DESCRIPTION: # DEPRECATED: This no longer receives any changes. Everyone must port to cmake.eclass. # The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier. @@ -93,6 +94,7 @@ _CMAKE_UTILS_ECLASS=1 # "no" to disable (default) or anything else to enable. # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF @@ -100,6 +102,7 @@ _CMAKE_UTILS_ECLASS=1 # Should be set by user in a per-package basis in /etc/portage/package.env. # @ECLASS-VARIABLE: CMAKE_UTILS_QA_SRC_DIR_READONLY +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # After running cmake-utils_src_prepare, sets ${S} to read-only. This is diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 196c60e0b15c..4bd09459ea62 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -48,6 +48,7 @@ _CMAKE_ECLASS=1 # Set to enable in-source build. # @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Specify a makefile generator to be used by cmake. @@ -81,6 +82,7 @@ _CMAKE_ECLASS=1 : ${CMAKE_WARN_UNUSED_CLI:=yes} # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF @@ -88,6 +90,7 @@ _CMAKE_ECLASS=1 # Should be set by user in a per-package basis in /etc/portage/package.env. # @ECLASS-VARIABLE: CMAKE_QA_SRC_DIR_READONLY +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # After running cmake_src_prepare, sets ${S} to read-only. This is diff --git a/eclass/cron.eclass b/eclass/cron.eclass index b9f436a4a5aa..5548b190f9a7 100644 --- a/eclass/cron.eclass +++ b/eclass/cron.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cron.eclass @@ -16,7 +16,6 @@ # NOTE on defaults: the default settings in the below functions were # chosen based on the most common setting among cron ebuilds. # -# Please assign any bugs regarding this eclass to cron-bugs@gentoo.org. inherit eutils flag-o-matic diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass index dd3cbe135a39..a8e5ee4cc9a0 100644 --- a/eclass/cvs.eclass +++ b/eclass/cvs.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: cvs.eclass @@ -62,6 +62,7 @@ _CVS_ECLASS=1 # CVS options given after the cvs checkout command. # @ECLASS-VARIABLE: ECVS_OFFLINE +# @USER_VARIABLE # @DESCRIPTION: # Set this variable to a non-empty value to disable the automatic updating of # a CVS source tree. This is intended to be set outside the cvs source @@ -131,6 +132,7 @@ _CVS_ECLASS=1 #: ${ECVS_BRANCH:="HEAD"} # @ECLASS-VARIABLE: ECVS_AUTH +# @PRE_INHERIT # @DESCRIPTION: # Authentication method to use # diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass index 12e7289cc7d0..1ed886fb4dce 100644 --- a/eclass/darcs.eclass +++ b/eclass/darcs.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: darcs.eclass @@ -71,6 +71,7 @@ SRC_URI="" : ${EDARCS_REPOSITORY:=} # @ECLASS-VARIABLE: EDARCS_OFFLINE +# @USER_VARIABLE # @DESCRIPTION: # Set this variable to a non-empty value to disable the automatic updating of # a darcs repository. This is intended to be set outside the darcs source @@ -100,6 +101,7 @@ case ${EAPI:-0} in esac # @FUNCTION: darcs_patchcount +# @INTERNAL # @DESCRIPTION: # Internal function to determine amount of patches in repository. darcs_patchcount() { @@ -109,6 +111,7 @@ darcs_patchcount() { } # @FUNCTION: darcs_fetch +# @INTERNAL # @DESCRIPTION: # Internal function is called from darcs_src_unpack darcs_fetch() { diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass index 7633425bac3b..d23b08d19996 100644 --- a/eclass/db-use.eclass +++ b/eclass/db-use.eclass @@ -1,8 +1,18 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # This is a common location for functions that aid the use of sys-libs/db # -# Bugs: maintainer-needed@gentoo.org + +# @ECLASS: db-use.eclass +# @MAINTAINER: +# maintainer-needed@gentoo.org +# @AUTHOR: +# Paul de Vrieze <pauldv@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 +# @BLURB: This is a common location for functions that aid the use of sys-libs/db +# @DESCRIPTION: +# This eclass is designed to provide helpful functions for depending on +# sys-libs/db. # multilib is used for get_libname in all EAPI case "${EAPI:-0}" in diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 655a33e0d208..2994993e63e8 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on the work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: A simple eclass to build Python packages using distutils. # @DESCRIPTION: # A simple eclass providing functions to build Python packages using @@ -33,8 +33,8 @@ # functions, you should consider calling the defaults (and especially # distutils-r1_python_prepare_all). # -# Please note that distutils-r1 sets RDEPEND and DEPEND unconditionally -# for you. +# Please note that distutils-r1 sets RDEPEND and BDEPEND (or DEPEND +# in earlier EAPIs) unconditionally for you. # # Also, please note that distutils-r1 will always inherit python-r1 # as well. Thus, all the variables defined and documented there are @@ -44,10 +44,10 @@ # https://dev.gentoo.org/~mgorny/python-guide/ case "${EAPI:-0}" in - 0|1|2|3|4) + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 5|6|7) + [6-7]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -97,8 +97,7 @@ esac if [[ ! ${_DISTUTILS_R1} ]]; then -[[ ${EAPI} == [456] ]] && inherit eutils -[[ ${EAPI} == [56] ]] && inherit xdg-utils +[[ ${EAPI} == 6 ]] && inherit eutils xdg-utils inherit multiprocessing toolchain-funcs if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then @@ -146,7 +145,7 @@ _distutils_set_globals() { fi RDEPEND="${PYTHON_DEPS} ${rdep}" - if [[ ${EAPI} != [56] ]]; then + if [[ ${EAPI} != 6 ]]; then BDEPEND="${PYTHON_DEPS} ${bdep}" else DEPEND="${PYTHON_DEPS} ${bdep}" @@ -202,26 +201,6 @@ unset -f _distutils_set_globals # HTML_DOCS=( doc/html/. ) # @CODE -# @ECLASS-VARIABLE: EXAMPLES -# @DEFAULT_UNSET -# @DESCRIPTION: -# OBSOLETE: this variable is deprecated and banned in EAPI 6 -# -# An array containing examples installed into 'examples' doc -# subdirectory. The files and directories listed there must exist -# in the directory from which distutils-r1_python_install_all() is run -# (${S} by default). -# -# The 'examples' subdirectory will be marked not to be compressed -# automatically. -# -# If unset, no examples will be installed. -# -# Example: -# @CODE -# EXAMPLES=( examples/. demos/. ) -# @CODE - # @ECLASS-VARIABLE: DISTUTILS_IN_SOURCE_BUILD # @DEFAULT_UNSET # @DESCRIPTION: @@ -369,7 +348,7 @@ distutils_enable_sphinx() { python_compile_all() { sphinx_compile_all; } IUSE+=" doc" - if [[ ${EAPI} == [56] ]]; then + if [[ ${EAPI} == 6 ]]; then DEPEND+=" doc? ( ${deps} )" else BDEPEND+=" doc? ( ${deps} )" @@ -426,6 +405,7 @@ distutils_enable_tests() { setup.py) ;; unittest) + test_pkg="dev-python/unittest-or-fail" ;; *) die "${FUNCNAME}: unsupported argument: ${1}" @@ -447,7 +427,7 @@ distutils_enable_tests() { if [[ -n ${test_deps} ]]; then IUSE+=" test" RESTRICT+=" !test? ( test )" - if [[ ${EAPI} == [56] ]]; then + if [[ ${EAPI} == 6 ]]; then DEPEND+=" test? ( ${test_deps} )" else BDEPEND+=" test? ( ${test_deps} )" @@ -479,9 +459,6 @@ esetup.py() { [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context" - local die_args=() - [[ ${EAPI} != [45] ]] && die_args+=( -n ) - [[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg local setup_py=( setup.py ) @@ -493,11 +470,11 @@ esetup.py() { set -- "${EPYTHON}" "${setup_py[@]}" "${mydistutilsargs[@]}" "${@}" echo "${@}" >&2 - "${@}" || die "${die_args[@]}" + "${@}" || die -n local ret=${?} if [[ ${BUILD_DIR} ]]; then - rm "${HOME}"/.pydistutils.cfg || die "${die_args[@]}" + rm "${HOME}"/.pydistutils.cfg || die -n fi return ${ret} @@ -620,12 +597,7 @@ distutils-r1_python_prepare_all() { debug-print-function ${FUNCNAME} "${@}" if [[ ! ${DISTUTILS_OPTIONAL} ]]; then - if [[ ${EAPI} != [45] ]]; then - default - else - [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" - epatch_user - fi + default fi # by default, use in-source build if python_prepare() is used @@ -647,24 +619,6 @@ distutils-r1_python_prepare_all() { _DISTUTILS_DEFAULT_CALLED=1 } -# @FUNCTION: distutils-r1_python_prepare -# @DESCRIPTION: -# The default python_prepare(). A no-op. -distutils-r1_python_prepare() { - debug-print-function ${FUNCNAME} "${@}" - - [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI 6 (it was a no-op)" -} - -# @FUNCTION: distutils-r1_python_configure -# @DESCRIPTION: -# The default python_configure(). A no-op. -distutils-r1_python_configure() { - debug-print-function ${FUNCNAME} "${@}" - - [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI 6 (it was a no-op)" -} - # @FUNCTION: _distutils-r1_create_setup_cfg # @INTERNAL # @DESCRIPTION: @@ -830,7 +784,7 @@ distutils-r1_python_test() { nonfatal esetup.py test --verbose ;; unittest) - "${EPYTHON}" -m unittest discover -v + eunittest ;; *) die "Mis-synced test runner between ${FUNCNAME} and distutils_enable_testing" @@ -940,16 +894,6 @@ distutils-r1_python_install_all() { debug-print-function ${FUNCNAME} "${@}" einstalldocs - - if declare -p EXAMPLES &>/dev/null; then - [[ ${EAPI} != [45] ]] && die "EXAMPLES are banned in EAPI ${EAPI}" - - ( - docinto examples - dodoc -r "${EXAMPLES[@]}" - ) - docompress -x "/usr/share/doc/${PF}/examples" - fi } # @FUNCTION: distutils-r1_run_phase @@ -1080,10 +1024,7 @@ distutils-r1_src_prepare() { fi if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then - local cmd=die - [[ ${EAPI} == [45] ]] && cmd=eqawarn - - "${cmd}" "QA: python_prepare_all() didn't call distutils-r1_python_prepare_all" + die "QA: python_prepare_all() didn't call distutils-r1_python_prepare_all" fi if declare -f python_prepare >/dev/null; then @@ -1093,7 +1034,7 @@ distutils-r1_src_prepare() { distutils-r1_src_configure() { python_export_utf8_locale - [[ ${EAPI} == [56] ]] && xdg_environment_reset # Bug 577704 + [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704 if declare -f python_configure >/dev/null; then _distutils-r1_run_foreach_impl python_configure diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass index ae861daf6e79..fd25ad1d5856 100644 --- a/eclass/dotnet.eclass +++ b/eclass/dotnet.eclass @@ -1,8 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: dotnet.eclass -# @MAINTAINER: dotnet@gentoo.org +# @MAINTAINER: +# dotnet@gentoo.org # @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 # @BLURB: common settings and functions for mono and dotnet related packages # @DESCRIPTION: @@ -24,6 +25,7 @@ esac inherit mono-env # @ECLASS-VARIABLE: USE_DOTNET +# @PRE_INHERIT # @DESCRIPTION: # Use flags added to IUSE diff --git a/eclass/dune.eclass b/eclass/dune.eclass index 03857d25a2d4..c19c5ab9944f 100644 --- a/eclass/dune.eclass +++ b/eclass/dune.eclass @@ -9,14 +9,15 @@ # @AUTHOR: # Rafael Kitover <rkitover@gmail.com> # @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: Provides functions for installing dune packages. +# @BLURB: Provides functions for installing Dune packages. # @DESCRIPTION: -# Provides dependencies on dune and ocaml and default src_compile, src_test and -# src_install for dune-based packages. +# Provides dependencies on dDne and OCaml and default src_compile, src_test and +# src_install for Dune-based packages. # @ECLASS-VARIABLE: DUNE_PKG_NAME +# @PRE_INHERIT # @DESCRIPTION: -# Sets the actual dune package name, if different from gentoo package name. +# Sets the actual Dune package name, if different from Gentoo package name. # Set before inheriting the eclass. case ${EAPI:-0} in @@ -31,8 +32,13 @@ EXPORT_FUNCTIONS src_compile src_test src_install RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?]" case ${EAPI:-0} in - 0|1|2|3|4|5|6) DEPEND="${RDEPEND} dev-ml/dune";; - *) BDEPEND="dev-ml/dune dev-lang/ocaml"; DEPEND="${RDEPEND}" ;; + 5|6) + DEPEND="${RDEPEND} dev-ml/dune" + ;; + *) + BDEPEND="dev-ml/dune dev-lang/ocaml" + DEPEND="${RDEPEND}" + ;; esac dune_src_compile() { diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index c763957bf893..5f10a7caf78d 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.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: ecm.eclass @@ -10,7 +10,7 @@ # This eclass is intended to streamline the creation of ebuilds for packages # that use cmake and KDE Frameworks' extra-cmake-modules, thereby following # some of their packaging conventions. It is primarily intended for the three -# upstream release groups (Frameworks, Plasma, Applications) but also for any +# upstream release groups (Frameworks, Plasma, Gear) but also for any # other package that follows similar conventions. # # This eclass unconditionally inherits cmake.eclass and all its public @@ -20,6 +20,17 @@ # 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. +case ${EAPI} in + 7) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +if [[ -v KDE_GCC_MINIMAL ]]; then + EXPORT_FUNCTIONS pkg_pretend +fi + +EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm + if [[ -z ${_ECM_ECLASS} ]]; then _ECM_ECLASS=1 @@ -48,17 +59,6 @@ if [[ ${ECM_NONGUI} = false ]] ; then inherit xdg fi -case ${EAPI} in - 7) ;; - *) die "EAPI=${EAPI:-0} is not supported" ;; -esac - -if [[ -v KDE_GCC_MINIMAL ]]; then - EXPORT_FUNCTIONS pkg_pretend -fi - -EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm - # @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS # @DESCRIPTION: # Assume the package is using KDEInstallDirs macro and switch diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 832fc19e4675..bce3fd0cec02 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -10,6 +10,7 @@ # Mamoru Komachi <usata@gentoo.org> # Christian Faulhammer <fauli@gentoo.org> # Ulrich Müller <ulm@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Emacs-related installation utilities # @DESCRIPTION: # @@ -165,7 +166,7 @@ # to above calls of elisp-site-regen(). case ${EAPI:-0} in - 4|5|6) inherit eapi7-ver ;; + 5|6) inherit eapi7-ver ;; 7) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -219,7 +220,9 @@ _ELISP_EMACS_VERSION="" # Output version of currently active Emacs. elisp-emacs-version() { - local version ret + local version ret tmout="timeout -k 5 55" + # Run without timeout if the command is not available + ${tmout} true &>/dev/null || tmout="" # The following will work for at least versions 18-24. echo "(princ emacs-version)" >"${T}"/emacs-version.el version=$( @@ -228,7 +231,7 @@ elisp-emacs-version() { # Redirecting stdin and unsetting TERM and DISPLAY will cause # most of them to exit with an error. unset TERM DISPLAY - ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null + ${tmout} ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null ) ret=$? rm -f "${T}"/emacs-version.el @@ -274,27 +277,6 @@ elisp-check-emacs-version() { fi } -# Test if the eselected Emacs version is at least the major version -# of GNU Emacs specified as argument. -# Return 0 if true, 1 if false, 2 if trouble. -# Deprecated, use elisp-check-emacs-version instead. - -elisp-need-emacs() { - local need_emacs=$1 have_emacs - have_emacs=$(elisp-emacs-version) || return 2 - einfo "Emacs version: ${have_emacs}" - if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then - eerror "This package needs GNU Emacs." - return 1 - fi - if ! [[ ${have_emacs%%.*} -ge ${need_emacs%%.*} ]]; then - eerror "This package needs at least Emacs ${need_emacs%%.*}." - eerror "Use \"eselect emacs\" to select the active version." - return 1 - fi - return 0 -} - # @FUNCTION: elisp-compile # @USAGE: <list of elisp files> # @DESCRIPTION: @@ -380,7 +362,7 @@ elisp-modules-install() { shift # Don't bother inheriting multilib.eclass for get_libdir(), but # error out in old EAPIs that don't support it natively. - [[ ${EAPI} == [45] ]] \ + [[ ${EAPI} == 5 ]] \ && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}" ebegin "Installing dynamic modules for GNU Emacs support" ( # subshell to avoid pollution of calling environment @@ -408,8 +390,8 @@ elisp-site-file-install() { [[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el" sf="${T}/${sf}" ebegin "Installing site initialisation file for GNU Emacs" - [[ $1 = "${sf}" ]] || cp "$1" "${sf}" - if [[ ${EAPI} == [45] ]]; then + [[ $1 == "${sf}" ]] || cp "$1" "${sf}" + if [[ ${EAPI} == 5 ]]; then grep -q "@EMACSMODULES@" "${sf}" \ && die "${ECLASS}: Dynamic modules not supported in EAPI ${EAPI}" else @@ -439,7 +421,7 @@ elisp-site-regen() { local sf i ret=0 null="" page=$'\f' local -a sflist - if [[ ${EBUILD_PHASE} = *rm && ! -e ${sitelisp}/site-gentoo.el ]]; then + if [[ ${EBUILD_PHASE} == *rm && ! -e ${sitelisp}/site-gentoo.el ]]; then ewarn "Refusing to create site-gentoo.el in ${EBUILD_PHASE} phase." return 0 fi @@ -494,7 +476,7 @@ elisp-site-regen() { mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el eend $? "elisp-site-regen: Replacing site-gentoo.el failed" || die case ${#sflist[@]} in - 0) [[ ${PN} = emacs-common ]] \ + 0) [[ ${PN} == emacs-common ]] \ || ewarn "... Huh? No site initialisation files found." ;; 1) einfo "... ${#sflist[@]} site initialisation file included." ;; *) einfo "... ${#sflist[@]} site initialisation files included." ;; diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index 7876928c7fb2..d763a4944d2d 100644 --- a/eclass/elisp.eclass +++ b/eclass/elisp.eclass @@ -1,4 +1,4 @@ -# Copyright 2002-2020 Gentoo Authors +# Copyright 2002-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: elisp.eclass @@ -9,7 +9,7 @@ # Jeremy Maitin-Shepard <jbms@attbi.com> # Christian Faulhammer <fauli@gentoo.org> # Ulrich Müller <ulm@gentoo.org> -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Eclass for Emacs Lisp packages # @DESCRIPTION: # @@ -27,6 +27,7 @@ # ${PN}.el in src_unpack(). # @ECLASS-VARIABLE: NEED_EMACS +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # If you need anything different from Emacs 23, use the NEED_EMACS @@ -39,7 +40,7 @@ # Space separated list of patches to apply after unpacking the sources. # Patch files are searched for in the current working dir, WORKDIR, and # FILESDIR. This variable is semi-deprecated, preferably use the -# PATCHES array instead if the EAPI supports it. +# PATCHES array instead. # @ECLASS-VARIABLE: ELISP_REMOVE # @DEFAULT_UNSET @@ -61,8 +62,8 @@ # will be generated in src_compile() and installed in src_install(). inherit elisp-common + case ${EAPI:-0} in - 4|5) inherit epatch ;; 6|7) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -72,8 +73,7 @@ EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \ RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*" case ${EAPI} in - 4) RDEPEND="${RDEPEND%:*}"; DEPEND="${RDEPEND}" ;; - 5|6) DEPEND="${RDEPEND}" ;; + 6) DEPEND="${RDEPEND}" ;; *) BDEPEND="${RDEPEND}" ;; esac @@ -117,17 +117,11 @@ elisp_src_prepare() { else die "Cannot find ${patch}" fi - case ${EAPI} in - 4|5) epatch "${file}" ;; - *) eapply "${file}" ;; - esac + eapply "${file}" done - # apply PATCHES (if supported in EAPI), and any user patches - case ${EAPI} in - 4|5) epatch_user ;; - *) default ;; - esac + # apply PATCHES and any user patches + default if [[ -n ${ELISP_REMOVE} ]]; then rm ${ELISP_REMOVE} || die @@ -171,10 +165,7 @@ elisp_src_install() { doinfo ${@/%.*/.info*} fi # install documentation only when explicitly requested - case ${EAPI} in - 4|5) [[ -n ${DOCS} ]] && dodoc ${DOCS} ;; - *) [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs ;; - esac + [[ $(declare -p DOCS 2>/dev/null) == *=* ]] && einstalldocs if declare -f readme.gentoo_create_doc >/dev/null; then readme.gentoo_create_doc fi diff --git a/eclass/emboss-r2.eclass b/eclass/emboss-r2.eclass index 1f09805f8541..680b7b7e4d61 100644 --- a/eclass/emboss-r2.eclass +++ b/eclass/emboss-r2.eclass @@ -23,6 +23,7 @@ # inherit emboss-r2 # @ECLASS-VARIABLE: EBO_DESCRIPTION +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Completes the generic description of the embassy module as follows: diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass index fbb4f0b5bc0d..5d18befe55b9 100644 --- a/eclass/epatch.eclass +++ b/eclass/epatch.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: epatch.eclass @@ -294,7 +294,7 @@ epatch() { local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") if [[ -n ${rel_paths} ]] ; then echo - eerror "Rejected Patch: ${patchname} !" + eerror "Rejected Patch: ${patchname}!" eerror " ( ${PATCH_TARGET} )" eerror eerror "Your patch uses relative paths '../':" @@ -359,14 +359,14 @@ epatch() { if [[ ${count} -ge 5 ]] ; then echo - eerror "Failed Patch: ${patchname} !" + eerror "Failed patch: ${patchname}!" eerror " ( ${PATCH_TARGET} )" eerror - eerror "Include in your bugreport the contents of:" + eerror "Include in your bug report the contents of:" eerror eerror " ${STDERR_TARGET}" echo - die "Failed Patch: ${patchname}!" + die "Failed patch: ${patchname}!" fi # if everything worked, delete the full debug patch log @@ -389,7 +389,8 @@ epatch() { case ${EAPI:-0} in 0|1|2|3|4|5) -# @VARIABLE: EPATCH_USER_SOURCE +# @ECLASS_VARIABLE: EPATCH_USER_SOURCE +# @USER_VARIABLE # @DESCRIPTION: # Location for user patches, see the epatch_user function. # Should be set by the user. Don't set this in ebuilds. diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass index 0e37e2ecfa0f..8eaaccd0ec96 100644 --- a/eclass/findlib.eclass +++ b/eclass/findlib.eclass @@ -10,19 +10,18 @@ # @DESCRIPTION: # ocamlfind (a.k.a. findlib) eclass -# Do not complain about CFLAGS etc since ml projects do not use them. +# Do not complain about CFLAGS etc since ML projects do not use them. QA_FLAGS_IGNORED='.*' -# From this findlib version there is proper stublibs support. +# From this findlib version, there is proper stublibs support. DEPEND=">=dev-ml/findlib-1.0.4-r1" [[ ${FINDLIB_USE} ]] && DEPEND="${FINDLIB_USE}? ( ${DEPEND} )" check_ocamlfind() { - if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ] - then - eerror "In findlib.eclass: could not find the ocamlfind executable" - eerror "Please report this bug on gentoo's bugzilla, assigning to ml@gentoo.org" - die "ocamlfind executabled not found" + if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ] ; then + eerror "In ${ECLASS}: could not find the ocamlfind executable" + eerror "Please report this bug on Gentoo's Bugzilla, assigning to ml@gentoo.org" + die "ocamlfind executable not found" fi } diff --git a/eclass/fixheadtails.eclass b/eclass/fixheadtails.eclass index 475b182843a5..f1df8242b6fd 100644 --- a/eclass/fixheadtails.eclass +++ b/eclass/fixheadtails.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: fixheadtails.eclass @@ -8,6 +8,12 @@ # Original author John Mylchreest <johnm@gentoo.org> # @BLURB: functions to replace obsolete head/tail with POSIX compliant ones +# @FUNCTION: _do_sed_fix +# @INTERNAL +# @USAGE: <file> +# @DESCRIPTION: +# Apply series of regular expressions via sed to file +# to make head/tail compliant _do_sed_fix() { einfo " - fixed $1" sed -i \ @@ -37,5 +43,5 @@ ht_fix_all() { MATCHES=$(grep -l -s -i -R -e "head -[ 0-9]" -e "tail [+-][ 0-9]" * | sort -u) [[ -n ${MATCHES} ]] \ && ht_fix_file ${MATCHES} \ - || einfo "No need for ht_fix_all anymore !" + || einfo "No need for ht_fix_all anymore!" } diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 20ee39d98bad..ed1b6e746cef 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,27 +1,52 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: flag-o-matic.eclass # @MAINTAINER: # toolchain@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: common functions to manipulate and query toolchain flags # @DESCRIPTION: # This eclass contains a suite of functions to help developers sanely # and safely manage toolchain flags in their builds. +case ${EAPI:-0} in + 0|1|2|3|4) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; + 5|6|7) ;; + *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;; +esac + if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then _FLAG_O_MATIC_ECLASS=1 -inherit eutils toolchain-funcs multilib +inherit toolchain-funcs + +[[ ${EAPI} == [567] ]] && inherit eutils +# @FUNCTION: all-flag-vars +# @DESCRIPTION: # Return all the flag variables that our high level funcs operate on. all-flag-vars() { echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS } +# @FUNCTION: setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _setup-allowed-flags "$@" +} + +# @FUNCTION: _setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: +# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags +# Note: shell globs and character lists are allowed +_setup-allowed-flags() { ALLOWED_FLAGS=( -pipe -O '-O[12sg]' -mcpu -march -mtune '-fstack-protector*' '-fsanitize*' '-fstack-check*' -fno-stack-check @@ -87,7 +112,10 @@ setup-allowed-flags() { ) } -# inverted filters for hardened compiler. This is trying to unpick +# @FUNCTION: _filter-hardened +# @INTERNAL +# @DESCRIPTION: +# Inverted filters for hardened compiler. This is trying to unpick # the hardened compiler defaults. _filter-hardened() { local f @@ -121,6 +149,9 @@ _filter-hardened() { done } +# @FUNCTION: _filter-var +# @INTERNAL +# @DESCRIPTION: # Remove occurrences of strings from variable given in $1 # Strings removed are matched as globs, so for example # '-O*' would remove -O1, -O2 etc. @@ -313,6 +344,11 @@ replace-cpu-flags() { return 0 } +# @FUNCTION: _is_flagq +# @USAGE: <variable> <flag> +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if <flag> is in a given <variable>, else returns shell false. _is_flagq() { local x var="$1[*]" for x in ${!var} ; do @@ -405,7 +441,7 @@ strip-flags() { local x y var local ALLOWED_FLAGS - setup-allowed-flags + _setup-allowed-flags set -f # disable pathname expansion @@ -438,7 +474,25 @@ strip-flags() { return 0 } +# @FUNCTION: test-flag-PROG +# @USAGE: <compiler> <flag> +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if <flag> is supported by given <compiler>, +# else returns shell false. test-flag-PROG() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _test-flag-PROG "$@" +} + +# @FUNCTION: _test-flag-PROG +# @USAGE: <compiler> <flag> +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if <flag> is supported by given <compiler>, +# else returns shell false. +_test-flag-PROG() { local comp=$1 local lang=$2 shift 2 @@ -533,33 +587,51 @@ test-flag-PROG() { # @USAGE: <flag> # @DESCRIPTION: # Returns shell true if <flag> is supported by the C compiler, else returns shell false. -test-flag-CC() { test-flag-PROG "CC" c "$@"; } +test-flag-CC() { _test-flag-PROG CC c "$@"; } # @FUNCTION: test-flag-CXX # @USAGE: <flag> # @DESCRIPTION: # Returns shell true if <flag> is supported by the C++ compiler, else returns shell false. -test-flag-CXX() { test-flag-PROG "CXX" c++ "$@"; } +test-flag-CXX() { _test-flag-PROG CXX c++ "$@"; } # @FUNCTION: test-flag-F77 # @USAGE: <flag> # @DESCRIPTION: # Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false. -test-flag-F77() { test-flag-PROG "F77" f77 "$@"; } +test-flag-F77() { _test-flag-PROG F77 f77 "$@"; } # @FUNCTION: test-flag-FC # @USAGE: <flag> # @DESCRIPTION: # Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false. -test-flag-FC() { test-flag-PROG "FC" f95 "$@"; } +test-flag-FC() { _test-flag-PROG FC f95 "$@"; } # @FUNCTION: test-flag-CCLD # @USAGE: <flag> # @DESCRIPTION: # Returns shell true if <flag> is supported by the C compiler and linker, else returns shell false. -test-flag-CCLD() { test-flag-PROG "CC" c+ld "$@"; } +test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; } +# @FUNCTION: test-flags-PROG +# @USAGE: <compiler> <flag> [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if <flags> are supported by given <compiler>, +# else returns shell false. test-flags-PROG() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _test-flags-PROG "$@" +} + +# @FUNCTION: _test-flags-PROG +# @USAGE: <compiler> <flag> [more flags...] +# @INTERNAL +# @DESCRIPTION: +# Returns shell true if <flags> are supported by given <compiler>, +# else returns shell false. +_test-flags-PROG() { local comp=$1 local flags=() local x @@ -596,31 +668,31 @@ test-flags-PROG() { # @USAGE: <flags> # @DESCRIPTION: # Returns shell true if <flags> are supported by the C compiler, else returns shell false. -test-flags-CC() { test-flags-PROG "CC" "$@"; } +test-flags-CC() { _test-flags-PROG CC "$@"; } # @FUNCTION: test-flags-CXX # @USAGE: <flags> # @DESCRIPTION: # Returns shell true if <flags> are supported by the C++ compiler, else returns shell false. -test-flags-CXX() { test-flags-PROG "CXX" "$@"; } +test-flags-CXX() { _test-flags-PROG CXX "$@"; } # @FUNCTION: test-flags-F77 # @USAGE: <flags> # @DESCRIPTION: # Returns shell true if <flags> are supported by the Fortran 77 compiler, else returns shell false. -test-flags-F77() { test-flags-PROG "F77" "$@"; } +test-flags-F77() { _test-flags-PROG F77 "$@"; } # @FUNCTION: test-flags-FC # @USAGE: <flags> # @DESCRIPTION: # Returns shell true if <flags> are supported by the Fortran 90 compiler, else returns shell false. -test-flags-FC() { test-flags-PROG "FC" "$@"; } +test-flags-FC() { _test-flags-PROG FC "$@"; } # @FUNCTION: test-flags-CCLD # @USAGE: <flags> # @DESCRIPTION: # Returns shell true if <flags> are supported by the C compiler and default linker, else returns shell false. -test-flags-CCLD() { test-flags-PROG "CCLD" "$@"; } +test-flags-CCLD() { _test-flags-PROG CCLD "$@"; } # @FUNCTION: test-flags # @USAGE: <flags> diff --git a/eclass/font-ebdftopcf.eclass b/eclass/font-ebdftopcf.eclass index 29568e560134..88256c3231bd 100644 --- a/eclass/font-ebdftopcf.eclass +++ b/eclass/font-ebdftopcf.eclass @@ -1,45 +1,59 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Author: Robin H. Johnson <robbat2@gentoo.org> - -# font-ebdftopcf.eclass -# Eclass to make PCF font generator from BDF uniform and optimal +# @ECLASS: font-ebdftopcf.eclass +# @MAINTAINER: +# fonts@gentoo.org +# @AUTHOR: +# Robin H. Johnson <robbat2@gentoo.org> +# @SUPPORTED_EAPIS: 7 +# @BLURB: Eclass to make PCF font generator from BDF uniform and optimal +# @DESCRIPTION: # The manpage for this eclass is in media-gfx/ebdftopcf. +# Inherit this eclass after font.eclass + +case ${EAPI} in + 7) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile -# inherit this eclass after font.eclass +if [[ -z ${_FONT_EBDFTOPCF_ECLASS} ]]; then +_FONT_EBDFTOPCF_ECLASS=1 -# if USE="-X", this eclass is basically a no-op, since bdftopcf requires Xorg. +# Make dependence on Xorg optional IUSE="X" -# Variable declarations -DEPEND="X? ( media-gfx/ebdftopcf )" -RDEPEND="" +BDEPEND="X? ( media-gfx/ebdftopcf )" -# -# Public functions -# +# @FUNCTION: ebdftopcf +# @USAGE: <list of BDF files to convert> +# @DESCRIPTION: +# Convert BDF to PCF. This implicitly requires USE="X" to be enabled. ebdftopcf() { - local bdffiles - bdffiles="$@" - [ -z "$bdffiles" ] && die "No BDF files specified." - emake -f "${EPREFIX}"/usr/share/ebdftopcf/Makefile.ebdftopcf \ + debug-print-function ${FUNCNAME} "$@" + + local bdffiles="$@" + [[ -z ${bdffiles} ]] && die "No BDF files specified" + emake -f "${BROOT}"/usr/share/ebdftopcf/Makefile.ebdftopcf \ BDFFILES="${bdffiles}" \ BDFTOPCF_PARAMS="${BDFTOPCF_PARAMS}" \ || die "Failed to build PCF files" } -# -# Public inheritable functions -# +# @FUNCTION: font-ebdftopcf_src_compile +# @DESCRIPTION: +# Default phase function to convert BDF to PCF. If USE="-X", this amounts to +# a no-op, since bdftopcf requires Xorg. font-ebdftopcf_src_compile() { - use X && FONT_SUFFIX="pcf.gz" - use X || FONT_SUFFIX="bdf" + debug-print-function ${FUNCNAME} "$@" + FONT_SUFFIX=$(usex X "pcf.gz" "bdf") if use X; then - [ -z "${BDFFILES}" ] && BDFFILES="$(find . -name '*.bdf')" + [[ -z ${BDFFILES} ]] && local BDFFILES="$(find . -name '*.bdf')" ebdftopcf ${BDFFILES} fi } -EXPORT_FUNCTIONS src_compile +fi diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass index 2af79666aa20..20603adc8427 100644 --- a/eclass/freedict.eclass +++ b/eclass/freedict.eclass @@ -5,7 +5,7 @@ # @MAINTAINER: # maintainer-needed@gentoo.org # @AUTHOR: -# Original author: Seemant Kulleen +# Original author: Seemant Kulleen <seemant@gentoo.org> # @SUPPORTED_EAPIS: 7 # @BLURB: Ease the installation of freedict translation dictionaries # @DESCRIPTION: @@ -37,7 +37,7 @@ S="${WORKDIR}" # @FUNCTION: freedict_src_install # @DESCRIPTION: -# Installs translation specific dict.dz and index files. +# Installs translation-specific dict.dz and index files. freedict_src_install() { insinto /usr/$(get_libdir)/dict doins ${FREEDICT_P}.dict.dz diff --git a/eclass/games.eclass b/eclass/games.eclass index a2a5ce066a57..c3645ea5a802 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD # @ECLASS: games.eclass # @MAINTAINER: # Games team <games@gentoo.org> diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass index 72d668ca0e2e..7e8a5aa0cba8 100644 --- a/eclass/ghc-package.eclass +++ b/eclass/ghc-package.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: ghc-package.eclass @@ -37,6 +37,7 @@ ghc-getghc() { } # @FUNCTION: ghc-getghcpkg +# @INTERNAL # @DESCRIPTION: # Internal function determines returns the name of the ghc-pkg executable ghc-getghcpkg() { diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index cda7ac161e92..9c4f2c9d778e 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.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: git-r3.eclass @@ -36,6 +36,7 @@ if [[ ! ${_INHERITED_BY_GIT_2} ]]; then fi # @ECLASS-VARIABLE: EGIT_CLONE_TYPE +# @USER_VARIABLE # @DESCRIPTION: # Type of clone that should be used against the remote repository. # This can be either of: 'mirror', 'single', 'shallow'. diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass index d6eb57ad0eca..3d13409933e7 100644 --- a/eclass/gkrellm-plugin.eclass +++ b/eclass/gkrellm-plugin.eclass @@ -1,12 +1,12 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gkrellm-plugin.eclass # @MAINTAINER: # maintainer-needed@gentoo.org # @AUTHOR: -# Original author: Jim Ramsay -# EAPI 6 author: David Seifert +# Original author: Jim Ramsay <lack@gentoo.org> +# EAPI 6 author: David Seifert <soap@gentoo.org> # @SUPPORTED_EAPIS: 6 # @BLURB: Provides src_install used by (almost) all gkrellm plugins # @DESCRIPTION: diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass index 281627859e86..2b740561ba5b 100644 --- a/eclass/gnome.org.eclass +++ b/eclass/gnome.org.eclass @@ -15,6 +15,7 @@ [[ ${EAPI} == [0123456] ]] && inherit eapi7-ver versionator # @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX +# @PRE_INHERIT # @DESCRIPTION: # Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or # tar.xz. This eclass defaults to bz2 for EAPI 0, 1, 2, 3 and defaults to xz for diff --git a/eclass/gnuconfig.eclass b/eclass/gnuconfig.eclass index 3433837787c2..173df6fd25e9 100644 --- a/eclass/gnuconfig.eclass +++ b/eclass/gnuconfig.eclass @@ -1,25 +1,46 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# -# Author: Will Woods <wwoods@gentoo.org> -# + +# @ECLASS: gnuconfig.eclass +# @MAINTAINER: +# Sam James <sam@gentoo.org> +# @AUTHOR: +# Will Woods <wwoods@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 +# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub) +# @DESCRIPTION: # This eclass is used to automatically update files that typically come with # automake to the newest version available on the system. The most common use # of this is to update config.guess and config.sub when configure dies from # misguessing your canonical system name (CHOST). It can also be used to update # other files that come with automake, e.g. depcomp, mkinstalldirs, etc. # -# usage: gnuconfig_update [file1 file2 ...] + +case ${EAPI:-0} in + 5|6|7) + ;; + *) + die "EAPI ${EAPI} is unsupported!" + ;; +esac + +if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then + _GNUCONFIG_CLASS=1 + +BDEPEND="sys-devel/gnuconfig" + +[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}" + +# @FUNCTION: gnuconfig_update +# @USAGE: [file1 file2 ...] +# @DESCRIPTION: # if called without arguments, config.guess and config.sub will be updated. # All files in the source tree ($S) with the given name(s) will be replaced # with the newest available versions chosen from the list of locations in # gnuconfig_findnewest(), below. # # gnuconfig_update should generally be called from src_unpack() - - -DEPEND="sys-devel/gnuconfig" - +# # Wrapper function for gnuconfig_do_update. If no arguments are given, update # config.sub and config.guess (old default behavior), otherwise update the # named files. @@ -42,6 +63,9 @@ gnuconfig_update() { return $? } +# @FUNCTION: gnuconfig_do_update +# @INTERNAL +# @DESCRIPTION: # Copy the newest available version of specified files over any old ones in the # source dir. This function shouldn't be called directly - use gnuconfig_update # @@ -75,16 +99,34 @@ gnuconfig_do_update() { return 0 } -# this searches the standard locations for the newest config.{sub|guess}, and +# @FUNCTION: gnuconfig_findnewest +# @INTERNAL +# @DESCRIPTION: +# This searches the standard locations for the newest config.{sub|guess}, and # returns the directory where they can be found. gnuconfig_findnewest() { - local locations=( - "${EPREFIX}"/usr/share/misc/config.sub - "${EPREFIX}"/usr/share/gnuconfig/config.sub - "${EPREFIX}"/usr/share/automake*/config.sub - "${EPREFIX}"/usr/share/libtool/config.sub + local locations=() + local prefix + + case ${EAPI} in + 5|6) + prefix="${EPREFIX}" + ;; + *) + prefix="${BROOT}" + ;; + esac + + locations+=( + "${prefix}"/usr/share/misc/config.sub + "${prefix}"/usr/share/gnuconfig/config.sub + "${prefix}"/usr/share/automake*/config.sub + "${prefix}"/usr/share/libtool/config.sub ) + grep -s '^timestamp' "${locations[@]}" | \ sort -r -n -t\' -k2 | \ sed -n '1{s,/config.sub:.*$,,;p;q}' } + +fi diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass index e700d17a4d8f..8e859d0fdf63 100644 --- a/eclass/golang-base.eclass +++ b/eclass/golang-base.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-base.eclass @@ -15,7 +15,7 @@ case "${EAPI:-0}" in 5|6|7) ;; *) - die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})" + die "${ECLASS}: Unsupported EAPI (EAPI=${EAPI})" ;; esac diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass index 306db1f26c98..abdb7fa119dd 100644 --- a/eclass/golang-vcs-snapshot.eclass +++ b/eclass/golang-vcs-snapshot.eclass @@ -1,12 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-vcs-snapshot.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> # @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: support eclass for unpacking VCS snapshot tarballs for -# software written in the Go programming language +# @BLURB: eclass to unpack VCS snapshot tarballs for Go software # @DESCRIPTION: # This eclass provides a convenience src_unpack() which unpacks the # first tarball mentioned in SRC_URI to its appropriate location in diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass index 159b32f952f9..4d4a38bffe8c 100644 --- a/eclass/golang-vcs.eclass +++ b/eclass/golang-vcs.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: golang-vcs.eclass @@ -41,6 +41,7 @@ PROPERTIES+=" live" # @CODE # @ECLASS-VARIABLE: EGO_STORE_DIR +# @USER_VARIABLE # @DESCRIPTION: # Storage directory for Go sources. # diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 6099363bc9a5..b4741a0840c1 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: haskell-cabal.eclass @@ -42,6 +42,7 @@ inherit eutils ghc-package multilib toolchain-funcs # @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup configure'. # example: /etc/portage/make.conf: @@ -49,12 +50,14 @@ inherit eutils ghc-package multilib toolchain-funcs : ${CABAL_EXTRA_CONFIGURE_FLAGS:=} # @ECLASS-VARIABLE: CABAL_EXTRA_BUILD_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup build'. # example: /etc/portage/make.conf: CABAL_EXTRA_BUILD_FLAGS=-v : ${CABAL_EXTRA_BUILD_FLAGS:=} # @ECLASS-VARIABLE: GHC_BOOTSTRAP_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters for ghc when building # _only_ 'setup' binary bootstrap. @@ -63,6 +66,7 @@ inherit eutils ghc-package multilib toolchain-funcs : ${GHC_BOOTSTRAP_FLAGS:=} # @ECLASS-VARIABLE: CABAL_EXTRA_HADDOCK_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup haddock'. # example: /etc/portage/make.conf: @@ -70,6 +74,7 @@ inherit eutils ghc-package multilib toolchain-funcs : ${CABAL_EXTRA_HADDOCK_FLAGS:=} # @ECLASS-VARIABLE: CABAL_EXTRA_HOOGLE_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup haddock --hoogle'. # example: /etc/portage/make.conf: @@ -77,6 +82,7 @@ inherit eutils ghc-package multilib toolchain-funcs : ${CABAL_EXTRA_HOOGLE_FLAGS:=} # @ECLASS-VARIABLE: CABAL_EXTRA_HSCOLOUR_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup hscolour'. # example: /etc/portage/make.conf: @@ -85,6 +91,7 @@ inherit eutils ghc-package multilib toolchain-funcs # @ECLASS-VARIABLE: CABAL_EXTRA_TEST_FLAGS +# @USER_VARIABLE # @DESCRIPTION: # User-specified additional parameters passed to 'setup test'. # example: /etc/portage/make.conf: diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index 733d1d1f6bf7..69e3f7d46d8e 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -1,11 +1,12 @@ -# Copyright 2004-2019 Gentoo Authors +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-ant-2.eclass # @MAINTAINER: # java@gentoo.org # @AUTHOR: -# kiorky (kiorky@cryptelium.net), Petteri Räty (betelgeuse@gentoo.org) +# kiorky <kiorky@cryptelium.net> +# Petteri Räty <betelgeuse@gentoo.org> # @BLURB: eclass for ant based Java packages # @DESCRIPTION: # Eclass for Ant-based Java packages. Provides support for both automatic and diff --git a/eclass/java-osgi.eclass b/eclass/java-osgi.eclass index bb8c1d8575bd..f9a77b8490fa 100644 --- a/eclass/java-osgi.eclass +++ b/eclass/java-osgi.eclass @@ -1,11 +1,11 @@ -# Copyright 2007-2015 Gentoo Foundation +# Copyright 2007-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-osgi.eclass # @MAINTAINER: # java@gentoo.org # @AUTHOR: -# Java maintainers (java@gentoo.org) +# Java maintainers <java@gentoo.org> # @BLURB: Java OSGi eclass # @DESCRIPTION: # This eclass provides functionality which is used by packages that need to be diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass index bd5e92da6a27..4b690be13751 100644 --- a/eclass/java-pkg-2.eclass +++ b/eclass/java-pkg-2.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2015 Gentoo Foundation +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-pkg-2.eclass @@ -14,6 +14,7 @@ inherit java-utils-2 # @ECLASS-VARIABLE: JAVA_PKG_IUSE +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Use JAVA_PKG_IUSE instead of IUSE for doc, source and examples so that @@ -42,7 +43,6 @@ esac # @FUNCTION: java-pkg-2_pkg_setup # @DESCRIPTION: # pkg_setup initializes the Java environment - java-pkg-2_pkg_setup() { java-pkg_init } @@ -51,7 +51,6 @@ java-pkg-2_pkg_setup() { # @FUNCTION: java-pkg-2_src_prepare # @DESCRIPTION: # wrapper for java-utils-2_src_prepare - java-pkg-2_src_prepare() { java-utils-2_src_prepare } @@ -72,7 +71,6 @@ java-pkg-2_src_prepare() { # EANT_EXTRA_ARGS - extra arguments to pass to eant # EANT_ANT_TASKS - modifies the ANT_TASKS variable in the eant environment # @CODE - java-pkg-2_src_compile() { if [[ -e "${EANT_BUILD_XML:=build.xml}" ]]; then # auto generate classpath @@ -96,7 +94,6 @@ java-pkg-2_src_compile() { # @FUNCTION: java-pkg-2_src_test # @DESCRIPTION: # src_test, not exported. - java-pkg-2_src_test() { [[ -e "${EANT_BUILD_XML:=build.xml}" ]] || return @@ -149,7 +146,6 @@ java-pkg-2_src_test() { # @FUNCTION: java-pkg-2_pkg_preinst # @DESCRIPTION: # wrapper for java-utils-2_pkg_preinst - java-pkg-2_pkg_preinst() { java-utils-2_pkg_preinst } diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index a1ab0afb3162..ca03fea78cf4 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -1,11 +1,11 @@ -# Copyright 2004-2020 Gentoo Authors +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-pkg-simple.eclass # @MAINTAINER: # java@gentoo.org # @AUTHOR: -# Java maintainers (java@gentoo.org) +# Java maintainers <java@gentoo.org> # @BLURB: Eclass for packaging Java software with ease. # @DESCRIPTION: # This class is intended to build pure Java packages from Java sources diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index b0d4d8acbefc..a5c06a689ced 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2020 Gentoo Authors +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-utils-2.eclass @@ -1484,7 +1484,6 @@ java-pkg_ensure-vm-version-sufficient() { # @FUNCTION: java-pkg_is-vm-version-sufficient # @INTERNAL -# @DESCRIPTION: # @RETURN: zero - VM is sufficient; non-zero - VM is not sufficient java-pkg_is-vm-version-sufficient() { debug-print-function ${FUNCNAME} $* @@ -2592,14 +2591,14 @@ java-pkg_needs-vm() { # @FUNCTION: java-pkg_get-current-vm # @INTERNAL -# @RETURN - The current VM being used +# @RETURN: The current VM being used java-pkg_get-current-vm() { java-config -f } # @FUNCTION: java-pkg_get-vm-vendor # @INTERNAL -# @RETURN - The vendor of the current VM +# @RETURN: The vendor of the current VM java-pkg_get-vm-vendor() { debug-print-function ${FUNCNAME} $* @@ -2610,7 +2609,7 @@ java-pkg_get-vm-vendor() { # @FUNCTION: java-pkg_get-vm-version # @INTERNAL -# @RETURN - The version of the current VM +# @RETURN: The version of the current VM java-pkg_get-vm-version() { debug-print-function ${FUNCNAME} $* @@ -2619,12 +2618,12 @@ java-pkg_get-vm-version() { # @FUNCTION: java-pkg_build-vm-from-handle # @INTERNAL +# @RETURN: VM handle of an available JDK # @DESCRIPTION: # Selects a build vm from a list of vm handles. First checks for the system-vm # beeing usable, then steps through the listed handles till a suitable vm is # found. # -# @RETURN - VM handle of an available JDK java-pkg_build-vm-from-handle() { debug-print-function ${FUNCNAME} "$*" diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass index 6c6d14cc9797..5f14493f18a1 100644 --- a/eclass/java-vm-2.eclass +++ b/eclass/java-vm-2.eclass @@ -186,7 +186,7 @@ set_java_env() { # Make the symlink dodir "${JAVA_VM_DIR}" - dosym ${java_home#${EPREFIX}} ${JAVA_VM_DIR}/${VMHANDLE} + dosym "${java_home}" "${JAVA_VM_DIR}/${VMHANDLE}" } @@ -228,7 +228,7 @@ java-vm_install-env() { # Make the symlink dodir "${JAVA_VM_DIR}" - dosym "${java_home#${EPREFIX}}" "${JAVA_VM_DIR}/${VMHANDLE}" + dosym "${java_home}" "${JAVA_VM_DIR}/${VMHANDLE}" } diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index f0b6079ef968..7f0b32aad848 100644 --- a/eclass/kde.org.eclass +++ b/eclass/kde.org.eclass @@ -7,14 +7,21 @@ # @SUPPORTED_EAPIS: 7 # @BLURB: Support eclass for packages that are hosted on kde.org infrastructure. # @DESCRIPTION: -# This eclass is mainly providing facilities for the upstream release groups -# Frameworks, Plasma, Release Service to assemble default SRC_URI for tarballs, +# This eclass is mainly providing facilities for the three upstream release +# groups (Frameworks, Plasma, Gear) to assemble default SRC_URI for tarballs, # set up git-r3.eclass for stable/master branch versions or restrict access to # unreleased (packager access only) tarballs in Gentoo KDE overlay, but it may # be also used by any other package hosted on kde.org. # It also contains default meta variables for settings not specific to any # particular build system. +case ${EAPI} in + 7) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_nofetch src_unpack + if [[ -z ${_KDE_ORG_ECLASS} ]]; then _KDE_ORG_ECLASS=1 @@ -32,7 +39,60 @@ if [[ ${KDE_BUILD_TYPE} = live ]]; then inherit git-r3 fi -EXPORT_FUNCTIONS pkg_nofetch src_unpack +# @ECLASS-VARIABLE: KDE_ORG_CATEGORIES +# @INTERNAL +# @DESCRIPTION: +# Map of ${CATEGORY}=<upstream category> key-value pairs. +declare -A KDE_ORG_CATEGORIES=( + [app-accessibility]=accessibility + [app-admin]=system + [app-backup]=system + [app-cdr]=utilities + [app-editors]=utilities + [app-office]=office + [app-text]=office + [dev-libs]=libraries + [dev-qt]=qt/qt + [dev-util]=sdk + [games-board]=games + [games-kids]=education + [games-mud]=games + [kde-frameworks]=frameworks + [kde-plasma]=plasma + [mail-client]=pim + [media-gfx]=graphics + [media-libs]=libraries + [media-sound]=multimedia + [media-video]=multimedia + [net-firewall]=network + [net-im]=network + [net-irc]=network + [net-libs]=libraries + [net-misc]=network + [net-p2p]=network + [sci-astronomy]=education + [sci-calculators]=utilities + [sci-mathematics]=education + [sci-visualization]=education + [sys-block]=system + [sys-libs]=system + [www-client]=network + [x11-libs]=libraries +) +readonly KDE_ORG_CATEGORIES + +# @ECLASS-VARIABLE: KDE_ORG_CATEGORY +# @DESCRIPTION: +# If unset, default value is mapped from ${CATEGORY} to corresponding upstream +# category on invent.kde.org, with "kde" as fallback value. +: ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}} + +# @ECLASS-VARIABLE: KDE_ORG_COMMIT +# @DEFAULT_UNSET +# @DESCRIPTION: +# If set, instead of a regular release tarball, pull tar.gz snapshot from an +# invent.kde.org repository identified by KDE_ORG_CATEGORY and KDE_ORG_NAME +# at the desired COMMIT ID. # @ECLASS-VARIABLE: KDE_ORG_NAME # @DESCRIPTION: @@ -40,13 +100,15 @@ EXPORT_FUNCTIONS pkg_nofetch src_unpack # Name of the package as hosted on kde.org mirrors. : ${KDE_ORG_NAME:=$PN} -# @ECLASS-VARIABLE: KDE_RELEASE_SERVICE +# @ECLASS-VARIABLE: KDE_GEAR # @DESCRIPTION: # If set to "false", do nothing. # If set to "true", set SRC_URI accordingly and apply KDE_UNRELEASED. -: ${KDE_RELEASE_SERVICE:=false} +# Backward compatibility: Picks up KDE_RELEASE_SERVICE value if set. +: ${KDE_GEAR:=${KDE_RELEASE_SERVICE:-false}} # @ECLASS-VARIABLE: KDE_SELINUX_MODULE +# @PRE_INHERIT # @DESCRIPTION: # If set to "none", do nothing. # For any other value, add selinux to IUSE, and depending on that useflag @@ -72,8 +134,13 @@ KDE_UNRELEASED=( ) HOMEPAGE="https://kde.org/" case ${CATEGORY} in + dev-qt) + KDE_ORG_NAME=${QT5_MODULE:-${PN}} + HOMEPAGE="https://community.kde.org/Qt5PatchCollection + https://invent.kde.org/qt/qt/ https://www.qt.io/" + ;; kde-apps) - KDE_RELEASE_SERVICE=true + KDE_GEAR=true ;; kde-plasma) HOMEPAGE="https://kde.org/plasma-desktop" @@ -95,7 +162,7 @@ _kde.org_is_unreleased() { for pair in "${KDE_UNRELEASED[@]}" ; do if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then return 0 - elif [[ ${KDE_RELEASE_SERVICE} = true ]]; then + elif [[ ${KDE_GEAR} = true ]]; then if [[ "${pair/kde-apps/${CATEGORY}}" = "${CATEGORY}-${PV}" ]]; then return 0 fi @@ -114,7 +181,7 @@ _kde.org_calculate_src_uri() { local _src_uri="mirror://kde/" - if [[ ${KDE_RELEASE_SERVICE} = true ]]; then + if [[ ${KDE_GEAR} = true ]]; then case ${PV} in ??.??.[6-9]? ) _src_uri+="unstable/release-service/${PV}/src/" @@ -162,7 +229,13 @@ _kde.org_calculate_src_uri() { esac fi - SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz" + if [[ -n ${KDE_ORG_COMMIT} ]]; then + SRC_URI="https://invent.kde.org/${KDE_ORG_CATEGORY}/${KDE_ORG_NAME}/-/" + SRC_URI+="archive/${KDE_ORG_COMMIT}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}.tar.gz" + SRC_URI+=" -> ${KDE_ORG_NAME}-${PV}-${KDE_ORG_COMMIT:0:8}.tar.gz" + else + SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz" + fi if _kde.org_is_unreleased ; then RESTRICT+=" fetch" @@ -182,9 +255,13 @@ _kde.org_calculate_live_repo() { # @DESCRIPTION: # This variable allows easy overriding of default kde mirror service # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/kde} + EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}} + + if [[ ${PV} == ?.??.9999 && ${CATEGORY} = dev-qt ]]; then + EGIT_BRANCH="kde/$(ver_cut 1-2)" + fi - if [[ ${PV} == ??.??.49.9999 && ${KDE_RELEASE_SERVICE} = true ]]; then + if [[ ${PV} == ??.??.49.9999 && ${KDE_GEAR} = true ]]; then EGIT_BRANCH="release/$(ver_cut 1-2)" fi @@ -208,14 +285,15 @@ case ${KDE_BUILD_TYPE} in *) _kde.org_calculate_src_uri debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" + if [[ -n ${KDE_ORG_COMMIT} ]]; then + S=${WORKDIR}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT} + [[ ${CATEGORY} == dev-qt ]] && QT5_BUILD_DIR="${S}_build" + else + S=${WORKDIR}/${KDE_ORG_NAME}-${PV} + fi ;; esac - -if [[ ${KDE_BUILD_TYPE} = release ]]; then - S=${WORKDIR}/${KDE_ORG_NAME}-${PV} -fi - # @FUNCTION: kde.org_pkg_nofetch # @DESCRIPTION: # Intended for use in the KDE overlay. If this package matches something in @@ -231,8 +309,8 @@ kde.org_pkg_nofetch() { kde-frameworks) sched_uri+="/Frameworks" ;; kde-plasma) sched_uri+="/Plasma_5" ;; *) - [[ ${KDE_RELEASE_SERVICE} = true ]] && - sched_uri+="/release_service/$(ver_cut 1-2)_Release_Schedule" + [[ ${KDE_GEAR} = true ]] && + sched_uri+="/KDE_Gear_$(ver_cut 1-2)_Schedule" ;; esac diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index dccd39ec8f2f..67ad4acc1fef 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.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: kernel-2.eclass @@ -1631,9 +1631,9 @@ kernel-2_pkg_setup() { echo ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!" ewarn "Either switch to another gcc-version (via gcc-config) or use a" - ewarn "newer kernel that supports gcc-4." + ewarn "newer kernel that supports >=sys-devel/gcc-4." echo - ewarn "Also be aware that bugreports about gcc-4 not working" + ewarn "Also, be aware that bug reports about gcc-4 not working" ewarn "with linux-2.4 based ebuilds will be closed as INVALID!" echo fi diff --git a/eclass/libretro-core.eclass b/eclass/libretro-core.eclass index f5f63065f223..ff7b629d63b5 100644 --- a/eclass/libretro-core.eclass +++ b/eclass/libretro-core.eclass @@ -1,4 +1,4 @@ -# Copyright 2018-2020 Gentoo Authors +# Copyright 2018-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: libretro-core.eclass @@ -53,11 +53,13 @@ if [[ -z "${LIBRETRO_CORE_NAME}" ]]; then fi # @ECLASS-VARIABLE: LIBRETRO_COMMIT_SHA +# @PRE_INHERIT # @DESCRIPTION: # Commit SHA used for SRC_URI will die if not set in <9999 ebuilds. # Needs to be set before inherit. # @ECLASS-VARIABLE: LIBRETRO_REPO_NAME +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # Contains the real repo name of the core formatted as "repouser/reponame". diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 11a890889e4f..55f38af0ffd8 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.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: linux-info.eclass @@ -951,9 +951,9 @@ linux-info_pkg_setup() { ewarn "linux-2.4 (or modules building against a linux-2.4 kernel)!" echo ewarn "Either switch to another gcc-version (via gcc-config) or use a" - ewarn "newer kernel that supports gcc-4." + ewarn "newer kernel that supports >=sys-devel/gcc-4." echo - ewarn "Also be aware that bugreports about gcc-4 not working" + ewarn "Also, be aware that bug reports about gcc-4 not working" ewarn "with linux-2.4 based ebuilds will be closed as INVALID!" echo fi diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index e0444eacc61a..11b0fd0cfb5e 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -18,11 +18,13 @@ # These are as follows: # @ECLASS-VARIABLE: MODULES_OPTIONAL_USE +# @PRE_INHERIT # @DESCRIPTION: # 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 +# @PRE_INHERIT # @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 diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 2da2ba0aa90a..a41381c3d4ee 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -17,21 +17,21 @@ # a proper dependency string yourself to guarantee that appropriate # version of LLVM is installed. # -# Example use for a package supporting LLVM 5 to 7: +# Example use for a package supporting LLVM 9 to 11: # @CODE -# inherit cmake-utils llvm +# inherit cmake llvm # # RDEPEND=" -# <sys-devel/llvm-8:= +# <sys-devel/llvm-11:= # || ( -# sys-devel/llvm:7 -# sys-devel/llvm:6 -# sys-devel/llvm:5 +# sys-devel/llvm:9 +# sys-devel/llvm:10 +# sys-devel/llvm:11 # ) # " # DEPEND=${RDEPEND} # -# LLVM_MAX_SLOT=7 +# LLVM_MAX_SLOT=11 # # # only if you need to define one explicitly # pkg_setup() { @@ -42,12 +42,12 @@ # # Example for a package needing LLVM+clang w/ a specific target: # @CODE -# inherit cmake-utils llvm +# inherit cmake llvm # # # 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-6:=[llvm_targets_AMDGPU(+)] +# >=sys-devel/clang-9:=[llvm_targets_AMDGPU(+)] # " # DEPEND=${RDEPEND} # @@ -177,7 +177,7 @@ get_llvm_prefix() { die "${FUNCNAME}: invalid max_slot=${max_slot}" fi - die "No LLVM slot${1:+ <= ${1}} found installed!" + die "No LLVM slot${1:+ <= ${1}} satisfying the package's dependencies found installed!" } # @FUNCTION: llvm_pkg_setup diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index e532c953cb70..394df33df047 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -89,6 +89,11 @@ inherit multiprocessing # the manpages. If set to 'pregenerated', fetch and install # pregenerated manpages from the archive. +# @ECLASS-VARIABLE: LLVM_PATCHSET +# @DEFAULT_UNSET +# @DESCRIPTION: +# LLVM patchset version. No patchset is used if unset. + # == global scope logic == @@ -145,6 +150,11 @@ llvm.org_set_globals() { die "Invalid LLVM_MANPAGES=${LLVM_MANPAGES}" esac + if [[ -n ${LLVM_PATCHSET} ]]; then + SRC_URI+=" + https://dev.gentoo.org/~mgorny/dist/llvm/llvm-gentoo-patchset-${LLVM_PATCHSET}.tar.xz" + fi + # === useful defaults for cmake-based packages === # least intrusive of all @@ -192,6 +202,15 @@ llvm.org_src_unpack() { [[ ${x} != ${archive} ]] && unpack "${x}" done fi + + if [[ -n ${LLVM_PATCHSET} ]]; then + # strip patches that don't match current components + local IFS='|' + grep -E -r -L "^Gentoo-Component:.*(${components[*]})" \ + "${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" | + xargs rm + assert + fi } # @FUNCTION: llvm.org_src_prepare @@ -201,6 +220,13 @@ llvm.org_src_unpack() { # ${WORKDIR}, so that patches straight from llvm-project repository # work correctly with -p1. llvm.org_src_prepare() { + if [[ -n ${LLVM_PATCHSET} ]]; then + local PATCHES=( + "${PATCHES[@]}" + "${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" + ) + fi + if declare -f cmake_src_prepare >/dev/null; then # cmake eclasses force ${S} for default_src_prepare # but use ${CMAKE_USE_DIR} for everything else diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass index 418f3f8ce076..849479d048f0 100644 --- a/eclass/mate-desktop.org.eclass +++ b/eclass/mate-desktop.org.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: mate-desktop.org.eclass @@ -35,13 +35,13 @@ inherit versionator # @DESCRIPTION: # Name of the package as hosted on mate-desktop.org. # Leave unset if package name matches PN. -: ${MATE_DESKTOP_ORG_PN:=$PN} +: ${MATE_DESKTOP_ORG_PN:=${PN}} # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV # @DESCRIPTION: # Package version string as listed on mate-desktop.org. # Leave unset if package version string matches PV. -: ${MATE_DESKTOP_ORG_PV:=$PV} +: ${MATE_DESKTOP_ORG_PV:=${PV}} # @ECLASS-VARIABLE: MATE_BRANCH # @DESCRIPTION: diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass index faf38306db38..dc0d19f59ae2 100644 --- a/eclass/mercurial.eclass +++ b/eclass/mercurial.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: mercurial.eclass @@ -35,6 +35,7 @@ DEPEND="dev-vcs/mercurial" : ${EHG_REVISION:="default"} # @ECLASS-VARIABLE: EHG_STORE_DIR +# @USER_VARIABLE # @DESCRIPTION: # Mercurial sources store directory. Users may override this in /etc/portage/make.conf [[ -z "${EHG_STORE_DIR}" ]] && EHG_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src" diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass index c6276908b9f5..3966dfd9f53f 100644 --- a/eclass/mozextension.eclass +++ b/eclass/mozextension.eclass @@ -1,11 +1,12 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # + # @ECLASS: mozextension.eclass # @MAINTAINER: # Mozilla team <mozilla@gentoo.org> -# @BLURB: Install extensions for use in mozilla products. -# +# @BLURB: Install extensions for use in Mozilla products. + if [[ ! ${_MOZEXTENSION} ]]; then # @ECLASS-VARIABLE: MOZEXTENSION_TARGET diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass index be01ef6aca50..423f0bdcc71a 100644 --- a/eclass/mozlinguas-v2.eclass +++ b/eclass/mozlinguas-v2.eclass @@ -28,6 +28,7 @@ esac EXPORT_FUNCTIONS src_unpack src_compile src_install # @ECLASS-VARIABLE: MOZ_LANGS +# @DEFAULT_UNSET # @DESCRIPTION: # Array containing the list of language pack xpis available for # this release. The list can be updated with scripts/get_langs.sh from the @@ -35,34 +36,40 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install : ${MOZ_LANGS:=()} # @ECLASS-VARIABLE: MOZ_PV +# @DEFAULT_UNSET # @DESCRIPTION: # Ebuild package version converted to equivalent upstream version. # Defaults to ${PV}, and should be overridden for alphas, betas, and RCs : ${MOZ_PV:="${PV}"} # @ECLASS-VARIABLE: MOZ_PN +# @DEFAULT_UNSET # @DESCRIPTION: # Ebuild package name converted to equivalent upstream name. # Defaults to ${PN}, and should be overridden for binary ebuilds. : ${MOZ_PN:="${PN}"} # @ECLASS-VARIABLE: MOZ_P +# @DEFAULT_UNSET # @DESCRIPTION: # Ebuild package name + version converted to upstream equivalent. # Defaults to ${MOZ_PN}-${MOZ_PV} : ${MOZ_P:="${MOZ_PN}-${MOZ_PV}"} # @ECLASS-VARIABLE: MOZ_FTP_URI +# @DEFAULT_UNSET # @DESCRIPTION: # The ftp URI prefix for the release tarballs and language packs. : ${MOZ_FTP_URI:=""} # @ECLASS-VARIABLE: MOZ_HTTP_URI +# @PRE_INHERIT # @DESCRIPTION: # The http URI prefix for the release tarballs and language packs. : ${MOZ_HTTP_URI:=""} # @ECLASS-VARIABLE: MOZ_LANGPACK_HTTP_URI +# @PRE_INHERIT # @DESCRIPTION: # An alternative http URI if it differs from official mozilla URI. # Defaults to whatever MOZ_HTTP_URI was set to. @@ -91,6 +98,8 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install : ${MOZ_LANGPACK_UNOFFICIAL:=""} # @ECLASS-VARIABLE: MOZ_GENERATE_LANGPACKS +# @PRE_INHERIT +# @DEFAULT_UNSET # @DESCRIPTION: # This flag specifies whether or not the langpacks should be # generated directly during the build process, rather than @@ -106,6 +115,8 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install : ${MOZ_L10N_SOURCEDIR:="${WORKDIR}/l10n-sources"} # @ECLASS-VARIABLE: MOZ_L10N_URI_PREFIX +# @PRE_INHERIT +# @DEFAULT_UNSET # @DESCRIPTION: # The full URI prefix of the distfile for each l10n locale. The # AB_CD and MOZ_L10N_URI_SUFFIX will be appended to this to complete the @@ -115,12 +126,14 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install : ${MOZ_L10N_URI_PREFIX:=""} # @ECLASS-VARIABLE: MOZ_L10N_URI_SUFFIX +# @DEFAULT_UNSET # @DESCRIPTION: # The suffix of l10n source distfiles. # Defaults to '.tar.xz' : ${MOZ_L10N_URI_SUFFIX:=".tar.xz"} # @ECLASS-VARIABLE: MOZ_FORCE_UPSTREAM_L10N +# @DEFAULT_UNSET # @DESCRIPTION: # Set this to use upstream langpaks even if the package normally # shouldn't (ie it is an alpha or beta package) diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 585364de6273..e85cee1b94ce 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -1,4 +1,4 @@ -# Copyright 2013-2020 Gentoo Authors +# Copyright 2013-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multilib-build.eclass @@ -663,7 +663,6 @@ multilib_native_with() { # of <false1> (or 'no' if unspecified) and <false2>. Arguments # are the same as for usex in the EAPI. # -# Note: in EAPI 4 you need to inherit eutils to use this function. multilib_native_usex() { if multilib_is_native_abi; then usex "${@}" diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass index 065ed1e568f3..07b5ab3b5284 100644 --- a/eclass/netsurf.eclass +++ b/eclass/netsurf.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: netsurf.eclass @@ -19,7 +19,7 @@ inherit toolchain-funcs # @FUNCTION: netsurf_define_makeconf # @USAGE: # @DESCRIPTION: -# This function sets NETSURF_MAKECONF as needed by netsurf build system +# This function sets NETSURF_MAKECONF as needed by the netsurf build system netsurf_define_makeconf() { NETSURF_MAKECONF=( PREFIX="${EPREFIX}/usr" diff --git a/eclass/nvidia-driver.eclass b/eclass/nvidia-driver.eclass index 65fa9092ca27..99f7cf4876a6 100644 --- a/eclass/nvidia-driver.eclass +++ b/eclass/nvidia-driver.eclass @@ -1,6 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD # @ECLASS: nvidia-driver.eclass # @MAINTAINER: # David Seifert <soap@gentoo.org> diff --git a/eclass/oasis.eclass b/eclass/oasis.eclass deleted file mode 100644 index a0b9a0a71153..000000000000 --- a/eclass/oasis.eclass +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# @ECLASS: oasis.eclass -# @MAINTAINER: -# ML <ml@gentoo.org> -# @AUTHOR: -# Original Author: Alexis Ballier <aballier@gentoo.org> -# @SUPPORTED_EAPIS: 3 4 5 -# @BLURB: Provides common ebuild phases for oasis-based packages. -# @DEPRECATED: Use opam.eclass, dune.eclass, or findlib.eclass (if necessary) -# @DESCRIPTION: -# Provides common ebuild phases for oasis-based packages. -# Most of these packages will just have to inherit the eclass, set their -# dependencies and the DOCS variable for base.eclass to install it and be done. -# -# It inherits multilib, findlib, eutils and base eclasses. -# Ebuilds using oasis.eclass must be EAPI>=3. - -# @ECLASS-VARIABLE: OASIS_BUILD_DOCS -# @DESCRIPTION: -# Will make oasis_src_compile build the documentation if this variable is -# defined and the doc useflag is enabled. -# The eclass takes care of setting doc in IUSE but the ebuild should take care -# of the extra dependencies it may need. -# Set before inheriting the eclass. - -# @ECLASS-VARIABLE: OASIS_BUILD_TESTS -# @DESCRIPTION: -# Will make oasis_src_configure enable building the tests if the test useflag is -# enabled. oasis_src_test will then run them. -# Note that you sometimes need to enable this for src_test to be useful, -# sometimes not. It has to be enabled on a per-case basis. -# The eclass takes care of setting test in IUSE but the ebuild should take care -# of the extra dependencies it may need. -# Set before inheriting the eclass. - - -# @ECLASS-VARIABLE: OASIS_NO_DEBUG -# @DESCRIPTION: -# Disable debug useflag usage. Old oasis versions did not support it so we allow -# disabling it in those cases. -# The eclass takes care of setting debug in IUSE. -# Set before inheriting the eclass. - -# @ECLASS-VARIABLE: OASIS_DOC_DIR -# @DESCRIPTION: -# Specify where to install documentation. Default is for ocamldoc HTML. -# Change it before inherit if this is not what you want. -# EPREFIX is automatically prepended. -: ${OASIS_DOC_DIR:="/usr/share/doc/${PF}/html"} - -inherit multilib findlib eutils base - -# Implicitly limited to EAPI 5 or earlier because of base.eclass -case ${EAPI:-0} in - 0|1|2) die "You need at least EAPI-3 to use oasis.eclass";; - 3|4) RDEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]";; - *) RDEPEND=">=dev-lang/ocaml-3.12:=[ocamlopt?]";; -esac - -IUSE="+ocamlopt" -[ -n "${OASIS_NO_DEBUG}" ] || IUSE="${IUSE} debug" -[ -n "${OASIS_BUILD_DOCS}" ] && IUSE="${IUSE} doc" -if [[ -n ${OASIS_BUILD_TESTS} ]]; then - IUSE+=" test" - RESTRICT+=" !test? ( test )" -fi - -DEPEND="${RDEPEND} - dev-ml/ocamlbuild" - -# @FUNCTION: oasis_use_enable -# @USAGE: < useflag > < variable > -# @DESCRIPTION: -# A use_enable-like function for oasis configure variables. -# Outputs '--override variable (true|false)', whether useflag is enabled or -# not. -# Typical usage: $(oasis_use_enable ocamlopt is_native) as an oasis configure -# argument. -oasis_use_enable() { - echo "--override $2 $(usex $1 true false)" -} - -# @FUNCTION: oasis_src_configure -# @DESCRIPTION: -# src_configure phase shared by oasis-based packages. -# Extra arguments may be passed via oasis_configure_opts. -oasis_src_configure() { - local confargs="" - [ -n "${OASIS_BUILD_TESTS}" ] && confargs="${confargs} $(use_enable test tests)" - [ -n "${OASIS_NO_DEBUG}" ] || confargs="${confargs} $(oasis_use_enable debug debug)" - ${OASIS_SETUP_COMMAND:-ocaml setup.ml} -configure \ - --prefix "${ED}/usr" \ - --libdir "${ED}/usr/$(get_libdir)" \ - --docdir "${ED}${OASIS_DOC_DIR}" \ - $(oasis_use_enable ocamlopt is_native) \ - ${confargs} \ - ${oasis_configure_opts} \ - || die -} - -# @FUNCTION: oasis_src_compile -# @DESCRIPTION: -# Builds an oasis-based package. -# Will build documentation if OASIS_BUILD_DOCS is defined and the doc useflag is -# enabled. -oasis_src_compile() { - ${OASIS_SETUP_COMMAND:-ocaml setup.ml} -build || die - if [ -n "${OASIS_BUILD_DOCS}" ] && use doc; then - ocaml setup.ml -doc || die - fi -} - -# @FUNCTION: oasis_src_test -# @DESCRIPTION: -# Runs the testsuite of an oasis-based package. -oasis_src_test() { - LD_LIBRARY_PATH="${S}/_build/lib" ${OASIS_SETUP_COMMAND:-ocaml setup.ml} -test || die -} - -# @FUNCTION: oasis_src_install -# @DESCRIPTION: -# Installs an oasis-based package. -# It calls base_src_install_docs, so will install documentation declared in the -# DOCS variable. -oasis_src_install() { - findlib_src_preinst - ${OASIS_SETUP_COMMAND:-ocaml setup.ml} -install || die - base_src_install_docs -} - -EXPORT_FUNCTIONS src_configure src_compile src_test src_install diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass index a1649ac8d6aa..a81eea4b6107 100644 --- a/eclass/office-ext-r1.eclass +++ b/eclass/office-ext-r1.eclass @@ -20,6 +20,7 @@ esac EXPORT_FUNCTIONS src_unpack src_install # @ECLASS-VARIABLE: OFFICE_REQ_USE +# @PRE_INHERIT # @DESCRIPTION: # Useflags required on office implementation for the extension. # @@ -45,6 +46,7 @@ fi [[ -z ${OFFICE_IMPLEMENTATIONS} ]] && OFFICE_IMPLEMENTATIONS=( "libreoffice" ) # @ECLASS-VARIABLE: OFFICE_EXTENSIONS +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # Array containing list of extensions to install. diff --git a/eclass/opam.eclass b/eclass/opam.eclass index 338ba842cd9c..262d726a8a7a 100644 --- a/eclass/opam.eclass +++ b/eclass/opam.eclass @@ -22,14 +22,20 @@ esac QA_FLAGS_IGNORED='.*' # @ECLASS-VARIABLE: OPAM_INSTALLER_DEP +# @PRE_INHERIT # @DESCRIPTION: # Override dependency for OPAM_INSTALLER : ${OPAM_INSTALLER_DEP:="dev-ml/opam-installer"} RDEPEND=">=dev-lang/ocaml-4:=" case ${EAPI:-0} in - 0|1|2|3|4|5|6) DEPEND="${RDEPEND} ${OPAM_INSTALLER_DEP}";; - *) BDEPEND="${OPAM_INSTALLER_DEP} dev-lang/ocaml"; DEPEND="${RDEPEND}" ;; + 5|6) + DEPEND="${RDEPEND} ${OPAM_INSTALLER_DEP}" + ;; + *) + BDEPEND="${OPAM_INSTALLER_DEP} dev-lang/ocaml" + DEPEND="${RDEPEND}" + ;; esac # @ECLASS-VARIABLE: OPAM_INSTALLER diff --git a/eclass/openib.eclass b/eclass/openib.eclass index a36f5cd85d02..7810062fae36 100644 --- a/eclass/openib.eclass +++ b/eclass/openib.eclass @@ -1,9 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: openib.eclass +# @MAINTAINER: +# maintainer-needed@gentoo.org # @AUTHOR: -# Original Author: Alexey Shvetsov <alexxy@gentoo.org> +# Author: Alexey Shvetsov <alexxy@gentoo.org> # @BLURB: Simplify working with OFED packages inherit eutils rpm versionator diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass index e13fc3eba811..e6ab6b7f52db 100644 --- a/eclass/optfeature.eclass +++ b/eclass/optfeature.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: optfeature.eclass @@ -14,6 +14,58 @@ esac if [[ -z ${_OPTFEATURE_ECLASS} ]]; then _OPTFEATURE_ECLASS=1 +# @ECLASS-VARIABLE: _OPTFEATURE_DEFAULT_HEADER +# @INTERNAL +# @DESCRIPTION: +# Default header printed ahead of optfeature output. Can be overridden +# by calling optfeature_header function. Will not be displayed if all optional +# dependencies are present. +_OPTFEATURE_DEFAULT_HEADER="Install additional packages for optional runtime features:" + +readonly _OPTFEATURE_DEFAULT_HEADER + +# @ECLASS-VARIABLE: _OPTFEATURE_HEADER +# @INTERNAL +# @DESCRIPTION: +# Default empty. Custom header printed ahead of optfeature output. +# Set by calling optfeature_header function with the desired output, or reset +# by optfeature_header without argument. Will not be displayed if all optional +# dependencies are present. +_OPTFEATURE_HEADER= + +# @ECLASS-VARIABLE: _OPTFEATURE_DOHEADER +# @INTERNAL +# @DESCRIPTION: +# If true, print header ahead of the first optfeature output. +_OPTFEATURE_DOHEADER=true + +# @FUNCTION: optfeature_header +# @USAGE: [custom header for follow-up optfeature calls] +# @DESCRIPTION: +# Set a custom header for follow-up optfeature calls, or reset to default +# header by calling it without argument. This can not only be used to customize +# the header but also to distinguish optfeature "groups", e.g. to list a number +# of different possible database backends, and then a number of optional +# regular runtime features. +# +# The following snippet will leave the default header untouched for the first +# two optfeature calls. Then a custom header is set that is going to be +# displayed in case dev-db/a or dev-db/b are not installed. +# @CODE +# pkg_postinst() { +# optfeature "foo support" app-misc/foo +# optfeature "bar support" app-misc/bar +# optfeature_header "Install optional database backends:" +# optfeature "a DB backend" dev-db/a +# optfeature "b DB backend" dev-db/b +# } +# @CODE +optfeature_header() { + debug-print-function ${FUNCNAME} "$@" + _OPTFEATURE_HEADER="${1}" + _OPTFEATURE_DOHEADER=true +} + # @FUNCTION: optfeature # @USAGE: <short description> <package atom to match> [other atoms] # @DESCRIPTION: @@ -24,9 +76,11 @@ _OPTFEATURE_ECLASS=1 # app-misc/bar or app-misc/baz[bar] for optional bar support # and either both app-misc/a and app-misc/b or app-misc/c for alphabet support. # @CODE -# optfeature "foo support" app-misc/foo -# optfeature "bar support" app-misc/bar app-misc/baz[bar] -# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c +# pkg_postinst() { +# optfeature "foo support" app-misc/foo +# optfeature "bar support" app-misc/bar app-misc/baz[bar] +# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c +# } # @CODE optfeature() { debug-print-function ${FUNCNAME} "$@" @@ -51,6 +105,10 @@ optfeature() { fi done if [[ ${flag} -eq 0 ]]; then + if [[ ${_OPTFEATURE_DOHEADER} == true ]]; then + elog ${_OPTFEATURE_HEADER:-${_OPTFEATURE_DEFAULT_HEADER}} + _OPTFEATURE_DOHEADER=false + fi for i; do read -r -d '' -a arr <<<"${i}" msg=" " diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass index 1e109c884b14..209e4831f960 100644 --- a/eclass/pax-utils.eclass +++ b/eclass/pax-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: pax-utils.eclass @@ -176,6 +176,10 @@ host-is-pax() { # them elsewhere as they are not supported (i.e. they may be removed # or their function may change arbitrarily). +# @FUNCTION: _pax_list_files +# @INTERNAL +# @USAGE: <command to display items> [items] +# @DESCRIPTION: # Display a list of things, one per line, indented a bit, using the # display command in $1. _pax_list_files() { diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 7a839bc7288c..3f7e4100db07 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: perl-module.eclass @@ -172,6 +172,7 @@ LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" # Named MODULE_SECTION in EAPI=5. # @ECLASS-VARIABLE: DIST_EXAMPLES +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # (EAPI=6 and later) This Bash array allows passing a list of example files to be installed @@ -275,19 +276,38 @@ perl-module_src_configure() { fi if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then - einfo "Using Module::Build::Tiny" - if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." - die " Add dev-perl/Module-Build-Tiny to DEPEND!" - fi - else - einfo "Using Module::Build" - if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." - die " Add dev-perl/Module-Build to DEPEND!" - fi - fi + case ${EAPI:-0} in + 5|6) + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then + einfo "Using Module::Build::Tiny" + if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + die " Add dev-perl/Module-Build-Tiny to DEPEND!" + fi + else + einfo "Using Module::Build" + if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + die " Add dev-perl/Module-Build to DEPEND!" + fi + fi + ;; + *) + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then + einfo "Using Module::Build::Tiny" + if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it." + eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!" + fi + else + einfo "Using Module::Build" + if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it." + eerror " Add dev-perl/Module-Build to BDEPEND!" + fi + fi + ;; + esac set -- \ --installdirs=vendor \ --libdoc= \ @@ -358,6 +378,7 @@ perl-module_src_compile() { # network : do not try to disable network tests # @ECLASS-VARIABLE: DIST_TEST_OVERRIDE +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # (EAPI=6 and later) Variable that controls if tests are run in the test phase diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass index 8df60a372053..19040a7e762b 100644 --- a/eclass/php-ext-pecl-r3.eclass +++ b/eclass/php-ext-pecl-r3.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: php-ext-pecl-r3.eclass @@ -11,6 +11,7 @@ # see https://pecl.php.net/ # @ECLASS-VARIABLE: PHP_EXT_PECL_PKG +# @PRE_INHERIT # @DESCRIPTION: # Set in ebuild before inheriting this eclass if the tarball name # differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE get set @@ -22,6 +23,7 @@ [[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}" # @ECLASS-VARIABLE: PHP_EXT_PECL_FILENAME +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Set in ebuild before inheriting this eclass if the tarball name diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass index b2eae22fb74d..a782081b72a7 100644 --- a/eclass/php-ext-source-r3.eclass +++ b/eclass/php-ext-source-r3.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: php-ext-source-r3.eclass @@ -22,6 +22,7 @@ case ${EAPI:-0} in esac # @ECLASS-VARIABLE: PHP_EXT_NAME +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # The extension name. This must be set, otherwise the eclass dies. @@ -87,6 +88,7 @@ esac : ${PHP_INI_NAME:=${PHP_EXT_NAME}} # @ECLASS-VARIABLE: PHP_EXT_NEEDED_USE +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # A list of USE flags to append to each PHP target selected diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass index d3887492047d..f0fe4b96f8ef 100644 --- a/eclass/php-pear-r2.eclass +++ b/eclass/php-pear-r2.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: php-pear-r2.eclass @@ -39,7 +39,8 @@ RDEPEND=">=dev-php/pear-1.8.1" # @ECLASS-VARIABLE: PEAR-P # @INTERNAL -# @DESCRIPTION: Combines PHP_PEAR_PKG_NAME and PEAR_PV +# @DESCRIPTION: +# Combines PHP_PEAR_PKG_NAME and PEAR_PV PEAR_P="${PHP_PEAR_PKG_NAME}-${PEAR_PV}" # @ECLASS-VARIABLE: PHP_PEAR_DOMAIN diff --git a/eclass/portability.eclass b/eclass/portability.eclass index 333a9590b39c..3b085d6c4e70 100644 --- a/eclass/portability.eclass +++ b/eclass/portability.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: portability.eclass @@ -13,7 +13,6 @@ _PORTABILITY_ECLASS=1 # @FUNCTION: treecopy # @USAGE: <orig1> [orig2 orig3 ....] <dest> -# @RETURN: # @DESCRIPTION: # mimic cp --parents copy, but working on BSD userland as well treecopy() { @@ -118,7 +117,6 @@ get_bmake() { # @FUNCTION: get_mounts # @USAGE: # @RETURN: table of mounts in form "point node fs opts" -# @MAINTAINER: # @DESCRIPTION: # Portable method of getting mount names and points. # Returns as "point node fs options" diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass index 49d5c6a9c684..acaa5077217f 100644 --- a/eclass/postgres-multi.eclass +++ b/eclass/postgres-multi.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 inherit multibuild postgres @@ -8,7 +8,8 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_compile src_install src_test # @ECLASS: postgres-multi.eclass # @MAINTAINER: # PostgreSQL <pgsql-bugs@gentoo.org> -# @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org> +# @AUTHOR: +# Aaron W. Swenson <titanofold@gentoo.org> # @SUPPORTED_EAPIS: 5 6 7 # @BLURB: An eclass to build PostgreSQL-related packages against multiple slots # @DESCRIPTION: @@ -24,6 +25,7 @@ esac # @ECLASS-VARIABLE: POSTGRES_COMPAT +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # A Bash array containing a list of compatible PostgreSQL slots as diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass index 2e2ac85ead6f..7652a8625184 100644 --- a/eclass/postgres.eclass +++ b/eclass/postgres.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 inherit user @@ -7,7 +7,8 @@ EXPORT_FUNCTIONS pkg_setup # @ECLASS: postgres.eclass # @MAINTAINER: # PostgreSQL <pgsql-bugs@gentoo.org> -# @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org> +# @AUTHOR: +# Aaron W. Swenson <titanofold@gentoo.org> # @SUPPORTED_EAPIS: 5 6 7 # @BLURB: An eclass for PostgreSQL-related packages # @DESCRIPTION: @@ -32,6 +33,7 @@ _POSTGRES_ALL_VERSIONS=( 9999 13 12 11 10 9.6 9.5 9.4 9.3 9.2 ) # @ECLASS-VARIABLE: POSTGRES_COMPAT +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # A Bash array containing a list of compatible PostgreSQL slots as @@ -49,6 +51,7 @@ _POSTGRES_ALL_VERSIONS=( 9999 13 12 11 10 9.6 9.5 9.4 9.3 9.2 ) POSTGRES_DEP="dev-db/postgresql:=" # @ECLASS-VARIABLE: POSTGRES_USEDEP +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Add the 2-Style and/or 4-Style use dependencies without brackets to be used diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index 313fe6b40df0..49f639d5fac6 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.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: python-any-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: An eclass for packages having build-time dependency on Python. # @DESCRIPTION: # A minimal eclass for packages which need any Python interpreter @@ -38,8 +38,8 @@ # https://dev.gentoo.org/~mgorny/python-guide/ case "${EAPI:-0}" in - [0-4]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - [5-7]) ;; + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; + [6-7]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; esac @@ -116,8 +116,7 @@ EXPORT_FUNCTIONS pkg_setup # # Example use: # @CODE -# DEPEND="${RDEPEND} -# ${PYTHON_DEPS}" +# BDEPEND="${PYTHON_DEPS}" # @CODE # # Example value: @@ -222,7 +221,7 @@ if [[ ! ${_PYTHON_ANY_R1} ]]; then # # Example use: # @CODE -# DEPEND="$(python_gen_any_dep ' +# BDEPEND="$(python_gen_any_dep ' # dev-python/foo[${PYTHON_SINGLE_USEDEP}] # || ( dev-python/bar[${PYTHON_USEDEP}] # dev-python/baz[${PYTHON_USEDEP}] )')" diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 5e9dafe63d85..1eb68270a0b3 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: A common, simple eclass for Python packages. # @DESCRIPTION: # A common eclass providing helper functions to build and install @@ -30,11 +30,10 @@ # https://dev.gentoo.org/~mgorny/python-guide/ case "${EAPI:-0}" in - 0|1|2|3|4) + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 5|6|7) - # EAPI=5 is required for sane USE_EXPAND dependencies + [6-7]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -49,7 +48,6 @@ elif [[ ${_PYTHON_ANY_R1} ]]; then die 'python-r1.eclass can not be used with python-any-r1.eclass.' fi -[[ ${EAPI} == [45] ]] && inherit eutils inherit multibuild python-utils-r1 fi @@ -121,7 +119,7 @@ fi # @CODE # RDEPEND="${PYTHON_DEPS} # dev-foo/mydep" -# DEPEND="${RDEPEND}" +# BDEPEND="${PYTHON_DEPS}" # @CODE # # Example value: @@ -357,12 +355,12 @@ _python_gen_usedep() { # Example: # @CODE # PYTHON_COMPAT=( python{2_7,3_4} ) -# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )" +# BDEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )" # @CODE # # It will cause the dependency to look like: # @CODE -# DEPEND="doc? ( dev-python/epydoc[python_targets_python2_7?] )" +# BDEPEND="doc? ( dev-python/epydoc[python_targets_python2_7?] )" # @CODE python_gen_usedep() { debug-print-function ${FUNCNAME} "${@}" @@ -548,7 +546,7 @@ python_gen_impl_dep() { # # Example use: # @CODE -# DEPEND="$(python_gen_any_dep ' +# BDEPEND="$(python_gen_any_dep ' # dev-python/foo[${PYTHON_SINGLE_USEDEP}] # || ( dev-python/bar[${PYTHON_USEDEP}] # dev-python/baz[${PYTHON_USEDEP}] )' -2)" @@ -739,7 +737,7 @@ python_foreach_impl() { # # Pure mode example: # @CODE -# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )" +# BDEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )" # REQUIRED_USE="doc? ( $(python_gen_useflags 'python2*') )" # # src_compile() { @@ -753,7 +751,7 @@ python_foreach_impl() { # # Any-of mode example: # @CODE -# DEPEND="doc? ( +# BDEPEND="doc? ( # $(python_gen_any_dep 'dev-python/epydoc[${PYTHON_USEDEP}]' 'python2*') )" # # python_check_deps() { diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index dc032379cd84..07db2d762ded 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.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: python-single-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: An eclass for Python packages not installed for multiple implementations. # @DESCRIPTION: # An extension of the python-r1 eclass suite for packages which @@ -37,11 +37,10 @@ # https://dev.gentoo.org/~mgorny/python-guide/ case "${EAPI:-0}" in - 0|1|2|3|4) + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 5|6|7) - # EAPI=5 is required for sane USE_EXPAND dependencies + [6-7]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -131,7 +130,7 @@ EXPORT_FUNCTIONS pkg_setup # @CODE # RDEPEND="${PYTHON_DEPS} # dev-foo/mydep" -# DEPEND="${RDEPEND}" +# BDEPEND="${PYTHON_DEPS}" # @CODE # # Example value: diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 3036148b8383..77fbab7431b7 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Utility functions for packages with Python parts. # @DESCRIPTION: # A utility eclass providing functions to query Python implementations, @@ -19,9 +19,12 @@ # For more information, please see the Python Guide: # https://dev.gentoo.org/~mgorny/python-guide/ +# NOTE: When dropping support for EAPIs here, we need to update +# metadata/install-qa-check.d/60python-pyc +# See bug #704286, bug #781878 case "${EAPI:-0}" in - [0-4]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - [5-7]) ;; + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; + [6-7]) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; esac @@ -31,7 +34,6 @@ fi if [[ ! ${_PYTHON_UTILS_R1} ]]; then -[[ ${EAPI} == 5 ]] && inherit eutils multilib inherit toolchain-funcs # @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS @@ -1013,16 +1015,8 @@ python_is_python3() { python_is_installed() { local impl=${1:-${EPYTHON}} [[ ${impl} ]] || die "${FUNCNAME}: no impl nor EPYTHON" - local hasv_args=() - - case ${EAPI} in - 5|6) - hasv_args+=( --host-root ) - ;; - *) - hasv_args+=( -b ) - ;; - esac + local hasv_args=( -b ) + [[ ${EAPI} == 6 ]] && hasv_args=( --host-root ) local PYTHON_PKG_DEP _python_export "${impl}" PYTHON_PKG_DEP @@ -1169,17 +1163,14 @@ python_fix_shebang() { done < <(find -H "${path}" -type f -print0 || die) if [[ ! ${any_fixed} ]]; then - local cmd=eerror - [[ ${EAPI} == 5 ]] && cmd=eqawarn - - "${cmd}" "QA warning: ${FUNCNAME}, ${path#${D%/}} did not match any fixable files." + eerror "QA error: ${FUNCNAME}, ${path#${D%/}} did not match any fixable files." if [[ ${any_correct} ]]; then - "${cmd}" "All files have ${EPYTHON} shebang already." + eerror "All files have ${EPYTHON} shebang already." else - "${cmd}" "There are no Python files in specified directory." + eerror "There are no Python files in specified directory." fi - [[ ${cmd} == eerror ]] && die "${FUNCNAME} did not match any fixable files (QA warning fatal in EAPI ${EAPI})" + die "${FUNCNAME} did not match any fixable files" fi done } @@ -1282,20 +1273,44 @@ build_sphinx() { # Run pytest, passing the standard set of pytest options, followed # by user-specified options. # -# This command dies on failure and respects nonfatal in EAPIs supporting -# nonfatal die. +# This command dies on failure and respects nonfatal. epytest() { debug-print-function ${FUNCNAME} "${@}" [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context" - local die_args=() - [[ ${EAPI} != [45] ]] && die_args+=( -n ) + local args=( + # verbose progress reporting and tracebacks + -vv + # list all non-passed tests in the summary for convenience + # (includes failures, skips, xfails...) + -ra + # print local variables in tracebacks, useful for debugging + -l + ) + set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" + + echo "${@}" >&2 + "${@}" || die -n "pytest failed with ${EPYTHON}" + return ${?} +} + +# @FUNCTION: eunittest +# @USAGE: [<args>...] +# @DESCRIPTION: +# Run unit tests using dev-python/unittest-or-fail, passing the standard +# set of options, followed by user-specified options. +# +# This command dies on failure and respects nonfatal. +eunittest() { + debug-print-function ${FUNCNAME} "${@}" + + [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context" - set -- "${EPYTHON}" -m pytest -vv -ra "${@}" + set -- "${EPYTHON}" -m unittest_or_fail discover -v "${@}" echo "${@}" >&2 - "${@}" || die "${die_args[@]}" "pytest failed with ${EPYTHON}" + "${@}" || die -n "Tests failed with ${EPYTHON}" return ${?} } diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 6698b69b32f4..e94f3f33a101 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -51,6 +51,7 @@ esac # system to obtain the global qmodule.pri file. # @ECLASS-VARIABLE: VIRTUALX_REQUIRED +# @PRE_INHERIT # @DESCRIPTION: # For proper description see virtualx.eclass man page. # Here we redefine default value to be manual, if your package needs virtualx diff --git a/eclass/readme.gentoo.eclass b/eclass/readme.gentoo.eclass index fdb2d60f183f..c902605538aa 100644 --- a/eclass/readme.gentoo.eclass +++ b/eclass/readme.gentoo.eclass @@ -1,6 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD # @ECLASS: readme.gentoo.eclass # @MAINTAINER: # Pacho Ramos <pacho@gentoo.org> @@ -8,13 +9,12 @@ # Author: Pacho Ramos <pacho@gentoo.org> # @SUPPORTED_EAPIS: 4 5 # @BLURB: install a doc file shown via elog messages +# @DEPRECATED: readme.gentoo-r1 # @DESCRIPTION: # An eclass for installing a README.gentoo doc file recording tips # shown via elog messages. With this eclass, those elog messages will only be # shown at first package installation and a file for later reviewing will be # installed under /usr/share/doc/${PF} -# -# This eclass is DEPRECATED. Please use readme.gentoo-r1 instead. if [[ -z ${_README_GENTOO_ECLASS} ]]; then _README_GENTOO_ECLASS=1 diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass index 2779a0353ecb..1bd1be4a478c 100644 --- a/eclass/ros-catkin.eclass +++ b/eclass/ros-catkin.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: ros-catkin.eclass @@ -61,11 +61,13 @@ DEPEND="${RDEPEND} " # @ECLASS-VARIABLE: CATKIN_HAS_MESSAGES +# @PRE_INHERIT # @DESCRIPTION: # Set it to a non-empty value before inherit to tell the eclass the package has messages to build. # Messages will be built based on ROS_MESSAGES USE_EXPANDed variable. # @ECLASS-VARIABLE: CATKIN_MESSAGES_TRANSITIVE_DEPS +# @PRE_INHERIT # @DESCRIPTION: # Some messages have dependencies on other messages. # In that case, CATKIN_MESSAGES_TRANSITIVE_DEPS should contain a space-separated list of atoms @@ -175,7 +177,7 @@ ros-catkin_src_configure() { local mycmakeargs=( "-DCATKIN_ENABLE_TESTING=$(usex test)" "-DCATKIN_BUILD_BINARY_PACKAGE=ON" - "-DCATKIN_PREFIX_PATH=${SYSROOT:-${EROOT}}/usr" + "-DCATKIN_PREFIX_PATH=${SYSROOT:-${EPREFIX}}/usr" "${mycatkincmakeargs[@]}" ) diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 6fee9eb3e157..19445b10c164 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -17,12 +17,14 @@ inherit ruby-ng # @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME +# @PRE_INHERIT # @DESCRIPTION: # Sets the Gem name for the generated fake gemspec. # This variable MUST be set before inheriting the eclass. RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" # @ECLASS-VARIABLE: RUBY_FAKEGEM_VERSION +# @PRE_INHERIT # @DESCRIPTION: # Sets the Gem version for the generated fake gemspec. # This variable MUST be set before inheriting the eclass. @@ -288,7 +290,7 @@ ruby_fakegem_install_gemspec() { # RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification # in a way similar to packaging the gemspec file. ruby_fakegem_gemspec_gemspec() { - ${RUBY} -e "puts eval(File::open('$1').read).to_ruby" > $2 + ${RUBY} --disable=did_you_mean -e "puts eval(File::open('$1').read).to_ruby" > $2 } # @FUNCTION: ruby_fakegem_metadata_gemspec @@ -298,7 +300,7 @@ ruby_fakegem_gemspec_gemspec() { # the metadata distributed by the gem itself. This is similar to how # rubygems creates an installation from a .gem file. ruby_fakegem_metadata_gemspec() { - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2 + ${RUBY} --disable=did_you_mean -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2 } # @FUNCTION: ruby_fakegem_genspec diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index e52c507d8010..0dd65b894c83 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.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: ruby-ng.eclass @@ -111,6 +111,7 @@ ruby_implementation_depend() { # @FUNCTION: _ruby_get_all_impls # @INTERNAL # @RETURN: list of valid values in USE_RUBY +# @DESCRIPTION: # Return a list of valid implementations in USE_RUBY, skipping the old # implementations that are no longer supported. _ruby_get_all_impls() { @@ -606,7 +607,7 @@ ruby-ng_src_install() { # @USAGE: rbconfig item # @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}. ruby_rbconfig_value() { - echo $(${RUBY} -rrbconfig -e "puts RbConfig::CONFIG['$1']") + echo $(${RUBY} --disable=did_you_mean -rrbconfig -e "puts RbConfig::CONFIG['$1']") } # @FUNCTION: doruby diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass index 4ca5f5ef207b..bf339bc9b601 100644 --- a/eclass/ruby-single.eclass +++ b/eclass/ruby-single.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-single.eclass @@ -39,6 +39,7 @@ inherit ruby-utils # @ECLASS-VARIABLE: USE_RUBY # @DEFAULT_UNSET +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # This variable contains a space separated list of targets (see above) a package diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass index ad670d0cb315..35e13e3de97b 100644 --- a/eclass/rust-toolchain.eclass +++ b/eclass/rust-toolchain.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: rust-toolchain.eclass @@ -110,7 +110,8 @@ rust_all_arch_uris() 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+="arm64? ( elibc_glibc? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) + elibc_musl? ( $(rust_arch_uri aarch64-unknown-linux-musl "$@") ) ) " uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@") $(rust_arch_uri mipsel-unknown-linux-gnu "$@") $(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) " diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass index c616e4a3f455..93eac1a4c4aa 100644 --- a/eclass/scons-utils.eclass +++ b/eclass/scons-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: scons-utils.eclass @@ -73,6 +73,7 @@ # set in src_configure(). # @ECLASS-VARIABLE: SCONSOPTS +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # The default set of options to pass to scons. Similar to MAKEOPTS, @@ -80,6 +81,7 @@ # up MAKEOPTS instead. # @ECLASS-VARIABLE: EXTRA_ESCONS +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # The additional parameters to pass to SCons whenever escons() is used. diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass index fdd6775ffc77..a774f9b8b9ec 100644 --- a/eclass/ssl-cert.eclass +++ b/eclass/ssl-cert.eclass @@ -1,8 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ssl-cert.eclass # @MAINTAINER: +# maintainer-needed@gentoo.org # @AUTHOR: # Max Kalika <max@gentoo.org> # @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 @@ -26,16 +27,19 @@ case "${EAPI:-0}" in esac # @ECLASS-VARIABLE: SSL_CERT_MANDATORY +# @PRE_INHERIT # @DESCRIPTION: # Set to non zero if ssl-cert is mandatory for ebuild. : ${SSL_CERT_MANDATORY:=0} # @ECLASS-VARIABLE: SSL_CERT_USE +# @PRE_INHERIT # @DESCRIPTION: # Use flag to append dependency to. : ${SSL_CERT_USE:=ssl} # @ECLASS-VARIABLE: SSL_DEPS_SKIP +# @PRE_INHERIT # @DESCRIPTION: # Set to non zero to skip adding to DEPEND and IUSE. : ${SSL_DEPS_SKIP:=0} @@ -61,12 +65,12 @@ if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then fi # @FUNCTION: gen_cnf +# @INTERNAL # @USAGE: # @DESCRIPTION: # Initializes variables and generates the needed # OpenSSL configuration file and a CA serial file # -# Access: private gen_cnf() { # Location of the config file SSL_CONF="${T}/${$}ssl.cnf" @@ -113,13 +117,13 @@ gen_cnf() { } # @FUNCTION: get_base +# @INTERNAL # @USAGE: [if_ca] # @RETURN: <base path> # @DESCRIPTION: # Simple function to determine whether we're creating # a CA (which should only be done once) or final part # -# Access: private get_base() { if [ "${1}" ] ; then echo "${T}/${$}ca" @@ -129,11 +133,11 @@ get_base() { } # @FUNCTION: gen_key +# @INTERNAL # @USAGE: <base path> # @DESCRIPTION: # Generates an RSA key # -# Access: private gen_key() { local base=$(get_base "$1") ebegin "Generating ${SSL_BITS} bit RSA key${1:+ for CA}" @@ -149,12 +153,12 @@ gen_key() { } # @FUNCTION: gen_csr +# @INTERNAL # @USAGE: <base path> # @DESCRIPTION: # Generates a certificate signing request using # the key made by gen_key() # -# Access: private gen_csr() { local base=$(get_base "$1") ebegin "Generating Certificate Signing Request${1:+ for CA}" @@ -166,6 +170,7 @@ gen_csr() { } # @FUNCTION: gen_crt +# @INTERNAL # @USAGE: <base path> # @DESCRIPTION: # Generates either a self-signed CA certificate using @@ -173,7 +178,6 @@ gen_csr() { # a signed server certificate using the CA cert previously # created by gen_crt() # -# Access: private gen_crt() { local base=$(get_base "$1") if [ "${1}" ] ; then @@ -196,12 +200,12 @@ gen_crt() { } # @FUNCTION: gen_pem +# @INTERNAL # @USAGE: <base path> # @DESCRIPTION: # Generates a PEM file by concatinating the key # and cert file created by gen_key() and gen_cert() # -# Access: private gen_pem() { local base=$(get_base "$1") ebegin "Generating PEM Certificate" @@ -220,7 +224,6 @@ gen_pem() { # # Example: "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem} # -# Access: public install_cert() { if [ $# -lt 1 ] ; then eerror "At least one argument needed" diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass index 36b1fbb0c685..6ed8a62dbe35 100644 --- a/eclass/subversion.eclass +++ b/eclass/subversion.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: subversion.eclass @@ -40,6 +40,7 @@ case ${EAPI} in esac # @ECLASS-VARIABLE: ESVN_STORE_DIR +# @USER_VARIABLE # @DESCRIPTION: # subversion sources store directory. Users may override this in /etc/portage/make.conf [[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src" @@ -151,6 +152,8 @@ ESVN_PATCHES="${ESVN_PATCHES:-}" ESVN_RESTRICT="${ESVN_RESTRICT:-}" # @ECLASS-VARIABLE: ESVN_OFFLINE +# @USER_VARIABLE +# @DEFAULT_UNSET # @DESCRIPTION: # Set this variable to a non-empty value to disable the automatic updating of # an svn source tree. This is intended to be set outside the subversion source @@ -158,6 +161,7 @@ ESVN_RESTRICT="${ESVN_RESTRICT:-}" ESVN_OFFLINE="${ESVN_OFFLINE:-${EVCS_OFFLINE}}" # @ECLASS-VARIABLE: ESVN_UMASK +# @USER_VARIABLE # @DESCRIPTION: # Set this variable to a custom umask. This is intended to be set by users. # By setting this to something like 002, it can make life easier for people @@ -168,6 +172,7 @@ ESVN_OFFLINE="${ESVN_OFFLINE:-${EVCS_OFFLINE}}" ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}" # @ECLASS-VARIABLE: ESVN_UP_FREQ +# @USER_VARIABLE # @DESCRIPTION: # Set the minimum number of hours between svn up'ing in any given svn module. This is particularly # useful for split KDE ebuilds where we want to ensure that all submodules are compiled for the same @@ -175,6 +180,7 @@ ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}" ESVN_UP_FREQ="${ESVN_UP_FREQ:=}" # @ECLASS-VARIABLE: ESCM_LOGDIR +# @USER_VARIABLE # @DESCRIPTION: # User configuration variable. If set to a path such as e.g. /var/log/scm any # package inheriting from subversion.eclass will record svn revision to diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 81065a0af79a..ab0d65619843 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 2011-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: systemd.eclass @@ -58,7 +58,7 @@ _systemd_get_dir() { echo "${d}" } -# @FUNCTION: _systemd_get_unitdir +# @FUNCTION: _systemd_get_systemunitdir # @INTERNAL # @DESCRIPTION: # Get unprefixed unitdir. diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh index 93496f9ac007..163a509b3068 100755 --- a/eclass/tests/distutils-r1.sh +++ b/eclass/tests/distutils-r1.sh @@ -108,7 +108,7 @@ test-distutils_enable_tests pytest \ test-distutils_enable_tests nose \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( >=dev-python/nose-1.3.7-r4[${PYTHON_USEDEP}] )" test-distutils_enable_tests unittest \ - "${BASE_IUSE}" "" "${BASE_DEPS}" + "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( dev-python/unittest-or-fail[${PYTHON_USEDEP}] )" test-distutils_enable_tests setup.py \ "${BASE_IUSE}" "" "${BASE_DEPS}" eoutdent @@ -122,7 +122,7 @@ test-distutils_enable_tests pytest \ test-distutils_enable_tests nose \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} >=dev-python/nose-1.3.7-r4[${PYTHON_USEDEP}] )" test-distutils_enable_tests unittest \ - "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} )" + "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} dev-python/unittest-or-fail[${PYTHON_USEDEP}] )" test-distutils_enable_tests setup.py \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} )" eoutdent diff --git a/eclass/tests/distutils-r1_single.sh b/eclass/tests/distutils-r1_single.sh index 80c152b6ee0c..fb177261d0a0 100755 --- a/eclass/tests/distutils-r1_single.sh +++ b/eclass/tests/distutils-r1_single.sh @@ -88,7 +88,7 @@ test-distutils_enable_tests pytest \ test-distutils_enable_tests nose \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( python_single_target_python3_8? ( >=dev-python/nose-1.3.7-r4[python_targets_python3_8(-)] ) )" test-distutils_enable_tests unittest \ - "${BASE_IUSE}" "" "${BASE_DEPS}" + "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( python_single_target_python3_8? ( dev-python/unittest-or-fail[python_targets_python3_8(-)] ) )" test-distutils_enable_tests setup.py \ "${BASE_IUSE}" "" "${BASE_DEPS}" eoutdent @@ -102,7 +102,7 @@ test-distutils_enable_tests pytest \ test-distutils_enable_tests nose \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} python_single_target_python3_8? ( >=dev-python/nose-1.3.7-r4[python_targets_python3_8(-)] ) )" test-distutils_enable_tests unittest \ - "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} )" + "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} python_single_target_python3_8? ( dev-python/unittest-or-fail[python_targets_python3_8(-)] ) )" test-distutils_enable_tests setup.py \ "${BASE_IUSE} test" "${TEST_RESTRICT}" "${BASE_DEPS} test? ( ${BASE_RDEPEND} )" eoutdent diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index 15988fb4b54d..22b74237a4fb 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.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: texlive-module.eclass @@ -24,6 +24,7 @@ # bash array. # @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # The list of packages that will be installed. This variable will be expanded to @@ -31,12 +32,14 @@ # foo -> texlive-module-foo-${PV}.tar.xz # @ECLASS-VARIABLE: TEXLIVE_MODULE_DOC_CONTENTS +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # The list of packages that will be installed if the doc useflag is enabled. # Expansion to SRC_URI is the same as for TEXLIVE_MODULE_CONTENTS. # @ECLASS-VARIABLE: TEXLIVE_MODULE_SRC_CONTENTS +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # The list of packages that will be installed if the source useflag is enabled. diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass index 632343821648..b9238a6434a0 100644 --- a/eclass/tmpfiles.eclass +++ b/eclass/tmpfiles.eclass @@ -1,4 +1,4 @@ -# Copyright 2016-2019 Gentoo Authors +# Copyright 2016-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: tmpfiles.eclass @@ -61,6 +61,7 @@ case "${EAPI}" in esac # @ECLASS-VARIABLE: TMPFILES_OPTIONAL +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # When not empty, disables the dependency on virtual/tmpfiles. diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 3a1dc9f29f33..d01a6e8e648a 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.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: unpacker.eclass @@ -20,6 +20,7 @@ _UNPACKER_ECLASS=1 inherit toolchain-funcs # @ECLASS-VARIABLE: UNPACKER_BZ2 +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Utility to use to decompress bzip2 files. Will dynamically pick between @@ -27,6 +28,7 @@ inherit toolchain-funcs # Note: this is meant for users to set, not ebuilds. # @ECLASS-VARIABLE: UNPACKER_LZIP +# @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: # Utility to use to decompress lzip files. Will dynamically pick between diff --git a/eclass/user.eclass b/eclass/user.eclass index f8993b827741..96d3757233b9 100644 --- a/eclass/user.eclass +++ b/eclass/user.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: user.eclass @@ -100,7 +100,7 @@ enewuser() { # get the username local euser=$1; shift if [[ -z ${euser} ]] ; then - eerror "No username specified !" + eerror "No username specified!" die "Cannot call enewuser without a username" fi @@ -122,7 +122,7 @@ enewuser() { euid="next" fi else - eerror "Userid given but is not greater than 0 !" + eerror "Userid given but is not greater than 0!" die "${euid} is not a valid UID" fi else @@ -142,7 +142,7 @@ enewuser() { local eshell=$1; shift if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then if [[ ! -e ${ROOT}${eshell} ]] ; then - eerror "A shell was specified but it does not exist !" + eerror "A shell was specified but it does not exist!" die "${eshell} does not exist in ${ROOT}" fi if [[ ${eshell} == */false || ${eshell} == */nologin ]] ; then @@ -254,7 +254,7 @@ enewgroup() { # get the group local egroup=$1; shift if [[ -z ${egroup} ]] ; then - eerror "No group specified !" + eerror "No group specified!" die "Cannot call enewgroup without a group" fi @@ -273,7 +273,7 @@ enewgroup() { egid="next available; requested gid taken" fi else - eerror "Groupid given but is not greater than 0 !" + eerror "Groupid given but is not greater than 0!" die "${egid} is not a valid GID" fi else @@ -339,7 +339,7 @@ esethome() { # get the username local euser=$1; shift if [[ -z ${euser} ]] ; then - eerror "No username specified !" + eerror "No username specified!" die "Cannot call esethome without a username" fi @@ -352,7 +352,7 @@ esethome() { # handle homedir local ehome=$1; shift if [[ -z ${ehome} ]] ; then - eerror "No home directory specified !" + eerror "No home directory specified!" die "Cannot call esethome without a home directory or '-1'" fi @@ -408,7 +408,7 @@ esetshell() { # get the username local euser=$1; shift if [[ -z ${euser} ]] ; then - eerror "No username specified !" + eerror "No username specified!" die "Cannot call esetshell without a username" fi @@ -421,7 +421,7 @@ esetshell() { # handle shell local eshell=$1; shift if [[ -z ${eshell} ]] ; then - eerror "No shell specified !" + eerror "No shell specified!" die "Cannot call esetshell without a shell or '-1'" fi @@ -468,7 +468,7 @@ esetcomment() { # get the username local euser=$1; shift if [[ -z ${euser} ]] ; then - eerror "No username specified !" + eerror "No username specified!" die "Cannot call esetcomment without a username" fi @@ -481,7 +481,7 @@ esetcomment() { # handle comment local ecomment=$1; shift if [[ -z ${ecomment} ]] ; then - eerror "No comment specified !" + eerror "No comment specified!" die "Cannot call esetcomment without a comment" fi diff --git a/eclass/vala.eclass b/eclass/vala.eclass index 88c5231286ab..7bdf0d9d0e5b 100644 --- a/eclass/vala.eclass +++ b/eclass/vala.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: vala.eclass @@ -32,7 +32,7 @@ VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.36} # @ECLASS-VARIABLE: VALA_MAX_API_VERSION # @DESCRIPTION: # Maximum vala API version (e.g. 0.36). -VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.50} +VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.52} # @ECLASS-VARIABLE: VALA_USE_DEPEND # @DEFAULT_UNSET diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass index 828a45310e9d..f762a6bfd315 100644 --- a/eclass/vim-spell.eclass +++ b/eclass/vim-spell.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: vim-spell.eclass @@ -62,8 +62,6 @@ # spell files. It's best to let upstream know if you've generated spell files # for another language rather than keeping them Gentoo-specific. -inherit eutils - EXPORT_FUNCTIONS src_install pkg_postinst SRC_URI="mirror://gentoo/${P}.tar.bz2" diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index fa16784bd943..a95f8a7e1c14 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: virtualx.eclass @@ -25,6 +25,7 @@ esac [[ ${EAPI} == [45] ]] && inherit eutils # @ECLASS-VARIABLE: VIRTUALX_REQUIRED +# @PRE_INHERIT # @DESCRIPTION: # Variable specifying the dependency on xorg-server and xhost. # Possible special values are "always" and "manual", which specify diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index f22460881ef4..5218706a1ab7 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: waf-utils.eclass @@ -24,6 +24,7 @@ case ${EAPI:-0} in esac # @ECLASS-VARIABLE: WAF_VERBOSE +# @USER_VARIABLE # @DESCRIPTION: # Set to OFF to disable verbose messages during compilation # this is _not_ meant to be set in ebuilds diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass index b0a8f7a34d4d..6907ef1c321d 100644 --- a/eclass/webapp.eclass +++ b/eclass/webapp.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: webapp.eclass @@ -16,12 +16,14 @@ WEBAPP_DEPEND=">=app-admin/webapp-config-1.50.15" # @ECLASS-VARIABLE: WEBAPP_NO_AUTO_INSTALL +# @PRE_INHERIT # @DESCRIPTION: # An ebuild sets this to `yes' if an automatic installation and/or upgrade is # not possible. The ebuild should overwrite pkg_postinst() and explain the # reason for this BEFORE calling webapp_pkg_postinst(). # @ECLASS-VARIABLE: WEBAPP_OPTIONAL +# @PRE_INHERIT # @DESCRIPTION: # An ebuild sets this to `yes' to make webapp support optional, in which case # you also need to take care of USE-flags and dependencies. diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass index a40487bae78e..372e4c5301cf 100644 --- a/eclass/xemacs-packages.eclass +++ b/eclass/xemacs-packages.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: xemacs-packages.eclass @@ -15,6 +15,7 @@ # mule, or contrib. # @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # If set then the package is downloaded from the experimental packages diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass index 99b1f891b998..e6ec80523ae2 100644 --- a/eclass/xorg-2.eclass +++ b/eclass/xorg-2.eclass @@ -1,6 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD # @ECLASS: xorg-2.eclass # @MAINTAINER: # x11@gentoo.org @@ -9,6 +10,7 @@ # Author: Donnie Berkholz <dberkholz@gentoo.org> # @SUPPORTED_EAPIS: 4 5 # @BLURB: Reduces code duplication in the modularized X11 ebuilds. +# @DEPRECATED: xorg-3.eclass # @DESCRIPTION: # This eclass makes trivial X ebuilds possible for apps, fonts, drivers, # and more. Many things that would normally be done in various functions @@ -41,6 +43,7 @@ if [[ ${CATEGORY} = media-fonts ]]; then fi # @ECLASS-VARIABLE: XORG_MULTILIB +# @PRE_INHERIT # @DESCRIPTION: # If set to 'yes', the multilib support for package will be enabled. Set # before inheriting this eclass. @@ -66,18 +69,21 @@ EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} IUSE="" # @ECLASS-VARIABLE: XORG_EAUTORECONF +# @PRE_INHERIT # @DESCRIPTION: # If set to 'yes' and configure.ac exists, eautoreconf will run. Set # before inheriting this eclass. : ${XORG_EAUTORECONF:="no"} # @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI +# @PRE_INHERIT # @DESCRIPTION: # Set up SRC_URI for individual modular releases. If set to an empty # string, no SRC_URI will be provided by the eclass. : ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"} # @ECLASS-VARIABLE: XORG_MODULE +# @PRE_INHERIT # @DESCRIPTION: # The subdirectory to download source from. Possible settings are app, # doc, data, util, driver, font, lib, proto, xserver. Set above the @@ -97,6 +103,7 @@ if [[ ${XORG_MODULE} == auto ]]; then fi # @ECLASS-VARIABLE: XORG_PACKAGE_NAME +# @PRE_INHERIT # @DESCRIPTION: # For git checkout the git repository might differ from package name. # This variable can be used for proper directory specification @@ -146,6 +153,7 @@ if [[ ${FONT} == yes ]]; then >=x11-apps/mkfontscale-1.2.0" # @ECLASS-VARIABLE: FONT_DIR + # @PRE_INHERIT # @DESCRIPTION: # If you're creating a font package and the suffix of PN is not equal to # the subdirectory of /usr/share/fonts/ it should install into, set diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass index 811168ead986..7ed96c60848a 100644 --- a/eclass/xorg-3.eclass +++ b/eclass/xorg-3.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: xorg-3.eclass @@ -42,6 +42,7 @@ if [[ ${CATEGORY} = media-fonts ]]; then fi # @ECLASS-VARIABLE: XORG_MULTILIB +# @PRE_INHERIT # @DESCRIPTION: # If set to 'yes', the multilib support for package will be enabled. Set # before inheriting this eclass. @@ -67,18 +68,21 @@ EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} IUSE="" # @ECLASS-VARIABLE: XORG_EAUTORECONF +# @PRE_INHERIT # @DESCRIPTION: # If set to 'yes' and configure.ac exists, eautoreconf will run. Set # before inheriting this eclass. : ${XORG_EAUTORECONF:="no"} # @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI +# @PRE_INHERIT # @DESCRIPTION: # Set up SRC_URI for individual modular releases. If set to an empty # string, no SRC_URI will be provided by the eclass. : ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"} # @ECLASS-VARIABLE: XORG_MODULE +# @PRE_INHERIT # @DESCRIPTION: # The subdirectory to download source from. Possible settings are app, # doc, data, util, driver, font, lib, proto, xserver. Set above the @@ -99,6 +103,7 @@ if [[ ${XORG_MODULE} == auto ]]; then fi # @ECLASS-VARIABLE: XORG_PACKAGE_NAME +# @PRE_INHERIT # @DESCRIPTION: # For git checkout the git repository might differ from package name. # This variable can be used for proper directory specification @@ -107,6 +112,7 @@ fi HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" # @ECLASS-VARIABLE: XORG_TARBALL_SUFFIX +# @PRE_INHERIT # @DESCRIPTION: # Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults # to bz2. @@ -156,6 +162,7 @@ if [[ ${FONT} == yes ]]; then BDEPEND+=" x11-apps/bdftopcf" # @ECLASS-VARIABLE: FONT_DIR + # @PRE_INHERIT # @DESCRIPTION: # If you're creating a font package and the suffix of PN is not equal to # the subdirectory of /usr/share/fonts/ it should install into, set @@ -172,6 +179,7 @@ fi BDEPEND+=" virtual/pkgconfig" # @ECLASS-VARIABLE: XORG_DRI +# @PRE_INHERIT # @DESCRIPTION: # Possible values are "always" or the value of the useflag DRI capabilities # are required for. Default value is "no" @@ -205,6 +213,7 @@ fi # @ECLASS-VARIABLE: XORG_DOC +# @PRE_INHERIT # @DESCRIPTION: # Possible values are "always" or the value of the useflag doc packages # are required for. Default value is "no" |