1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 # @ECLASS: leechcraft.eclass
10 # @SUPPORTED_EAPIS: 6 7
11 # @BLURB: Common functions and setup utilities for the LeechCraft app
13 # The leechcraft eclass contains a common set of functions and steps
14 # needed to build LeechCraft core or its plugins.
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.
20 # Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
22 # Only EAPI >=6 is supported
26 *) die "EAPI not supported, bug ebuild mantainer" ;;
31 if [[ ${PV} == 9999 ]]; then
32 EGIT_REPO_URI="https://github.com/0xd34df00d/leechcraft.git"
36 DEPEND="app-arch/xz-utils"
37 SRC_URI="https://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
38 S="${WORKDIR}/leechcraft-${PV}"
41 HOMEPAGE="https://leechcraft.org/"
44 # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
47 # Set this to the category of the plugin, if any.
48 : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
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-}
55 CMAKE_USE_DIR="${S}"/src