To allow overriding the tarball type. Signed-off-by: Matt Turner <matts...@gentoo.org> --- eclass/xorg-3.eclass | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass index f135058fba6..bd857e1cca2 100644 --- a/eclass/xorg-3.eclass +++ b/eclass/xorg-3.eclass @@ -89,10 +89,26 @@ fi HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" +# @ECLASS-VARIABLE: XORG_TARBALL_SUFFIX +# @DESCRIPTION: +# Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults +# to bz2. +: ${XORG_TARBALL_SUFFIX:="bz2"} + +# 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 [[ ${XORG_TARBALL_SUFFIX} == "xz" ]]; then + if [[ ${EAPI:-0} != [0123456] ]]; then + BDEPEND="app-arch/xz-utils" + else + DEPEND="app-arch/xz-utils" + fi +fi + if [[ -n ${GIT_ECLASS} ]]; then : ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"} elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then - SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" + SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.${XORG_TARBALL_SUFFIX}" fi : ${SLOT:=0} -- 2.21.0