kde-plasma/breeze-gtk: x86 stable wrt bug #613144
[gentoo.git] / eclass / leechcraft.eclass
1 # Copyright 1999-2015 Gentoo Foundation
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 # @BLURB: Common functions and setup utilities for the LeechCraft app
11 # @DESCRIPTION:
12 # The leechcraft eclass contains a common set of functions and steps
13 # needed to build LeechCraft core or its plugins.
14 #
15 # Though this eclass seems to be small at the moment, it seems like a
16 # good idea to make all plugins inherit from it, since all plugins
17 # have mostly the same configuring/build process.
18 #
19 # Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
20 #
21 # Only EAPI >4 supported
22
23 case ${EAPI:-0} in
24         6) ;;
25         *) die "EAPI not supported, bug ebuild mantainer" ;;
26 esac
27
28 inherit cmake-utils
29
30 if [[ ${PV} == 9999 ]]; then
31         EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git
32                        https://github.com/0xd34df00d/leechcraft.git"
33
34         inherit git-r3
35 else
36         DEPEND="app-arch/xz-utils"
37         SRC_URI="https://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
38         S="${WORKDIR}/leechcraft-${PV}"
39 fi
40
41 HOMEPAGE="https://leechcraft.org/"
42 LICENSE="Boost-1.0"
43
44 # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
45 # @DEFAULT_UNSET
46 # @DESCRIPTION:
47 # Set this to the category of the plugin, if any.
48 : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
49
50 if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
51         CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
52 elif [[ ${PN} != lc-core ]]; then
53         CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
54 else
55         CMAKE_USE_DIR="${S}"/src
56 fi