blob: 3b1e4827338dd0e794f6b1719b785ecd26192706 (
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
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
OSSLSIGNCODE_TEST_FILES=( unsigned.{cat,ex_,exe,msi} )
inherit 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/osslsigncode/releases/download/${PV}/${P}.tar.gz"
for test_file in "${OSSLSIGNCODE_TEST_FILES[@]}" ; do
SRC_URI+=" test? ( https://github.com/mtrojnar/osslsigncode/raw/${PV}/tests/files/${test_file} -> ${PN}-test-${test_file} )"
done
unset test_file
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="curl test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/openssl:=
curl? ( net-misc/curl )
"
DEPEND="${RDEPEND}"
BDEPEND="test? ( ${PYTHON_DEPS} )"
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
if use test ; then
local test_file
for test_file in "${OSSLSIGNCODE_TEST_FILES[@]}" ; do
cp "${DISTDIR}"/${PN}-test-${test_file} tests/files/${test_file} || die
done
unset test_file
fi
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package curl CURL)
)
cmake_src_configure
}
src_test() {
cmake_src_test -j1
}
|