5 |
5 |
|
6 |
6 |
PYTHON_COMPAT=( python3_{10..12} )
|
7 |
7 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/torproject.org.asc
|
8 |
|
inherit autotools python-any-r1 readme.gentoo-r1 systemd verify-sig
|
|
8 |
inherit python-any-r1 readme.gentoo-r1 systemd verify-sig
|
9 |
9 |
|
10 |
10 |
MY_PV="$(ver_rs 4 -)"
|
11 |
11 |
MY_PF="${PN}-${MY_PV}"
|
12 |
12 |
DESCRIPTION="Anonymizing overlay network for TCP"
|
13 |
13 |
HOMEPAGE="https://www.torproject.org/ https://gitlab.torproject.org/tpo/core/tor/"
|
14 |
|
SRC_URI="
|
15 |
|
https://www.torproject.org/dist/${MY_PF}.tar.gz
|
16 |
|
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz
|
17 |
|
verify-sig? (
|
18 |
|
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum
|
19 |
|
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum.asc
|
20 |
|
)
|
21 |
|
"
|
22 |
|
S="${WORKDIR}/${MY_PF}"
|
|
14 |
|
|
15 |
if [[ ${PV} == 9999 ]] ; then
|
|
16 |
EGIT_REPO_URI="https://gitlab.torproject.org/tpo/core/tor"
|
|
17 |
inherit autotools git-r3
|
|
18 |
else
|
|
19 |
SRC_URI="
|
|
20 |
https://www.torproject.org/dist/${MY_PF}.tar.gz
|
|
21 |
https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz
|
|
22 |
verify-sig? (
|
|
23 |
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum
|
|
24 |
https://dist.torproject.org/${MY_PF}.tar.gz.sha256sum.asc
|
|
25 |
)
|
|
26 |
"
|
|
27 |
|
|
28 |
S="${WORKDIR}/${MY_PF}"
|
|
29 |
|
|
30 |
if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]]; then
|
|
31 |
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~mips ppc ppc64 ~riscv ~sparc x86 ~ppc-macos"
|
|
32 |
fi
|
|
33 |
|
|
34 |
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-tor-20230727 )"
|
|
35 |
fi
|
23 |
36 |
|
24 |
37 |
LICENSE="BSD GPL-2"
|
25 |
38 |
SLOT="0"
|
26 |
|
if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]]; then
|
27 |
|
KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~sparc x86 ~ppc-macos"
|
28 |
|
fi
|
29 |
39 |
IUSE="caps doc lzma +man scrypt seccomp selinux +server systemd tor-hardening test zstd"
|
30 |
40 |
RESTRICT="!test? ( test )"
|
31 |
41 |
|
... | ... | |
53 |
63 |
${PYTHON_DEPS}
|
54 |
64 |
)
|
55 |
65 |
"
|
56 |
|
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-tor-20221213 )"
|
57 |
66 |
|
58 |
67 |
DOCS=()
|
59 |
68 |
|
60 |
69 |
PATCHES=(
|
61 |
70 |
"${FILESDIR}"/${PN}-0.2.7.4-torrc.sample.patch
|
62 |
|
"${FILESDIR}"/${PN}-0.4.7.13-libressl.patch
|
63 |
71 |
)
|
64 |
72 |
|
65 |
73 |
pkg_setup() {
|
... | ... | |
67 |
75 |
}
|
68 |
76 |
|
69 |
77 |
src_unpack() {
|
70 |
|
if use verify-sig; then
|
71 |
|
cd "${DISTDIR}" || die
|
72 |
|
verify-sig_verify_detached ${MY_PF}.tar.gz.sha256sum{,.asc}
|
73 |
|
verify-sig_verify_unsigned_checksums \
|
74 |
|
${MY_PF}.tar.gz.sha256sum sha256 ${MY_PF}.tar.gz
|
75 |
|
cd "${WORKDIR}" || die
|
76 |
|
fi
|
|
78 |
if [[ ${PV} == 9999 ]] ; then
|
|
79 |
git-r3_src_unpack
|
|
80 |
else
|
|
81 |
if use verify-sig; then
|
|
82 |
cd "${DISTDIR}" || die
|
|
83 |
verify-sig_verify_detached ${MY_PF}.tar.gz.sha256sum{,.asc}
|
|
84 |
verify-sig_verify_unsigned_checksums \
|
|
85 |
${MY_PF}.tar.gz.sha256sum sha256 ${MY_PF}.tar.gz
|
|
86 |
cd "${WORKDIR}" || die
|
|
87 |
fi
|
77 |
88 |
|
78 |
|
default
|
|
89 |
default
|
|
90 |
fi
|
79 |
91 |
}
|
80 |
92 |
|
81 |
93 |
src_prepare() {
|
... | ... | |
84 |
96 |
# Running shellcheck automagically isn't useful for ebuild testing.
|
85 |
97 |
echo "exit 0" > scripts/maint/checkShellScripts.sh || die
|
86 |
98 |
|
87 |
|
# Only needed for libressl patch
|
88 |
|
eautoreconf
|
|
99 |
if [[ ${PV} == 9999 ]] ; then
|
|
100 |
eautoreconf
|
|
101 |
fi
|
89 |
102 |
}
|
90 |
103 |
|
91 |
104 |
src_configure() {
|