meson.eclass: Don't mix host *FLAGS with build *FLAGS
[gentoo.git] / eclass / mate-desktop.org.eclass
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: mate-desktop.org.eclass
5 # @MAINTAINER:
6 # mate@gentoo.org
7 # @AUTHOR:
8 # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
9 # @BLURB: Helper eclass for mate-desktop.org hosted archives
10 # @DESCRIPTION:
11 # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
12 # exporting some useful values like the MATE_BRANCH
13
14 # EAPIs < 6 are banned.
15 case "${EAPI:-0}" in
16         6) ;;
17         *) die "EAPI=${EAPI:-0} is not supported" ;;
18 esac
19
20 if [[ ${PV} == 9999 ]]; then
21         inherit git-r3
22 fi
23
24 inherit versionator
25
26 # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
27 # @INTERNAL
28 # @DESCRIPTION:
29 # All projects hosted on mate-desktop.org provide tarballs as tar.xz.
30 # Undefined in live ebuilds.
31 [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"}
32
33 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
34 # @DESCRIPTION:
35 # Name of the package as hosted on mate-desktop.org.
36 # Leave unset if package name matches PN.
37 : ${MATE_DESKTOP_ORG_PN:=$PN}
38
39 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
40 # @DESCRIPTION:
41 # Package version string as listed on mate-desktop.org.
42 # Leave unset if package version string matches PV.
43 : ${MATE_DESKTOP_ORG_PV:=$PV}
44
45 # @ECLASS-VARIABLE: MATE_BRANCH
46 # @DESCRIPTION:
47 # Major and minor numbers of the version number, unless live.
48 # If live ebuild, will be set to '9999'.
49 : ${MATE_BRANCH:=$(get_version_component_range 1-2)}
50
51 # Set SRC_URI or EGIT_REPO_URI based on whether live
52 if [[ ${PV} == 9999 ]]; then
53         EGIT_REPO_URI="https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git"
54         SRC_URI=""
55 else
56         SRC_URI="https://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
57 fi
58
59 # Set HOMEPAGE for all ebuilds
60 HOMEPAGE="https://mate-desktop.org"