/[gentoo-x86]/eclass/leechcraft.eclass
Gentoo

Contents of /eclass/leechcraft.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (hide annotations) (download)
Sun Aug 3 17:08:27 2014 UTC (4 months, 3 weeks ago) by maksbotan
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +2 -3 lines
Remove sourceforge SRC_URI for leechcraft packages, only leechcraft.org is used now

1 maksbotan 1.13 # Copyright 1999-2014 Gentoo Foundation
2 maksbotan 1.1 # Distributed under the terms of the GNU General Public License v2
3 maksbotan 1.16 # $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.15 2014/05/03 21:25:46 pinkbyte Exp $
4 maksbotan 1.1 #
5     # @ECLASS: leechcraft.eclass
6     # @MAINTAINER:
7 maksbotan 1.2 # leechcraft@gentoo.org
8 maksbotan 1.1 # @AUTHOR:
9     # 0xd34df00d@gmail.com
10     # NightNord@niifaq.ru
11 vapier 1.5 # @BLURB: Common functions and setup utilities for the LeechCraft app
12 maksbotan 1.1 # @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 >1 supported
23    
24     case ${EAPI:-0} in
25 pinkbyte 1.10 4|5) ;;
26     0|1|2|3) die "EAPI not supported, bug ebuild mantainer" ;;
27 maksbotan 1.1 *) die "Unknown EAPI, bug eclass maintainers" ;;
28     esac
29    
30 pinkbyte 1.7 inherit cmake-utils toolchain-funcs versionator
31 maksbotan 1.1
32     if [[ ${PV} == 9999 ]]; then
33     EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git"
34     EGIT_PROJECT="leechcraft"
35    
36     inherit git-2
37     else
38 pinkbyte 1.10 DEPEND="app-arch/xz-utils"
39 maksbotan 1.16 SRC_URI="http://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
40 maksbotan 1.1 S="${WORKDIR}/leechcraft-${PV}"
41     fi
42    
43     HOMEPAGE="http://leechcraft.org/"
44 pinkbyte 1.15 LICENSE="Boost-1.0"
45 maksbotan 1.1
46     # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
47     # @DEFAULT_UNSET
48     # @DESCRIPTION:
49     # Set this to the category of the plugin, if any.
50     : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
51    
52     if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
53 maksbotan 1.8 CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
54     elif [[ ${PN} != lc-core ]]; then
55     CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
56 maksbotan 1.1 else
57     CMAKE_USE_DIR="${S}"/src
58     fi
59 pinkbyte 1.7
60     EXPORT_FUNCTIONS "pkg_pretend"
61    
62     # @FUNCTION: leechcraft_pkg_pretend
63     # @DESCRIPTION:
64     # Determine active compiler version and refuse to build
65     # if it is not satisfied at least to minimal version,
66     # supported by upstream developers
67     leechcraft_pkg_pretend() {
68     debug-print-function ${FUNCNAME} "$@"
69    
70 pinkbyte 1.15 # 0.5.85 and later requires at least gcc 4.6
71     if [[ ${MERGE_TYPE} != binary ]]; then
72     [[ $(gcc-major-version) -lt 4 ]] || \
73     ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
74     && die "Sorry, but gcc 4.6 or higher is required."
75 pinkbyte 1.7 fi
76 maksbotan 1.13 if version_is_at_least 0.6.66 || ( [[ ${PN} == lc-monocle ]] && version_is_at_least 0.6.65 ); then
77     # 0.6.65 monocle and all later plugins require at least gcc 4.8
78     if [[ ${MERGE_TYPE} != binary ]]; then
79     [[ $(gcc-major-version) -lt 4 ]] || \
80     ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 8 ]] ) \
81     && die "Sorry, but gcc 4.8 or higher is required."
82     fi
83     fi
84 pinkbyte 1.7 }

  ViewVC Help
Powered by ViewVC 1.1.20