summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2021-06-20 21:40:58 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2021-06-20 21:40:58 +0000
commit92c8abfefe98b78772e6b577bcd99fba2721ff74 (patch)
tree4ef7bea4fc0675d54e1ebc7845e067f2327cde2d
parent2021-06-20 21:20:07 UTC (diff)
parentnet-im/ysm: fix WhitespaceFound (diff)
downloadgentoo-92c8abfefe98b78772e6b577bcd99fba2721ff74.tar.gz
gentoo-92c8abfefe98b78772e6b577bcd99fba2721ff74.tar.bz2
gentoo-92c8abfefe98b78772e6b577bcd99fba2721ff74.zip
Merge updates from master
-rw-r--r--eclass/alternatives.eclass17
-rw-r--r--eclass/apache-module.eclass13
-rw-r--r--eclass/chromium-2.eclass20
-rw-r--r--eclass/common-lisp-3.eclass14
-rw-r--r--eclass/cron.eclass18
-rw-r--r--eclass/dotnet.eclass15
-rw-r--r--eclass/eutils.eclass30
-rw-r--r--eclass/fortran-2.eclass7
-rw-r--r--eclass/gnome.org.eclass26
-rw-r--r--eclass/gnustep-2.eclass26
-rw-r--r--eclass/gnustep-base.eclass27
-rw-r--r--eclass/java-ant-2.eclass18
-rw-r--r--eclass/java-osgi.eclass11
-rw-r--r--eclass/java-pkg-2.eclass17
-rw-r--r--eclass/java-pkg-opt-2.eclass20
-rw-r--r--eclass/java-pkg-simple.eclass15
-rw-r--r--eclass/java-utils-2.eclass41
-rw-r--r--eclass/java-virtuals-2.eclass17
-rw-r--r--eclass/l10n.eclass8
-rw-r--r--eclass/linux-mod.eclass16
-rw-r--r--eclass/mercurial.eclass21
-rw-r--r--eclass/mono-env.eclass12
-rw-r--r--eclass/mono.eclass11
-rw-r--r--eclass/multilib.eclass10
-rw-r--r--eclass/multiprocessing.eclass8
-rw-r--r--eclass/openib.eclass11
-rw-r--r--eclass/optfeature.eclass1
-rw-r--r--eclass/pam.eclass6
-rw-r--r--eclass/pax-utils.eclass6
-rw-r--r--eclass/php-ext-pecl-r3.eclass15
-rw-r--r--eclass/portability.eclass6
-rw-r--r--eclass/prefix.eclass13
-rw-r--r--eclass/preserve-libs.eclass8
-rw-r--r--eclass/qmail.eclass11
-rw-r--r--eclass/ros-catkin.eclass9
-rw-r--r--eclass/rpm.eclass17
-rw-r--r--eclass/ruby-utils.eclass7
-rw-r--r--eclass/stardict.eclass42
-rw-r--r--eclass/toolchain-funcs.eclass6
-rw-r--r--eclass/unpacker.eclass6
-rw-r--r--eclass/user-info.eclass8
-rw-r--r--eclass/user.eclass1
-rw-r--r--eclass/vala.eclass18
-rw-r--r--eclass/vcs-clean.eclass13
-rw-r--r--eclass/vim-doc.eclass20
-rw-r--r--eclass/vim-spell.eclass12
-rw-r--r--eclass/waf-utils.eclass5
-rw-r--r--eclass/webapp.eclass15
-rw-r--r--eclass/xemacs-packages.eclass13
-rw-r--r--net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch17
-rw-r--r--net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch17
-rw-r--r--net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch163
-rw-r--r--net-im/ysm/ysm-2.9.9.1-r1.ebuild25
-rw-r--r--net-im/ysm/ysm-2.9.9.1-r2.ebuild46
54 files changed, 764 insertions, 211 deletions
diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
index e83326314261..86adc87b6f4c 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:
@@ -54,7 +65,6 @@
# @DESCRIPTION:
# automatic deduction 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
@@ -75,7 +85,6 @@ alternatives_auto_makesym() {
}
alternatives_makesym() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
local ALTERNATIVES=""
local SYMLINK=""
local alt pref
@@ -123,7 +132,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 +150,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/chromium-2.eclass b/eclass/chromium-2.eclass
index b3d63f302d05..b8dae862dfea 100644
--- a/eclass/chromium-2.eclass
+++ b/eclass/chromium-2.eclass
@@ -1,14 +1,22 @@
-# 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>
# @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 +27,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 +50,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 +180,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..eb02ae59c86e 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -9,8 +9,18 @@
# 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 +46,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 +243,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..337352b4e285 100644
--- a/eclass/cron.eclass
+++ b/eclass/cron.eclass
@@ -15,15 +15,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 +46,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 +79,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 +109,6 @@ docron() {
# Install crontab executable
#
# Uses same semantics as docron.
-
docrontab() {
local crontab="crontab" perms="-m 4750 -o root -g cron"
@@ -157,3 +159,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..1af5fbda513f 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,7 +24,7 @@ _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
;;
@@ -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/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/gnome.org.eclass b/eclass/gnome.org.eclass
index 2b740561ba5b..3c244adef000 100644
--- a/eclass/gnome.org.eclass
+++ b/eclass/gnome.org.eclass
@@ -8,29 +8,33 @@
# Authors: Spidler <spidler@gentoo.org> with help of carparski.
# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
# @BLURB: Helper eclass for gnome.org hosted archives
+# @SUPPORTED_EAPIS: 5 6 7
# @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..9a7e97a97eda 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -8,6 +8,7 @@
# kiorky <kiorky@cryptelium.net>
# Petteri Räty <betelgeuse@gentoo.org>
# @BLURB: eclass for ant based Java packages
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# Eclass for Ant-based Java packages. Provides support for both automatic and
# manual manipulation of build.xml files. Should be inherited after java-pkg-2
@@ -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..69f8f90d0ae3 100644
--- a/eclass/java-osgi.eclass
+++ b/eclass/java-osgi.eclass
@@ -7,12 +7,21 @@
# @AUTHOR:
# Java maintainers <java@gentoo.org>
# @BLURB: Java OSGi eclass
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass provides functionality which is used by packages that need to be
# OSGi compliant. This means that the generated jars will have special headers
# 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..362e5f47d66a 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -7,10 +7,21 @@
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>
# @BLURB: Eclass for Java Packages
+# @SUPPORTED_EAPIS: 5 6 7
# @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..7733fc7afd11 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
@@ -7,10 +7,21 @@
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>
# @BLURB: Eclass for package with optional Java support
+# @SUPPORTED_EAPIS: 5 6 7
# @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..afd2f92f5332 100644
--- a/eclass/java-pkg-simple.eclass
+++ b/eclass/java-pkg-simple.eclass
@@ -7,6 +7,7 @@
# @AUTHOR:
# Java maintainers <java@gentoo.org>
# @BLURB: Eclass for packaging Java software with ease.
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This class is intended to build pure Java packages from Java sources
# without the use of any build instructions shipped with the 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..da5f91505129 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -7,6 +7,7 @@
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>, Karl Trygve Kalleberg <karltk@gentoo.org>
# @BLURB: Base eclass for Java packages
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass provides functionality which is used by java-pkg-2.eclass,
# java-pkg-opt-2.eclass and java-ant-2 eclass, as well as from ebuilds.
@@ -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..d511682c26ac 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
@@ -7,10 +7,21 @@
# @AUTHOR:
# Original Author: Alistair John Bush <ali_bush@gentoo.org>
# @BLURB: Java virtuals eclass
+# @SUPPORTED_EAPIS: 5 6
# @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..878879e5e57a 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
@@ -7,6 +7,7 @@
# @AUTHOR:
# Ben de Groot <yngwin@gentoo.org>
# @BLURB: convenience functions to handle localizations
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# The l10n (localization) eclass offers a number of functions to more
# conveniently handle localizations (translations) offered by packages.
@@ -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..10a8413357a4 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -8,6 +8,7 @@
# John Mylchreest <johnm@gentoo.org>,
# Stefan Schweizer <genstef@gentoo.org>
# @BLURB: It provides the functionality required to install external modules against a kernel source tree.
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass is used to interface with linux-info.eclass in such a way
# to provide the functionality and initial functions
@@ -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/mercurial.eclass b/eclass/mercurial.eclass
index dc0d19f59ae2..1f4ae2c3b482 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -8,19 +8,34 @@
# Next gen author: Krzysztof Pawlik <nelchael@gentoo.org>
# Original author: Aron Griffis <agriffis@gentoo.org>
# @BLURB: This eclass provides generic mercurial fetching functions
+# @SUPPORTED_EAPIS: 7
# @DESCRIPTION:
# This eclass provides generic mercurial fetching functions. To fetch sources
# from mercurial repository just set EHG_REPO_URI to correct repository URI. If
# 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..46a25fb98893 100644
--- a/eclass/mono-env.eclass
+++ b/eclass/mono-env.eclass
@@ -5,14 +5,21 @@
# @MAINTAINER:
# maintainer-needed@gentoo.org
# @BLURB: Set environment variables commonly used by dotnet packages.
+# @SUPPORTED_EAPIS: 5 6 7
# @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..744b8099fe17 100644
--- a/eclass/mono.eclass
+++ b/eclass/mono.eclass
@@ -6,12 +6,21 @@
# maintainer-needed@gentoo.org
# @BLURB: common settings and functions for mono and dotnet related packages
# @DEPRECATED: mono-env
+# @SUPPORTED_EAPIS: 7
# @DESCRIPTION:
# The mono eclass contains common environment settings that are useful for
# dotnet packages. Currently, it provides no functions, just exports
# 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..4e3baa7188e4 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -1,13 +1,19 @@
-# 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
# @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass is for all functions pertaining to handling multilib configurations.
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_MULTILIB_ECLASS} ]]; then
_MULTILIB_ECLASS=1
@@ -47,7 +53,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} == 5 ]] ; then
get_libdir() {
local CONF_LIBDIR
if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then
diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclass
index 3e8b2f9d2540..8363fa33bd12 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
@@ -8,6 +8,7 @@
# Brian Harring <ferringb@gentoo.org>
# Mike Frysinger <vapier@gentoo.org>
# @BLURB: multiprocessing helper functions
+# @SUPPORTED_EAPIS: 5 6 7 8
# @DESCRIPTION:
# The multiprocessing eclass contains a suite of utility functions
# that could be helpful to controlling parallel multiple job execution.
@@ -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..8fb0c782ea44 100644
--- a/eclass/openib.eclass
+++ b/eclass/openib.eclass
@@ -7,11 +7,18 @@
# @AUTHOR:
# Author: Alexey Shvetsov <alexxy@gentoo.org>
# @BLURB: Simplify working with OFED packages
+# @SUPPORTED_EAPIS: 5 6
-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..ef69335d6a0b 100644
--- a/eclass/optfeature.eclass
+++ b/eclass/optfeature.eclass
@@ -5,6 +5,7 @@
# @MAINTAINER:
# base-system@gentoo.org
# @BLURB: Advertise optional functionality that might be useful to users
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
case ${EAPI:-0} in
[0-7]) ;;
diff --git a/eclass/pam.eclass b/eclass/pam.eclass
index c9de612469b1..642595f9b2f9 100644
--- a/eclass/pam.eclass
+++ b/eclass/pam.eclass
@@ -7,10 +7,16 @@
# @AUTHOR:
# Diego Pettenò <flameeyes@gentoo.org>
# @BLURB: Handles pam related tasks
+# @SUPPORTED_EAPIS: 5 6 7
# @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..1b3fa65d1319 100644
--- a/eclass/pax-utils.eclass
+++ b/eclass/pax-utils.eclass
@@ -8,6 +8,7 @@
# Author: Kevin F. Quinn <kevquinn@gentoo.org>
# Author: Anthony G. Basile <blueness@gentoo.org>
# @BLURB: functions to provide PaX markings for hardened kernels
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
#
# This eclass provides support for manipulating PaX markings on ELF binaries,
@@ -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/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass
index 19040a7e762b..eaf20e026f90 100644
--- a/eclass/php-ext-pecl-r3.eclass
+++ b/eclass/php-ext-pecl-r3.eclass
@@ -5,11 +5,22 @@
# @MAINTAINER:
# Gentoo PHP team <php-bugs@gentoo.org>
# @BLURB: A uniform way to install PECL extensions
+# @SUPPORTED_EAPIS: 6 7
# @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..1b3c3952f831 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -7,6 +7,12 @@
# @AUTHOR:
# Diego Pettenò <flameeyes@gentoo.org>
# @BLURB: This eclass is created to avoid using non-portable GNUisms inside ebuilds
+# @SUPPORTED_EAPIS: 5 6 7
+
+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..febdb7afeccb 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.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: prefix.eclass
@@ -6,11 +6,20 @@
# Feel free to contact the Prefix team through <prefix@gentoo.org> if
# you have problems, suggestions or questions.
# @BLURB: Eclass to provide Prefix functionality
+# @SUPPORTED_EAPIS: 5 6 7
# @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..8b2daf3e7f20 100644
--- a/eclass/preserve-libs.eclass
+++ b/eclass/preserve-libs.eclass
@@ -1,10 +1,16 @@
-# 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
# @BLURB: preserve libraries after SONAME changes
+# @SUPPORTED_EAPIS: 5 6 7
+
+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..92df9ad28fc5 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -5,6 +5,15 @@
# @MAINTAINER:
# Rolf Eike Beer <eike@sf-mail.de>
# @BLURB: common qmail functions
+# @SUPPORTED_EAPIS: 6 7
+
+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
@@ -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..19a89a3c0cbd 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
# @BLURB: convenience class for extracting RPMs
+# @SUPPORTED_EAPIS: 5 6 7
-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..82e09cf49cb2 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
@@ -7,6 +7,7 @@
# @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org>
# @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# The ruby-utils eclass is designed to allow an easier installation of
# Ruby scripts and bindings for non-ruby packages.
@@ -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/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 267cf5cfce34..6806bd0883bb 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -5,6 +5,7 @@
# @MAINTAINER:
# Toolchain Ninjas <toolchain@gentoo.org>
# @BLURB: functions to query common info about the toolchain
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# The toolchain-funcs aims to provide a complete suite of functions
# for gleaning useful information about the toolchain and to simplify
@@ -12,6 +13,11 @@
# in such a way that you can rely on the function always returning
# something sane.
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then
_TOOLCHAIN_FUNCS_ECLASS=1
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index d01a6e8e648a..b8a40cc682e0 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -5,6 +5,7 @@
# @MAINTAINER:
# base-system@gentoo.org
# @BLURB: helpers for extraneous file formats and consistent behavior across EAPIs
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# Some extraneous file formats are not part of PMS, or are only in certain
# EAPIs. Rather than worrying about that, support the crazy cruft here
@@ -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..ef89c065bd80 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -6,6 +6,7 @@
# base-system@gentoo.org (Linux)
# Michał Górny <mgorny@gentoo.org> (NetBSD)
# @BLURB: user management in ebuilds
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @DEPRECATED: acct-user/acct-group packages
# @DESCRIPTION:
# The user eclass contains a suite of functions that allow ebuilds
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 4bf15eae2684..eb6abc741e83 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).
@@ -170,3 +172,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
diff --git a/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch b/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch
new file mode 100644
index 000000000000..dd84db69b462
--- /dev/null
+++ b/net-im/ysm/files/ysm-2.9.9.1-dont-strip-binary.patch
@@ -0,0 +1,17 @@
+From bcdc0714b9dcd08714374aa83ab112f1da0600a7 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 21 Apr 2021 00:45:47 +0000
+Subject: [PATCH 2/2] Don't strip binary
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -53,7 +53,7 @@ install-prog:
+ @if [ -f "$(DESTDIR)$(bindir)/$(PROG)" ]; then \
+ mv -f "$(DESTDIR)$(bindir)/$(PROG)" "$(DESTDIR)$(bindir)/$(PROG).old"; \
+ fi
+- $(INSTALL) -s $(PROG) $(DESTDIR)$(bindir)/ ;
++ $(INSTALL) $(PROG) $(DESTDIR)$(bindir)/ ;
+
+ @echo -e \
+ " **********************************************************\n"\
+--
diff --git a/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch b/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch
new file mode 100644
index 000000000000..dcfeecb04c82
--- /dev/null
+++ b/net-im/ysm/files/ysm-2.9.9.1-fix-bashism.patch
@@ -0,0 +1,17 @@
+From 52470a9be22fb4f8b6092e744c324ba691aff583 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 21 Apr 2021 00:45:27 +0000
+Subject: [PATCH 1/2] Fix bashism
+
+--- a/configure.in
++++ b/configure.in
+@@ -94,7 +94,7 @@ AC_CHECK_LIB([nsl],
+
+ # final checks
+
+-if test "$vl_cv_lib_readline" == "no"; then
++if test "$vl_cv_lib_readline" = "xno"; then
+ # are we using getline instead? do we have threads?
+ if test "$pthread_libs"; then
+ CMDOBJS="cmdline/getline.o $CMDOBJS"
+--
diff --git a/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch b/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch
new file mode 100644
index 000000000000..cda0654e8e38
--- /dev/null
+++ b/net-im/ysm/files/ysm-2.9.9.1-fix-configure.patch
@@ -0,0 +1,163 @@
+From d86f720bf221d713243e60147c412c05696bae7a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 21 Apr 2021 01:16:11 +0000
+Subject: [PATCH] Rewrite configure.ac
+
+First cut at rewriting the configure script to use standard macros. Couldn't
+find the macros referred to in the original and they were non-standard anyway.
+
+First noticed when fixing a Bashism.
+---
+ configure.in | 74 +++++++++++++++++--------------------------------
+ src/YSM_Setup.c | 3 +-
+ 2 files changed, 26 insertions(+), 51 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 767fb51..e9f4262 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1,4 +1,5 @@
+ AC_INIT(src/YSM_Main.c)
++
+ # give welcome
+ echo ""
+ echo ""
+@@ -11,32 +12,20 @@ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+
+-# check missing posix types
+-CHECK_POSIX_TYPES
+-
+-# enable command line options.
+-ac_arg_threads="no"
+-ac_arg_readline="no"
++AC_ARG_ENABLE([threads],
++ AS_HELP_STRING([--disable-threads], [Disable threads]))
+
+-AC_ARG_ENABLE([threads],
+- AC_HELP_STRING([--disable-threads],
+- [disable threads support]),
+- ac_arg_threads=$enableval, ac_arg_threads=yes)
+-
+-AC_ARG_ENABLE([readline],
+- AC_HELP_STRING([--disable-readline],
+- [do not try to use the readline library]),
+- ac_arg_readline=$enableval, ac_arg_readline=yes)
++AC_ARG_ENABLE([readline],
++ AS_HELP_STRING([--disable-readline], [Disable readline]))
+
+ ##### fribidi #####
+
+ AC_ARG_WITH(fribidi,
+ [ --with-fribidi=[DIR] enable the fribidi library in [DIR] to enable Hebrew and Arabic support],
+- [with_fribidi=$withval],
+- [with_fribidi=no])
++ [with_fribidi=$withval])
+
+-if test "$with_fribidi" = "yes"; then
+- for ac_dir in /usr/local /usr; do
++if test "x$with_fribidi" = "xyes"; then
++ for ac_dir in /usr /usr/local; do
+ if test -f "$ac_dir/include/fribidi/fribidi.h"; then
+ with_fribidi=$ac_dir
+ break;
+@@ -44,8 +33,8 @@ if test "$with_fribidi" = "yes"; then
+ done
+ fi
+
+-if test -n "$with_fribidi" -a "$with_fribidi" != "no"; then
+- if test "$with_fribidi" = "yes"; then with_fribidi="/usr"; fi
++if test -n "$with_fribidi" -a "x$with_fribidi" != "xno"; then
++ if test "x$with_fribidi" = "xyes"; then with_fribidi="/usr"; fi
+
+ if test -r $with_fribidi/include/fribidi/fribidi.h; then
+ LIBS="$LIBS `$with_fribidi/bin/fribidi-config --libs`"
+@@ -53,36 +42,23 @@ if test -n "$with_fribidi" -a "$with_fribidi" != "no"; then
+ fi
+ fi
+
+-##### fribidi #####
+-
+-AC_CACHE_CHECK([whether to enable threads support],
+- ac_arg_threads, ac_arg_threads)
+-
+-AC_CACHE_CHECK([whether to use the readline library],
+- ac_arg_readline, ac_arg_readline)
+-
+-
+ # only check for readline if we have threads support
+-if test "x$ac_arg_threads" = "xyes"; then
+- CHECK_POSIX_THREADS
++if test "x$enable_threads" != "xno"; then
++ AC_DEFINE([YSM_WITH_THREADS], [1], [Building with threads])
++
++ AX_PTHREAD
++ LIBS="$LIBS $PTHREAD_LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # check for readline if we have threads only
+- if test "$pthread_libs" != "no" && test "x$ac_arg_readline" = "xyes";
+- then
+- CHECK_READLINE
+- else
+- vl_cv_lib_readline="no"
++ if test "x$PTHREAD_LIBS" != "xno" -a "x$enable_readline" != "xno"; then
++ AX_LIB_READLINE
++ LIBS="$LIBS $READLINE_LIBS"
++ CFLAGS="$CFLAGS $READLINE_CFLAGS"
+ fi
+-else
+- vl_cv_lib_readline="no"
+ fi
+
+-
+-# check for iconv
+-CHECK_ICONV
+-
+-# check for setenv
+-CHECK_SETENV
++AM_ICONV
+
+ # check for sparc required libraries
+ AC_CHECK_LIB([socket],
+@@ -93,18 +69,18 @@ AC_CHECK_LIB([nsl],
+ LIBS="-lnsl $LIBS")
+
+ # final checks
+-
+-if test "$vl_cv_lib_readline" = "xno"; then
++if test "$enable_readline" = "xno"; then
+ # are we using getline instead? do we have threads?
+- if test "$pthread_libs"; then
++ if test "$PTHREAD_LIBS"; then
+ CMDOBJS="cmdline/getline.o $CMDOBJS"
+ else
+ # no threads, use ysmreadline!.
+ CMDOBJS="cmdline/ysmline.o $CMDOBJS"
+ fi
++else
++ AC_DEFINE([USE_READLINE], [1], [Using GNU Readline])
+ fi
+
+-AC_SUBST(pthread_libs)
+ AC_SUBST(CMDOBJS)
+ AC_STDC_HEADERS
+ AC_OUTPUT([Makefile src/Makefile src/man/Makefile])
+diff --git a/src/YSM_Setup.c b/src/YSM_Setup.c
+index d91c143..8436549 100644
+--- a/src/YSM_Setup.c
++++ b/src/YSM_Setup.c
+@@ -743,8 +743,7 @@ int tries = 0;
+ #define YSMOPENCONFIG(rwx) (fd = YSM_fopen(YSM_cfgfile,rwx))
+ #define YSMCLOSECONFIG() YSM_fclose(fd)
+
+-__inline void
+-CFGWRITE(FILE *fd, const u_int8_t *foo, ...)
++void CFGWRITE(FILE *fd, const u_int8_t *foo, ...)
+ {
+ va_list args;
+ va_start(args, foo);
+--
+2.31.1
+
diff --git a/net-im/ysm/ysm-2.9.9.1-r1.ebuild b/net-im/ysm/ysm-2.9.9.1-r1.ebuild
deleted file mode 100644
index 1cc3184874b7..000000000000
--- a/net-im/ysm/ysm-2.9.9.1-r1.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic versionator
-
-MY_PV="$(replace_all_version_separators _)"
-
-DESCRIPTION="A console ICQ client supporting versions 7/8"
-HOMEPAGE="http://ysmv7.sourceforge.net/"
-SRC_URI="mirror://sourceforge/ysmv7/${PN}v7_${MY_PV}.tar.bz2"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE=""
-RESTRICT="mirror"
-
-S=${WORKDIR}/${PN}v7_${MY_PV}
-
-src_prepare() {
- # fix bug 570408 by restoring pre-GCC5 inline semantics
- append-cflags -std=gnu89
- default
-}
diff --git a/net-im/ysm/ysm-2.9.9.1-r2.ebuild b/net-im/ysm/ysm-2.9.9.1-r2.ebuild
new file mode 100644
index 000000000000..c36878d19813
--- /dev/null
+++ b/net-im/ysm/ysm-2.9.9.1-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+MY_PV=$(ver_rs 1- _)
+
+DESCRIPTION="A console ICQ client supporting versions 7/8"
+HOMEPAGE="http://ysmv7.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ysmv7/${PN}v7_${MY_PV}.tar.bz2"
+S="${WORKDIR}"/${PN}v7_${MY_PV}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+RESTRICT="mirror"
+
+# Introduced by fix-configure.patch
+BDEPEND="sys-devel/autoconf-archive"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.9.9.1-dont-strip-binary.patch
+ "${FILESDIR}"/${PN}-2.9.9.1-fix-bashism.patch
+ "${FILESDIR}"/${PN}-2.9.9.1-fix-configure.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.{in,ac} || die
+
+ # Made obsolete by rewrite patch (fix-configure.patch)
+ rm aclocal.m4 || die
+
+ config_rpath_update .
+ eautoreconf
+}
+
+src_configure() {
+ # fix bug #570408 by restoring pre-GCC 5 inline semantics
+ append-cflags -std=gnu89
+
+ econf
+}