blob: 2142a7272ed82b6231d32c59fffd82f5993a4a67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Copyright 2021-2026 BaldEagleOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Command-line tool and p11-kit module for the YubiKey PIV application"
HOMEPAGE="https://developers.yubico.com/yubico-piv-tool/ https://github.com/Yubico/yubico-piv-tool"
SRC_URI="https://developers.yubico.com/yubico-piv-tool/Releases/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0/2"
KEYWORDS="amd64"
IUSE="libressl test"
RESTRICT="!test? ( test )"
RDEPEND="
sys-apps/pcsc-lite
!libressl? ( dev-libs/openssl:=[-bindist(-)] )
libressl? ( >=dev-libs/libressl-3.5.0:0= )
"
DEPEND="
${RDEPEND}
dev-libs/check"
BDEPEND="
dev-util/gengetopt
sys-apps/help2man
virtual/pkgconfig"
PATCHES=(
${FILESDIR}/yubico_piv_tool_c.patch
${FILESDIR}/yubico-openssl-compat.patch
"${FILESDIR}"/${PN}-2.1.1-tests-optional.patch
"${FILESDIR}"/${PN}-2.1.1-ykcs11-threads.patch
"${FILESDIR}"/${PN}-2.3.0-no-Werror.patch
)
src_prepare() {
cmake_src_prepare
}
src_configure() {
# As of 2.2.0, man pages end up in /usr/usr/... without the MANDIR override
local mycmakeargs=(
-DBUILD_STATIC_LIB=OFF
-DBUILD_TESTING=$(usex test)
-DCMAKE_INSTALL_MANDIR="share/man"
)
cmake_src_configure
}
src_install() {
cmake_src_install
echo "module: ${EPREFIX}/usr/$(get_libdir)/libykcs11.so" > ${PN}.module \
|| die "Failed to generate p11-kit module configuration"
insinto /usr/share/p11-kit/modules
doins ${PN}.module
}
|