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 F04DC1389E2 for ; Fri, 28 Nov 2014 18:53:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1D70E086D; Fri, 28 Nov 2014 18:53:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 50A80E086D for ; Fri, 28 Nov 2014 18:53:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D10E33F980 for ; Fri, 28 Nov 2014 18:53:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ECFDBB1A9 for ; Fri, 28 Nov 2014 18:53:05 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1417200782.9146141c89bf4249e78e602b1c18e858adca2143.kensington@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: app-crypt/qca/ X-VCS-Repository: proj/qt X-VCS-Files: app-crypt/qca/qca-9999.ebuild X-VCS-Directories: app-crypt/qca/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 9146141c89bf4249e78e602b1c18e858adca2143 X-VCS-Branch: master Date: Fri, 28 Nov 2014 18:53:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3c9bb690-fa75-4d34-b1a0-526b2c195839 X-Archives-Hash: aa3fd16512db5b1661a9ef7ec0acb0df commit: 9146141c89bf4249e78e602b1c18e858adca2143 Author: Michael Palimaka gentoo org> AuthorDate: Fri Nov 28 18:51:43 2014 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Fri Nov 28 18:53:02 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=9146141c [app-crypt/qca] Add experimental multibuild support. This is subject to change as upstream is still in flux. Package-Manager: portage-2.2.14 --- app-crypt/qca/qca-9999.ebuild | 76 +++++++++++++++++++++++++++++++------------ 1 file changed, 55 insertions(+), 21 deletions(-) diff --git a/app-crypt/qca/qca-9999.ebuild b/app-crypt/qca/qca-9999.ebuild index 8e313ba..f1c1452 100644 --- a/app-crypt/qca/qca-9999.ebuild +++ b/app-crypt/qca/qca-9999.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit multilib cmake-utils git-r3 +inherit cmake-utils multilib multibuild git-r3 DESCRIPTION="Qt Cryptographic Architecture (QCA)" HOMEPAGE="http://delta.affinix.com/qca/" @@ -15,7 +15,6 @@ SLOT="2" KEYWORDS="" IUSE="botan debug doc examples gcrypt gpg logger nss openssl pkcs11 +qt4 qt5 sasl softstore test" -REQUIRED_USE="^^ ( qt4 qt5 )" RDEPEND=" !app-crypt/qca-cyrus-sasl @@ -54,31 +53,66 @@ qca_plugin_use() { echo "-DWITH_${2:-$1}_PLUGIN=$(use $1 && echo yes || echo no)" } +pkg_setup() { + MULTIBUILD_VARIANTS=() + if use qt4; then + MULTIBUILD_VARIANTS+=( qt4 ) + fi + if use qt5; then + MULTIBUILD_VARIANTS+=( qt5 ) + fi +} + src_configure() { - local mycmakeargs=( - -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/$(usex qt4 qt4 qt5)/plugins" - -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}/usr/$(usex qt4 share $(get_libdir))/$(usex qt4 qt4 qt5)/mkspecs/features" - $(cmake-utils_use qt4 QT4_BUILD) - $(qca_plugin_use botan) - $(qca_plugin_use gcrypt) - $(qca_plugin_use gpg gnupg) - $(qca_plugin_use logger) - $(qca_plugin_use nss) - $(qca_plugin_use openssl ossl) - $(qca_plugin_use pkcs11) - $(qca_plugin_use sasl cyrus-sasl) - $(qca_plugin_use softstore) - $(cmake-utils_use_build test TESTS) - ) - cmake-utils_src_configure + myconfigure() { + local mycmakeargs=( + -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/$(usex qt4 qt4 qt5)/plugins" + -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}/usr/$(usex qt4 share $(get_libdir))/$(usex qt4 qt4 qt5)/mkspecs/features" + $(qca_plugin_use botan) + $(qca_plugin_use gcrypt) + $(qca_plugin_use gpg gnupg) + $(qca_plugin_use logger) + $(qca_plugin_use nss) + $(qca_plugin_use openssl ossl) + $(qca_plugin_use pkcs11) + $(qca_plugin_use sasl cyrus-sasl) + $(qca_plugin_use softstore) + $(cmake-utils_use_build test TESTS) + ) + + if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then + mycmakeargs+=( -DQT4_BUILD=true ) + fi + + if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then + mycmakeargs+=( -DQCA_SUFFIX=QT5 ) + fi + + cmake-utils_src_configure + } + + multibuild_foreach_variant myconfigure } -src_install() { - cmake-utils_src_install +src_compile() { + multibuild_foreach_variant cmake-utils_src_compile if use doc; then - pushd "${BUILD_DIR}" >/dev/null + pushd "${BUILD_DIR}" > /dev/null doxygen Doxyfile || die + popd > /dev/null + fi +} + +src_test() { + multibuild_foreach_variant cmake-utils_src_test +} + +src_install() { + multibuild_foreach_variant cmake-utils_src_install + + if use doc; then + pushd "${BUILD_DIR}" > /dev/null dohtml apidocs/html/* popd >/dev/null fi