2015-01-12 11:09:44 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2012-02-06 16:39:49 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
#
|
|
|
|
# @ECLASS: leechcraft.eclass
|
|
|
|
# @MAINTAINER:
|
2017-02-26 22:28:25 +03:00
|
|
|
# 0xd34df00d@gmail.com
|
2012-02-06 16:39:49 +04:00
|
|
|
# @AUTHOR:
|
|
|
|
# 0xd34df00d@gmail.com
|
|
|
|
# NightNord@niifaq.ru
|
2012-07-17 10:27:09 +04:00
|
|
|
# @BLURB: Common functions and setup utilities for the LeechCraft app
|
2012-02-06 16:39:49 +04:00
|
|
|
# @DESCRIPTION:
|
|
|
|
# The leechcraft eclass contains a common set of functions and steps
|
|
|
|
# needed to build LeechCraft core or its plugins.
|
|
|
|
#
|
|
|
|
# Though this eclass seems to be small at the moment, it seems like a
|
|
|
|
# good idea to make all plugins inherit from it, since all plugins
|
|
|
|
# have mostly the same configuring/build process.
|
|
|
|
#
|
|
|
|
# Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
|
|
|
|
#
|
2017-02-26 22:28:25 +03:00
|
|
|
# Only EAPI >4 supported
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
case ${EAPI:-0} in
|
2017-02-26 22:28:25 +03:00
|
|
|
6) ;;
|
|
|
|
*) die "EAPI not supported, bug ebuild mantainer" ;;
|
2012-02-06 16:39:49 +04:00
|
|
|
esac
|
|
|
|
|
2017-02-26 22:28:25 +03:00
|
|
|
inherit cmake-utils
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
if [[ ${PV} == 9999 ]]; then
|
2017-07-31 18:47:13 +03:00
|
|
|
EGIT_REPO_URI="https://github.com/0xd34df00d/leechcraft.git"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2017-02-26 22:28:25 +03:00
|
|
|
inherit git-r3
|
2012-02-06 16:39:49 +04:00
|
|
|
else
|
2013-05-10 18:53:08 +04:00
|
|
|
DEPEND="app-arch/xz-utils"
|
2017-02-26 22:28:25 +03:00
|
|
|
SRC_URI="https://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
|
2012-02-06 16:39:49 +04:00
|
|
|
S="${WORKDIR}/leechcraft-${PV}"
|
|
|
|
fi
|
|
|
|
|
2017-02-26 22:28:25 +03:00
|
|
|
HOMEPAGE="https://leechcraft.org/"
|
2014-05-04 20:43:30 +04:00
|
|
|
LICENSE="Boost-1.0"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
# @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
|
|
|
|
# @DEFAULT_UNSET
|
|
|
|
# @DESCRIPTION:
|
|
|
|
# Set this to the category of the plugin, if any.
|
|
|
|
: ${LEECHCRAFT_PLUGIN_CATEGORY:=}
|
|
|
|
|
|
|
|
if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
|
2013-03-10 10:59:05 +04:00
|
|
|
CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
|
|
|
|
elif [[ ${PN} != lc-core ]]; then
|
|
|
|
CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
|
2012-02-06 16:39:49 +04:00
|
|
|
else
|
|
|
|
CMAKE_USE_DIR="${S}"/src
|
|
|
|
fi
|