Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 14 Aug 2019 04:08:21
Message-Id: 1565755674.b73091c3ba676d43eb42c3d0e99d89aac7a9b2b5.mattst88@gentoo
commit:     b73091c3ba676d43eb42c3d0e99d89aac7a9b2b5
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 22:10:34 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Aug 14 04:07:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b73091c3

xorg-3.eclass: Add XORG_TARBALL_SUFFIX

To allow overriding the tarball type.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 eclass/xorg-3.eclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index f135058fba6..217aadecb3b 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -89,10 +89,16 @@ 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"}
+
 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}