1 |
commit: 3af5208d3dcb070081dca7a01ae415d52b5c04b1 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 18 12:27:38 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 18 12:27:49 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3af5208d |
7 |
|
8 |
net-misc/kea: Synced live ebuild |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
net-misc/kea/kea-9999.ebuild | 41 +++++++++++++++++++++++++++++++++-------- |
13 |
1 file changed, 33 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/net-misc/kea/kea-9999.ebuild b/net-misc/kea/kea-9999.ebuild |
16 |
index 9f241b088227..aca4fe99e606 100644 |
17 |
--- a/net-misc/kea/kea-9999.ebuild |
18 |
+++ b/net-misc/kea/kea-9999.ebuild |
19 |
@@ -1,7 +1,7 @@ |
20 |
# Copyright 1999-2022 Gentoo Authors |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
-EAPI=7 |
24 |
+EAPI=8 |
25 |
|
26 |
MY_PV="${PV//_p/-P}" |
27 |
MY_PV="${MY_PV/_/-}" |
28 |
@@ -10,7 +10,9 @@ MY_P="${PN}-${MY_PV}" |
29 |
DESCRIPTION="High-performance production grade DHCPv4 & DHCPv6 server" |
30 |
HOMEPAGE="https://www.isc.org/kea/" |
31 |
|
32 |
-inherit autotools systemd tmpfiles |
33 |
+PYTHON_COMPAT=( python3_{8..10} ) |
34 |
+ |
35 |
+inherit autotools fcaps python-single-r1 systemd tmpfiles |
36 |
|
37 |
if [[ ${PV} = 9999* ]] ; then |
38 |
inherit git-r3 |
39 |
@@ -18,34 +20,53 @@ if [[ ${PV} = 9999* ]] ; then |
40 |
else |
41 |
SRC_URI="ftp://ftp.isc.org/isc/kea/${MY_P}.tar.gz |
42 |
ftp://ftp.isc.org/isc/kea/${MY_PV}/${MY_P}.tar.gz" |
43 |
- [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ |
44 |
- KEYWORDS="~amd64 ~arm64 ~x86" |
45 |
+ # Odd minor version = development release |
46 |
+ if [[ $(( $(ver_cut 2) % 2 )) -ne 1 ]] ; then |
47 |
+ [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ |
48 |
+ KEYWORDS="~amd64 ~arm64 ~x86" |
49 |
+ fi |
50 |
fi |
51 |
|
52 |
LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script |
53 |
SLOT="0" |
54 |
-IUSE="mysql +openssl postgres +samples" |
55 |
+IUSE="mysql +openssl postgres +samples shell test" |
56 |
+RESTRICT="!test? ( test )" |
57 |
|
58 |
-DEPEND=" |
59 |
+COMMON_DEPEND=" |
60 |
dev-libs/boost:= |
61 |
dev-libs/log4cplus |
62 |
mysql? ( dev-db/mysql-connector-c ) |
63 |
!openssl? ( dev-libs/botan:2= ) |
64 |
openssl? ( dev-libs/openssl:0= ) |
65 |
postgres? ( dev-db/postgresql:* ) |
66 |
+ shell? ( ${PYTHON_DEPS} ) |
67 |
" |
68 |
-RDEPEND="${DEPEND} |
69 |
+DEPEND="${COMMON_DEPEND} |
70 |
+ test? ( dev-cpp/gtest ) |
71 |
+" |
72 |
+RDEPEND="${COMMON_DEPEND} |
73 |
acct-group/dhcp |
74 |
acct-user/dhcp" |
75 |
BDEPEND="virtual/pkgconfig" |
76 |
|
77 |
+REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )" |
78 |
+ |
79 |
S="${WORKDIR}/${MY_P}" |
80 |
|
81 |
+PATCHES=( |
82 |
+ "${FILESDIR}"/${PN}-1.8.2-boost-1.77.0.patch |
83 |
+ "${FILESDIR}"/${PN}-1.9.10-gtest.patch |
84 |
+) |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ use shell && python-single-r1_pkg_setup |
88 |
+} |
89 |
+ |
90 |
src_prepare() { |
91 |
default |
92 |
# Brand the version with Gentoo |
93 |
sed -i \ |
94 |
- -e "s/AC_INIT(kea,${PV}.*, kea-dev@×××××××××.org)/AC_INIT(kea,${PVR}-gentoo, kea-dev@×××××××××.org)/g" \ |
95 |
+ -e "s/AC_INIT(kea,${PV}.*, kea-dev@×××××××××.org)/AC_INIT([kea], [${PVR}-gentoo], [kea-dev@×××××××××.org])/g" \ |
96 |
configure.ac || die |
97 |
|
98 |
sed -i \ |
99 |
@@ -59,10 +80,13 @@ src_configure() { |
100 |
local myeconfargs=( |
101 |
--disable-install-configurations |
102 |
--disable-static |
103 |
+ --enable-generate-messages |
104 |
--enable-perfdhcp |
105 |
--localstatedir="${EPREFIX}/var" |
106 |
--runstatedir="${EPREFIX}/run" |
107 |
--without-werror |
108 |
+ $(use_enable test gtest) |
109 |
+ $(use_enable shell) |
110 |
$(use_with mysql) |
111 |
$(use_with openssl) |
112 |
$(use_with postgres pgsql) |
113 |
@@ -99,4 +123,5 @@ src_install() { |
114 |
|
115 |
pkg_postinst() { |
116 |
tmpfiles_process ${PN}.conf |
117 |
+ fcaps cap_net_bind_service,cap_net_raw=+ep /usr/sbin/kea-dhcp{4,6} |
118 |
} |