summaryrefslogtreecommitdiff
path: root/net-dns/knot-resolver
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/knot-resolver')
-rw-r--r--net-dns/knot-resolver/Manifest6
-rw-r--r--net-dns/knot-resolver/files/knot-resolver-5.5.3-docdir.patch32
-rw-r--r--net-dns/knot-resolver/files/knot-resolver-5.5.3-nghttp-openssl.patch38
-rw-r--r--net-dns/knot-resolver/knot-resolver-5.5.3.ebuild90
-rw-r--r--net-dns/knot-resolver/metadata.xml19
5 files changed, 185 insertions, 0 deletions
diff --git a/net-dns/knot-resolver/Manifest b/net-dns/knot-resolver/Manifest
new file mode 100644
index 000000000000..9393a9f019fa
--- /dev/null
+++ b/net-dns/knot-resolver/Manifest
@@ -0,0 +1,6 @@
+AUX knot-resolver-5.5.3-docdir.patch 925 BLAKE2B 9d40a287fe0a6d883d46dbe13fa3ba5f19f73b61fbd8c8eb6ec4061744b8c4b8eeb04533b18cede2051aaa5ddacca96b21432c0dac00f8be9087cb8e5d5fed0d SHA512 18259bc66b1b3ff20ee34a01373017267e1cf76a458c938673e925d972ded8bdc863bb961fd93983e45080d7b0b88ab30c513153e6b2b4323a3d95f6724baff5
+AUX knot-resolver-5.5.3-nghttp-openssl.patch 1087 BLAKE2B 4570658d9d358384c435c0b4694995945f9c788249899670e000d3273ae6c2631ff69319660db2d04f4143e24746bc0160295042a7887d30dae09de11556ce8e SHA512 50e8a99aef8bc4ce41ddb4d1760cd96818859b440aa74effdc1482af150c21f4fc3e451fae739a07161fc5a2e0ee2cd093c26950dd4e16de430e6bb8a635dd84
+DIST knot-resolver-5.5.3.tar.xz 1921668 BLAKE2B 7efdf1a69081d8f9f43b5bbe1b483826b94b87a0b001a449a5f89988afce070e4e3310e513e6281691bd81274a523ab8c7e52fe56a3d62019efe07809033a5a8 SHA512 7bf29bbf82e71727c1f47095a04a12712ca89a6f34d3a325337625ad116f49a47a90cb402525fdbf59cb0889b64d7083b908c335d65429b24d776603a3a8f28a
+DIST knot-resolver-5.5.3.tar.xz.asc 833 BLAKE2B 7ab348587c2604f14171d09436b2a296e9fb7124e6f899aba91215d32d8642dc5b9ae8300edf55c0790289bc954d5cf95c71b66a20b960c848d15e34469fc2f3 SHA512 1e95fffdb1c78a225b5bf861f978c1c18a9935ecd495e8f708ed4a241308b9302d2cf5a5ec51334dbecf50950af5f775bfff78995663cf1681a3dbc354d3a686
+EBUILD knot-resolver-5.5.3.ebuild 1906 BLAKE2B 0dd59f239cdf8233fa24599f3d5f91a3aa1c57d393e319ce9be80af4a634b2b47ab3f43f9b24a1dd99b35e6928f1bd9c3cab010e00cdd8e79566efb95d78dc9b SHA512 34bd2028726df78a2b6b8542c2e6cf38aa29b0bd8e490934ee4b94ffc683fe3884f9404dfad7f6b6f1ebdef9efc2dfa7dfe916d3cce3fe2868c52423ea7e7f66
+MISC metadata.xml 470 BLAKE2B 16d945ec59b8b4bf54306a3f3182bc61f45ec8cc1880480366a6a918cbad337fc102ae6d2f0cdf3347e7a7a85fc5bc58129bb7e2f1378e42cb047aaa15dbc138 SHA512 09e7fce327eff1d4b5c4702ac4c90c6cf157d076715808eaea42cf0371007ed44a84466bed7c03b296c3fc1b99059cfd0cb575a2a957e7730d49a26bb35c160a
diff --git a/net-dns/knot-resolver/files/knot-resolver-5.5.3-docdir.patch b/net-dns/knot-resolver/files/knot-resolver-5.5.3-docdir.patch
new file mode 100644
index 000000000000..d75b98c3acca
--- /dev/null
+++ b/net-dns/knot-resolver/files/knot-resolver-5.5.3-docdir.patch
@@ -0,0 +1,32 @@
+From 4086abfd85e0bacc027ac1773d524093387265f9 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Sun, 16 Oct 2022 13:49:25 +0100
+Subject: [PATCH] build: docdir option
+
+--- a/meson.build
++++ b/meson.build
+@@ -46,7 +46,7 @@ endif
+ ## Paths
+ prefix = get_option('prefix')
+ data_dir = prefix / get_option('datadir') / 'knot-resolver'
+-doc_dir = prefix / get_option('datadir') / 'doc' / 'knot-resolver'
++doc_dir = get_option('docdir')
+ info_dir = prefix / get_option('datadir') / 'info'
+ examples_dir = doc_dir / 'examples'
+ etc_dir = prefix / get_option('sysconfdir') / 'knot-resolver'
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,13 @@
+ # Configuration options
+ # SPDX-License-Identifier: GPL-3.0-or-later
+
++option(
++ 'docdir',
++ type: 'string',
++ value: '/usr/share/doc/knot-resolver',
++ description: 'path to store documentation',
++)
++
+ option(
+ 'keyfile_default',
+ type: 'string',
diff --git a/net-dns/knot-resolver/files/knot-resolver-5.5.3-nghttp-openssl.patch b/net-dns/knot-resolver/files/knot-resolver-5.5.3-nghttp-openssl.patch
new file mode 100644
index 000000000000..49340be1506c
--- /dev/null
+++ b/net-dns/knot-resolver/files/knot-resolver-5.5.3-nghttp-openssl.patch
@@ -0,0 +1,38 @@
+From 30087f85bb8d19586350c2a64648c0578c5c096c Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Sun, 16 Oct 2022 13:44:40 +0100
+Subject: [PATCH] build: Add nghttp2 and openssl options
+
+--- a/meson.build
++++ b/meson.build
+@@ -87,8 +87,8 @@ group = get_option('group')
+
+ ## Optional dependencies
+ message('--- optional dependencies ---')
+-nghttp2 = dependency('libnghttp2', required: false)
+-openssl = dependency('openssl', required: false)
++nghttp2 = dependency('libnghttp2', required: get_option('nghttp2'))
++openssl = dependency('openssl', required: get_option('openssl'))
+
+ have_asprintf = meson.get_compiler('c').has_function('asprintf',
+ prefix: '#define _GNU_SOURCE\n#include <stdio.h>')
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -205,3 +205,17 @@ option(
+ value: 'auto',
+ description: 'cmocka unit tests',
+ )
++
++option(
++ 'nghttp2',
++ type: 'feature',
++ value: 'auto',
++ description: 'dns over https support',
++)
++
++option(
++ 'openssl',
++ type: 'feature',
++ value: 'auto',
++ description: 'auxiliary debug library for http module',
++)
diff --git a/net-dns/knot-resolver/knot-resolver-5.5.3.ebuild b/net-dns/knot-resolver/knot-resolver-5.5.3.ebuild
new file mode 100644
index 000000000000..58013de8e63e
--- /dev/null
+++ b/net-dns/knot-resolver/knot-resolver-5.5.3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( luajit )
+
+inherit lua-single meson tmpfiles verify-sig
+
+DESCRIPTION="A scaleable caching DNS resolver"
+HOMEPAGE="https://www.knot-resolver.cz https://gitlab.nic.cz/knot/knot-resolver"
+SRC_URI="
+ https://secure.nic.cz/files/${PN}/${P}.tar.xz
+ verify-sig? ( https://secure.nic.cz/files/${PN}/${P}.tar.xz.asc )
+"
+
+LICENSE="Apache-2.0 BSD CC0-1.0 GPL-3+ LGPL-2.1+ MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="caps dnstap kresc nghttp2 systemd test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+ ${LUA_DEPS}
+ acct-group/knot-resolver
+ acct-user/knot-resolver
+ dev-db/lmdb:=
+ dev-libs/libuv:=
+ net-dns/knot:=
+ net-libs/gnutls:=
+ caps? ( sys-libs/libcap-ng )
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c:=
+ )
+ kresc? ( dev-libs/libedit )
+ nghttp2? ( net-libs/nghttp2:= )
+ systemd? ( sys-apps/systemd:= )
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ dev-util/cmocka
+ )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.5.3-docdir.patch
+ "${FILESDIR}"/${PN}-5.5.3-nghttp-openssl.patch
+)
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/${PN}.gpg
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+ fi
+
+ unpack ${P}.tar.xz
+}
+
+src_configure() {
+ local emesonargs=(
+ --localstatedir "${EPREFIX}"/var # double lib
+ # https://bugs.gentoo.org/870019
+ -Dauto_features=disabled
+ -Ddoc=disabled
+ -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
+ -Dopenssl=disabled
+ $(meson_feature caps capng)
+ $(meson_feature dnstap)
+ $(meson_feature kresc client)
+ $(meson_feature nghttp2)
+ $(meson_feature test unit_tests)
+ $(meson_feature systemd systemd_files)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+ fowners -R ${PN}: /etc/${PN}
+}
+
+pkg_postinst() {
+ tmpfiles_process knot-resolver.conf
+}
diff --git a/net-dns/knot-resolver/metadata.xml b/net-dns/knot-resolver/metadata.xml
new file mode 100644
index 000000000000..9f36a2c8cacc
--- /dev/null
+++ b/net-dns/knot-resolver/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>matthew@gentoo.org</email>
+ <name>Matthew Smith</name>
+ </maintainer>
+ <use>
+ <flag name="dnstap">
+ Build dnstap binary logging module
+ </flag>
+ <flag name="kresc">
+ Build (experimental) command-line client
+ </flag>
+ <flag name="nghttp2">
+ DNS-over-HTTPS support
+ </flag>
+ </use>
+</pkgmetadata>