summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-04-10 15:22:10 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-04-10 15:22:10 +0200
commitda55f04795f95f821d79563b9886f89df84d2973 (patch)
treec00c5ebe3090a3ac7faa5e9d89395c9ba9cd1c55
parentdev-libs/libdbusmenu-qt: Import from Gentoo ebuild repo (diff)
downloadkde-sunset-da55f04795f95f821d79563b9886f89df84d2973.tar.gz
kde-sunset-da55f04795f95f821d79563b9886f89df84d2973.tar.bz2
kde-sunset-da55f04795f95f821d79563b9886f89df84d2973.zip
app-crypt/qca: Import from Gentoo ebuild repo
Package-Manager: Portage-2.3.28, Repoman-2.3.9
-rw-r--r--app-crypt/qca/Manifest3
-rw-r--r--app-crypt/qca/files/qca-2.1.3-c++11.patch97
-rw-r--r--app-crypt/qca/files/qca-disable-pgp-test.patch13
-rw-r--r--app-crypt/qca/metadata.xml10
-rw-r--r--app-crypt/qca/qca-2.1.3-r1.ebuild122
5 files changed, 244 insertions, 1 deletions
diff --git a/app-crypt/qca/Manifest b/app-crypt/qca/Manifest
index cda568ec..bed2df91 100644
--- a/app-crypt/qca/Manifest
+++ b/app-crypt/qca/Manifest
@@ -1 +1,2 @@
-DIST qca-1.0.tar.bz2 30677 SHA256 614b8c9e03d8796c90f7f316f2ace66a5356270a75921ea72cebf129de491c5b
+DIST qca-1.0.tar.bz2 30677 BLAKE2B f85b76632f7f4997c70976764ba74bf3314b850f82bdce1d2d0e176268503c279d0eae98abe762cecbfd2bf523295e2178cd8b667ad5a8f6c45c4dc91ba7cbb8 SHA512 50a0017eaf75d0d896c6f142ab39ef6bd75cfd7f5712f9f059b65b5e0230f04f385c62a7a67ae24f820afe8109578108aa860306e47909038fb7b999a0dcd918
+DIST qca-2.1.3.tar.xz 686340 BLAKE2B 60ebf9add907632ed17426ee53c6c35a9aed279a4492012f1c174608cbe9579d366feb7ff7bff551d2e9e4ef2f271e8f340fcb4c9e1f67f209657d388567d44f SHA512 0aec277e0695da2e45298f0a9006213829fe4c449a79969e472947db54f45000ba6e22361b782465bdc03f269b7301d318c843f5a83db459a118e58a03f3116a
diff --git a/app-crypt/qca/files/qca-2.1.3-c++11.patch b/app-crypt/qca/files/qca-2.1.3-c++11.patch
new file mode 100644
index 00000000..a12f96bf
--- /dev/null
+++ b/app-crypt/qca/files/qca-2.1.3-c++11.patch
@@ -0,0 +1,97 @@
+From 5f18ebc705ec98e883aa63cb537e36e6a08b7e34 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 21 Mar 2017 12:23:17 +0200
+Subject: [PATCH] build: fix C++11 throwing distructors
+
+For >=C++11, explicitly mark throwing destructors `noexcept(false)`
+
+Thanks: Peter-Levine <plevine457@gmail.com>
+---
+ Doxyfile.in | 2 +-
+ src/botantools/botan/alloc_mmap/mmap_mem.cpp | 2 +-
+ src/botantools/botan/botan/allocate.h | 8 +++++++-
+ src/botantools/botan/botan/mem_pool.h | 2 +-
+ src/botantools/botan/mem_pool.cpp | 2 +-
+ 5 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/Doxyfile.in b/Doxyfile.in
+index 59d9afe..844c234 100644
+--- a/Doxyfile.in
++++ b/Doxyfile.in
+@@ -1070,7 +1070,7 @@ PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \
+ # The macro definition that is found in the sources will be used.
+ # Use the PREDEFINED tag if you want to use a different macro definition.
+
+-EXPAND_AS_DEFINED = QCA_EXPORT
++EXPAND_AS_DEFINED = QCA_EXPORT QCA_NOEXCEPT
+
+ # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+ # doxygen's preprocessor will remove all function-like macros that are alone
+diff --git a/src/botantools/botan/alloc_mmap/mmap_mem.cpp b/src/botantools/botan/alloc_mmap/mmap_mem.cpp
+index 362b688..54f0d23 100644
+--- a/src/botantools/botan/alloc_mmap/mmap_mem.cpp
++++ b/src/botantools/botan/alloc_mmap/mmap_mem.cpp
+@@ -107,7 +107,7 @@ void* MemoryMapping_Allocator::alloc_block(u32bit n)
+ umask(old_umask);
+ }
+
+- ~TemporaryFile()
++ ~TemporaryFile() QCA_NOEXCEPT(false)
+ {
+ delete[] filepath;
+ if(fd != -1 && close(fd) == -1)
+diff --git a/src/botantools/botan/botan/allocate.h b/src/botantools/botan/botan/allocate.h
+index 0ac351e..52bc397 100644
+--- a/src/botantools/botan/botan/allocate.h
++++ b/src/botantools/botan/botan/allocate.h
+@@ -40,6 +40,12 @@ namespace QCA { // WRAPNS_LINE
+ #include <string>
+ namespace QCA { // WRAPNS_LINE
+
++#if __cplusplus >= 201103L
++#define QCA_NOEXCEPT(x) noexcept(x)
++#else
++#define QCA_NOEXCEPT(x)
++#endif
++
+ namespace Botan {
+
+ /*************************************************
+@@ -58,7 +64,7 @@ class Allocator
+ virtual void init() {}
+ virtual void destroy() {}
+
+- virtual ~Allocator() {}
++ virtual ~Allocator() QCA_NOEXCEPT(false) {}
+ };
+
+ /*************************************************
+diff --git a/src/botantools/botan/botan/mem_pool.h b/src/botantools/botan/botan/mem_pool.h
+index 32834b8..1cb903e 100644
+--- a/src/botantools/botan/botan/mem_pool.h
++++ b/src/botantools/botan/botan/mem_pool.h
+@@ -63,7 +63,7 @@ class Pooling_Allocator : public Allocator
+ void destroy();
+
+ Pooling_Allocator(u32bit, bool);
+- ~Pooling_Allocator();
++ ~Pooling_Allocator() QCA_NOEXCEPT(false);
+ private:
+ void get_more_core(u32bit);
+ byte* allocate_blocks(u32bit);
+diff --git a/src/botantools/botan/mem_pool.cpp b/src/botantools/botan/mem_pool.cpp
+index 00280ec..baa47aa 100644
+--- a/src/botantools/botan/mem_pool.cpp
++++ b/src/botantools/botan/mem_pool.cpp
+@@ -171,7 +171,7 @@ Pooling_Allocator::Pooling_Allocator(u32bit p_size, bool) :
+ /*************************************************
+ * Pooling_Allocator Destructor *
+ *************************************************/
+-Pooling_Allocator::~Pooling_Allocator()
++Pooling_Allocator::~Pooling_Allocator() QCA_NOEXCEPT(false)
+ {
+ delete mutex;
+ if(blocks.size())
+--
+2.10.2
+
diff --git a/app-crypt/qca/files/qca-disable-pgp-test.patch b/app-crypt/qca/files/qca-disable-pgp-test.patch
new file mode 100644
index 00000000..7944e3c3
--- /dev/null
+++ b/app-crypt/qca/files/qca-disable-pgp-test.patch
@@ -0,0 +1,13 @@
+diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
+index f4d9eb9..67ef281 100644
+--- a/unittest/CMakeLists.txt
++++ b/unittest/CMakeLists.txt
+@@ -23,7 +23,7 @@ add_subdirectory(keylengthunittest)
+ add_subdirectory(keystore)
+ add_subdirectory(macunittest)
+ add_subdirectory(metatype)
+-add_subdirectory(pgpunittest)
++# add_subdirectory(pgpunittest)
+ add_subdirectory(pipeunittest)
+ add_subdirectory(pkits)
+ add_subdirectory(rsaunittest)
diff --git a/app-crypt/qca/metadata.xml b/app-crypt/qca/metadata.xml
index 6f49eba8..04bb89d3 100644
--- a/app-crypt/qca/metadata.xml
+++ b/app-crypt/qca/metadata.xml
@@ -2,4 +2,14 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
+<use>
+ <flag name="botan">Enable botan plugin</flag>
+ <flag name="gcrypt">Enable gcrypt plugin</flag>
+ <flag name="gpg">Enable GnuPG plugin</flag>
+ <flag name="logger">Enable logger plugin</flag>
+ <flag name="nss">Enable NSS plugin</flag>
+ <flag name="pkcs11">Enable PKCS#11 plugin</flag>
+ <flag name="sasl">Enable SASL plugin</flag>
+ <flag name="softstore">Enable softstore plugin</flag>
+</use>
</pkgmetadata>
diff --git a/app-crypt/qca/qca-2.1.3-r1.ebuild b/app-crypt/qca/qca-2.1.3-r1.ebuild
new file mode 100644
index 00000000..2f074b17
--- /dev/null
+++ b/app-crypt/qca/qca-2.1.3-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils multibuild qmake-utils
+
+DESCRIPTION="Qt Cryptographic Architecture (QCA)"
+HOMEPAGE="https://userbase.kde.org/QCA"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+
+IUSE="botan debug doc examples gcrypt gpg libressl logger nss pkcs11 qt4 +qt5 sasl softstore +ssl test"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ !app-crypt/qca-cyrus-sasl
+ !app-crypt/qca-gnupg
+ !app-crypt/qca-logger
+ !app-crypt/qca-ossl
+ !app-crypt/qca-pkcs11
+ botan? ( dev-libs/botan:0 )
+ gcrypt? ( dev-libs/libgcrypt:= )
+ gpg? ( app-crypt/gnupg )
+ nss? ( dev-libs/nss )
+ pkcs11? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ dev-libs/pkcs11-helper
+ )
+ qt4? ( >=dev-qt/qtcore-4.8.7-r2:4 )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtnetwork:5
+ )
+ sasl? ( dev-libs/cyrus-sasl:2 )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )
+"
+
+DOCS=( README TODO )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-disable-pgp-test.patch"
+ "${FILESDIR}/${P}-c++11.patch"
+)
+
+qca_plugin_use() {
+ echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1")
+}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_mkspecsdir)/features"
+ -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_plugindir)"
+ $(qca_plugin_use botan)
+ $(qca_plugin_use gcrypt)
+ $(qca_plugin_use gpg gnupg)
+ $(qca_plugin_use logger)
+ $(qca_plugin_use nss)
+ $(qca_plugin_use pkcs11)
+ $(qca_plugin_use sasl cyrus-sasl)
+ $(qca_plugin_use softstore)
+ $(qca_plugin_use ssl ossl)
+ -DBUILD_TESTS=$(usex test)
+ )
+
+ if [[ ${MULTIBUILD_VARIANT} == qt4 ]]; then
+ mycmakeargs+=(-DQT4_BUILD=ON)
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ mytest() {
+ local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca"
+ cmake-utils_src_test
+ }
+
+ multibuild_foreach_variant mytest
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+
+ if use doc; then
+ pushd "${BUILD_DIR}" >/dev/null || die
+ doxygen Doxyfile.in || die
+ dodoc -r apidocs/html
+ popd >/dev/null || die
+ fi
+
+ if use examples; then
+ dodoc -r "${S}"/examples
+ fi
+}