media-fonts/noto-emoji: add ~ppc64 keyword
[gentoo.git] / eclass / leechcraft.eclass
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3 #
4 # @ECLASS: leechcraft.eclass
5 # @MAINTAINER:
6 # 0xd34df00d@gmail.com
7 # @AUTHOR:
8 # 0xd34df00d@gmail.com
9 # NightNord@niifaq.ru
10 # @SUPPORTED_EAPIS: 6 7
11 # @BLURB: Common functions and setup utilities for the LeechCraft app
12 # @DESCRIPTION:
13 # The leechcraft eclass contains a common set of functions and steps
14 # needed to build LeechCraft core or its plugins.
15 #
16 # Though this eclass seems to be small at the moment, it seems like a
17 # good idea to make all plugins inherit from it, since all plugins
18 # have mostly the same configuring/build process.
19 #
20 # Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
21 #
22 # Only EAPI >=6 is supported
23
24 case ${EAPI:-0} in
25         6) inherit cmake-utils ;;
26         7) inherit cmake ;;
27         *) die "EAPI not supported, bug ebuild mantainer" ;;
28 esac
29
30 if [[ ${PV} == 9999 ]]; then
31         EGIT_REPO_URI="https://github.com/0xd34df00d/leechcraft.git"
32
33         inherit git-r3
34 else
35         SRC_URI="https://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
36         S="${WORKDIR}/leechcraft-${PV}"
37 fi
38
39 HOMEPAGE="https://leechcraft.org/"
40 LICENSE="Boost-1.0"
41
42 DEPEND="
43         dev-qt/qtcore:5
44         dev-qt/qtgui:5
45 "
46 RDEPEND="${DEPEND}"
47
48 # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
49 # @DEFAULT_UNSET
50 # @DESCRIPTION:
51 # Set this to the category of the plugin, if any.
52 : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
53
54 if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
55         CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
56 elif [[ ${PN} != lc-core ]]; then
57         CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
58 else
59         CMAKE_USE_DIR="${S}"/src
60 fi