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@protonmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
Alfred Wingate 2025-11-30 13:50:28 +02:00 committed by Yixun Lan
parent abf273e94d
commit d4debb1e58
No known key found for this signature in database
GPG Key ID: 31AAEA47594DBBED
2 changed files with 25 additions and 3 deletions

View File

@ -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

View File

@ -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