From 6fa7d68a0bb6995f11100d50182ad8cd7e61b235 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 11 Dec 2018 21:52:13 -0500 Subject: dev-libs/xml-security-c: Fix libressl support Closes: https://bugs.gentoo.org/672718 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Craig Andrews --- .../files/xml-security-c-2.0.2-libressl.patch | 52 ++++++++++++++++++++++ .../xml-security-c/xml-security-c-2.0.2-r1.ebuild | 43 ++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 dev-libs/xml-security-c/files/xml-security-c-2.0.2-libressl.patch create mode 100644 dev-libs/xml-security-c/xml-security-c-2.0.2-r1.ebuild (limited to 'dev-libs/xml-security-c') diff --git a/dev-libs/xml-security-c/files/xml-security-c-2.0.2-libressl.patch b/dev-libs/xml-security-c/files/xml-security-c-2.0.2-libressl.patch new file mode 100644 index 000000000000..754ddc6bcf1d --- /dev/null +++ b/dev-libs/xml-security-c/files/xml-security-c-2.0.2-libressl.patch @@ -0,0 +1,52 @@ +diff --git a/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp b/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp +index 2ad9da6e..a8ea9f1d 100644 +--- a/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp ++++ b/xsec/enc/OpenSSL/OpenSSLCryptoBase64.cpp +@@ -48,7 +48,7 @@ XERCES_CPP_NAMESPACE_USE + // Construction/Destruction + // -------------------------------------------------------------------------------- + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + OpenSSLCryptoBase64::OpenSSLCryptoBase64() : mp_ectx(&m_ectx_store), mp_dctx(&m_dctx_store) { } + OpenSSLCryptoBase64::~OpenSSLCryptoBase64() { } + #else +diff --git a/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp b/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp +index c892eac4..82aeb0a1 100644 +--- a/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp ++++ b/xsec/enc/OpenSSL/OpenSSLCryptoBase64.hpp +@@ -205,7 +205,7 @@ private : + EVP_ENCODE_CTX *mp_ectx; // Encode context + EVP_ENCODE_CTX *mp_dctx; // Decode context + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + EVP_ENCODE_CTX m_ectx_store; + EVP_ENCODE_CTX m_dctx_store; + #endif +diff --git a/xsec/enc/OpenSSL/OpenSSLSupport.cpp b/xsec/enc/OpenSSL/OpenSSLSupport.cpp +index dfd37eb3..cf874f82 100644 +--- a/xsec/enc/OpenSSL/OpenSSLSupport.cpp ++++ b/xsec/enc/OpenSSL/OpenSSLSupport.cpp +@@ -273,7 +273,7 @@ int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) + + #endif + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + EvpEncodeCtxRAII::EvpEncodeCtxRAII() : mp_ctx(&mp_ctx_store) { }; + EvpEncodeCtxRAII::~EvpEncodeCtxRAII() { } + #else +diff --git a/xsec/enc/OpenSSL/OpenSSLSupport.hpp b/xsec/enc/OpenSSL/OpenSSLSupport.hpp +index e3527fae..b5f67f26 100644 +--- a/xsec/enc/OpenSSL/OpenSSLSupport.hpp ++++ b/xsec/enc/OpenSSL/OpenSSLSupport.hpp +@@ -88,7 +88,7 @@ public: + + private: + EVP_ENCODE_CTX *mp_ctx; +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + EVP_ENCODE_CTX mp_ctx_store; + #endif + }; diff --git a/dev-libs/xml-security-c/xml-security-c-2.0.2-r1.ebuild b/dev-libs/xml-security-c/xml-security-c-2.0.2-r1.ebuild new file mode 100644 index 000000000000..afd103f43067 --- /dev/null +++ b/dev-libs/xml-security-c/xml-security-c-2.0.2-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Apache C++ XML security libraries" +HOMEPAGE="http://santuario.apache.org/" +SRC_URI="mirror://apache/santuario/c-library/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug examples libressl nss static-libs xalan" + +RDEPEND=">=dev-libs/xerces-c-3.2 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + nss? ( dev-libs/nss ) + xalan? ( dev-libs/xalan-c )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}/${P}-libressl.patch" +) + +DOCS=( CHANGELOG.txt NOTICE.txt ) + +src_configure() { + econf \ + --with-openssl \ + $(use_enable static-libs static) \ + $(use_enable debug) \ + $(use_with xalan) \ + $(use_with nss) +} + +src_install() { + default + if use examples ; then + docinto examples + dodoc xsec/samples/*.cpp + fi +} -- cgit v1.2.3-65-gdbad