From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7C64A1388A9 for ; Wed, 6 Feb 2013 10:02:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0BB921C022; Wed, 6 Feb 2013 10:02:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A27BAE04C8 for ; Wed, 6 Feb 2013 10:02:47 +0000 (UTC) Received: from pomiocik.lan (213-238-96-111.adsl.inetia.pl [213.238.96.111]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id D42EC33DFA1; Wed, 6 Feb 2013 10:02:45 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: aballier@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] Introduce cmake-multilib wrapper for cmake-utils. Date: Wed, 6 Feb 2013 11:02:40 +0100 Message-Id: <1360144960-1327-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <20130206105605.32b55a8d@pomiocik.lan> References: <20130206105605.32b55a8d@pomiocik.lan> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 9c59a40c-c38a-48b1-985b-373128f1b0fb X-Archives-Hash: d0ba1fe53bd6a1a2624e187a90a158ca --- gx86/eclass/cmake-multilib.eclass | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 gx86/eclass/cmake-multilib.eclass diff --git a/gx86/eclass/cmake-multilib.eclass b/gx86/eclass/cmake-multilib.eclass new file mode 100644 index 0000000..7e929b2 --- /dev/null +++ b/gx86/eclass/cmake-multilib.eclass @@ -0,0 +1,56 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.8 2013/02/01 21:39:50 mgorny Exp $ + +# @ECLASS: cmake-multilib.eclass +# @MAINTAINER: +# Michał Górny +# @BLURB: cmake-utils wrapper for multilib builds +# @DESCRIPTION: +# The cmake-multilib.eclass is a cmake-utils.eclass(5) wrapper +# introducing support for building for more than one ABI (multilib). +# +# Inheriting this eclass sets IUSE and exports cmake-utils phase +# function wrappers which build the package for each supported ABI +# if the appropriate flag is enabled. +# +# Note that the multilib support requires out-of-source builds to be +# enabled. Thus, it is impossible to use CMAKE_IN_SOURCE_BUILD with +# it. + +# EAPI=5 is required for meaningful MULTILIB_USEDEP. +case ${EAPI:-0} in + 5) ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac + +if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then + die "${ECLASS}: multilib support requires out-of-source builds." +fi + +inherit cmake-utils multilib-build + +EXPORT_FUNCTIONS src_configure src_compile src_test src_install + +cmake-multilib_src_configure() { + multilib_parallel_foreach_abi cmake-utils_src_configure +} + +cmake-multilib_src_compile() { + multilib_foreach_abi cmake-utils_src_compile +} + +cmake-multilib_src_test() { + multilib_foreach_abi cmake-utils_src_test +} + +cmake-multilib_src_install() { + cmake-multilib_secure_install() { + cmake-utils_src_install + + # Make sure all headers are the same for each ABI. + multilib_check_headers + } + + multilib_foreach_abi cmake-multilib_secure_install +} -- 1.8.1.2