summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Lamm <expeditioneer@gentoo.org>2022-10-14 23:23:48 +0200
committerDennis Lamm <expeditioneer@gentoo.org>2022-10-19 06:48:18 +0200
commit624d139ae7abe036425e4628cd59da1703867db3 (patch)
tree39edec63aed106e8fe39da13f1c1b7fee6f14114 /net-misc/kea
parentdev-python/google-api-python-client: Bump to 2.65.0 (diff)
downloadgentoo-624d139ae7abe036425e4628cd59da1703867db3.tar.gz
gentoo-624d139ae7abe036425e4628cd59da1703867db3.tar.bz2
gentoo-624d139ae7abe036425e4628cd59da1703867db3.zip
net-misc/kea: version bump 2.2.0
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Diffstat (limited to 'net-misc/kea')
-rw-r--r--net-misc/kea/Manifest1
-rw-r--r--net-misc/kea/files/ax_gtest.m462
-rw-r--r--net-misc/kea/files/kea-2.2.0-openssl-version.patch11
-rw-r--r--net-misc/kea/kea-2.2.0.ebuild137
4 files changed, 211 insertions, 0 deletions
diff --git a/net-misc/kea/Manifest b/net-misc/kea/Manifest
index bff98126c828..5107f3317c1b 100644
--- a/net-misc/kea/Manifest
+++ b/net-misc/kea/Manifest
@@ -1,2 +1,3 @@
DIST kea-1.8.2.tar.gz 9005645 BLAKE2B fec1118ca34adc4bdafea13dd6c1c3abcd42df80043b621d1ed994e7ec6906a5d13e86a1bbb6dcbdfee32a4d70281c751b46c57d4866bd92557448ab7c602c30 SHA512 7bea9eb30ee819bd350ba3f64da7dc46d1176363e7243e934ff0f0498fcd47ef4eccb7fe8d8dd4f883ab9e376174aaba4fae06b20405181d46b6b12cfbdf7dd0
DIST kea-2.0.2.tar.gz 9796557 BLAKE2B a859c4cc3f6686db2dcf640738b421499a816700d134ee9322290051c3a192bab482be4a4bdb2630113594a3af1cafe2b95abce4a463815a6404fe87fac227ad SHA512 edb7de227898fb7bd76dd8b503d02e07b4ba512b907b53399a5c45bd216820b342f00c1834858848ce8ff94aa3c228ceead0e2946cbcb1f75a03ca579630be83
+DIST kea-2.2.0.tar.gz 9999074 BLAKE2B 10b4bca1a135c6d146490f8c4c7bd4d56c1c03e2b4cc88a6888fcad5d1a5c2ee2d2c0215cb345b53a2a4262dbd02516d75d5778835d45384a7d69a062b8696b9 SHA512 82cd44efea8c968ef097de242e1ca59e0183c80df25050017fd45538d35da64a9a0d2f4a5249ad3bd3d30b1f8895c360d301518bc22e60dfddd966fe020dc773
diff --git a/net-misc/kea/files/ax_gtest.m4 b/net-misc/kea/files/ax_gtest.m4
new file mode 100644
index 000000000000..acd887c2d3ab
--- /dev/null
+++ b/net-misc/kea/files/ax_gtest.m4
@@ -0,0 +1,62 @@
+AC_DEFUN([AX_ISC_GTEST], [
+
+AC_ARG_WITH([lcov],
+ [AS_HELP_STRING([--with-lcov[[=PROGRAM]]],
+ [enable gtest and coverage target using the specified lcov])],
+ [lcov="$withval"],
+ [lcov="no"])
+
+USE_LCOV="no"
+if test "$lcov" != "no"; then
+ # force gtest if not set
+ if test "$enable_gtest" = "no"; then
+# AC_MSG_ERROR("lcov needs gtest for test coverage report")
+ AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
+ enable_gtest="yes"
+ fi
+ if test "$lcov" != "yes"; then
+ LCOV=$lcov
+ else
+ AC_PATH_PROG([LCOV], [lcov])
+ fi
+ if test -x "${LCOV}"; then
+ USE_LCOV="yes"
+ else
+ AC_MSG_ERROR([Cannot find lcov.])
+ fi
+ # is genhtml always in the same directory?
+ GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/`
+ if test ! -x $GENHTML; then
+ AC_MSG_ERROR([genhtml not found, needed for lcov])
+ fi
+ # GCC specific?
+ CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
+ LIBS=" $LIBS -lgcov"
+ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LIBS)
+ AC_SUBST(LCOV)
+ AC_SUBST(GENHTML)
+fi
+AC_SUBST(USE_LCOV)
+
+#
+# Check availability of gtest, which will be used for unit tests.
+#
+DISTCHECK_GTEST_CONFIGURE_FLAG=
+
+AS_IF([test "x$enable_gtest" = "xyes"], [
+ DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest"
+ PKG_CHECK_MODULES([GTEST], [gtest], [], [AC_MSG_ERROR([gtest requested but not found])])
+ GTEST_INCLUDES=`${PKG_CONFIG} --keep-system-cflags --cflags-only-I gtest`
+ GTEST_LDFLAGS=`${PKG_CONFIG} --keep-system-libs --libs-only-L gtest`
+ GTEST_VERSION=`${PKG_CONFIG} --modversion gtest`
+])
+
+AM_CONDITIONAL(HAVE_GTEST, test $enable_gtest != "no")
+AM_CONDITIONAL(HAVE_GTEST_SOURCE, test "X$have_gtest_source" = "Xyes")
+AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
+AC_SUBST(GTEST_INCLUDES)
+AC_SUBST([GTEST_LDADD], [$GTEST_LIBS])
+AC_SUBST(GTEST_SOURCE)
+
+])dnl AX_ISC_GTEST
diff --git a/net-misc/kea/files/kea-2.2.0-openssl-version.patch b/net-misc/kea/files/kea-2.2.0-openssl-version.patch
new file mode 100644
index 000000000000..5e323357d7c5
--- /dev/null
+++ b/net-misc/kea/files/kea-2.2.0-openssl-version.patch
@@ -0,0 +1,11 @@
+--- a/m4macros/ax_crypto.m4
++++ b/m4macros/ax_crypto.m4
+@@ -258,7 +258,7 @@ then
+ else
+ CRYPTO_NAME="OpenSSL"
+ DISABLED_CRYPTO="Botan"
+- CRYPTO_PACKAGE="openssl-1.1.0"
++ CRYPTO_PACKAGE="openssl"
+ DISTCHECK_CRYPTO_CONFIGURE_FLAG="--with-openssl=${use_openssl}"
+ AC_DEFINE_UNQUOTED([WITH_OPENSSL], [], [Compile with OpenSSL crypto])
+ AC_MSG_CHECKING(for OpenSSL library)
diff --git a/net-misc/kea/kea-2.2.0.ebuild b/net-misc/kea/kea-2.2.0.ebuild
new file mode 100644
index 000000000000..c7127f76da89
--- /dev/null
+++ b/net-misc/kea/kea-2.2.0.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV="${PV//_p/-P}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance production grade DHCPv4 & DHCPv6 server"
+HOMEPAGE="https://www.isc.org/kea/"
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit autotools fcaps python-single-r1 systemd tmpfiles
+
+if [[ ${PV} = 9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.isc.org/isc-projects/kea.git"
+else
+ SRC_URI="ftp://ftp.isc.org/isc/kea/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/kea/${MY_PV}/${MY_P}.tar.gz"
+ # odd minor version = development release
+ if [[ $(( $(ver_cut 2) % 2 )) -ne 1 ]] ; then
+ [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || KEYWORDS="~amd64 ~arm64 ~x86"
+ fi
+fi
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+IUSE="debug doc mysql +openssl postgres +samples shell test"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ dev-libs/boost:=
+ dev-libs/log4cplus
+ doc? (
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]')
+ )
+ mysql? ( dev-db/mysql-connector-c )
+ !openssl? ( dev-libs/botan:2= )
+ openssl? ( dev-libs/openssl:0= )
+ postgres? ( dev-db/postgresql:* )
+ shell? ( ${PYTHON_DEPS} )
+"
+DEPEND="${COMMON_DEPEND}
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="${COMMON_DEPEND}
+ acct-group/dhcp
+ acct-user/dhcp"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2.0-openssl-version.patch
+)
+
+pkg_setup() {
+ use shell && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ cp "${FILESDIR}"/ax_gtest.m4 "${S}"/m4macros/ax_gtest.m4
+
+ # brand the version with Gentoo
+ sed -i \
+ -e "s/AC_INIT(kea,${PV}.*, kea-dev@lists.isc.org)/AC_INIT([kea], [${PVR}-gentoo], [kea-dev@lists.isc.org])/g" \
+ configure.ac || die
+
+ sed -i \
+ -e '/mkdir -p $(DESTDIR)${runstatedir}\/${PACKAGE_NAME}/d' \
+ Makefile.am || die "Fixing Makefile.am failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-install-configurations
+ --disable-rpath
+ --disable-static
+ --enable-generate-messages
+ --enable-perfdhcp
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --without-werror
+ --with-log4cplus
+ $(use_enable debug)
+ $(use_enable doc generate-docs)
+ $(use_enable test gtest)
+ $(use_enable shell)
+ $(use_with mysql)
+ $(use_with openssl)
+ $(use_with postgres pgsql)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ newconfd "${FILESDIR}"/${PN}-confd-r1 ${PN}
+ newinitd "${FILESDIR}"/${PN}-initd-r1 ${PN}
+
+ if use samples; then
+ diropts -m 0750 -o root -g dhcp
+ dodir /etc/kea
+ insopts -m 0640 -o root -g dhcp
+ insinto /etc/kea
+ doins "${FILESDIR}"/${PN}-ctrl-agent.conf
+ doins "${FILESDIR}"/${PN}-ddns-server.conf
+ doins "${FILESDIR}"/${PN}-dhcp4.conf
+ doins "${FILESDIR}"/${PN}-dhcp6.conf
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}-ctrl-agent.service
+ systemd_dounit "${FILESDIR}"/${PN}-ddns-server.service
+ systemd_dounit "${FILESDIR}"/${PN}-dhcp4-server.service
+ systemd_dounit "${FILESDIR}"/${PN}-dhcp6-server.service
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf
+
+ keepdir /var/lib/${PN} /var/log/${PN}
+ find "${ED}" -type f -name "*.la" -delete || die
+}
+
+pkg_postinst() {
+ tmpfiles_process ${PN}.conf
+ fcaps cap_net_bind_service,cap_net_raw=+ep /usr/sbin/kea-dhcp{4,6}
+}