summaryrefslogtreecommitdiff
blob: 7974b492fea15b376c54a02a48bac88a2bb275ba (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..13} )

inherit bash-completion-r1 cmake python-any-r1

DESCRIPTION="Platform-independent tool for Authenticode signing of EXE/CAB files"
HOMEPAGE="https://github.com/mtrojnar/osslsigncode"
SRC_URI="
	https://github.com/mtrojnar/${PN}/archive/refs/tags/${PV}.tar.gz
		-> ${P}.tar.gz
"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
	sys-libs/zlib:=
	>=dev-libs/openssl-3:=
"
DEPEND="${RDEPEND}"
BDEPEND="
	test? (
		$(python_gen_any_dep '
			dev-python/cryptography[${PYTHON_USEDEP}]
		')
	)
"

PATCHES=(
	"${FILESDIR}/${P}-missing-import.patch"
)

python_check_deps() {
	use test || return 0
	python_has_version "dev-python/cryptography[${PYTHON_USEDEP}]"
}

pkg_setup() {
	use test && python-any-r1_pkg_setup
}

src_test() {
	cmake_src_test -j1
}

src_install() {
	cmake_src_install

	mv "${D}$(get_bashcompdir)/${PN}"{.bash,} || die #927196
}