| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.9 2008/09/28 16:19:06 jmbsvicetto Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.10 2008/09/28 18:52:16 jmbsvicetto Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: cmake-utils.eclass |
5 | # @ECLASS: cmake-utils.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kde@gentoo.org |
7 | # kde@gentoo.org |
| 8 | # @BLURB: common ebuild functions for cmake-based packages |
8 | # @BLURB: common ebuild functions for cmake-based packages |
| … | |
… | |
| 19 | |
19 | |
| 20 | DESCRIPTION="Based on the ${ECLASS} eclass" |
20 | DESCRIPTION="Based on the ${ECLASS} eclass" |
| 21 | |
21 | |
| 22 | DEPEND=">=dev-util/cmake-2.4.6" |
22 | DEPEND=">=dev-util/cmake-2.4.6" |
| 23 | |
23 | |
|
|
24 | case ${EAPI} in |
|
|
25 | 2) |
| 24 | EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
26 | EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
|
|
27 | ;; |
|
|
28 | *) |
|
|
29 | EXPORT_FUNCTIONS src_compile src_test src_install |
|
|
30 | ;; |
|
|
31 | esac |
|
|
32 | |
| 25 | |
33 | |
| 26 | # Internal function use by cmake-utils_use_with and cmake-utils_use_enable |
34 | # Internal function use by cmake-utils_use_with and cmake-utils_use_enable |
| 27 | _use_me_now() { |
35 | _use_me_now() { |
| 28 | debug-print-function $FUNCNAME $* |
36 | debug-print-function $FUNCNAME $* |
| 29 | [[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]" |
37 | [[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]" |
| … | |
… | |
| 88 | # @DESCRIPTION: |
96 | # @DESCRIPTION: |
| 89 | # General function for compiling with cmake. Default behaviour is to check for |
97 | # General function for compiling with cmake. Default behaviour is to check for |
| 90 | # eapi and based on it configure or only compile |
98 | # eapi and based on it configure or only compile |
| 91 | cmake-utils_src_compile() { |
99 | cmake-utils_src_compile() { |
| 92 | case ${EAPI} in |
100 | case ${EAPI} in |
| 93 | 2 | 2_pre3 | 2_pre2 | 2_pre1) |
101 | 2) |
| 94 | ;; |
102 | ;; |
| 95 | *) |
103 | *) |
| 96 | cmake-utils_src_configure |
104 | cmake-utils_src_configure |
| 97 | ;; |
105 | ;; |
| 98 | esac |
106 | esac |