mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 17:06:58 +02:00
eclass/gnome.org: Sync with gentoo
It's from gentoo commit 40e43312a2c4ad1dc0692becfbeb7c165bb1ae14.
This commit is contained in:
parent
d465ce1bed
commit
ef98d2e473
@ -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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: gnome.org.eclass
|
# @ECLASS: gnome.org.eclass
|
||||||
@ -7,29 +7,34 @@
|
|||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Authors: Spidler <spidler@gentoo.org> with help of carparski.
|
# Authors: Spidler <spidler@gentoo.org> with help of carparski.
|
||||||
# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
|
# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
|
||||||
|
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||||
# @BLURB: Helper eclass for gnome.org hosted archives
|
# @BLURB: Helper eclass for gnome.org hosted archives
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
|
# Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
|
||||||
|
|
||||||
|
case ${EAPI} in
|
||||||
|
5|6|7|8) ;;
|
||||||
|
*) 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
|
# 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
|
# @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
|
||||||
|
# @PRE_INHERIT
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or
|
# 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
|
# tar.xz. This eclass defaults to xz. This is because the GNOME mirrors are
|
||||||
# everything else. This is because the gnome mirrors are moving to only have xz
|
# moving to only have xz tarballs for new releases.
|
||||||
# tarballs for new releases.
|
|
||||||
if has "${EAPI:-0}" 0 1 2 3; then
|
|
||||||
: ${GNOME_TARBALL_SUFFIX:="bz2"}
|
|
||||||
else
|
|
||||||
: ${GNOME_TARBALL_SUFFIX:="xz"}
|
: ${GNOME_TARBALL_SUFFIX:="xz"}
|
||||||
fi
|
|
||||||
|
|
||||||
# Even though xz-utils are in @system, they must still be added to DEPEND; see
|
# Even though xz-utils are in @system, they must still be added to BDEPEND; see
|
||||||
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
|
||||||
if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
|
if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
|
||||||
if [[ ${EAPI:-0} != [0123456] ]]; then
|
if [[ ${EAPI} != [56] ]]; then
|
||||||
BDEPEND="app-arch/xz-utils"
|
BDEPEND="app-arch/xz-utils"
|
||||||
else
|
else
|
||||||
DEPEND="app-arch/xz-utils"
|
DEPEND="app-arch/xz-utils"
|
||||||
@ -45,9 +50,15 @@ fi
|
|||||||
# @ECLASS-VARIABLE: GNOME_ORG_PVP
|
# @ECLASS-VARIABLE: GNOME_ORG_PVP
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Major and minor numbers of the version number.
|
# Components of the version number that correspond to a 6 month release.
|
||||||
|
if ver_test -ge 40.0; then
|
||||||
|
: ${GNOME_ORG_PVP:=$(ver_cut 1)}
|
||||||
|
else
|
||||||
: ${GNOME_ORG_PVP:=$(ver_cut 1-2)}
|
: ${GNOME_ORG_PVP:=$(ver_cut 1-2)}
|
||||||
|
fi
|
||||||
|
|
||||||
SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"
|
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}"
|
S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}"
|
||||||
|
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user