summaryrefslogtreecommitdiff
path: root/dns/knot-resolver/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'dns/knot-resolver/Makefile')
-rw-r--r--dns/knot-resolver/Makefile137
1 files changed, 81 insertions, 56 deletions
diff --git a/dns/knot-resolver/Makefile b/dns/knot-resolver/Makefile
index af56050982fa..d98d431a4892 100644
--- a/dns/knot-resolver/Makefile
+++ b/dns/knot-resolver/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= knot-resolver
-DISTVERSION= 5.1.1
+DISTVERSION= 5.1.2
CATEGORIES= dns
MASTER_SITES= https://secure.nic.cz/files/knot-resolver/ \
https://dns.company/downloads/knot-resolver/
@@ -14,23 +14,26 @@ LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= bash:shells/bash \
- cmocka>=1.1.1:sysutils/cmocka \
flake8:devel/py-flake8@${PY_FLAVOR} \
- luacheck:devel/lua-luacheck
-
-LIB_DEPENDS= libgnutls.so:security/gnutls \
- libknot.so:dns/knot2-lib \
+ lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51 \
+ luacheck:devel/lua-luacheck \
+ cmake:devel/cmake
+LIB_DEPENDS= libknot.so:dns/knot2-lib \
+ libdnssec.so:dns/knot2-lib \
+ libzscanner.so:dns/knot2-lib \
+ libgnutls.so:security/gnutls \
liblmdb.so:databases/lmdb \
libluajit-5.1.so:lang/luajit-openresty \
libuv.so:devel/libuv
+RUN_DEPENDS= lua51-cqueues>=20200603_1:devel/lua-cqueues@lua51
+
+USES= compiler:c11 compiler:c++11-lang libedit libtool \
+ meson ncurses ninja pkgconfig python:3.5+,build \
+ shebangfix tar:xz
-USES= compiler:c11 compiler:c++11-lang libedit libtool meson \
- ncurses ninja pkgconfig python shebangfix tar:xz
USE_CXXSTD= c++11
-USE_LDCONFIG= yes
-LDFLAGS+= -L${LOCALBASE}/lib
-SUB_FILES= pkg-message
+USE_RC_SUBR= krescachegc kresd
SHEBANG_FILES= scripts/bench.sh \
scripts/build-in-obs.sh \
@@ -50,64 +53,83 @@ SHEBANG_FILES= scripts/bench.sh \
scripts/test-integration-prepare.sh \
scripts/update-root-hints.sh
-CONFLICTS= knot-1.* knot1-[0-6].*
-
MESON_ARGS= --buildtype=release \
--default-library=static \
+ --libdir=${PREFIX}/lib \
+ --pkg-config-path=${PREFIX}/libdata/pkgconfig \
--prefix=${LOCALBASE} \
-Duser=${USERS} \
-Dgroup=${GROUPS} \
-Dinstall_kresd_conf=enabled \
-Dclient=enabled \
-Dutils=enabled \
- -Dinstall_root_keys=enabled \
-Dkeyfile_default=${ETCDIR}/root.keys \
- -Dmanaged_ta=enabled \
- -Droot_hints=${ETCDIR}/root.hints \
- -Dunit_tests=enabled
-
-# --libdir=${PREFIX}/lib
-# --pkg-config-path=${PREFIX}/libdata/pkgconfig
-# lmdb_CFLAGS=-I${PREFIX}/include lmdb_LIBS=-llmdb
-# -Dlmdb_CFLAGS=-I${PREFIX}/include \ # doesn't help
-# -Dlmdb_LIBS=-llmdb # doesn't help
-# -Dconfig_tests=enabled \ # complains about missing cqueues lua package
-# -Dextra_tests=enabled \ # also requires -Dsendmmsg=disabled
-
-OPTIONS_DEFINE= DOCS DNSTAP DOXYGEN TRUSTANCHOR
-OPTIONS_DEFAULT= DOCS DNSTAP DOXYGEN
-
-# docs/meson.build wants python2 or python3 - not -for example- python3.7
-# So this currently is partially broken:
-#DOCS_MESON_ON= -Ddoc=enabled
-
-DNSTAP_DESC= dnstap support
-DNSTAP_LIB_DEPENDS= libprotobuf.so:devel/protobuf \
- libprotobuf-c.so:devel/protobuf-c \
- libfstrm.so:devel/fstrm
-DNSTAP_PLIST_FILES= lib/knot-resolver/kres_modules/dnstap.so
-DNSTAP_MESON_ON= -Ddnstap=enabled
-DNSTAP_MESON_OFF= -Ddnstap=disabled
-
-DOXYGEN_IMPLIES= DOCS
-DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen \
- ${PY_SPHINX} \
- ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
-
-TRUSTANCHOR_DESC= Trust anchor bootstrapping and stats
-TRUSTANCHOR_USES= lua
-TRUSTANCHOR_BUILD_DEPENDS= ${LUA_PKGNAMEPREFIX}luasocket>=0:net/luasocket@${LUA_FLAVOR} \
- ${LUA_PKGNAMEPREFIX}luasec>=0:security/luasec@${LUA_FLAVOR}
-
-.include <bsd.port.options.mk>
+ -Droot_hints=${ETCDIR}/root.hints
+
+LDFLAGS+= -L${LOCALBASE}/lib
+
+CONFLICTS= knot-1.* knot1-[0-6].*
+
+SUB_FILES= pkg-message
+
+SUB_LIST= USERS=${USERS} \
+ GROUPS=${GROUPS} \
+ RUNDIR=${RUNDIR}
USERS= kresd
-GROUPS= ${USERS}
+GROUPS= kresd
+RUNDIR= /var/run/kresd
+
+PLIST_SUB= USERS=${USERS} \
+ GROUPS=${GROUPS} \
+ RUNDIR=${RUNDIR}
+
+OPTIONS_DEFINE= DOCS EXAMPLES DNSTAP ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF TESTEXTRA
+OPTIONS_DEFAULT= DOCS EXAMPLES ROOTKEYS TRUSTANCHOR TEST TESTUNIT TESTCONF
+
+DNSTAP_DESC= dnstap support
+ROOTKEYS_DESC= install root.keys
+TESTCONF_DESC= Do config tests
+TESTEXTRA_DESC= Do extra tests
+TESTUNIT_DESC= Do unit tests
+TEST_DESC= Do tests
+TRUSTANCHOR_DESC= Trust anchor bootstrapping, management and stats
+
+DNSTAP_LIB_DEPENDS= libprotobuf.so:devel/protobuf \
+ libprotobuf-c.so:devel/protobuf-c \
+ libfstrm.so:devel/fstrm
+DNSTAP_MESON_ON= -Ddnstap=enabled
+DNSTAP_MESON_OFF= -Ddnstap=disabled
+DNSTAP_PLIST_FILES= lib/knot-resolver/kres_modules/dnstap.so
+
+ROOTKEYS_MESON_ON= -Dinstall_root_keys=enabled
+ROOTKEYS_MESON_OFF= -Dinstall_root_keys=disabled
+ROOTKEYS_PLIST_FILES= ${ETCDIR}/root.keys
+
+TESTCONF_MESON_ON= -Dconfig_tests=enabled
+TESTCONF_MESON_OFF= -Dconfig_tests=disabled
+
+TESTEXTRA_BROKEN= CMake Error: The source directory misses CMakeLists.txt
+TESTEXTRA_BUILD_DEPENDS=git:devel/git
+TESTEXTRA_USES= cmake python:3
+TESTEXTRA_MESON_ON= -Dextra_tests=enabled \
+ -Dsendmmsg=disabled
+TESTEXTRA_MESON_OFF= -Dextra_tests=disabled
+
+TESTUNIT_BUILD_DEPENDS= cmocka>=1.1.1:sysutils/cmocka
+TESTUNIT_MESON_ON= -Dunit_tests=enabled
+TESTUNIT_MESON_OFF= -Dunit_tests=disabled
+
+TRUSTANCHOR_MESON_ON= -Dmanaged_ta=enabled
+TRUSTANCHOR_MESON_OFF= -Dmanaged_ta=disabled
PORTDOCS= AUTHORS COPYING CodingStyle NEWS README.md
+PORTEXAMPLES= config.cluster config.docker config.internal config.isp \
+ config.personal config.privacy config.splitview
-STRIP_TARGETS= sbin/kresd \
+STRIP_TARGETS= sbin/kres-cache-gc \
sbin/kresc \
+ sbin/kresd \
lib/knot-resolver/ahocorasick.so \
lib/knot-resolver/kres_modules/bogus_log.so \
lib/knot-resolver/kres_modules/dnstap.so \
@@ -117,14 +139,17 @@ STRIP_TARGETS= sbin/kresd \
lib/knot-resolver/kres_modules/refuse_nord.so \
lib/knot-resolver/kres_modules/stats.so
+pre-install:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${RUNDIR}
+
pre-install-TEST-on: do-test
post-install:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
.for STRIP_TGT in ${STRIP_TARGETS}
if [ -f ${STAGEDIR}${PREFIX}/${STRIP_TGT} ]; then \
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${STRIP_TGT}; \
fi
.endfor