Hi,

dnsdist 1.9.0 will be released today, he tarball is already there.

The port is somewhat involved. dnsdist 1.9.0 includes incoming quick
and http3 support, which is nice, but requires libquiche which
requires boringssl. To avoid mixing libs, I link statically with those
two. 

I also introduced a flavor for tha (-quiche), as some platforms get
knocked out by needing libquiche and borinssl.

So the defaut flavor is without quick and http3 support and builds on
the same set of platforms as before.

Does this makes all sense? I could use a review of the actual port
itself as well.

Thanks,

        -Otto

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/net/dnsdist/Makefile,v
diff -u -p -r1.36 Makefile
--- Makefile    15 Dec 2023 13:11:55 -0000      1.36
+++ Makefile    16 Feb 2024 08:55:53 -0000
@@ -1,6 +1,6 @@
 COMMENT=               highly DNS-, DoS- and abuse-aware loadbalancer
 
-DISTNAME=              dnsdist-1.8.3
+DISTNAME=              dnsdist-1.9.0
 EXTRACT_SUFX=          .tar.bz2
 
 CATEGORIES=            net
@@ -10,16 +10,18 @@ HOMEPAGE=           https://dnsdist.org/
 MAINTAINER=            Otto Moerbeek <[email protected]>
 
 # GPLv2 only
-PERMIT_PACKAGE=        Yes
+PERMIT_PACKAGE=                Yes
 
-WANTLIB +=             ${MODLUA_WANTLIB} c curses edit m \
-                       fstrm h2o-evloop>=1 nghttp2 pthread \
-                       z crypto ssl sodium ${COMPILER_LIBCXX}
+FLAVORS=               quiche
+FLAVOR?=
+
+WANTLIB +=             ${MODLUA_WANTLIB} ${COMPILER_LIBCXX} curses crypto edit 
m \
+                       fstrm nghttp2 pthread sodium 
 
 SITES=                 https://downloads.powerdns.com/releases/
 
 CONFIGURE_STYLE=       autoconf
-AUTOCONF_VERSION=      2.69
+AUTOCONF_VERSION=      2.71
 USE_GMAKE=             Yes
 
 CONFIGURE_ARGS+=       --without-gnutls \
@@ -34,27 +36,50 @@ CONFIGURE_ARGS+=    --without-gnutls \
                        --enable-dnscrypt \
                        --enable-dnstap \
                        --enable-dns-over-https
-#
-# On at least amd64 using clang13 dnsdist-lua-bindings.cc gets
-# miscompiled with -O2, resulting in a segfault on startup
-#
+
 CONFIGURE_ENV+=                CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib" \
-                       LIBEDIT_LIBS='-ledit -lcurses' \
-                       LIBEDIT_CFLAGS=' '
-SYSCONFDIR=            ${BASESYSCONFDIR}/dnsdist
-
-COMPILER =             base-clang ports-gcc
-
-MODULES+=              lang/lua
-MODLUA_VERSION=                5.3
+                       LIBEDIT_LIBS="-ledit -lcurses" \
+                       LIBEDIT_CFLAGS=" "
 
 BUILD_DEPENDS=         devel/boost
 LIB_DEPENDS+=          ${MODLUA_LIB_DEPENDS} \
                        security/libsodium \
                        net/libfstrm \
-                       www/h2o \
                        www/nghttp2
+
+
+.if ${FLAVOR:L:Mquiche}
+
+# Lua module overrides FULLPKGNAME
+FULLPKGNAME=           ${PKGNAME}-${FLAVOR}
+CONFIGURE_ARGS+=       --with-libcrypto=${LOCALBASE}/eboringssl \
+                       --with-quiche \
+                       --enable-dns-over-quic \
+                       --enable-dns-over-http3 \
+
+# OpenBSD libtool seems to leave out boringssl libs, because they have the same
+# name as system libs, so explicitly refer to the .a files.
+CONFIGURE_ENV+=                
LIBSSL_CFLAGS="-I${LOCALBASE}/eboringssl/include \
+                               -DDISABLE_OCSP_STAPLING" \
+                       LIBSSL_LIBS="${LOCALBASE}/eboringssl/lib/libssl.a \
+                               ${LOCALBASE}/eboringssl/lib/libcrypto.a" \
+                       QUICHE_CFLAGS=" " \
+                       QUICHE_LIBS='-lquiche'
+BUILD_DEPENDS+=                net/quiche \
+                       security/boringssl/head
+.else
+
+WANTLIB+=              ssl
+
+.endif
+
+SYSCONFDIR=            ${BASESYSCONFDIR}/dnsdist
+
+COMPILER =             base-clang ports-gcc
+
+MODULES+=              lang/lua
+MODLUA_VERSION=                5.3
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/{doc,examples}/dnsdist
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/net/dnsdist/distinfo,v
diff -u -p -r1.19 distinfo
--- distinfo    15 Dec 2023 13:11:55 -0000      1.19
+++ distinfo    16 Feb 2024 08:55:53 -0000
@@ -1,2 +1,2 @@
-SHA256 (dnsdist-1.8.3.tar.bz2) = hYMj8u1RgUiLt1WPv0+E7HGYYAsHCyxTddFdQGlXJ/Q=
-SIZE (dnsdist-1.8.3.tar.bz2) = 1484359
+SHA256 (dnsdist-1.9.0.tar.bz2) = FrqxXK2SRVcYBjmKjkpdwyqStrtg5hfBL+lYyUWInHw=
+SIZE (dnsdist-1.9.0.tar.bz2) = 1620891
Index: patches/patch-configure_ac
===================================================================
RCS file: /home/cvs/ports/net/dnsdist/patches/patch-configure_ac,v
diff -u -p -r1.8 patch-configure_ac
--- patches/patch-configure_ac  31 Mar 2023 05:38:03 -0000      1.8
+++ patches/patch-configure_ac  16 Feb 2024 08:55:53 -0000
@@ -11,4 +11,4 @@ Index: configure.ac
 +CXXFLAGS="-g -Wall -Wextra -Wshadow -Wno-unused-parameter 
-Wmissing-declarations -Wredundant-decls -fvisibility=hidden $CXXFLAGS"
  
  PDNS_WITH_LIBSODIUM
- PDNS_CHECK_DNSTAP([auto])
+ PDNS_WITH_QUICHE

Reply via email to