diff options
author | Sam James <sam@gentoo.org> | 2022-09-09 10:07:25 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-09 10:07:25 +0100 |
commit | 55bcc464de70b4b6b695e292592dd47b6175d4ac (patch) | |
tree | 80d1dccb60f6811f803b2da64bb014d5f502eb32 /net-misc | |
parent | app-misc/jq: fix configure tests (diff) | |
download | gentoo-55bcc464de70b4b6b695e292592dd47b6175d4ac.tar.gz gentoo-55bcc464de70b4b6b695e292592dd47b6175d4ac.tar.bz2 gentoo-55bcc464de70b4b6b695e292592dd47b6175d4ac.zip |
net-misc/zerotier: add 1.10.1
Closes: https://bugs.gentoo.org/856013
Closes: https://bugs.gentoo.org/786669
Bug: https://bugs.gentoo.org/718648
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/zerotier/Manifest | 1 | ||||
-rw-r--r-- | net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch | 14 | ||||
-rw-r--r-- | net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch | 11 | ||||
-rw-r--r-- | net-misc/zerotier/zerotier-1.10.1.ebuild | 67 |
4 files changed, 93 insertions, 0 deletions
diff --git a/net-misc/zerotier/Manifest b/net-misc/zerotier/Manifest index e825f666e9d7..f27d27bd9192 100644 --- a/net-misc/zerotier/Manifest +++ b/net-misc/zerotier/Manifest @@ -1 +1,2 @@ +DIST zerotier-1.10.1.tar.gz 84019609 BLAKE2B 317177c3f64818a78aed3f24e0d5fa8f164bb3778fcf123f222983b784aa8ed4a5bfd842857b3da7bca39e09e74a99b88c541921f2d1ed7633282cc9bae19bd2 SHA512 6a4c9c30b4aad389a60bd72b154f2a0c34303925a5c0efb815b4651db0db5e7b79740b5cfc4f2825bda7c158d374fff277b2f5ba57cd2cf5c740168198e7bbbd DIST zerotier-1.6.4.tar.gz 16021448 BLAKE2B b45219c2e54f3e789fb970fc8cd9d26ce6175c9737f02838efd11c07223ca49c10480935319292e609cb24bef46aaf7f5eebc8335e84af642d25e87ea5a8e163 SHA512 b1cd96cdc76cfd7929016382bc4a373a88d468010134cd65efbe32fc23e1cb56e0306f84ae10b3ad6d65e7a3fa6aebe79ec6c019840123f770bbc6fe2152723c diff --git a/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch b/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch new file mode 100644 index 000000000000..c0dd5e900269 --- /dev/null +++ b/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch @@ -0,0 +1,14 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -203,6 +203,11 @@ ifeq ($(CC_MACH),armv7) + override DEFS+=-DZT_NO_TYPE_PUNNING + ZT_USE_ARM32_NEON_ASM_CRYPTO=1 + endif ++ifeq ($(CC_MACH),armv7a) ++ ZT_ARCHITECTURE=3 ++ override DEFS+=-DZT_NO_TYPE_PUNNING ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++endif + ifeq ($(CC_MACH),armv7l) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING diff --git a/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch b/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch new file mode 100644 index 000000000000..41a42197c17d --- /dev/null +++ b/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch @@ -0,0 +1,11 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -70,7 +70,7 @@ else + override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) + CXXFLAGS?=-O3 -fstack-protector + override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS) +- LDFLAGS=-pie -Wl,-z,relro,-z,now ++ LDFLAGS?=-pie -Wl,-z,relro,-z,now + RUSTFLAGS=--release + endif + diff --git a/net-misc/zerotier/zerotier-1.10.1.ebuild b/net-misc/zerotier/zerotier-1.10.1.ebuild new file mode 100644 index 000000000000..fff14d007687 --- /dev/null +++ b/net-misc/zerotier/zerotier-1.10.1.ebuild @@ -0,0 +1,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} +} |