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

Contents of /eclass/leechcraft.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download)
Tue Apr 15 16:06:56 2014 UTC (14 hours, 56 minutes ago) by maksbotan
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -2 lines
Remove useless debug echo line from leechcraft.eclass

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.14 # $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.13 2014/04/14 15:45:16 maksbotan 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 pinkbyte 1.11 SRC_URI="mirror://sourceforge/leechcraft/leechcraft-${PV}.tar.xz
40 maksbotan 1.12 http://dist.leechcraft.org/LeechCraft/${PV}/leechcraft-${PV}.tar.xz"
41 maksbotan 1.1 S="${WORKDIR}/leechcraft-${PV}"
42     fi
43    
44     HOMEPAGE="http://leechcraft.org/"
45 pinkbyte 1.9 if version_is_at_least 0.5.95; then
46     LICENSE="Boost-1.0"
47     else
48     LICENSE="GPL-3"
49     fi
50 maksbotan 1.1
51     # @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
52     # @DEFAULT_UNSET
53     # @DESCRIPTION:
54     # Set this to the category of the plugin, if any.
55     : ${LEECHCRAFT_PLUGIN_CATEGORY:=}
56    
57     if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
58 maksbotan 1.8 CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#lc-}
59     elif [[ ${PN} != lc-core ]]; then
60     CMAKE_USE_DIR="${S}"/src/plugins/${PN#lc-}
61 maksbotan 1.1 else
62     CMAKE_USE_DIR="${S}"/src
63     fi
64 pinkbyte 1.7
65     EXPORT_FUNCTIONS "pkg_pretend"
66    
67     # @FUNCTION: leechcraft_pkg_pretend
68     # @DESCRIPTION:
69     # Determine active compiler version and refuse to build
70     # if it is not satisfied at least to minimal version,
71     # supported by upstream developers
72     leechcraft_pkg_pretend() {
73     debug-print-function ${FUNCNAME} "$@"
74    
75     if version_is_at_least 0.5.85; then
76     # 0.5.85 and later requires at least gcc 4.6
77     if [[ ${MERGE_TYPE} != binary ]]; then
78     [[ $(gcc-major-version) -lt 4 ]] || \
79     ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
80     && die "Sorry, but gcc 4.6 or higher is required."
81     fi
82     fi
83 maksbotan 1.13 if version_is_at_least 0.6.66 || ( [[ ${PN} == lc-monocle ]] && version_is_at_least 0.6.65 ); then
84     # 0.6.65 monocle and all later plugins require at least gcc 4.8
85     if [[ ${MERGE_TYPE} != binary ]]; then
86     [[ $(gcc-major-version) -lt 4 ]] || \
87     ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 8 ]] ) \
88     && die "Sorry, but gcc 4.8 or higher is required."
89     fi
90     fi
91 pinkbyte 1.7 }

  ViewVC Help
Powered by ViewVC 1.1.20