From: | Matt Turner <mattst88@g.o> |
---|---|
To: | gentoo-dev@l.g.o |
Cc: | Matt Turner <mattst88@g.o> |
Subject: | [gentoo-dev] [PATCH] xorg-3.eclass: Add XORG_TARBALL_SUFFIX |
Date: | Mon, 12 Aug 2019 22:12:49 |
Message-Id: | 20190812221222.21142-1-mattst88@gentoo.org |
1 | To allow overriding the tarball type. |
2 | |
3 | Signed-off-by: Matt Turner <mattst88@g.o> |
4 | --- |
5 | eclass/xorg-3.eclass | 18 +++++++++++++++++- |
6 | 1 file changed, 17 insertions(+), 1 deletion(-) |
7 | |
8 | diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass |
9 | index f135058fba6..bd857e1cca2 100644 |
10 | --- a/eclass/xorg-3.eclass |
11 | +++ b/eclass/xorg-3.eclass |
12 | @@ -89,10 +89,26 @@ fi |
13 | |
14 | HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" |
15 | |
16 | +# @ECLASS-VARIABLE: XORG_TARBALL_SUFFIX |
17 | +# @DESCRIPTION: |
18 | +# Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults |
19 | +# to bz2. |
20 | +: ${XORG_TARBALL_SUFFIX:="bz2"} |
21 | + |
22 | +# Even though xz-utils are in @system, they must still be added to DEPEND; see |
23 | +# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml |
24 | +if [[ ${XORG_TARBALL_SUFFIX} == "xz" ]]; then |
25 | + if [[ ${EAPI:-0} != [0123456] ]]; then |
26 | + BDEPEND="app-arch/xz-utils" |
27 | + else |
28 | + DEPEND="app-arch/xz-utils" |
29 | + fi |
30 | +fi |
31 | + |
32 | if [[ -n ${GIT_ECLASS} ]]; then |
33 | : ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"} |
34 | elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then |
35 | - SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" |
36 | + SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.${XORG_TARBALL_SUFFIX}" |
37 | fi |
38 | |
39 | : ${SLOT:=0} |
40 | -- |
41 | 2.21.0 |
Subject | Author |
---|---|
Re: [gentoo-dev] [PATCH] xorg-3.eclass: Add XORG_TARBALL_SUFFIX | Ulrich Mueller <ulm@g.o> |