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

Contents of /eclass/cmake-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Fri May 9 10:48:59 2014 UTC (4 months, 1 week ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +36 -22 lines
Use multilib-minimal for phase functions.

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.7 # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.6 2014/04/29 20:54:54 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 mgorny 1.7 # The cmake-multilib.eclass provides a glue between cmake-utils.eclass(5)
13     # and multilib-minimal.eclass(5), aiming to provide a convenient way
14     # to build packages using cmake for multiple ABIs.
15 mgorny 1.1 #
16 mgorny 1.7 # Inheriting this eclass sets IUSE and exports default multilib_src_*()
17     # sub-phases that call cmake-utils phase functions for each ABI enabled.
18     # The multilib_src_*() functions can be defined in ebuild just like
19     # in multilib-minimal, yet they ought to call appropriate cmake-utils
20     # phase rather than 'default'.
21 mgorny 1.1
22     # EAPI=5 is required for meaningful MULTILIB_USEDEP.
23     case ${EAPI:-0} in
24     5) ;;
25     *) die "EAPI=${EAPI} is not supported" ;;
26     esac
27    
28     if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
29     die "${ECLASS}: multilib support requires out-of-source builds."
30     fi
31    
32 mgorny 1.7 inherit cmake-utils multilib-minimal
33 mgorny 1.1
34     EXPORT_FUNCTIONS src_configure src_compile src_test src_install
35    
36     cmake-multilib_src_configure() {
37 mgorny 1.7 local _cmake_args=( "${@}" )
38    
39     multilib-minimal_src_configure
40     }
41    
42     multilib_src_configure() {
43     cmake-utils_src_configure "${_cmake_args[@]}"
44 mgorny 1.1 }
45    
46     cmake-multilib_src_compile() {
47 mgorny 1.7 local _cmake_args=( "${@}" )
48    
49     multilib-minimal_src_compile
50     }
51    
52     multilib_src_compile() {
53     cmake-utils_src_compile "${_cmake_args[@]}"
54 mgorny 1.1 }
55    
56     cmake-multilib_src_test() {
57 mgorny 1.7 local _cmake_args=( "${@}" )
58    
59     multilib-minimal_src_test
60     }
61    
62     multilib_src_test() {
63     cmake-utils_src_test "${_cmake_args[@]}"
64 mgorny 1.1 }
65    
66     cmake-multilib_src_install() {
67 mgorny 1.7 local _cmake_args=( "${@}" )
68 mgorny 1.1
69 mgorny 1.7 multilib-minimal_src_install
70     }
71 mgorny 1.1
72 mgorny 1.7 multilib_src_install() {
73     cmake-utils_src_install "${_cmake_args[@]}"
74 mgorny 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20