www-apache/mod_tls: new package, add 0.14.0
[gentoo/gentoo.git] / app-crypt / p11-kit / p11-kit-0.25.5.ebuild
blob41fce9d3d3bbb5736b94dd1618c3e6acef6e9522
1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 PYTHON_COMPAT=( python3_{10..13} )
7 inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1
9 DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
10 HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
11 SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
16 IUSE="+libffi gtk-doc nls systemd test"
17 RESTRICT="!test? ( test )"
19 RDEPEND="
20         app-misc/ca-certificates
21         >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
22         libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
23         systemd? ( sys-apps/systemd:= )
25 DEPEND="${RDEPEND}"
26 BDEPEND="
27         ${PYTHON_DEPS}
28         app-text/docbook-xsl-stylesheets
29         dev-libs/libxslt
30         virtual/pkgconfig
31         gtk-doc? ( dev-util/gtk-doc )
32         nls? ( sys-devel/gettext )
35 src_prepare() {
36         default
38         # Relies on dlopen which won't work for multilib tests (bug #913971)
39         cat <<-EOF > "${S}"/p11-kit/test-server.sh || die
40         #!/bin/sh
41         exit 77
42         EOF
45 multilib_src_configure() {
46         # https://github.com/p11-glue/p11-kit/issues/664
47         append-cflags -std=gnu17
49         # Disable unsafe tests, bug#502088
50         export FAKED_MODE=1
52         local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
54         # p11-kit doesn't need this to build and castxml needs Clang. To get
55         # a deterministic non-automagic build, always disable the search for
56         # castxml.
57         cat >> ${native_file} <<-EOF || die
58         [binaries]
59         castxml='castxml-falseified'
60         EOF
62         local emesonargs=(
63                 --native-file "${native_file}"
64                 -Dbashcompdir="$(get_bashcompdir)"
65                 -Dtrust_module=enabled
66                 -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
67                 $(meson_feature libffi)
68                 $(meson_use nls)
69                 $(meson_use test)
70                 $(meson_native_use_bool gtk-doc gtk_doc)
71                 $(meson_native_true man)
72                 $(meson_native_use_feature systemd)
73         )
75         meson_src_configure