/[gentoo-x86]/eclass/cmake-multilib.eclass
Gentoo

Contents of /eclass/cmake-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Feb 10 11:44:55 2013 UTC (19 months, 1 week ago) by mgorny
Branch: MAIN
Introduce cmake-utils wrapper eclass for multilib.

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.8 2013/02/01 21:39:50 mgorny Exp $
4
5 # @ECLASS: cmake-multilib.eclass
6 # @MAINTAINER:
7 # Michał Górny <mgorny@gentoo.org>
8 # @BLURB: cmake-utils wrapper for multilib builds
9 # @DESCRIPTION:
10 # The cmake-multilib.eclass is a cmake-utils.eclass(5) wrapper
11 # introducing support for building for more than one ABI (multilib).
12 #
13 # Inheriting this eclass sets IUSE and exports cmake-utils phase
14 # function wrappers which build the package for each supported ABI
15 # if the appropriate flag is enabled.
16 #
17 # Note that the multilib support requires out-of-source builds to be
18 # enabled. Thus, it is impossible to use CMAKE_IN_SOURCE_BUILD with
19 # it.
20
21 # EAPI=5 is required for meaningful MULTILIB_USEDEP.
22 case ${EAPI:-0} in
23 5) ;;
24 *) die "EAPI=${EAPI} is not supported" ;;
25 esac
26
27 if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
28 die "${ECLASS}: multilib support requires out-of-source builds."
29 fi
30
31 inherit cmake-utils multilib-build
32
33 EXPORT_FUNCTIONS src_configure src_compile src_test src_install
34
35 cmake-multilib_src_configure() {
36 multilib_parallel_foreach_abi cmake-utils_src_configure
37 }
38
39 cmake-multilib_src_compile() {
40 multilib_foreach_abi cmake-utils_src_compile
41 }
42
43 cmake-multilib_src_test() {
44 multilib_foreach_abi cmake-utils_src_test
45 }
46
47 cmake-multilib_src_install() {
48 cmake-multilib_secure_install() {
49 cmake-utils_src_install
50
51 # Make sure all headers are the same for each ABI.
52 multilib_check_headers
53 }
54
55 multilib_foreach_abi cmake-multilib_secure_install
56 }

  ViewVC Help
Powered by ViewVC 1.1.20