summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:13:53 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:13:53 +0200
commitc7b8b92f58e15b41c63e6631091de63301f01fd1 (patch)
tree3b221c0bb33923c1b0d47d3c796c5c58ff4aea38 /eclass
parentfortran-2.eclass: [QA] drop EAPI 4 support (diff)
downloadgentoo-c7b8b92f58e15b41c63e6631091de63301f01fd1.tar.gz
gentoo-c7b8b92f58e15b41c63e6631091de63301f01fd1.tar.bz2
gentoo-c7b8b92f58e15b41c63e6631091de63301f01fd1.zip
gnome.org.eclass: [QA] add EAPI guard
Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gnome.org.eclass26
1 files changed, 16 insertions, 10 deletions
diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass
index 2b740561ba5..3c244adef00 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