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