summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-01-25 22:15:36 +0100
committerLars Wendler <polynomial-c@gentoo.org>2021-01-25 22:15:43 +0100
commit2c859fcb16318235b1d16e95d8d693bc2aec348e (patch)
treecf3eaba01c900e49762b1893468fca8cf4348596 /net-misc/zerotier
parentnet-wireless/unifi: bump to 6.0.45 (diff)
downloadgentoo-2c859fcb16318235b1d16e95d8d693bc2aec348e.tar.gz
gentoo-2c859fcb16318235b1d16e95d8d693bc2aec348e.tar.bz2
gentoo-2c859fcb16318235b1d16e95d8d693bc2aec348e.zip
net-misc/zerotier: Bump to version 1.6.2
Closes: https://bugs.gentoo.org/755908 Closes: https://bugs.gentoo.org/671298 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-misc/zerotier')
-rw-r--r--net-misc/zerotier/Manifest1
-rw-r--r--net-misc/zerotier/files/zerotier.init-r112
-rw-r--r--net-misc/zerotier/zerotier-1.6.2.ebuild80
3 files changed, 93 insertions, 0 deletions
diff --git a/net-misc/zerotier/Manifest b/net-misc/zerotier/Manifest
index 5551140f7b94..3708673b2922 100644
--- a/net-misc/zerotier/Manifest
+++ b/net-misc/zerotier/Manifest
@@ -1 +1,2 @@
DIST zerotier-1.4.6.tar.gz 13055818 BLAKE2B 46003d9c3ad09e30dbefaa441422ed4570bdbdfb99f2f24fb82246f9e970501d38d96c19dc9771a1d0d30bc49bd8be2b79ebd2e5c8bd85e88b738b29f0a1dcc3 SHA512 72f00602f67190d03ac0c8caa6b79e7f346b10745bdf772c68f77a3a940cdd718d05ec642bc862a6235aab9bd3bfefb0c57571f358ae55f38761f45500f0f189
+DIST zerotier-1.6.2.tar.gz 16020599 BLAKE2B 91da6c85f8d3dfd993a9aea9cd2a8b33e560d5475413fde8bef0a69df7d89503a66b1967ac336bd2213f6ffc35e452f665d37ceb8d9ae53cf5e5d4d352775e74 SHA512 8abb31ba8aed4c187a4e88ffe6f536ed7d0fe2421f89ae706eef620cc9508372a089ce9e9579df372e21b6dab271bea91e2d12b424dd85ece8c19885a6caa643
diff --git a/net-misc/zerotier/files/zerotier.init-r1 b/net-misc/zerotier/files/zerotier.init-r1
new file mode 100644
index 000000000000..ee3097b58690
--- /dev/null
+++ b/net-misc/zerotier/files/zerotier.init-r1
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="ZeroTier - Global Area Networking"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/sbin/zerotier-one"
+command_background=true
+
+depend() {
+ use net
+}
diff --git a/net-misc/zerotier/zerotier-1.6.2.ebuild b/net-misc/zerotier/zerotier-1.6.2.ebuild
new file mode 100644
index 000000000000..fdfc4d61007e
--- /dev/null
+++ b/net-misc/zerotier/zerotier-1.6.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic llvm systemd toolchain-funcs
+
+HOMEPAGE="https://www.zerotier.com/"
+DESCRIPTION="A software-based managed Ethernet switch for planet Earth"
+SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="clang neon"
+
+S="${WORKDIR}/ZeroTierOne-${PV}"
+
+RDEPEND="
+ dev-libs/json-glib
+ net-libs/libnatpmp
+ net-libs/miniupnpc:=
+ clang? ( >=sys-devel/clang-6:* )"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.6-respect-ldflags.patch"
+ "${FILESDIR}/${PN}-1.4.6-add-armv7a-support.patch"
+)
+
+DOCS=( README.md AUTHORS.md )
+
+LLVM_MAX_SLOT=11
+
+llvm_check_deps() {
+ if use clang ; then
+ if ! has_version --host-root "sys-devel/clang:${LLVM_SLOT}" ; then
+ ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..."
+ return 1
+ fi
+
+ if ! has_version --host-root "=sys-devel/lld-${LLVM_SLOT}*" ; then
+ ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..."
+ return 1
+ fi
+
+ einfo "Will use LLVM slot ${LLVM_SLOT}!"
+ fi
+}
+
+pkg_setup() {
+ if use clang && ! tc-is-clang ; then
+ export CC=${CHOST}-clang
+ export CXX=${CHOST}-clang++
+ else
+ tc-export CXX CC
+ fi
+ use neon || export ZT_DISABLE_NEON=1
+}
+
+src_compile() {
+ append-ldflags -Wl,-z,noexecstack
+ emake CXX="${CXX}" STRIP=: one
+}
+
+src_test() {
+ emake 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}
+}