dev-libs/xmlsec: Add from Gentoo

It's from Gentoo commit 1e94c87d6d6155169455dfd273e02c16e705ae92.
This commit is contained in:
Krzesimir Nowak 2023-09-13 15:10:23 +02:00
parent 2c3df2aafe
commit fc34867b81
7 changed files with 296 additions and 0 deletions

View File

@ -0,0 +1,3 @@
DIST xmlsec1-1.2.37.tar.gz 2009175 BLAKE2B 19f43ba6bf6eb49428b9c5563baecbab21476f326cceee13785ae16769afa258f100732831c0f3f7d160543bd075cdcfdc5cbf11b7406637ee6c2f0e27c07f30 SHA512 99220cb28a346ffac0023f9f177d6a7be3ddcea04bea434b7dc926c1f0aaa5564d75f74f92896ac100179c04d77e001f688ddf46fed4e0a0b4f20b7b87c24900
DIST xmlsec1-1.2.38.tar.gz 2036578 BLAKE2B 03f7e1b5e659793bf1984c5a59582d9459089ce913620d5cc1e5a5d0eb65557580cd23fa190db277298fd7cc55bd41563b93cf61a37c8b7521a4690cd2ca3489 SHA512 724089777caae95db27e67f24381c066eaae23a9d64819a18bb04837c1ab1b380d19be2c7ee25659ca481d9eab96fcbe8027a430a0ac1630ad3b073cddd20fac
DIST xmlsec1-1.3.1.tar.gz 2432943 BLAKE2B 1dafdffd959579add5c579e3fa9c9f9ddc73ce4aadc6fc2139506e6e64ffcd1bbe7298786e414900eb9f33f93b0a47da64e686c499e48d4c80d81b256db6692e SHA512 7f30c15c3edcafe70fa5febaa0ba39f73f8d30525ee102b5961a658dd2842fbc58e63f7595f15b150d71bf735bfa7688c3694a191b0d475776ca26902d90d25f

View File

@ -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)

View File

@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -2482,7 +2482,7 @@ AC_ARG_ENABLE([pedantic], [AS_HELP_STRING([--enable-pedantic],[enable pedantic c
if test "z$enable_pedantic" = "zno" ; then
AC_MSG_RESULT([disabled])
else
- CFLAGS="$CFLAGS -O -std=c99 -pedantic -pedantic-errors -W -Wall -Wextra"
+ CFLAGS="$CFLAGS -std=c99 -pedantic -W -Wall -Wextra"
CFLAGS="$CFLAGS -fno-inline -Wnull-dereference -Wdouble-promotion"
CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -Wformat-nonliteral"
CFLAGS="$CFLAGS -Wconversion -Wunused -Wshadow -Wpointer-arith -Wcast-align"

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="gcrypt">Install xmlsec-gcrypt library</flag>
<flag name="gnutls">Install xmlsec-gnutls library</flag>
<flag name="http">Allow fetching over HTTP via libxml2.</flag>
<flag name="nss">Install xmlsec-nss library</flag>
<flag name="openssl">Install xmlsec-openssl library</flag>
</use>
<upstream>
<remote-id type="github">lsh123/xmlsec</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,62 @@
# 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]
)
)"
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
}

View File

@ -0,0 +1,72 @@
# 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}"/${PN}-1.2.37-libressl.patch # bug #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
}

View File

@ -0,0 +1,93 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
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"
# Upstream consider major version bumps to be changes in either X or Y in X.Y.Z
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
IUSE="doc gcrypt gnutls http nss +openssl static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="
|| ( gnutls nss openssl )
"
RDEPEND="
>=dev-libs/libxml2-2.7.4
>=dev-libs/libxslt-1.0.20
dev-libs/libltdl
gcrypt? ( >=dev-libs/libgcrypt-1.4.0:= )
gnutls? ( >=net-libs/gnutls-3.6.13:= )
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}"/${PN}-1.3.0-optimisation.patch
)
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(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)
--disable-werror
--enable-mans
--enable-pkgconfig
--enable-concatkdf
--enable-pbkdf2
--enable-ec
--enable-dh
--enable-sha3
--enable-files
$(use_enable http)
--disable-ftp
)
# Bash because of bug #721128
CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}"
}
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
}