diff options
author | orbea <orbea@riseup.net> | 2023-05-31 07:29:27 -0700 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-06-14 07:07:16 +0100 |
commit | e1e2b092d919a5303afac98fb77f9bc809229e13 (patch) | |
tree | 48fc5806883beb8594242b15c1a199d952ac1953 /dev-libs/xmlsec | |
parent | net-libs/libpcap: Stabilize 1.10.4 sparc, #908476 (diff) | |
download | gentoo-e1e2b092d919a5303afac98fb77f9bc809229e13.tar.gz gentoo-e1e2b092d919a5303afac98fb77f9bc809229e13.tar.bz2 gentoo-e1e2b092d919a5303afac98fb77f9bc809229e13.zip |
dev-libs/xmlsec: add upstream libressl patches
These patches add compatiblity for LibreSSL.
Bug: https://bugs.gentoo.org/903001
Upstream-PR: https://github.com/lsh123/xmlsec/pull/456
Upstream-Commit: https://github.com/lsh123/xmlsec/commit/c5469cfc8443c57a25a8783f0bd669f71e29bb04
Upstream-PR: https://github.com/lsh123/xmlsec/pull/654
Upstream-Commit: https://github.com/lsh123/xmlsec/commit/dfdf981f3522e4059170b504fb6fd40b37c9d70f
Upstream-Issue: https://github.com/lsh123/xmlsec/issues/665
Upstream-PR: https://github.com/lsh123/xmlsec/pull/666
Upstream-Commit: https://github.com/lsh123/xmlsec/commit/1ee1754c5ab8f0071adbde92d3a007729df7c5a7
Upstream-PR: https://github.com/lsh123/xmlsec/pull/667
Upstream-Commit: https://github.com/lsh123/xmlsec/commit/c9b0dcd01af1ecaed828269b734861cb93edeae3
Signed-off-by: orbea <orbea@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/31246
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/xmlsec')
-rw-r--r-- | dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch | 40 | ||||
-rw-r--r-- | dev-libs/xmlsec/xmlsec-1.2.37-r1.ebuild | 66 |
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch b/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch new file mode 100644 index 000000000000..acdb535ba552 --- /dev/null +++ b/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch @@ -0,0 +1,40 @@ +https://github.com/lsh123/xmlsec/pull/456 +https://github.com/lsh123/xmlsec/commit/c5469cfc8443c57a25a8783f0bd669f71e29bb04 +https://github.com/lsh123/xmlsec/pull/654 +https://github.com/lsh123/xmlsec/commit/dfdf981f3522e4059170b504fb6fd40b37c9d70f + +From c5469cfc8443c57a25a8783f0bd669f71e29bb04 Mon Sep 17 00:00:00 2001 +From: lsh123 <aleksey@aleksey.com> +Date: Mon, 12 Dec 2022 10:34:56 -0500 +Subject: [PATCH] fix libressl (#456) + +--- + src/openssl/openssl_compat.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +From d113d1e6355c4841fd03c6aa797d33bde1d064f3 Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Mon, 29 May 2023 07:46:58 -0700 +Subject: [PATCH] openssl_compat.h: Update LibreSSL UI_null() compat + +LibreSSL added UI_null() in 3.7.1. +--- + src/openssl/openssl_compat.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/openssl/openssl_compat.h ++++ b/src/openssl/openssl_compat.h +@@ -123,6 +123,13 @@ static inline int xmlSecOpenSSLCompatRand(unsigned char *buf, xmlSecSize size) { + * LibreSSL 2.7 compatibility (implements most of OpenSSL 1.1 API) + * + *****************************************************************************/ ++#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3070200fL) ++ ++/* Needed for Engine initialization */ ++#define UI_null() NULL ++ ++#endif /* defined(LIBRESSL_VERSION_NUMBER) */ ++ + #if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x30500000L) && defined(XMLSEC_OPENSSL_API_110) + /* EVP_CIPHER_CTX stuff */ + #define EVP_CIPHER_CTX_encrypting(x) ((x)->encrypt) diff --git a/dev-libs/xmlsec/xmlsec-1.2.37-r1.ebuild b/dev-libs/xmlsec/xmlsec-1.2.37-r1.ebuild new file mode 100644 index 000000000000..f5ed4f8c1c07 --- /dev/null +++ b/dev-libs/xmlsec/xmlsec-1.2.37-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Command line tool for signing, verifying, encrypting and decrypting XML" +HOMEPAGE="https://www.aleksey.com/xmlsec" +SRC_URI="https://www.aleksey.com/xmlsec/download/${PN}1-${PV}.tar.gz" +S="${WORKDIR}/${PN}1-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="doc gcrypt gnutls nss +openssl static-libs test" +RESTRICT="!test? ( test )" +REQUIRED_USE="|| ( gcrypt gnutls nss openssl ) + gnutls? ( gcrypt )" + +RDEPEND=">=dev-libs/libxml2-2.7.4[ftp(+)] + >=dev-libs/libxslt-1.0.20 + dev-libs/libltdl + gcrypt? ( >=dev-libs/libgcrypt-1.4.0:= ) + gnutls? ( >=net-libs/gnutls-2.8.0:= ) + nss? ( + >=dev-libs/nspr-4.4.1 + >=dev-libs/nss-3.9 + ) + openssl? ( + dev-libs/openssl:= + )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + test? ( + nss? ( + >=dev-libs/nss-3.9[utils] + ) + )" + +PATCHES=( + "${FILESDIR}"/${P}-libressl.patch #903001 +) + +src_configure() { + # Bash because of bug #721128 + CONFIG_SHELL="${BROOT}"/bin/bash econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) \ + $(use_with gcrypt) \ + $(use_with gnutls) \ + $(use_with nss nspr) \ + $(use_with nss) \ + $(use_with openssl) \ + --enable-mans \ + --enable-pkgconfig +} + +src_test() { + # See https://github.com/lsh123/xmlsec/issues/280 for TZ=UTC + TZ=UTC SHELL="${BROOT}"/bin/bash emake TMPFOLDER="${T}" check +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} |