| 1 | # Copyright 1999-2012 Gentoo Foundation |
1 | # Copyright 1999-2012 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/boost-utils.eclass,v 1.1 2012/09/19 09:37:53 mgorny Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/boost-utils.eclass,v 1.3 2012/10/07 08:29:49 mgorny Exp $ |
| 4 | |
4 | |
| 5 | if [[ ! ${_BOOST_ECLASS} ]]; then |
5 | if [[ ! ${_BOOST_ECLASS} ]]; then |
| 6 | |
6 | |
| 7 | # @ECLASS: boost-utils.eclass |
7 | # @ECLASS: boost-utils.eclass |
| 8 | # @MAINTAINER: |
8 | # @MAINTAINER: |
| … | |
… | |
| 22 | # boost-utils_export_root. However, other build system may require more |
22 | # boost-utils_export_root. However, other build system may require more |
| 23 | # hackery or even appending -I$(boost-utils_get_includedir) to CFLAGS |
23 | # hackery or even appending -I$(boost-utils_get_includedir) to CFLAGS |
| 24 | # and -L$(boost-utils_get_libdir) to LDFLAGS. |
24 | # and -L$(boost-utils_get_libdir) to LDFLAGS. |
| 25 | |
25 | |
| 26 | case ${EAPI:-0} in |
26 | case ${EAPI:-0} in |
| 27 | 0|1|2|3|4) ;; |
27 | 0|1|2|3|4|5) ;; |
| 28 | *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established." |
28 | *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established." |
| 29 | esac |
29 | esac |
| 30 | |
30 | |
| 31 | inherit multilib versionator |
31 | inherit multilib versionator |
| 32 | |
32 | |
| … | |
… | |
| 43 | boost-utils_get_best_slot() { |
43 | boost-utils_get_best_slot() { |
| 44 | local pkg=dev-libs/boost |
44 | local pkg=dev-libs/boost |
| 45 | [[ ${BOOST_MAX_SLOT} ]] && pkg="<=${pkg}-${BOOST_MAX_SLOT}.9999" |
45 | [[ ${BOOST_MAX_SLOT} ]] && pkg="<=${pkg}-${BOOST_MAX_SLOT}.9999" |
| 46 | |
46 | |
| 47 | local cpv=$(best_version ${pkg}) |
47 | local cpv=$(best_version ${pkg}) |
| 48 | get_version_component_range 1-2 ${cpv#${pkg}-} |
48 | get_version_component_range 1-2 ${cpv#dev-libs/boost-} |
| 49 | } |
49 | } |
| 50 | |
50 | |
| 51 | # @FUNCTION: boost-utils_get_includedir |
51 | # @FUNCTION: boost-utils_get_includedir |
| 52 | # @USAGE: [slot] |
52 | # @USAGE: [slot] |
| 53 | # @DESCRIPTION: |
53 | # @DESCRIPTION: |