diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
commit | 61f10f985e19dfe20a4d9552902625edd5b6eabb (patch) | |
tree | 50db31971b38c4e0358253ef5005058a46fc773e /eclass | |
parent | 34dea8e38f88007799629d0a56b12dec480b1d21 (diff) |
gentoo resync : 21.06.2021
Diffstat (limited to 'eclass')
61 files changed, 635 insertions, 227 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 492236ba54b6..ffce1ae18c6e 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass index e83326314261..d6bb6b19e973 100644 --- a/eclass/alternatives.eclass +++ b/eclass/alternatives.eclass @@ -6,6 +6,7 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Alastair Tse <liquidx@gentoo.org> (03 Oct 2003) +# @SUPPORTED_EAPIS: 5 6 7 # @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 @@ -40,6 +41,16 @@ # link to. It is probably more robust against version upgrades. You should # consider using this unless you are want to do something special. +case ${EAPI} in + [5-7]) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_postinst pkg_postrm + +if [[ -z ${_ALTERNATIVES_ECLASS} ]]; then +_ALTERNATIVES_ECLASS=1 + # @ECLASS-VARIABLE: SOURCE # @DEFAULT_UNSET # @DESCRIPTION: @@ -52,9 +63,8 @@ # @FUNCTION: alternatives_auto_makesym # @DESCRIPTION: -# automatic deduction based on a symlink and a regex mask +# Automatic deduction (Bash pathname expansion) based on a symlink and a regex mask alternatives_auto_makesym() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}" local SYMLINK REGEX ALT myregex SYMLINK=$1 REGEX=$2 @@ -74,8 +84,10 @@ alternatives_auto_makesym() { alternatives_makesym ${SYMLINK} ${ALT} } +# @FUNCTION: alternatives_makesym +# @DESCRIPTION: +# Creates symlink based on a symlink and regex mask literally alternatives_makesym() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= local ALTERNATIVES="" local SYMLINK="" local alt pref @@ -123,7 +135,7 @@ alternatives_makesym() { fi } -# @FUNCTION: alernatives-pkg_postinst +# @FUNCTION: alternatives_pkg_postinst # @DESCRIPTION: # The alternatives pkg_postinst, this function will be exported alternatives_pkg_postinst() { @@ -141,4 +153,4 @@ alternatives_pkg_postrm() { fi } -EXPORT_FUNCTIONS pkg_postinst pkg_postrm +fi diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass index 4c88f14566a1..2594445c8b4f 100644 --- a/eclass/apache-module.eclass +++ b/eclass/apache-module.eclass @@ -4,6 +4,7 @@ # @ECLASS: apache-module.eclass # @MAINTAINER: # apache-bugs@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Provides a common set of functions for apache modules # @DESCRIPTION: # This eclass handles apache modules in a sane way. @@ -44,6 +45,16 @@ # </IfDefine> # @CODE +case ${EAPI} in + [5-7]) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile src_install pkg_postinst + +if [[ -z ${_APACHE_MODULE_ECLASS} ]]; then +_APACHE_MODULE_ECLASS=1 + inherit depend.apache # ============================================================================== @@ -235,4 +246,4 @@ apache-module_pkg_postinst() { fi } -EXPORT_FUNCTIONS src_compile src_install pkg_postinst +fi diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass index 5df857d18587..ac56ef2849ca 100644 --- a/eclass/cannadic.eclass +++ b/eclass/cannadic.eclass @@ -1,6 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD +# No consumers left. Removal in 30 days. + # @ECLASS: cannadic.eclass # @MAINTAINER: # cjk@gentoo.org diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass index 623a19867d42..9dca3f63bc10 100644 --- a/eclass/cdrom.eclass +++ b/eclass/cdrom.eclass @@ -4,6 +4,7 @@ # @ECLASS: cdrom.eclass # @MAINTAINER: # games@gentoo.org +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Functions for CD-ROM handling # @DESCRIPTION: # Acquire CD(s) for those lovely CD-based emerges. Yes, this violates @@ -14,6 +15,11 @@ # eclass will require RESTRICT="bindist" but the point still stands. # The functions are generally called in src_unpack. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_CDROM_ECLASS} ]]; then _CDROM_ECLASS=1 diff --git a/eclass/chromium-2.eclass b/eclass/chromium-2.eclass index b3d63f302d05..54df3b1394c7 100644 --- a/eclass/chromium-2.eclass +++ b/eclass/chromium-2.eclass @@ -1,14 +1,23 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: chromium-2.eclass # @MAINTAINER: -# Chromium Herd <chromium@gentoo.org> +# Chromium Project <chromium@gentoo.org> # @AUTHOR: # Mike Gilbert <floppym@gentoo.org> +# @SUPPORTED_EAPIS: 7 # @BLURB: Shared functions for chromium and google-chrome -inherit eutils linux-info +case ${EAPI} in + 7) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +inherit linux-info + +if [[ -z ${_CHROMIUM_2_ECLASS} ]]; then +_CHROMIUM_2_ECLASS=1 if [[ ${PN} == chromium ]]; then IUSE+=" custom-cflags" @@ -19,8 +28,6 @@ fi # @DESCRIPTION: # Ensures the system kernel supports features needed for SUID sandbox to work. chromium_suid_sandbox_check_kernel_config() { - has "${EAPI:-0}" 0 1 2 3 && die "EAPI=${EAPI} is not supported" - if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then # Warn if the kernel does not support features needed for sandboxing. # Bug #363987. @@ -44,8 +51,6 @@ chromium_suid_sandbox_check_kernel_config() { # List of language packs available for this package. _chromium_set_l10n_IUSE() { - [[ ${EAPI:-0} == 0 ]] && die "EAPI=${EAPI} is not supported" - local lang for lang in ${CHROMIUM_LANGS}; do # Default to enabled since we bundle them anyway. @@ -176,3 +181,5 @@ gyp_use() { local gypflag="-D${2:-use_${1//-/_}}=" usex "$1" "${gypflag}" "${gypflag}" "${3-1}" "${4-0}" } + +fi diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass index 2ad4e243a846..0f47b3c094d1 100644 --- a/eclass/common-lisp-3.eclass +++ b/eclass/common-lisp-3.eclass @@ -4,13 +4,24 @@ # @ECLASS: common-lisp-3.eclass # @MAINTAINER: # Common Lisp project <common-lisp@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: functions to support the installation of Common Lisp libraries # @DESCRIPTION: # Since Common Lisp libraries share similar structure, this eclass aims # to provide a simple way to write ebuilds with these characteristics. +case ${EAPI} in + [67]) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile src_install + inherit eutils +if [[ -z ${_COMMON_LISP_3_ECLASS} ]]; then +_COMMON_LISP_3_ECLASS=1 + # @ECLASS-VARIABLE: CLIMPLEMENTATIONS # @DESCRIPTION: # Common Lisp implementations @@ -36,8 +47,6 @@ CLPACKAGE="${PN}" PDEPEND="virtual/commonlisp" -EXPORT_FUNCTIONS src_compile src_install - # @FUNCTION: common-lisp-3_src_compile # @DESCRIPTION: # Since there's nothing to build in most cases, default doesn't do @@ -235,3 +244,5 @@ common-lisp-export-impl-args() { esac export CL_BINARY CL_NORC CL_LOAD CL_EVAL } + +fi diff --git a/eclass/cron.eclass b/eclass/cron.eclass index 5548b190f9a7..81f963a4f722 100644 --- a/eclass/cron.eclass +++ b/eclass/cron.eclass @@ -6,6 +6,7 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Original Author: Aaron Walker <ka0ttic@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Some functions for cron # @DESCRIPTION: # Purpose: The main motivation for this eclass was to simplify @@ -15,15 +16,20 @@ # # NOTE on defaults: the default settings in the below functions were # chosen based on the most common setting among cron ebuilds. -# -inherit eutils flag-o-matic +case ${EAPI} in + [67]) inherit eutils ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +inherit flag-o-matic EXPORT_FUNCTIONS pkg_postinst -SLOT="0" +if [[ -z ${_CRON_ECLASS} ]]; then +_CRON_ECLASS=1 -DEPEND=">=sys-apps/sed-4.0.5" +SLOT="0" RDEPEND=">=sys-process/cronbase-0.3.2" for pn in vixie-cron bcron cronie dcron fcron; do @@ -41,7 +47,6 @@ done # ex: docrondir /some/dir -m 0770 -o root -g cron # docrondir /some/dir (uses default perms) # docrondir -m0700 (uses default dir) - docrondir() { # defaults local perms="-m0750 -o root -g cron" dir="/var/spool/cron/crontabs" @@ -75,7 +80,6 @@ docrondir() { # # ex: docron -m 0700 -o root -g root ('exe' defaults to "cron") # docron crond -m 0110 - docron() { local cron="cron" perms="-m 0750 -o root -g wheel" @@ -106,7 +110,6 @@ docron() { # Install crontab executable # # Uses same semantics as docron. - docrontab() { local crontab="crontab" perms="-m 4750 -o root -g cron" @@ -157,3 +160,5 @@ cron_pkg_postinst() { einfo " https://wiki.gentoo.org/wiki/Cron" echo } + +fi diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass index cbda4f01d451..cff3a5341569 100644 --- a/eclass/dotnet.eclass +++ b/eclass/dotnet.eclass @@ -4,7 +4,7 @@ # @ECLASS: dotnet.eclass # @MAINTAINER: # maintainer-needed@gentoo.org -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: common settings and functions for mono and dotnet related packages # @DESCRIPTION: # The dotnet eclass contains common environment settings that are useful for @@ -13,13 +13,16 @@ # of dotnet packages. case ${EAPI:-0} in - 0) - die "this eclass doesn't support EAPI 0" ;; - [1-6]) + 6) inherit eapi7-ver multilib - DEPEND="dev-lang/mono" ;; + DEPEND="dev-lang/mono" + ;; + 7) + BDEPEND="dev-lang/mono" + ;; *) - BDEPEND="dev-lang/mono" ;; + die "${ECLASS}: EAPI ${EAPI:-0} not supported" + ;; esac inherit mono-env diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 20ebe31c10a4..2d90c35d9ade 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: eutils.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: many extra (but common) functions that are used in ebuilds # @DESCRIPTION: # The eutils eclass contains a suite of functions that complement @@ -24,12 +24,12 @@ _EUTILS_ECLASS=1 # implicitly inherited (now split) eclasses case ${EAPI:-0} in - 0|1|2|3|4|5|6) + 5|6) inherit desktop edos2unix epatch estack l10n ltprune multilib \ preserve-libs toolchain-funcs vcs-clean wrapper ;; 7) inherit edos2unix l10n wrapper ;; - *) die "${ECLASS} is banned in EAPI ${EAPI}" ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac # @FUNCTION: emktemp @@ -90,23 +90,7 @@ use_if_iuse() { use $1 } -case ${EAPI:-0} in -0|1|2|3|4) - -# @FUNCTION: usex -# @USAGE: <USE flag> [true output] [false output] [true suffix] [false suffix] -# @DESCRIPTION: -# Proxy to declare usex for package managers or EAPIs that do not provide it -# and use the package manager implementation when available (i.e. EAPI >= 5). -# If USE flag is set, echo [true output][true suffix] (defaults to "yes"), -# otherwise echo [false output][false suffix] (defaults to "no"). -usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 - -;; -esac - -case ${EAPI:-0} in -0|1|2|3|4|5) +if [[ ${EAPI} == 5 ]] ; then # @FUNCTION: einstalldocs # @DESCRIPTION: @@ -138,7 +122,6 @@ einstalldocs() { debug-print-function ${FUNCNAME} "${@}" local dodoc_opts=-r - has ${EAPI} 0 1 2 3 && dodoc_opts= if ! declare -p DOCS &>/dev/null ; then local d @@ -189,11 +172,10 @@ in_iuse() { has "${flag}" "${liuse[@]#[+-]}" } -;; -esac +fi case ${EAPI:-0} in -0|1|2|3|4|5|6) +5|6) # @FUNCTION: eqawarn # @USAGE: [message] diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass index d117c0b2bfd6..e8b6e73c97af 100644 --- a/eclass/findlib.eclass +++ b/eclass/findlib.eclass @@ -6,10 +6,19 @@ # ML <ml@gentoo.org> # @AUTHOR: # Original author: Matthieu Sozeau <mattam@gentoo.org> (retired) +# @SUPPORTED_EAPIS: 6 7 # @BLURB: ocamlfind (a.k.a. findlib) eclass # @DESCRIPTION: # ocamlfind (a.k.a. findlib) eclass +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_FINDLIB_ECLASS} ]] ; then +_FINDLIB_ECLASS=1 + # Do not complain about CFLAGS etc since ML projects do not use them. QA_FLAGS_IGNORED='.*' @@ -60,3 +69,5 @@ findlib_src_install() { findlib_src_preinst make DESTDIR="${D}" "$@" install || die "make failed" } + +fi diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass index 6049b03b8f14..0bb00f475a21 100644 --- a/eclass/fortran-2.eclass +++ b/eclass/fortran-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: fortran-2.eclass @@ -7,7 +7,7 @@ # @AUTHOR: # Author Justin Lecher <jlec@gentoo.org> # Test functions provided by Sebastien Fabbro and Kacper Kowalik -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Simplify fortran compiler management # @DESCRIPTION: # If you need a fortran compiler, then you should be inheriting this eclass. @@ -27,9 +27,10 @@ # FORTRAN_NEED_OPENMP=1 inherit toolchain-funcs + case ${EAPI:-0} in # not used in the eclass, but left for backward compatibility with legacy users - 4|5|6) inherit eutils ;; + 5|6) inherit eutils ;; 7) ;; *) die "EAPI=${EAPI} is not supported" ;; esac diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass index 20603adc8427..47b203307e52 100644 --- a/eclass/freedict.eclass +++ b/eclass/freedict.eclass @@ -12,6 +12,9 @@ # This eclass exists to ease the installation of freedict translation # dictionaries. +if [[ -z ${_FREEDICT_ECLASS} ]]; then +_FREEDICT_ECLASS=1 + # @ECLASS-VARIABLE: FREEDICT_P # @DESCRIPTION: # Strips PN of 'freedict' prefix, to be used in SRC_URI and doins @@ -45,3 +48,5 @@ freedict_src_install() { } EXPORT_FUNCTIONS src_install + +fi diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass index 2b740561ba5b..dba26155d740 100644 --- a/eclass/gnome.org.eclass +++ b/eclass/gnome.org.eclass @@ -7,30 +7,34 @@ # @AUTHOR: # Authors: Spidler <spidler@gentoo.org> with help of carparski. # eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Helper eclass for gnome.org hosted archives # @DESCRIPTION: # Provide a default SRC_URI for tarball hosted on gnome.org mirrors. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_GNOME_ORG_ECLASS} ]] ; then +_GNOME_ORG_ECLASS=1 + # versionator inherit kept for older EAPIs due to ebuilds (potentially) relying on it -[[ ${EAPI} == [0123456] ]] && inherit eapi7-ver versionator +[[ ${EAPI} == [56] ]] && 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 -# everything else. This is because the gnome mirrors are moving to only have xz -# tarballs for new releases. -if has "${EAPI:-0}" 0 1 2 3; then - : ${GNOME_TARBALL_SUFFIX:="bz2"} -else - : ${GNOME_TARBALL_SUFFIX:="xz"} -fi +# tar.xz. This eclass defaults to xz. This is because the GNOME mirrors are +# moving to only have xz tarballs for new releases. +: ${GNOME_TARBALL_SUFFIX:="xz"} # Even though xz-utils are in @system, they must still be added to DEPEND; see # https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then - if [[ ${EAPI:-0} != [0123456] ]]; then + if [[ ${EAPI} != [56] ]]; then BDEPEND="app-arch/xz-utils" else DEPEND="app-arch/xz-utils" @@ -56,3 +60,5 @@ fi SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}" S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}" + +fi diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass index d1acdc1dd4b9..fc3d2d0fe3bd 100644 --- a/eclass/gnustep-2.eclass +++ b/eclass/gnustep-2.eclass @@ -1,19 +1,35 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnustep-2.eclass # @MAINTAINER: # GNUstep Herd <gnustep@gentoo.org> -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build # @DESCRIPTION: # This eclass sets up GNUstep environment to properly install # GNUstep packages +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_GNUSTEP_2_ECLASS} ]] ; then +_GNUSTEP_2_ECLASS=1 + inherit gnustep-base -DEPEND=">=gnustep-base/gnustep-make-2.0 - virtual/gnustep-back" +case ${EAPI:-0} in + [56]) + DEPEND=">=gnustep-base/gnustep-make-2.0" + ;; + *) + BDEPEND=">=gnustep-base/gnustep-make-2.0" + ;; +esac + +DEPEND+=" virtual/gnustep-back" RDEPEND="${DEPEND}" # The following gnustep-based EXPORT_FUNCTIONS are available: @@ -24,3 +40,5 @@ RDEPEND="${DEPEND}" # * gnustep-base_src_compile # * gnustep-base_src_install # * gnustep-base_pkg_postinst + +fi diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass index 6cd9f532a55f..2f836eb2830f 100644 --- a/eclass/gnustep-base.eclass +++ b/eclass/gnustep-base.eclass @@ -1,16 +1,26 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnustep-base.eclass # @MAINTAINER: # GNUstep Herd <gnustep@gentoo.org> -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Internal handling of GNUstep pacakges # @DESCRIPTION: # Inner gnustep eclass, should only be inherited directly by gnustep-base # packages -inherit eutils flag-o-matic +case ${EAPI:-0} in + [567]) inherit eutils ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_postinst + +if [[ -z ${_GNUSTEP_BASE_ECLASS} ]] ; then +_GNUSTEP_BASE_ECLASS=1 + +inherit flag-o-matic # IUSE variables across all GNUstep packages # "debug": enable code for debugging @@ -63,7 +73,7 @@ gnustep-base_src_prepare() { eend $? fi - ! has ${EAPI:-0} 0 1 2 3 4 5 && default + ! has ${EAPI} 5 && default } gnustep-base_src_configure() { @@ -75,10 +85,6 @@ gnustep-base_src_configure() { gnustep-base_src_compile() { egnustep_env - case ${EAPI:-0} in - 0|1) gnustep-base_src_configure ;; - esac - egnustep_make } @@ -263,7 +269,4 @@ EOF doexe "${T}"/${cfile} } -case ${EAPI:-0} in - 0|1) EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst ;; - *) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_postinst ;; -esac +fi diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index 69e3f7d46d8e..5592186936c0 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # kiorky <kiorky@cryptelium.net> # Petteri Räty <betelgeuse@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: eclass for ant based Java packages # @DESCRIPTION: # Eclass for Ant-based Java packages. Provides support for both automatic and @@ -15,6 +16,16 @@ inherit java-utils-2 multilib +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_configure + +if [[ -z ${_JAVA_ANT_2_ECLASS} ]] ; then +_JAVA_ANT_2_ECLASS=1 + # This eclass provides functionality for Java packages which use # ant to build. In particular, it will attempt to fix build.xml files, so that # they use the appropriate 'target' and 'source' attributes. @@ -109,11 +120,6 @@ JAVA_ANT_CLASSPATH_TAGS="javac xjavac" # @DESCRIPTION: # When set, <available> Ant tasks are rewritten to ignore Ant's runtime classpath. -case "${EAPI:-0}" in - 0|1) : ;; - *) EXPORT_FUNCTIONS src_configure ;; -esac - # @FUNCTION: java-ant-2_src_configure # @DESCRIPTION: # src_configure rewrites the build.xml files automatically, unless EAPI is undefined, 0 or 1. @@ -430,3 +436,5 @@ java-ant_rewrite-bootclasspath() { java-ant_xml-rewrite -f "${file}" -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \ -a bootclasspath -v "${bcp}" } + +fi diff --git a/eclass/java-osgi.eclass b/eclass/java-osgi.eclass index f9a77b8490fa..abbf73cdd3fa 100644 --- a/eclass/java-osgi.eclass +++ b/eclass/java-osgi.eclass @@ -6,6 +6,7 @@ # java@gentoo.org # @AUTHOR: # Java maintainers <java@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Java OSGi eclass # @DESCRIPTION: # This eclass provides functionality which is used by packages that need to be @@ -13,6 +14,14 @@ # in their manifests. Currently this is used only by Eclipse-3.3 - later we # could extend this so that Gentoo Java system would be fully OSGi compliant. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_JAVA_OSGI_ECLASS} ]] ; then +_JAVA_OSGI_ECLASS=1 + inherit java-utils-2 # @ECLASS-VARIABLE: _OSGI_T @@ -275,3 +284,5 @@ java-osgi_dojar-fromfile() { _java-osgi_makejar-fromfile "$@" "${versionRewriting}" java-pkg_dojar "${_OSGI_T}/osgi/${jarName}" } + +fi diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass index 4b690be13751..4d5cb7665728 100644 --- a/eclass/java-pkg-2.eclass +++ b/eclass/java-pkg-2.eclass @@ -6,11 +6,22 @@ # java@gentoo.org # @AUTHOR: # Thomas Matthijs <axxo@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass for Java Packages # @DESCRIPTION: # This eclass should be inherited for pure Java packages, or by packages which # need to use Java. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst + +if [[ -z ${_JAVA_PKG_2_ECLASS} ]] ; then +_JAVA_PKG_2_ECLASS=1 + inherit java-utils-2 # @ECLASS-VARIABLE: JAVA_PKG_IUSE @@ -35,10 +46,6 @@ if [[ ${CATEGORY} = dev-java && ${PN} = commons-* ]]; then SRC_URI="mirror://apache/${PN/-///}/source/${P}-src.tar.gz" fi -case "${EAPI:-0}" in - 0|1) EXPORT_FUNCTIONS pkg_setup src_compile pkg_preinst ;; - *) EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst ;; -esac # @FUNCTION: java-pkg-2_pkg_setup # @DESCRIPTION: @@ -149,3 +156,5 @@ java-pkg-2_src_test() { java-pkg-2_pkg_preinst() { java-utils-2_pkg_preinst } + +fi diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass index fa72421a0d77..7f1f5a2f8394 100644 --- a/eclass/java-pkg-opt-2.eclass +++ b/eclass/java-pkg-opt-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-opt-2.eclass @@ -6,11 +6,22 @@ # java@gentoo.org # @AUTHOR: # Thomas Matthijs <axxo@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass for package with optional Java support # @DESCRIPTION: # Inherit this eclass instead of java-pkg-2 if you only need optional Java # support. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst + +if [[ -z ${_JAVA_PKG_OPT_2_ECLASS} ]] ; then +_JAVA_PKG_OPT_2_ECLASS=1 + inherit java-utils-2 # @ECLASS-VARIABLE: JAVA_PKG_OPT_USE @@ -24,11 +35,6 @@ RDEPEND="${DEPEND}" # See java-pkg-2.eclass for JAVA_PKG_IUSE documentation IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}" -case "${EAPI:-0}" in - 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;; - *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;; -esac - # @FUNCTION: java-pkg-opt-2_pkg_setup # @DESCRIPTION: # default pkg_setup, wrapper for java-utils-2_pkg_init @@ -58,3 +64,5 @@ java-pkg-opt-2_src_prepare() { java-pkg-opt-2_pkg_preinst() { use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst } + +fi diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index ca03fea78cf4..0c3e1af70364 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -6,6 +6,7 @@ # java@gentoo.org # @AUTHOR: # Java maintainers <java@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass for packaging Java software with ease. # @DESCRIPTION: # This class is intended to build pure Java packages from Java sources @@ -15,14 +16,22 @@ # addressed by an ebuild by putting corresponding files into the target # directory before calling the src_compile function of this eclass. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile src_install src_test + +if [[ -z ${_JAVA_PKG_SIMPLE_ECLASS} ]] ; then +_JAVA_PKG_SIMPLE_ECLASS=1 + inherit java-utils-2 if ! has java-pkg-2 ${INHERITED}; then eerror "java-pkg-simple eclass can only be inherited AFTER java-pkg-2" fi -EXPORT_FUNCTIONS src_compile src_install src_test - # We are only interested in finding all java source files, wherever they may be. S="${WORKDIR}" @@ -479,3 +488,5 @@ java-pkg-simple_src_test() { esac done } + +fi diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index a5c06a689ced..3368e6977f60 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,6 +6,7 @@ # java@gentoo.org # @AUTHOR: # Thomas Matthijs <axxo@gentoo.org>, Karl Trygve Kalleberg <karltk@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Base eclass for Java packages # @DESCRIPTION: # This eclass provides functionality which is used by java-pkg-2.eclass, @@ -16,18 +17,23 @@ # that have optional Java support. In addition you can inherit java-ant-2 for # Ant-based packages. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_JAVA_UTILS_2_ECLASS} ]] ; then +_JAVA_UTILS_2_ECLASS=1 + # EAPI 7 has version functions built-in. Use eapi7-ver for all earlier eclasses. # Keep versionator inheritance in case consumers are using it implicitly. -[[ ${EAPI} == [0123456] ]] && inherit eapi7-ver eutils multilib versionator +[[ ${EAPI} == [56] ]] && inherit eapi7-ver eutils multilib versionator IUSE="elibc_FreeBSD" # Make sure we use java-config-2 export WANT_JAVA_CONFIG="2" -# Prefix variables are only available for EAPI>=3 -has "${EAPI:-0}" 0 1 2 && ED="${D}" EPREFIX= EROOT="${ROOT}" - has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )" # @VARIABLE: JAVA_PKG_E_DEPEND @@ -975,10 +981,6 @@ java-pkg_jar-from() { [[ -z ${target_pkg} ]] && die "Must specify a package" - if [[ "${EAPI}" == "1" ]]; then - target_pkg="${target_pkg//:/-}" - fi - # default destjar to the target jar [[ -z "${destjar}" ]] && destjar="${target_jar}" @@ -1114,10 +1116,6 @@ java-pkg_getjars() { local pkgs="${1}" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - jars="$(java-config ${deep} --classpath=${pkgs})" [[ $? != 0 ]] && die "java-config --classpath=${pkgs} failed" debug-print "${pkgs}:${jars}" @@ -1183,10 +1181,6 @@ java-pkg_getjar() { local pkg="${1}" target_jar="${2}" jar - if [[ "${EAPI}" == "1" ]]; then - pkg="${pkg//:/-}" - fi - [[ -z ${pkg} ]] && die "Must specify package to get a jar from" [[ -z ${target_jar} ]] && die "Must specify jar to get" @@ -1272,10 +1266,6 @@ java-pkg_register-dependency() { [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - if [[ -z "${jar}" ]]; then for pkg in ${pkgs//,/ }; do java-pkg_ensure-dep runtime "${pkg}" @@ -1329,10 +1319,6 @@ java-pkg_register-optional-dependency() { [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - if [[ -z "${jar}" ]]; then for pkg in ${pkgs//,/ }; do java-pkg_record-jar_ --optional "${pkg}" @@ -1904,7 +1890,7 @@ etestng() { # Don't call directly, but via java-pkg-2_src_prepare! java-utils-2_src_prepare() { case ${EAPI:-0} in - [0-5]) + 5) java-pkg_func-exists java_prepare && java_prepare ;; *) java-pkg_func-exists java_prepare && @@ -2191,9 +2177,6 @@ java-pkg_init() { # Don't set up build environment if installing from binary. #206024 #258423 [[ "${MERGE_TYPE}" == "binary" ]] && return - # Also try Portage's nonstandard EMERGE_FROM for old EAPIs, if it doesn't - # work nothing is lost. - has ${EAPI:-0} 0 1 2 3 && [[ "${EMERGE_FROM}" == "binary" ]] && return unset JAVAC unset JAVA_HOME @@ -2956,3 +2939,5 @@ java-pkg_gen-cp() { fi done } + +fi diff --git a/eclass/java-virtuals-2.eclass b/eclass/java-virtuals-2.eclass index 987ff448364e..27ed9157da5b 100644 --- a/eclass/java-virtuals-2.eclass +++ b/eclass/java-virtuals-2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-virtuals-2.eclass @@ -6,11 +6,22 @@ # java@gentoo.org # @AUTHOR: # Original Author: Alistair John Bush <ali_bush@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Java virtuals eclass # @DESCRIPTION: # To provide a default (and only) src_install function for ebuilds in the # java-virtuals category. +case ${EAPI:-0} in + [56]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_install + +if [[ -z ${_JAVA_VIRTUALS_2_ECLASS} ]] ; then +_JAVA_VIRTUALS_2_ECLASS=1 + inherit java-utils-2 DEPEND=">=dev-java/java-config-2.2.0-r3" @@ -18,8 +29,6 @@ RDEPEND="${DEPEND}" S="${WORKDIR}" -EXPORT_FUNCTIONS src_install - # @FUNCTION: java-virtuals-2_src_install # @DESCRIPTION: # default src_install @@ -52,3 +61,5 @@ java-virtuals-2_do_write() { echo "MULTI_PROVIDER=\"${JAVA_VIRTUAL_MULTI=FALSE}\"" } > "${JAVA_PKG_VIRTUAL_PROVIDER}" } + +fi diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass index 7bd8f382fbe3..5cf3931b7bf5 100644 --- a/eclass/l10n.eclass +++ b/eclass/l10n.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: l10n.eclass @@ -6,6 +6,7 @@ # Ulrich Müller <ulm@gentoo.org> # @AUTHOR: # Ben de Groot <yngwin@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: convenience functions to handle localizations # @DESCRIPTION: # The l10n (localization) eclass offers a number of functions to more @@ -14,6 +15,11 @@ # determining the cross-section between the user's set LINGUAS and what # is offered by the package. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_L10N_ECLASS} ]]; then _L10N_ECLASS=1 diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 11b0fd0cfb5e..e87c5ec0cdb3 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # John Mylchreest <johnm@gentoo.org>, # Stefan Schweizer <genstef@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: It provides the functionality required to install external modules against a kernel source tree. # @DESCRIPTION: # This eclass is used to interface with linux-info.eclass in such a way @@ -134,9 +135,20 @@ # @DESCRIPTION: # It's a read-only variable. It contains the extension of the kernel modules. -inherit eutils linux-info multilib toolchain-funcs +case ${EAPI:-0} in + [567]) inherit eutils ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm +if [[ -z ${_LINUX_MOD_ECLASS} ]] ; then +_LINUX_MOD_ECLASS=1 + +# TODO: When adding support for future EAPIs, please audit this list +# for unused inherits and conditionalise them. +inherit linux-info multilib toolchain-funcs + case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; *) _modules_optional_use_iuse_default='+' ;; @@ -769,3 +781,5 @@ linux-mod_pkg_postrm() { [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return remove_moduledb; } + +fi diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index 394df33df047..7f4aa723e0a5 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -6,6 +6,7 @@ # Michał Górny <mgorny@gentoo.org> # @AUTHOR: # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 7 # @BLURB: Common bits for fetching & unpacking llvm.org projects # @DESCRIPTION: # The llvm.org eclass provides common code to fetch and unpack parts diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass index 11c2790dac29..7abe1eb6674a 100644 --- a/eclass/lua-single.eclass +++ b/eclass/lua-single.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: lua-single.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Marek Szuba <marecki@gentoo.org> # Based on python-single-r1.eclass by Michał Górny <mgorny@gentoo.org> et al. -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: An eclass for Lua packages not installed for multiple implementations. # @DESCRIPTION: # An extension of lua.eclass suite for packages which don't support being @@ -34,7 +34,7 @@ # # @EXAMPLE: # @CODE -# EAPI=7 +# EAPI=8 # # LUA_COMPAT=( lua5-{1..3} ) # @@ -66,7 +66,7 @@ case ${EAPI:-0} in 0|1|2|3|4|5|6) die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}" ;; - 7) + 7|8) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass index ddf44f354e17..59959eaf9c08 100644 --- a/eclass/lua-utils.eclass +++ b/eclass/lua-utils.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Marek Szuba <marecki@gentoo.org> # Based on python-utils-r1.eclass by Michał Górny <mgorny@gentoo.org> et al. -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Utility functions for packages with Lua parts # @DESCRIPTION: # A utility eclass providing functions to query Lua implementations, @@ -21,7 +21,7 @@ case ${EAPI:-0} in 0|1|2|3|4|5|6) die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}" ;; - 7) + 7|8) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" diff --git a/eclass/lua.eclass b/eclass/lua.eclass index 46d9e848c87f..e3a25c5d184b 100644 --- a/eclass/lua.eclass +++ b/eclass/lua.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: lua.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Marek Szuba <marecki@gentoo.org> # Based on python-r1.eclass by Michał Górny <mgorny@gentoo.org> et al. -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: A common eclass for Lua packages # @DESCRIPTION: # A common eclass providing helper functions to build and install @@ -27,7 +27,7 @@ # # @EXAMPLE: # @CODE -# EAPI=7 +# EAPI=8 # # LUA_COMPAT=( lua5-{1..3} ) # @@ -54,7 +54,7 @@ case ${EAPI:-0} in 0|1|2|3|4|5|6) die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}" ;; - 7) + 7|8) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass index dc0d19f59ae2..b62ecdf102a5 100644 --- a/eclass/mercurial.eclass +++ b/eclass/mercurial.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Next gen author: Krzysztof Pawlik <nelchael@gentoo.org> # Original author: Aron Griffis <agriffis@gentoo.org> +# @SUPPORTED_EAPIS: 7 # @BLURB: This eclass provides generic mercurial fetching functions # @DESCRIPTION: # This eclass provides generic mercurial fetching functions. To fetch sources @@ -14,13 +15,27 @@ # you need to share single repository between several ebuilds set EHG_PROJECT to # project name in all of them. -inherit eutils +case ${EAPI:-0} in + 7) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac EXPORT_FUNCTIONS src_unpack +if [[ -z ${_MERCURIAL_ECLASS} ]] ; then +_MERCURIAL_ECLASS=1 + PROPERTIES+=" live" -DEPEND="dev-vcs/mercurial" +case ${EAPI:-0} in + 7) + # For compatibiilty only (indirect inherits). + # Eclass itself doesn't need it. + inherit eutils + ;; +esac + +BDEPEND="dev-vcs/mercurial" # @ECLASS-VARIABLE: EHG_REPO_URI # @DESCRIPTION: @@ -202,3 +217,5 @@ function mercurial_src_unpack { mercurial_fetch mercurial_bootstrap } + +fi diff --git a/eclass/mono-env.eclass b/eclass/mono-env.eclass index 6a93993acd29..8cec214e615f 100644 --- a/eclass/mono-env.eclass +++ b/eclass/mono-env.eclass @@ -4,15 +4,22 @@ # @ECLASS: mono-env.eclass # @MAINTAINER: # maintainer-needed@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Set environment variables commonly used by dotnet packages. # @DESCRIPTION: # Set environment variables commonly used by dotnet packages. -SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2" +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac EXPORT_FUNCTIONS pkg_setup -if [[ ! ${_MONO_ENV} ]]; then +if [[ -z ${_MONO_ENV_ECLASS} ]] ; then +_MONO_ENV_ECLASS=1 + +SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2" mono-env_pkg_setup() { # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the @@ -40,5 +47,4 @@ mono-env_pkg_setup() { QA_MULTILIB_PATHS="usr/lib/" } -_MONO_ENV=1 fi diff --git a/eclass/mono.eclass b/eclass/mono.eclass index 382c6e4b4dcb..ea0485746230 100644 --- a/eclass/mono.eclass +++ b/eclass/mono.eclass @@ -4,6 +4,7 @@ # @ECLASS: mono.eclass # @MAINTAINER: # maintainer-needed@gentoo.org +# @SUPPORTED_EAPIS: 7 # @BLURB: common settings and functions for mono and dotnet related packages # @DEPRECATED: mono-env # @DESCRIPTION: @@ -12,6 +13,14 @@ # MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation # of dotnet packages. +case ${EAPI:-0} in + 7) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_MONO_ECLASS} ]] ; then +_MONO_ECLASS=1 + inherit multilib # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the @@ -79,3 +88,5 @@ mono_multilib_comply() { fi } + +fi diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 93c062cb36ac..6ba820229de3 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,13 +1,20 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multilib.eclass # @MAINTAINER: # toolchain@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: This eclass is for all functions pertaining to handling multilib configurations. # @DESCRIPTION: # This eclass is for all functions pertaining to handling multilib configurations. +case ${EAPI:-0} in + # EAPI=0 is still used by crossdev, bug #797367 + [0567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_MULTILIB_ECLASS} ]]; then _MULTILIB_ECLASS=1 @@ -47,7 +54,7 @@ has_multilib_profile() { # fall back on old behavior. Any profile that has these set should also # depend on a newer version of portage (not yet released) which uses these # over CONF_LIBDIR in econf, dolib, etc... -if has "${EAPI:-0}" 0 1 2 3 4 5; then +if [[ ${EAPI} == [05] ]] ; then get_libdir() { local CONF_LIBDIR if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclass index 3e8b2f9d2540..c32bfaac2e6b 100644 --- a/eclass/multiprocessing.eclass +++ b/eclass/multiprocessing.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: multiprocessing.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Brian Harring <ferringb@gentoo.org> # Mike Frysinger <vapier@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: multiprocessing helper functions # @DESCRIPTION: # The multiprocessing eclass contains a suite of utility functions @@ -23,6 +24,11 @@ # } # @CODE +case ${EAPI:-0} in + [5678]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_MULTIPROCESSING_ECLASS} ]]; then _MULTIPROCESSING_ECLASS=1 diff --git a/eclass/openib.eclass b/eclass/openib.eclass index 7810062fae36..e25418854c89 100644 --- a/eclass/openib.eclass +++ b/eclass/openib.eclass @@ -6,12 +6,19 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Author: Alexey Shvetsov <alexxy@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Simplify working with OFED packages -inherit eutils rpm versionator +case ${EAPI:-0} in + [56]) inherit eutils rpm versionator ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac EXPORT_FUNCTIONS src_unpack +if [[ -z ${_OPENIB_ECLASS} ]] ; then +_OPENIB_ECLASS=1 + HOMEPAGE="https://www.openfabrics.org/" LICENSE="|| ( GPL-2 BSD-2 )" @@ -146,3 +153,5 @@ openib_src_unpack() { esac fi } + +fi diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass index e6ab6b7f52db..8fc346c3ac6a 100644 --- a/eclass/optfeature.eclass +++ b/eclass/optfeature.eclass @@ -4,6 +4,7 @@ # @ECLASS: optfeature.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: Advertise optional functionality that might be useful to users case ${EAPI:-0} in diff --git a/eclass/pam.eclass b/eclass/pam.eclass index c9de612469b1..0b3421b5e7c8 100644 --- a/eclass/pam.eclass +++ b/eclass/pam.eclass @@ -6,11 +6,17 @@ # Mikle Kolyada <zlogene@gentoo.org> # @AUTHOR: # Diego Pettenò <flameeyes@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Handles pam related tasks # @DESCRIPTION: # This eclass contains functions to install pamd configuration files and # pam modules. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_PAM_ECLASS} ]]; then _PAM_ECLASS=1 diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass index 209e4831f960..9c4903d24b61 100644 --- a/eclass/pax-utils.eclass +++ b/eclass/pax-utils.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Kevin F. Quinn <kevquinn@gentoo.org> # Author: Anthony G. Basile <blueness@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: functions to provide PaX markings for hardened kernels # @DESCRIPTION: # @@ -20,6 +21,11 @@ # To control what markings are made, set PAX_MARKINGS in /etc/portage/make.conf # to contain either "PT", "XT" or "none". The default is none +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_PAX_UTILS_ECLASS} ]]; then _PAX_UTILS_ECLASS=1 diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 6285e9363156..3c1b4c3c5acc 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -43,7 +43,9 @@ esac # dev-lang/perl is automatically added by the eclass. It defaults to yes. # Set to no to disable, set to noslotop to add a perl dependency without # slot operator (EAPI=6). All packages installing into the vendor_perl -# path must use yes here. +# path must use yes here. (EAPI=8 and later) Also adds a test useflag, +# a use-conditional build time dependency on virtual/perl-Test-Simple, and +# the required RESTRICT setting. case ${EAPI:-0} in 5) @@ -103,7 +105,7 @@ case ${EAPI:-0} in EXPORT_FUNCTIONS ${PERL_EXPF} ;; - *) + 7) [[ ${CATEGORY} == perl-core ]] && \ PERL_EXPF+=" pkg_postinst pkg_postrm" @@ -130,6 +132,36 @@ case ${EAPI:-0} in EXPORT_FUNCTIONS ${PERL_EXPF} ;; + *) + [[ ${CATEGORY} == perl-core ]] && \ + PERL_EXPF+=" pkg_postinst pkg_postrm" + + case "${GENTOO_DEPEND_ON_PERL:-yes}" in + yes|noslotop) + DEPEND="dev-lang/perl" + BDEPEND="dev-lang/perl + test? ( virtual/perl-Test-Simple )" + IUSE="test" + RESTRICT="!test? ( test )" + ;;& + yes) + RDEPEND="dev-lang/perl:=" + ;; + noslotop) + RDEPEND="dev-lang/perl" + ;; + esac + + if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later." + fi + + if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then + die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later." + fi + + EXPORT_FUNCTIONS ${PERL_EXPF} + ;; esac LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass index 19040a7e762b..f3977b225aa4 100644 --- a/eclass/php-ext-pecl-r3.eclass +++ b/eclass/php-ext-pecl-r3.eclass @@ -4,12 +4,23 @@ # @ECLASS: php-ext-pecl-r3.eclass # @MAINTAINER: # Gentoo PHP team <php-bugs@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: A uniform way to install PECL extensions # @DESCRIPTION: # This eclass should be used by all dev-php/pecl-* ebuilds as a uniform # way of installing PECL extensions. For more information about PECL, # see https://pecl.php.net/ +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_install src_test + +if [[ -z ${_PHP_EXT_PECL_R3_ECLASS} ]] ; then +_PHP_EXT_PECL_R3_ECLASS=1 + # @ECLASS-VARIABLE: PHP_EXT_PECL_PKG # @PRE_INHERIT # @DESCRIPTION: @@ -46,8 +57,6 @@ S="${WORKDIR}/${PHP_EXT_PECL_PKG_V}" inherit php-ext-source-r3 -EXPORT_FUNCTIONS src_install src_test - if [[ -z "${PHP_EXT_PECL_FILENAME}" ]] ; then SRC_URI="https://pecl.php.net/get/${PHP_EXT_PECL_PKG_V}.tgz" else @@ -85,3 +94,5 @@ php-ext-pecl-r3_src_test() { NO_INTERACTION="yes" emake test done } + +fi diff --git a/eclass/portability.eclass b/eclass/portability.eclass index 3b085d6c4e70..1cc36757b625 100644 --- a/eclass/portability.eclass +++ b/eclass/portability.eclass @@ -6,8 +6,14 @@ # base-system@gentoo.org # @AUTHOR: # Diego Pettenò <flameeyes@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: This eclass is created to avoid using non-portable GNUisms inside ebuilds +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_PORTABILITY_ECLASS} ]]; then _PORTABILITY_ECLASS=1 diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass index d00c0d79ef53..da6f63bcc50c 100644 --- a/eclass/prefix.eclass +++ b/eclass/prefix.eclass @@ -1,16 +1,25 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: prefix.eclass # @MAINTAINER: # Feel free to contact the Prefix team through <prefix@gentoo.org> if # you have problems, suggestions or questions. +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass to provide Prefix functionality # @DESCRIPTION: # Gentoo Prefix allows users to install into a self defined offset # located somewhere in the filesystem. Prefix ebuilds require # additional functions and variables which are defined by this eclass. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_PREFIX_ECLASS} ]]; then +_PREFIX_ECLASS=1 + # @ECLASS-VARIABLE: EPREFIX # @DESCRIPTION: # The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix @@ -136,3 +145,5 @@ prefixify_ro() { fi } # vim: tw=72: + +fi diff --git a/eclass/preserve-libs.eclass b/eclass/preserve-libs.eclass index 548c6411fcf0..da13e7943add 100644 --- a/eclass/preserve-libs.eclass +++ b/eclass/preserve-libs.eclass @@ -1,11 +1,17 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: preserve-libs.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: preserve libraries after SONAME changes +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_PRESERVE_LIBS_ECLASS} ]]; then _PRESERVE_LIBS_ECLASS=1 diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass index f42f04915157..76c612f026f2 100644 --- a/eclass/qmail.eclass +++ b/eclass/qmail.eclass @@ -4,8 +4,17 @@ # @ECLASS: qmail.eclass # @MAINTAINER: # Rolf Eike Beer <eike@sf-mail.de> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: common qmail functions +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_QMAIL_ECLASS} ]] ; then +_QMAIL_ECLASS=1 + inherit flag-o-matic toolchain-funcs fixheadtails # hardcoded paths @@ -509,3 +518,5 @@ qmail_ssl_generate() { einfo "Send req.pem to your CA to obtain signed_req.pem, and do:" einfo "cat signed_req.pem >> ${QMAIL_HOME}/control/servercert.pem" } + +fi diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass index 43c4acb11425..48121bf1d2a1 100644 --- a/eclass/ros-catkin.eclass +++ b/eclass/ros-catkin.eclass @@ -6,18 +6,15 @@ # ros@gentoo.org # @AUTHOR: # Alexis Ballier <aballier@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 7 # @BLURB: Template eclass for catkin based ROS packages. # @DESCRIPTION: # Provides function for building ROS packages on Gentoo. # It supports selectively building messages, single-python installation, live ebuilds (git only). case "${EAPI:-0}" in - 0|1|2|3|4|5|6) - die "EAPI='${EAPI}' is not supported" - ;; - *) - ;; + 7) ;; + *) die "EAPI='${EAPI}' is not supported" ;; esac # @ECLASS-VARIABLE: ROS_REPO_URI diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass index d27f0a386c7f..351d7974877e 100644 --- a/eclass/rpm.eclass +++ b/eclass/rpm.eclass @@ -1,12 +1,23 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: rpm.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: convenience class for extracting RPMs -inherit estack eutils +case ${EAPI:-0} in + [567]) inherit eutils ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_unpack + +if [[ -z ${_RPM_ECLASS} ]] ; then +_RPM_ECLASS=1 + +inherit estack case "${EAPI:-0}" in [0-6]) DEPEND=">=app-arch/rpm2targz-9.0.0.3g" ;; @@ -126,4 +137,4 @@ rpm_spec_epatch() { eend } -EXPORT_FUNCTIONS src_unpack +fi diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass index e5752dca2d7b..4db362e2cd50 100644 --- a/eclass/ruby-utils.eclass +++ b/eclass/ruby-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: ruby-utils.eclass @@ -6,6 +6,7 @@ # Ruby team <ruby@gentoo.org> # @AUTHOR: # Author: Hans de Graaff <graaff@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages # @DESCRIPTION: # The ruby-utils eclass is designed to allow an easier installation of @@ -14,6 +15,10 @@ # This eclass does not set any metadata variables nor export any phase # functions. It can be inherited safely. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac if [[ ! ${_RUBY_UTILS} ]]; then diff --git a/eclass/stardict.eclass b/eclass/stardict.eclass index 5e96b01625cd..0061353f4abc 100644 --- a/eclass/stardict.eclass +++ b/eclass/stardict.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Author : Alastair Tse <liquidx@gentoo.org> -# -# Convienence class to do stardict dictionary installations. -# +# @NAME: stardict.eclass +# @AUTHOR: Alastair Tse <liquidx@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 +# @BLURB: Convenience class to do stardict dictionary installations. # Usage: # - Variables to set : # * FROM_LANG - From this language @@ -12,6 +12,16 @@ # * DICT_PREFIX - SRC_URI prefix, like "dictd_www.mova.org_" # * DICT_SUFFIX - SRC_URI after the prefix. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile src_install + +if [[ -z ${_STARDICT_ECLASS} ]] ; then +_STARDICT_ECLASS=1 + RESTRICT="strip" [ -z "${DICT_SUFFIX}" ] && DICT_SUFFIX=${PN#stardict-[[:lower:]]*-} @@ -25,18 +35,22 @@ fi HOMEPAGE="http://stardict.sourceforge.net/" SRC_URI="mirror://sourceforge/stardict/${DICT_P}.tar.bz2" +S="${WORKDIR}"/${DICT_P} -IUSE="gzip" -SLOT="0" LICENSE="GPL-2" +SLOT="0" +IUSE="gzip" -DEPEND="|| ( >=app-text/stardict-2.4.2 +DEPEND=" + || ( + >=app-text/stardict-2.4.2 app-text/sdcv - app-text/goldendict ) - gzip? ( app-arch/gzip - app-text/dictd )" - -S=${WORKDIR}/${DICT_P} + app-text/goldendict + ) + gzip? ( + app-arch/gzip + app-text/dictd + )" stardict_src_compile() { if use gzip; then @@ -56,4 +70,4 @@ stardict_src_install() { doins *.ifo } -EXPORT_FUNCTIONS src_compile src_install +fi diff --git a/eclass/sword-module.eclass b/eclass/sword-module.eclass index 2ae58d1e51bc..f8ae83c9f051 100644 --- a/eclass/sword-module.eclass +++ b/eclass/sword-module.eclass @@ -1,16 +1,16 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: sword-module.eclass # @MAINTAINER: # Marek Szuba <marecki@gentoo.org> -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Simplify installation of SWORD modules # @DESCRIPTION: # This eclass provides dependencies, ebuild environment and the src_install # function common to all app-text/sword modules published by the SWORD Project. # -# Note that as of 2020-07-26 module archives published by SWORD are still +# Note that as of 2021-06-16 module archives published by SWORD are still # not versioned and it is necessary to look at respective module pages in # order to see what versions the currently available files are. Once # a module file has been replicated to the Gentoo mirror network it will be @@ -23,7 +23,7 @@ # sword-Personal-1.0.ebuild, a typical ebuild using sword-module.eclass: # # @CODE -# EAPI=7 +# EAPI=8 # # SWORD_MINIMUM_VERSION="1.5.1a" # @@ -40,7 +40,7 @@ case ${EAPI:-0} in 0|1|2|3|4|5|6) die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}" ;; - 7) + 7|8) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 267cf5cfce34..1643f64cab76 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -4,6 +4,7 @@ # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: # Toolchain Ninjas <toolchain@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: functions to query common info about the toolchain # @DESCRIPTION: # The toolchain-funcs aims to provide a complete suite of functions @@ -12,6 +13,12 @@ # in such a way that you can rely on the function always returning # something sane. +case ${EAPI:-0} in + # EAPI=0 is still used by crossdev, bug #797367 + [0567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then _TOOLCHAIN_FUNCS_ECLASS=1 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 3c495631a0e8..c07d483fd1f0 100644 --- a/eclass/toolchain.eclass +++ b/eclass/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 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -7,6 +7,8 @@ DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" +# TODO: Please audit this inherit list on future EAPI bumps and ideally +# conditonalise them where possible. inherit eutils flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix tc_is_live() { diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index d01a6e8e648a..c9dab4345c95 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -4,6 +4,7 @@ # @ECLASS: unpacker.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs # @DESCRIPTION: # Some extraneous file formats are not part of PMS, or are only in certain @@ -14,6 +15,11 @@ # - merge rpm unpacking # - support partial unpacks? +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_UNPACKER_ECLASS} ]]; then _UNPACKER_ECLASS=1 diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass index 15e9238ab44b..d349fc17476b 100644 --- a/eclass/user-info.eclass +++ b/eclass/user-info.eclass @@ -1,12 +1,18 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: user-info.eclass # @MAINTAINER: # base-system@gentoo.org (Linux) # Michał Górny <mgorny@gentoo.org> (NetBSD) +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Read-only access to user and group information +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_USER_INFO_ECLASS} ]]; then _USER_INFO_ECLASS=1 diff --git a/eclass/user.eclass b/eclass/user.eclass index 96d3757233b9..e1f87a383ada 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # base-system@gentoo.org (Linux) # Michał Górny <mgorny@gentoo.org> (NetBSD) +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: user management in ebuilds # @DEPRECATED: acct-user/acct-group packages # @DESCRIPTION: @@ -32,14 +33,16 @@ inherit user-info # @FUNCTION: _assert_pkg_ebuild_phase # @INTERNAL # @USAGE: <calling func name> +# @DESCRIPTION: +# Raises an alert if the phase is not suitable for user.eclass usage. _assert_pkg_ebuild_phase() { case ${EBUILD_PHASE} in setup|preinst|postinst|prerm|postrm) ;; *) eerror "'$1()' called from '${EBUILD_PHASE}' phase which is not OK:" eerror "You may only call from pkg_{setup,{pre,post}{inst,rm}} functions." - eerror "Package fails at QA and at life. Please file a bug." - die "Bad package! $1 is only for use in some pkg_* functions!" + eerror "Package has serious QA issues. Please file a bug." + die "Bad package! ${1} is only for use in some pkg_* functions!" esac } @@ -88,8 +91,8 @@ enewuser() { _assert_pkg_ebuild_phase ${FUNCNAME} local create_home=1 force_uid= - while [[ $1 == -* ]]; do - case $1 in + while [[ ${1} == -* ]]; do + case ${1} in -F) force_uid=1;; -M) create_home=;; *) die "${FUNCNAME}: invalid option ${1}";; @@ -98,7 +101,7 @@ enewuser() { done # get the username - local euser=$1; shift + local euser=${1}; shift if [[ -z ${euser} ]] ; then eerror "No username specified!" die "Cannot call enewuser without a username" @@ -114,7 +117,7 @@ enewuser() { local opts=() # handle uid - local euid=$1; shift + local euid=${1}; shift if [[ -n ${euid} && ${euid} != -1 ]] ; then if [[ ${euid} -gt 0 ]] ; then if [[ -n $(egetent passwd ${euid}) ]] ; then @@ -139,7 +142,7 @@ enewuser() { elog " - Userid: ${euid}" # handle shell - local eshell=$1; shift + 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!" @@ -156,7 +159,7 @@ enewuser() { opts+=( -s "${eshell}" ) # handle homedir - local ehome=$1; shift + local ehome=${1}; shift if [[ -z ${ehome} ]] || [[ ${ehome} == "-1" ]] ; then ehome="/dev/null" fi @@ -164,7 +167,7 @@ enewuser() { opts+=( -d "${ehome}" ) # handle groups - local egroups=$1; shift + local egroups=${1}; shift local g egroups_arr IFS="," read -r -a egroups_arr <<<"${egroups}" if [[ ${#egroups_arr[@]} -gt 0 ]] ; then @@ -243,8 +246,8 @@ enewgroup() { _assert_pkg_ebuild_phase ${FUNCNAME} local force_gid= - while [[ $1 == -* ]]; do - case $1 in + while [[ ${1} == -* ]]; do + case ${1} in -F) force_gid=1;; *) die "${FUNCNAME}: invalid option ${1}";; esac @@ -252,7 +255,7 @@ enewgroup() { done # get the group - local egroup=$1; shift + local egroup=${1}; shift if [[ -z ${egroup} ]] ; then eerror "No group specified!" die "Cannot call enewgroup without a group" @@ -265,7 +268,7 @@ enewgroup() { elog "Adding group '${egroup}' to your system ..." # handle gid - local egid=$1; shift + local egid=${1}; shift if [[ -n ${egid} && ${egid} != -1 ]] ; then if [[ ${egid} -gt 0 ]] ; then if [[ -n $(egetent group ${egid}) ]] ; then @@ -337,7 +340,7 @@ esethome() { _assert_pkg_ebuild_phase ${FUNCNAME} # get the username - local euser=$1; shift + local euser=${1}; shift if [[ -z ${euser} ]] ; then eerror "No username specified!" die "Cannot call esethome without a username" @@ -350,7 +353,7 @@ esethome() { fi # handle homedir - local ehome=$1; shift + local ehome=${1}; shift if [[ -z ${ehome} ]] ; then eerror "No home directory specified!" die "Cannot call esethome without a home directory or '-1'" @@ -406,7 +409,7 @@ esetshell() { _assert_pkg_ebuild_phase ${FUNCNAME} # get the username - local euser=$1; shift + local euser=${1}; shift if [[ -z ${euser} ]] ; then eerror "No username specified!" die "Cannot call esetshell without a username" @@ -419,7 +422,7 @@ esetshell() { fi # handle shell - local eshell=$1; shift + local eshell=${1}; shift if [[ -z ${eshell} ]] ; then eerror "No shell specified!" die "Cannot call esetshell without a shell or '-1'" @@ -466,7 +469,7 @@ esetcomment() { _assert_pkg_ebuild_phase ${FUNCNAME} # get the username - local euser=$1; shift + local euser=${1}; shift if [[ -z ${euser} ]] ; then eerror "No username specified!" die "Cannot call esetcomment without a username" @@ -479,7 +482,7 @@ esetcomment() { fi # handle comment - local ecomment=$1; shift + local ecomment=${1}; shift if [[ -z ${ecomment} ]] ; then eerror "No comment specified!" die "Cannot call esetcomment without a comment" @@ -525,7 +528,7 @@ esetgroups() { [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <user> <groups>" # get the username - local euser=$1; shift + local euser=${1}; shift # lets see if the username already exists if [[ -z $(egetent passwd "${euser}") ]] ; then @@ -534,7 +537,7 @@ esetgroups() { fi # handle group - local egroups=$1; shift + local egroups=${1}; shift local g egroups_arr=() IFS="," read -r -a egroups_arr <<<"${egroups}" diff --git a/eclass/vala.eclass b/eclass/vala.eclass index 4bf15eae2684..59b5f671c5d4 100644 --- a/eclass/vala.eclass +++ b/eclass/vala.eclass @@ -6,7 +6,7 @@ # gnome@gentoo.org # @AUTHOR: # Alexandre Rostovtsev <tetromino@gentoo.org> -# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Sets up the environment for using a specific version of vala. # @DESCRIPTION: # This eclass sets up commonly used environment variables for using a specific @@ -16,14 +16,16 @@ # # This eclass provides one phase function: src_prepare. -inherit eutils multilib - -case "${EAPI:-0}" in - 0) die "EAPI=0 is not supported" ;; - 1) ;; - *) EXPORT_FUNCTIONS src_prepare ;; +case ${EAPI:-0} in + [67]) inherit eutils multilib ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +EXPORT_FUNCTIONS src_prepare + +if [[ -z ${_VALA_ECLASS} ]] ; then +_VALA_ECLASS=1 + # @ECLASS-VARIABLE: VALA_MIN_API_VERSION # @DESCRIPTION: # Minimum vala API version (e.g. 0.36). @@ -61,6 +63,9 @@ vala_api_versions() { done } +# @FUNCTION: _vala_use_depend +# @INTERNAL +# @DESCRIPTION: # Outputs VALA_USE_DEPEND as a a USE-dependency string _vala_use_depend() { local u="" vala_use @@ -170,3 +175,5 @@ vala_src_prepare() { : ${PKG_CONFIG_PATH:="${EPREFIX}/usr/$(get_libdir)/pkgconfig:${EPREFIX}/usr/share/pkgconfig"} export PKG_CONFIG_PATH="${T}/pkgconfig:${PKG_CONFIG_PATH}" } + +fi diff --git a/eclass/vcs-clean.eclass b/eclass/vcs-clean.eclass index 649a9e3039b1..89f6b7321879 100644 --- a/eclass/vcs-clean.eclass +++ b/eclass/vcs-clean.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: vcs-clean.eclass @@ -6,8 +6,17 @@ # base-system@gentoo.org # @AUTHOR: # Benedikt Böhm <hollow@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: helper functions to remove VCS directories +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_VCS_CLEAN_ECLASS} ]] ; then +_VCS_CLEAN_ECLASS=1 + # @FUNCTION: ecvs_clean # @USAGE: [list of dirs] # @DESCRIPTION: @@ -38,3 +47,5 @@ egit_clean() { [[ $# -eq 0 ]] && set -- . find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + } + +fi diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass index 70a6e943e85f..ba9d00f4f5e8 100644 --- a/eclass/vim-doc.eclass +++ b/eclass/vim-doc.eclass @@ -1,6 +1,12 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# + +# @ECLASS: vim-doc.eclass +# @MAINTAINER: +# vim@gentoo.org +# @SUPPORTED_EAPIS: 6 7 +# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags. +# @DESCRIPTION: # This eclass is used by vim.eclass and vim-plugin.eclass to update # the documentation tags. This is necessary since vim doesn't look in # /usr/share/vim/vimfiles/doc for documentation; it only uses the @@ -10,9 +16,15 @@ # DEPEND in vim-plugin or by whatever version of vim is being # installed by the eclass. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_VIM_DOC_ECLASS} ]] ; then +_VIM_DOC_ECLASS=1 update_vim_helptags() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}" local vimfiles vim d s # This is where vim plugins are installed @@ -70,3 +82,5 @@ update_vim_helptags() { [[ -n "${vim}" && -f "${vim}" ]] && rm "${vim}" } + +fi diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass index baf77221bc97..54bf6b879f7b 100644 --- a/eclass/vim-spell.eclass +++ b/eclass/vim-spell.eclass @@ -6,6 +6,7 @@ # Vim Maintainers <vim@gentoo.org> # @AUTHOR: # Ciaran McCreesh <ciaranm@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Eclass for managing Vim spell files. # @DESCRIPTION: # How to make a vim spell file package using prebuilt spell lists @@ -62,8 +63,16 @@ # spell files. It's best to let upstream know if you've generated spell files # for another language rather than keeping them Gentoo-specific. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + EXPORT_FUNCTIONS src_install pkg_postinst +if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then +_VIM_SPELL_ECLASS=1 + SRC_URI="mirror://gentoo/${P}.tar.bz2" SLOT="0" @@ -128,7 +137,6 @@ vim-spell_src_install() { # @DESCRIPTION: # This function displays installed Vim spell files. vim-spell_pkg_postinst() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}" echo elog "To enable ${VIM_SPELL_LANGUAGE} spell checking, use" elog " :setlocal spell spelllang=${VIM_SPELL_LOCALE}" @@ -147,3 +155,5 @@ vim-spell_pkg_postinst() { elog " :help spell" echo } + +fi diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 5218706a1ab7..411b19fcb71c 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -8,18 +8,17 @@ # Original Author: Gilles Dartiguelongue <eva@gentoo.org> # Various improvements based on cmake-utils.eclass: Tomáš Chvátal <scarabeus@gentoo.org> # Proper prefix support: Jonathan Callen <jcallen@gentoo.org> -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @BLURB: common ebuild functions for waf-based packages # @DESCRIPTION: # The waf-utils eclass contains functions that make creating ebuild for # waf-based packages much easier. # Its main features are support of common portage default settings. -[[ ${EAPI} == [45] ]] && inherit eutils inherit multilib toolchain-funcs multiprocessing case ${EAPI:-0} in - 4|5|6|7) EXPORT_FUNCTIONS src_configure src_compile src_install ;; + 6|7) EXPORT_FUNCTIONS src_configure src_compile src_install ;; *) die "EAPI=${EAPI} is not supported" ;; esac diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass index 6907ef1c321d..5ef7dbce03cf 100644 --- a/eclass/webapp.eclass +++ b/eclass/webapp.eclass @@ -4,11 +4,22 @@ # @ECLASS: webapp.eclass # @MAINTAINER: # web-apps@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: functions for installing applications to run under a web server # @DESCRIPTION: # The webapp eclass contains functions to handle web applications with # webapp-config. Part of the implementation of GLEP #11 +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm + +if [[ -z ${_WEBAPP_ECLASS} ]]; then +_WEBAPP_ECLASS=1 + # @ECLASS-VARIABLE: WEBAPP_DEPEND # @DESCRIPTION: # An ebuild should use WEBAPP_DEPEND if a custom DEPEND needs to be built, most @@ -35,8 +46,6 @@ if [[ "${WEBAPP_OPTIONAL}" != "yes" ]]; then RDEPEND="${DEPEND}" fi -EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm - INSTALL_DIR="/${PN}" IS_UPGRADE=0 IS_REPLACE=0 @@ -577,3 +586,5 @@ webapp_pkg_prerm() { echo fi } + +fi diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass index 372e4c5301cf..99c6b63014c7 100644 --- a/eclass/xemacs-packages.eclass +++ b/eclass/xemacs-packages.eclass @@ -4,6 +4,7 @@ # @ECLASS: xemacs-packages.eclass # @MAINTAINER: # xemacs@gentoo.org +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Eclass to support elisp packages distributed by XEmacs. # @DESCRIPTION: # This eclass supports ebuilds for packages distributed by XEmacs. @@ -23,8 +24,16 @@ # in the experimental repository are auto-generated from XEmacs VCS, so # they may not be well-tested. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + EXPORT_FUNCTIONS src_unpack src_install +if [[ -z ${_XEMACS_PACKAGES_ECLASS} ]] ; then +_XEMACS_PACKAGES_ECLASS=1 + RDEPEND="app-editors/xemacs" S="${WORKDIR}" @@ -55,6 +64,8 @@ xemacs-packages_src_install() { debug-print "install_dir is ${install_dir}" dodir "${install_dir}" - cd "${D}${EPREFIX}${install_dir}" || die + cd "${ED}${install_dir}" || die unpack ${A} } + +fi |