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

Contents of /eclass/cmake-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Thu Apr 3 22:09:36 2014 UTC (7 months, 3 weeks ago) by mgorny
Branch: MAIN
Changes since 1.4: +5 -3 lines
Make multilib@g.o the maintainer of multilib eclasses.

1 mgorny 1.5 # Copyright 1999-2014 Gentoo Foundation
2 mgorny 1.1 # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.4 2013/11/20 19:23:45 mgorny Exp $
4 mgorny 1.1
5     # @ECLASS: cmake-multilib.eclass
6     # @MAINTAINER:
7 mgorny 1.5 # gx86-multilib team <multilib@gentoo.org>
8     # @AUTHOR:
9     # Author: Michał Górny <mgorny@gentoo.org>
10 mgorny 1.1 # @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 xmw 1.2 multilib_parallel_foreach_abi cmake-utils_src_configure "${@}"
39 mgorny 1.1 }
40    
41     cmake-multilib_src_compile() {
42 xmw 1.2 multilib_foreach_abi cmake-utils_src_compile "${@}"
43 mgorny 1.1 }
44    
45     cmake-multilib_src_test() {
46 xmw 1.2 multilib_foreach_abi cmake-utils_src_test "${@}"
47 mgorny 1.1 }
48    
49     cmake-multilib_src_install() {
50     cmake-multilib_secure_install() {
51 xmw 1.2 cmake-utils_src_install "${@}"
52 mgorny 1.1
53 mgorny 1.4 # Do multilib magic only when >1 ABI is used.
54     if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
55     multilib_prepare_wrappers
56     # Make sure all headers are the same for each ABI.
57     multilib_check_headers
58     fi
59 mgorny 1.1 }
60    
61 xmw 1.2 multilib_foreach_abi cmake-multilib_secure_install "${@}"
62 axs 1.3 multilib_install_wrappers
63 mgorny 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20