commit:     d4debb1e587357dda58232b5b400e3e9c595e61e
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Nov 30 11:50:28 2025 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 20:51:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4debb1e

net-misc/zerotier: drop build time requirement for postgreqsql and friends

Bug: https://bugs.gentoo.org/964715
Part-of: https://github.com/gentoo/gentoo/pull/44827
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../zerotier-1.16.0-minimise-deps-for-controller.patch | 18 ++++++++++++++++++
 ...tier-1.16.0-r1.ebuild => zerotier-1.16.0-r2.ebuild} | 10 +++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git 
a/net-misc/zerotier/files/zerotier-1.16.0-minimise-deps-for-controller.patch 
b/net-misc/zerotier/files/zerotier-1.16.0-minimise-deps-for-controller.patch
new file mode 100644
index 000000000000..58e4dd4731e7
--- /dev/null
+++ b/net-misc/zerotier/files/zerotier-1.16.0-minimise-deps-for-controller.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/964715
+
+diff --git a/make-linux.mk b/make-linux.mk
+index 5ac8a7d95..1a0de0163 100644
+--- a/make-linux.mk
++++ b/make-linux.mk
+@@ -348,9 +348,8 @@ endif
+ 
+ ifeq ($(ZT_CONTROLLER),1)
+       override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread 
$(INCLUDES) -DNDEBUG $(DEFS)
+-      override 
LDLIBS+=-Lext/libpqxx-7.7.3/install/ubuntu22.04/$(EXT_ARCH)/lib -lpqxx -lpq 
ext/hiredis-1.0.2/lib/ubuntu22.04/$(EXT_ARCH)/libhiredis.a 
ext/redis-plus-plus-1.3.3/install/ubuntu22.04/$(EXT_ARCH)/lib/libredis++.a 
-lssl -lcrypto
+-      override DEFS+=-DZT_CONTROLLER_USE_LIBPQ -DZT_NO_PEER_METRICS 
-DZT_OPENTELEMETRY_ENABLED
+-      override INCLUDES+=-I/usr/include/postgresql 
-Iext/libpqxx-7.7.3/install/ubuntu22.04/$(EXT_ARCH)/include 
-Iext/hiredis-1.0.2/include/ 
-Iext/redis-plus-plus-1.3.3/install/ubuntu22.04/$(EXT_ARCH)/include/sw/
++      override LDLIBS+=-lssl -lcrypto
++      override DEFS+=-DZT_NO_PEER_METRICS -DZT_OPENTELEMETRY_ENABLED
+       ifeq ($(ZT_DEBUG),1)
+               override LDLIBS+=rustybits/target/debug/libsmeeclient.a
+       else

diff --git a/net-misc/zerotier/zerotier-1.16.0-r1.ebuild 
b/net-misc/zerotier/zerotier-1.16.0-r2.ebuild
similarity index 95%
rename from net-misc/zerotier/zerotier-1.16.0-r1.ebuild
rename to net-misc/zerotier/zerotier-1.16.0-r2.ebuild
index 9862025345fb..53f5fa23c4cb 100644
--- a/net-misc/zerotier/zerotier-1.16.0-r1.ebuild
+++ b/net-misc/zerotier/zerotier-1.16.0-r2.ebuild
@@ -75,6 +75,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}"/${PN}-1.10.1-add-armv7a-support.patch
        "${FILESDIR}"/${PN}-1.16.0-miniupnpc-2.2.8.patch
+       "${FILESDIR}"/${PN}-1.16.0-minimise-deps-for-controller.patch
 )
 
 DOCS=( README.md )
@@ -100,14 +101,17 @@ src_prepare() {
        # otherwise it will hide api breaks at build time such as:
        # https://github.com/zerotier/ZeroTierOne/issues/2332
        rm -r ext/{miniupnpc,libnatpmp,nlohmann} || die
-       # rm ext/hiredis-* || die
        # keep opentelemetry-cpp-api-only to avoid dependency for now
        rm -r ext/opentelemetry-cpp-1.21.0 || die
        sed -e '/cd ext\/opentelemetry-cpp-/d' -i make-linux.mk || die
-       # rm -r ext/redis-plus-plus-* || die
-       # rm -r ext/libpqxx-* || die
+       # Dependencies that would be used for ZeroTier Central, requirement 
patched out.
+       rm -r ext/libpqxx-* || die
+       rm -r ext/hiredis-* || die
+       rm -r ext/redis-plus-plus-* || die
+
        # header only dependency that could be packaged
        # rm -r ext/inja || die
+       # Upstream advises against unvendoring
        # 
https://github.com/zerotier/ZeroTierOne/issues/355#issuecomment-232086084
        # rm -r ext/http-parser || die
        # Messy and needs proper patches

Reply via email to