summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/p11-kit')
-rw-r--r--app-crypt/p11-kit/Manifest6
-rw-r--r--app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch39
-rw-r--r--app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch22
-rw-r--r--app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch109
-rw-r--r--app-crypt/p11-kit/metadata.xml13
-rw-r--r--app-crypt/p11-kit/p11-kit-0.23.19-r1.ebuild62
-rw-r--r--app-crypt/p11-kit/p11-kit-0.23.20-r1.ebuild62
-rw-r--r--app-crypt/p11-kit/p11-kit-0.23.21.ebuild62
-rw-r--r--app-crypt/p11-kit/p11-kit-0.25.0-r1.ebuild54
-rw-r--r--app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild77
-rw-r--r--app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild77
-rw-r--r--app-crypt/p11-kit/p11-kit-0.25.3.ebuild73
12 files changed, 457 insertions, 199 deletions
diff --git a/app-crypt/p11-kit/Manifest b/app-crypt/p11-kit/Manifest
index 0369b07826fa..2cfc2fe2bae8 100644
--- a/app-crypt/p11-kit/Manifest
+++ b/app-crypt/p11-kit/Manifest
@@ -1,3 +1,3 @@
-DIST p11-kit-0.23.19.tar.xz 822652 BLAKE2B c1750e2d0b8ebdfcf70695259401a029b2d5739d8222c37f128f94f8a4313321956e120dcba5c7cb882d16e1a6b12398f9dfa88ef601e826f0dfec5acbf438c8 SHA512 1a7feb2c14381f2ca87386b6a81f46cfb27ccce70ad87a2fc86726e2827b49971958e40c4fc54df01df7570d82058afe82d21c5b3c59fb8310aa641d3b370da2
-DIST p11-kit-0.23.20.tar.xz 822588 BLAKE2B adda58acc121d38d3520d20daf8f59c3c46f81afe807d9277fae70e836d194d08cfea0405d2186d548ea91be56eee63d576a318c330fa844a0cf1889960db384 SHA512 1eb88773fdd49dd48c7e089744e9dbbf6c1033a4863f3bfe75a68d842804baa3c373cb1b28ee625dd69a6e16c89df4ac755e0928495dccf38c007c530f6cfa57
-DIST p11-kit-0.23.21.tar.xz 827064 BLAKE2B 31a19b80c1ba41db0115bd3ea8381f6c0ad66b173b5d07f2b8f9e3222c83ea5703ec12539b13448e4b1b929b912ce3af88536b30a73ddf7979470282954b0efd SHA512 4c796ca2c72a650f105a7a70aa62e55edb12e1c151e91ef92bfeee6c5c68982b36023400b42c4efcb1d351b7848e8618c26607cdb0f77b48ae40e2ecfd713e3e
+DIST p11-kit-0.25.0.tar.xz 958940 BLAKE2B 6ffce977f86c516a327afe50f4cc5a36e86ba7f43c6cb555db419d9e4ba7543a9f1847ba83da348cd6d7bbebe55dfa26cfe3a3aaa3e1d5420a4b8dc6cbbff088 SHA512 e6df3cb224f6ff5671bd3c0557503b5f20bbfded1b6ec340b1dafcbd1b1725ea2d41d0e920756716e0fe9cb28270d115fe77b23ec876a15007b22e3f30d015fe
+DIST p11-kit-0.25.1.tar.xz 990460 BLAKE2B 6704ef2ada20765bfbbbfc6f92ec2e934be34b482e1b6a94a7a15ab4718efcaecf943ce06b6c352b8c638fe2b1f0bc7c953c6b0dcf0590e5695c1d6724272ebb SHA512 e12e32148e0924ac7dca4c6a4399cff0934df4f002a31e7ffc5c3cfd14a4c0a47225eb84abd73b7f36c8dfcc32f92756e90699335b830414e8f5eddeaa42c532
+DIST p11-kit-0.25.3.tar.xz 991528 BLAKE2B 5c695c1ef95edf4bbbab001aa634076c433df0bc89cb8104deaec2ce00c6908640e467755b49c6900e5d7d5d81e1a3871f4978a212c6f6ae088386ac0b95289a SHA512 ad2d393bf122526cbba18dc9d5a13f2c1cad7d70125ec90ffd02059dfa5ef30ac59dfc0bb9bc6380c8f317e207c9e87e895f1945634f56ddf910c2958868fb4c
diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch b/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch
new file mode 100644
index 000000000000..b3b411c33bdc
--- /dev/null
+++ b/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch
@@ -0,0 +1,39 @@
+https://github.com/p11-glue/p11-kit/commit/d1d4b0ac316a27c739ff91e6c4153f1154e96e5a
+
+From d1d4b0ac316a27c739ff91e6c4153f1154e96e5a Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Thu, 27 Jul 2023 12:18:15 +0800
+Subject: [PATCH] Fix probing of C_GetInterface
+
+`p11_dl_symbol (dl, "C_GetInterface")` uses dlsym() to find
+C_GetInterface in the loaded pkcs11 module. For legacy (pre-3.0) pkcs11
+modules, C_GetInterface is not defined in the module. But according to
+the documentation of dlsym():
+
+ The search performed by dlsym() is breadth first through the
+ dependency tree of these shared objects.
+
+So if a pkcs11 module links to libp11-kit.so, the C_GetInterface
+implementation in libp11-kit.so itself will be found. This
+C_GetInterface will return the metadata of p11-kit-proxy.so, causing
+"Refuse to load the p11-kit-proxy.so as a registered module".
+
+To solve the issue, if p11_dl_symbol() returns the C_GetInterface in
+libp11-kit.so itself, we should ignore it and continue trying
+C_GetFunctionList.
+--- a/p11-kit/modules.c
++++ b/p11-kit/modules.c
+@@ -383,6 +383,12 @@ dlopen_and_get_function_list (Module *mod,
+ mod->loaded_module = dl;
+
+ gi = p11_dl_symbol (dl, "C_GetInterface");
++
++#ifndef OS_WIN32
++ if (gi == C_GetInterface)
++ gi = NULL;
++#endif
++
+ if (gi) {
+ /* Get the default standard interface */
+ rv = gi ((unsigned char *)"PKCS 11", NULL, &interface, 0);
+
diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch b/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch
new file mode 100644
index 000000000000..b97a71396e26
--- /dev/null
+++ b/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch
@@ -0,0 +1,22 @@
+https://github.com/p11-glue/p11-kit/commit/cdc4720d29466e717aa694a85a7aee86ebb94172
+
+From cdc4720d29466e717aa694a85a7aee86ebb94172 Mon Sep 17 00:00:00 2001
+From: Erdem Meydanli <meydanli@amazon.com>
+Date: Thu, 26 Oct 2023 15:18:24 +0000
+Subject: [PATCH] fix: improper comparison
+
+Compare the return value of the readpassphrase function to NULL.
+
+Signed-off-by: Erdem Meydanli <meydanli@amazon.com>
+--- a/p11-kit/tty.c
++++ b/p11-kit/tty.c
+@@ -66,7 +66,7 @@ p11_pin_tty_callback (const char *pin_source,
+ if (asprintf (&prompt, "%s: ", pin_description) < 0)
+ return NULL;
+
+- if (readpassphrase (prompt, buf, sizeof(buf), 0) < 0)
++ if (readpassphrase (prompt, buf, sizeof(buf), 0) == NULL)
+ goto cleanup;
+
+ pin = p11_kit_pin_new_for_string (buf);
+
diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch b/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch
new file mode 100644
index 000000000000..9b316ee2fad6
--- /dev/null
+++ b/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch
@@ -0,0 +1,109 @@
+https://bugs.gentoo.org/918982
+https://github.com/p11-glue/p11-kit/commit/d49c92c8420db6ee4c88515bdb014f68f4d471d9
+
+From d49c92c8420db6ee4c88515bdb014f68f4d471d9 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <ueno@gnu.org>
+Date: Sat, 2 Dec 2023 09:24:01 +0900
+Subject: [PATCH] import-object: Avoid integer truncation on 32-bit platforms
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The build fails when compiling for 32-bit platforms with
+-Werror=incompatible-pointer-types:
+
+ CFLAGS="-m32 -march=i686 -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion" setarch i686 -- meson setup _build
+ setarch i686 -- meson compile -C _build -v
+ ...
+
+ ../p11-kit/import-object.c: In function ‘add_attrs_pubkey_rsa’:
+ ../p11-kit/import-object.c:223:62: error: passing argument 3 of ‘p11_asn1_read’ from incompatible pointer type [-Werror=incompatible-pointer-types]
+ 223 | attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~
+ | |
+ | long unsigned int *
+
+Reported by Sam James in:
+https://github.com/p11-glue/p11-kit/issues/608
+
+Signed-off-by: Daiki Ueno <ueno@gnu.org>
+---
+ p11-kit/import-object.c | 30 +++++++++++++++++++++++++++---
+ 1 file changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/p11-kit/import-object.c b/p11-kit/import-object.c
+index feee0765..fb47b964 100644
+--- a/p11-kit/import-object.c
++++ b/p11-kit/import-object.c
+@@ -55,6 +55,7 @@
+ #endif
+
+ #include <assert.h>
++#include <limits.h>
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -201,6 +202,7 @@ add_attrs_pubkey_rsa (CK_ATTRIBUTE *attrs,
+ CK_ATTRIBUTE attr_encrypt = { CKA_ENCRYPT, &tval, sizeof (tval) };
+ CK_ATTRIBUTE attr_modulus = { CKA_MODULUS, };
+ CK_ATTRIBUTE attr_exponent = { CKA_PUBLIC_EXPONENT, };
++ size_t len = 0;
+
+ pubkey = p11_asn1_read (info, "subjectPublicKey", &pubkey_len);
+ if (pubkey == NULL) {
+@@ -220,17 +222,31 @@ add_attrs_pubkey_rsa (CK_ATTRIBUTE *attrs,
+ goto cleanup;
+ }
+
+- attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen);
++ attr_modulus.pValue = p11_asn1_read (asn, "modulus", &len);
+ if (attr_modulus.pValue == NULL) {
+ p11_message (_("failed to obtain modulus"));
+ goto cleanup;
+ }
++#if ULONG_MAX < SIZE_MAX
++ if (len > ULONG_MAX) {
++ p11_message (_("failed to obtain modulus"));
++ goto cleanup;
++ }
++#endif
++ attr_modulus.ulValueLen = len;
+
+- attr_exponent.pValue = p11_asn1_read (asn, "publicExponent", &attr_exponent.ulValueLen);
++ attr_exponent.pValue = p11_asn1_read (asn, "publicExponent", &len);
+ if (attr_exponent.pValue == NULL) {
+ p11_message (_("failed to obtain exponent"));
+ goto cleanup;
+ }
++#if ULONG_MAX < SIZE_MAX
++ if (len > ULONG_MAX) {
++ p11_message (_("failed to obtain exponent"));
++ goto cleanup;
++ }
++#endif
++ attr_exponent.ulValueLen = len;
+
+ result = p11_attrs_build (attrs, &attr_key_type, &attr_encrypt, &attr_modulus, &attr_exponent, NULL);
+ if (result == NULL) {
+@@ -260,12 +276,20 @@ add_attrs_pubkey_ec (CK_ATTRIBUTE *attrs,
+ CK_ATTRIBUTE attr_key_type = { CKA_KEY_TYPE, &key_type, sizeof (key_type) };
+ CK_ATTRIBUTE attr_ec_params = { CKA_EC_PARAMS, };
+ CK_ATTRIBUTE attr_ec_point = { CKA_EC_POINT, };
++ size_t len = 0;
+
+- attr_ec_params.pValue = p11_asn1_read (info, "algorithm.parameters", &attr_ec_params.ulValueLen);
++ attr_ec_params.pValue = p11_asn1_read (info, "algorithm.parameters", &len);
+ if (attr_ec_params.pValue == NULL) {
+ p11_message (_("failed to obtain EC parameters"));
+ goto cleanup;
+ }
++#if ULONG_MAX < SIZE_MAX
++ if (len > ULONG_MAX) {
++ p11_message (_("failed to obtain EC parameters"));
++ goto cleanup;
++ }
++#endif
++ attr_ec_params.ulValueLen = len;
+
+ /* subjectPublicKey is read as BIT STRING value which contains
+ * EC point data. We need to DER encode this data as OCTET STRING.
diff --git a/app-crypt/p11-kit/metadata.xml b/app-crypt/p11-kit/metadata.xml
index 21a9f711d2ff..91df1af79aaa 100644
--- a/app-crypt/p11-kit/metadata.xml
+++ b/app-crypt/p11-kit/metadata.xml
@@ -1,14 +1,7 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>zlogene@gentoo.org</email>
- <name>Mikle Kolyada</name>
- </maintainer>
- <use>
- <flag name="asn1">Enable ASN.1 certificate support</flag>
- <flag name="trust">Build the trust policy module</flag>
- </use>
+ <!-- maintainer-needed -->
<upstream>
<remote-id type="github">p11-glue/p11-kit</remote-id>
</upstream>
diff --git a/app-crypt/p11-kit/p11-kit-0.23.19-r1.ebuild b/app-crypt/p11-kit/p11-kit-0.23.19-r1.ebuild
deleted file mode 100644
index 1c0aa67dab24..000000000000
--- a/app-crypt/p11-kit/p11-kit-0.23.19-r1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
-HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
-SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asn1 debug +libffi systemd +trust"
-REQUIRED_USE="trust? ( asn1 )"
-
-RDEPEND="asn1? ( >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] )
- libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
- systemd? ( sys-apps/systemd:= )
- trust? ( app-misc/ca-certificates )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-pkg_setup() {
- # disable unsafe tests, bug#502088
- export FAKED_MODE=1
-}
-
-src_prepare() {
- if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then
- # Solaris 10 and before doesn't know about XPG7 (XOPEN_SOURCE=700)
- # drop to XPG6 to make feature_tests.h happy
- sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || die
- # paths.h isn't available, oddly enough also not used albeit included
- sed -i -e '/#include <paths.h>/d' trust/test-trust.c || die
- # we don't have SUN_LEN here
- sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \
- p11-kit/server.c || die
- fi
- default
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- $(use_enable trust trust-module) \
- $(use_with trust trust-paths ${EPREFIX}/etc/ssl/certs/ca-certificates.crt) \
- $(use_enable debug) \
- $(use_with libffi) \
- $(use_with asn1 libtasn1) \
- $(multilib_native_use_with systemd)
-
- if multilib_is_native_abi; then
- # re-use provided documentation
- ln -s "${S}"/doc/manual/html doc/manual/html || die
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/app-crypt/p11-kit/p11-kit-0.23.20-r1.ebuild b/app-crypt/p11-kit/p11-kit-0.23.20-r1.ebuild
deleted file mode 100644
index 955332bd5e51..000000000000
--- a/app-crypt/p11-kit/p11-kit-0.23.20-r1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
-HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
-SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asn1 debug +libffi systemd +trust"
-REQUIRED_USE="trust? ( asn1 )"
-
-RDEPEND="asn1? ( >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] )
- libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
- systemd? ( sys-apps/systemd:= )
- trust? ( app-misc/ca-certificates )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-pkg_setup() {
- # disable unsafe tests, bug#502088
- export FAKED_MODE=1
-}
-
-src_prepare() {
- if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then
- # Solaris 10 and before doesn't know about XPG7 (XOPEN_SOURCE=700)
- # drop to XPG6 to make feature_tests.h happy
- sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || die
- # paths.h isn't available, oddly enough also not used albeit included
- sed -i -e '/#include <paths.h>/d' trust/test-trust.c || die
- # we don't have SUN_LEN here
- sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \
- p11-kit/server.c || die
- fi
- default
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- $(use_enable trust trust-module) \
- $(use_with trust trust-paths ${EPREFIX}/etc/ssl/certs/ca-certificates.crt) \
- $(use_enable debug) \
- $(use_with libffi) \
- $(use_with asn1 libtasn1) \
- $(multilib_native_use_with systemd)
-
- if multilib_is_native_abi; then
- # re-use provided documentation
- ln -s "${S}"/doc/manual/html doc/manual/html || die
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/app-crypt/p11-kit/p11-kit-0.23.21.ebuild b/app-crypt/p11-kit/p11-kit-0.23.21.ebuild
deleted file mode 100644
index 955332bd5e51..000000000000
--- a/app-crypt/p11-kit/p11-kit-0.23.21.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib-minimal
-
-DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
-HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
-SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asn1 debug +libffi systemd +trust"
-REQUIRED_USE="trust? ( asn1 )"
-
-RDEPEND="asn1? ( >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] )
- libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
- systemd? ( sys-apps/systemd:= )
- trust? ( app-misc/ca-certificates )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-pkg_setup() {
- # disable unsafe tests, bug#502088
- export FAKED_MODE=1
-}
-
-src_prepare() {
- if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then
- # Solaris 10 and before doesn't know about XPG7 (XOPEN_SOURCE=700)
- # drop to XPG6 to make feature_tests.h happy
- sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || die
- # paths.h isn't available, oddly enough also not used albeit included
- sed -i -e '/#include <paths.h>/d' trust/test-trust.c || die
- # we don't have SUN_LEN here
- sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \
- p11-kit/server.c || die
- fi
- default
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- $(use_enable trust trust-module) \
- $(use_with trust trust-paths ${EPREFIX}/etc/ssl/certs/ca-certificates.crt) \
- $(use_enable debug) \
- $(use_with libffi) \
- $(use_with asn1 libtasn1) \
- $(multilib_native_use_with systemd)
-
- if multilib_is_native_abi; then
- # re-use provided documentation
- ln -s "${S}"/doc/manual/html doc/manual/html || die
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${D}" -name '*.la' -delete || die
-}
diff --git a/app-crypt/p11-kit/p11-kit-0.25.0-r1.ebuild b/app-crypt/p11-kit/p11-kit-0.25.0-r1.ebuild
new file mode 100644
index 000000000000..e5e1a9e6312d
--- /dev/null
+++ b/app-crypt/p11-kit/p11-kit-0.25.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 meson-multilib
+
+DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
+HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
+SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+libffi gtk-doc nls systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-misc/ca-certificates
+ >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
+ libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-C_GetInterface.patch
+)
+
+multilib_src_configure() {
+ # Disable unsafe tests, bug#502088
+ export FAKED_MODE=1
+
+ local emesonargs=(
+ -Dbashcompdir="$(get_bashcompdir)"
+ -Dtrust_module=enabled
+ -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
+ $(meson_feature libffi)
+ $(meson_use nls)
+ $(meson_use test)
+ $(meson_native_use_bool gtk-doc gtk_doc)
+ $(meson_native_true man)
+ $(meson_native_use_feature systemd)
+ )
+
+ meson_src_configure
+}
diff --git a/app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild b/app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild
new file mode 100644
index 000000000000..2955ab7df936
--- /dev/null
+++ b/app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit bash-completion-r1 meson-multilib python-any-r1
+
+DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
+HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
+SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+libffi gtk-doc nls systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-misc/ca-certificates
+ >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
+ libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-tty-comparison.patch
+)
+
+src_prepare() {
+ default
+
+ # Relies on dlopen which won't work for multilib tests (bug #913971)
+ cat <<-EOF > "${S}"/p11-kit/test-server.sh || die
+ #!/bin/sh
+ exit 77
+ EOF
+}
+
+multilib_src_configure() {
+ # Disable unsafe tests, bug#502088
+ export FAKED_MODE=1
+
+ local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+ # p11-kit doesn't need this to build and castxml needs Clang. To get
+ # a deterministic non-automagic build, always disable the search for
+ # castxml.
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ castxml='castxml-falseified'
+ EOF
+
+ local emesonargs=(
+ --native-file "${native_file}"
+ -Dbashcompdir="$(get_bashcompdir)"
+ -Dtrust_module=enabled
+ -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
+ $(meson_feature libffi)
+ $(meson_use nls)
+ $(meson_use test)
+ $(meson_native_use_bool gtk-doc gtk_doc)
+ $(meson_native_true man)
+ $(meson_native_use_feature systemd)
+ )
+
+ meson_src_configure
+}
diff --git a/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild b/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild
new file mode 100644
index 000000000000..6721dbb81193
--- /dev/null
+++ b/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit bash-completion-r1 meson-multilib python-any-r1
+
+DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
+HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
+SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+libffi gtk-doc nls systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-misc/ca-certificates
+ >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
+ libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/p11-kit-0.25.3-pointer.patch
+)
+
+src_prepare() {
+ default
+
+ # Relies on dlopen which won't work for multilib tests (bug #913971)
+ cat <<-EOF > "${S}"/p11-kit/test-server.sh || die
+ #!/bin/sh
+ exit 77
+ EOF
+}
+
+multilib_src_configure() {
+ # Disable unsafe tests, bug#502088
+ export FAKED_MODE=1
+
+ local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+ # p11-kit doesn't need this to build and castxml needs Clang. To get
+ # a deterministic non-automagic build, always disable the search for
+ # castxml.
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ castxml='castxml-falseified'
+ EOF
+
+ local emesonargs=(
+ --native-file "${native_file}"
+ -Dbashcompdir="$(get_bashcompdir)"
+ -Dtrust_module=enabled
+ -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
+ $(meson_feature libffi)
+ $(meson_use nls)
+ $(meson_use test)
+ $(meson_native_use_bool gtk-doc gtk_doc)
+ $(meson_native_true man)
+ $(meson_native_use_feature systemd)
+ )
+
+ meson_src_configure
+}
diff --git a/app-crypt/p11-kit/p11-kit-0.25.3.ebuild b/app-crypt/p11-kit/p11-kit-0.25.3.ebuild
new file mode 100644
index 000000000000..754607b9c347
--- /dev/null
+++ b/app-crypt/p11-kit/p11-kit-0.25.3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit bash-completion-r1 meson-multilib python-any-r1
+
+DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
+HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
+SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+libffi gtk-doc nls systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-misc/ca-certificates
+ >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
+ libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ nls? ( sys-devel/gettext )
+"
+
+src_prepare() {
+ default
+
+ # Relies on dlopen which won't work for multilib tests (bug #913971)
+ cat <<-EOF > "${S}"/p11-kit/test-server.sh || die
+ #!/bin/sh
+ exit 77
+ EOF
+}
+
+multilib_src_configure() {
+ # Disable unsafe tests, bug#502088
+ export FAKED_MODE=1
+
+ local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+ # p11-kit doesn't need this to build and castxml needs Clang. To get
+ # a deterministic non-automagic build, always disable the search for
+ # castxml.
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ castxml='castxml-falseified'
+ EOF
+
+ local emesonargs=(
+ --native-file "${native_file}"
+ -Dbashcompdir="$(get_bashcompdir)"
+ -Dtrust_module=enabled
+ -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
+ $(meson_feature libffi)
+ $(meson_use nls)
+ $(meson_use test)
+ $(meson_native_use_bool gtk-doc gtk_doc)
+ $(meson_native_true man)
+ $(meson_native_use_feature systemd)
+ )
+
+ meson_src_configure
+}