summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/leechcraft.eclass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/leechcraft.eclass')
-rw-r--r--eclass/leechcraft.eclass85
1 files changed, 85 insertions, 0 deletions
diff --git a/eclass/leechcraft.eclass b/eclass/leechcraft.eclass
new file mode 100644
index 00000000000..b9fc73b4350
--- /dev/null
+++ b/eclass/leechcraft.eclass
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+# @ECLASS: leechcraft.eclass
+# @MAINTAINER:
+# leechcraft@gentoo.org
+# @AUTHOR:
+# 0xd34df00d@gmail.com
+# NightNord@niifaq.ru
+# @BLURB: Common functions and setup utilities for the LeechCraft app
+# @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>.
+#
+# Only EAPI >1 supported
+
+case ${EAPI:-0} in
+ 4|5) ;;
+ 0|1|2|3) die "EAPI not supported, bug ebuild mantainer" ;;
+ *) die "Unknown EAPI, bug eclass maintainers" ;;
+esac
+
+inherit cmake-utils toolchain-funcs versionator
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git
+ https://github.com/0xd34df00d/leechcraft.git"
+ EGIT_PROJECT="leechcraft"
+
+ inherit git-2
+else
+ DEPEND="app-arch/xz-utils"
+ SRC_URI="http://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
+ S="${WORKDIR}/leechcraft-${PV}"
+fi
+
+HOMEPAGE="http://leechcraft.org/"
+LICENSE="Boost-1.0"
+
+# @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
+ CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
+elif [[ ${PN} != lc-core ]]; then
+ CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
+else
+ CMAKE_USE_DIR="${S}"/src
+fi
+
+EXPORT_FUNCTIONS "pkg_pretend"
+
+# @FUNCTION: leechcraft_pkg_pretend
+# @DESCRIPTION:
+# Determine active compiler version and refuse to build
+# if it is not satisfied at least to minimal version,
+# supported by upstream developers
+leechcraft_pkg_pretend() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ # 0.5.85 and later requires at least gcc 4.6
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
+ && die "Sorry, but gcc 4.6 or higher is required."
+ fi
+ if version_is_at_least 0.6.66 || ( [[ ${PN} == lc-monocle ]] && version_is_at_least 0.6.65 ); then
+ # 0.6.65 monocle and all later plugins require at least gcc 4.8
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 8 ]] ) \
+ && die "Sorry, but gcc 4.8 or higher is required."
+ fi
+ fi
+}