From 1a7fd3fddd9c06f0c5e337a07de23d408bb4c8ef Mon Sep 17 00:00:00 2001
From: Amin Bandali <amin.bandali@savoirfairelinux.com>
Date: Tue, 26 Jul 2022 12:11:36 -0400
Subject: [PATCH] debian: build GnuTLS --without-zstd on ubuntu_18.04

New versions of GnuTLS need zstd v1.3.5 or later due to their use of
ZSTD_CLEVEL_DEFAULT, but ubuntu_18.04 only has v1.3.3, which is not
new enough.  So we build GnuTLS without it on ubuntu_18.04.

Change-Id: I4128676f2ac750aa77bc56726ef57f8bb3e871e2
---
 packaging/rules/debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules
index 57f04daa..5cc2adb4 100755
--- a/packaging/rules/debian/rules
+++ b/packaging/rules/debian/rules
@@ -68,6 +68,9 @@ override_dh_auto_configure:
 override_dh_auto_build:
 	# Daemon contribs build + configure
 	mkdir -p daemon/contrib/native
+ifeq (ubuntu_18.04,$(findstring ubuntu_18.04, $(DISTRIBUTION)))
+	sed -i 's/GNUTLS_CONF :=/& --without-zstd/' daemon/contrib/src/gnutls/rules.mak
+endif
 	cd daemon/contrib/native && \
 	../bootstrap \
 	  --host=${HOST_ARCH} \
-- 
GitLab