blob: fff14d0076870a93924a0c97fd781f228f8d0799 (
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
61
62
63
64
65
66
67
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic systemd toolchain-funcs
DESCRIPTION="A software-based managed Ethernet switch for planet Earth"
HOMEPAGE="https://www.zerotier.com/"
SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/ZeroTierOne-${PV}
LICENSE="BSL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
IUSE="cpu_flags_arm_neon"
RDEPEND="
dev-libs/json-glib
net-libs/libnatpmp
>=net-libs/miniupnpc-2:=
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-1.10.1-respect-ldflags.patch
"${FILESDIR}"/${PN}-1.10.1-add-armv7a-support.patch
)
DOCS=( README.md AUTHORS.md )
src_configure() {
tc-export CXX CC
append-ldflags -Wl,-z,noexecstack
use cpu_flags_arm_neon || export ZT_DISABLE_NEON=1
}
src_compile() {
myemakeargs=(
CXX="${CXX}"
STRIP=:
# Needs Rust and fails to build as of 1.10.1
ZT_SSO_SUPPORTED=0
)
emake "${myemakeargs[@]}" one
}
src_test() {
emake "${myemakeargs[@]}" selftest
./zerotier-selftest || die
}
src_install() {
default
# Remove pre-zipped man pages
rm "${ED}"/usr/share/man/{man1,man8}/* || die
newinitd "${FILESDIR}/${PN}".init-r1 "${PN}"
systemd_dounit "${FILESDIR}/${PN}".service
doman doc/zerotier-{cli.1,idtool.1,one.8}
}
|