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

Contents of /eclass/cmake-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Apr 29 20:54:54 2014 UTC (5 months, 3 weeks ago) by mgorny
Branch: MAIN
Changes since 1.5: +4 -7 lines
Move conditionals for enabling wrappers into multilib_prepare_wrappers() and multilib_install_wrappers().

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

  ViewVC Help
Powered by ViewVC 1.1.20