1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
... | ... | |
10 |
10 |
DESCRIPTION="High-performance production grade DHCPv4 & DHCPv6 server"
|
11 |
11 |
HOMEPAGE="https://www.isc.org/kea/"
|
12 |
12 |
|
13 |
|
PYTHON_COMPAT=( python3_{8..10} )
|
|
13 |
PYTHON_COMPAT=( python3_{8..11} )
|
14 |
14 |
|
15 |
15 |
inherit autotools fcaps python-single-r1 systemd tmpfiles
|
16 |
16 |
|
17 |
17 |
if [[ ${PV} = 9999* ]] ; then
|
18 |
18 |
inherit git-r3
|
19 |
|
EGIT_REPO_URI="https://github.com/isc-projects/kea.git"
|
|
19 |
EGIT_REPO_URI="https://gitlab.isc.org/isc-projects/kea.git"
|
20 |
20 |
else
|
21 |
21 |
SRC_URI="ftp://ftp.isc.org/isc/kea/${MY_P}.tar.gz
|
22 |
22 |
ftp://ftp.isc.org/isc/kea/${MY_PV}/${MY_P}.tar.gz"
|
23 |
|
# Odd minor version = development release
|
|
23 |
# odd minor version = development release
|
24 |
24 |
if [[ $(( $(ver_cut 2) % 2 )) -ne 1 ]] ; then
|
25 |
|
[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
|
26 |
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
|
25 |
if ! [[ "${PV}" == *_beta* || "${PV}" == *_rc* ]] ; then
|
|
26 |
KEYWORDS="~amd64 ~arm64 ~x86"
|
|
27 |
fi
|
27 |
28 |
fi
|
28 |
29 |
fi
|
29 |
30 |
|
30 |
31 |
LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
|
31 |
32 |
SLOT="0"
|
32 |
|
IUSE="mysql +openssl postgres +samples shell test"
|
|
33 |
IUSE="debug doc mysql +openssl postgres +samples shell test"
|
33 |
34 |
RESTRICT="!test? ( test )"
|
34 |
35 |
|
35 |
36 |
COMMON_DEPEND="
|
36 |
37 |
dev-libs/boost:=
|
37 |
38 |
dev-libs/log4cplus
|
|
39 |
doc? (
|
|
40 |
$(python_gen_cond_dep '
|
|
41 |
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
42 |
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
|
|
43 |
')
|
|
44 |
)
|
38 |
45 |
mysql? ( dev-db/mysql-connector-c )
|
39 |
46 |
!openssl? ( dev-libs/botan:2= )
|
40 |
47 |
openssl? ( dev-libs/openssl:0= )
|
... | ... | |
54 |
61 |
S="${WORKDIR}/${MY_P}"
|
55 |
62 |
|
56 |
63 |
PATCHES=(
|
57 |
|
"${FILESDIR}"/${PN}-1.8.2-boost-1.77.0.patch
|
58 |
|
"${FILESDIR}"/${PN}-1.9.10-gtest.patch
|
|
64 |
"${FILESDIR}"/${PN}-2.2.0-openssl-version.patch
|
59 |
65 |
)
|
60 |
66 |
|
61 |
67 |
pkg_setup() {
|
... | ... | |
64 |
70 |
|
65 |
71 |
src_prepare() {
|
66 |
72 |
default
|
67 |
|
# Brand the version with Gentoo
|
|
73 |
|
|
74 |
cp "${FILESDIR}"/ax_gtest.m4 "${S}"/m4macros/ax_gtest.m4 || die 'Replace gtest m4 macro failed'
|
|
75 |
|
|
76 |
# brand the version with Gentoo
|
68 |
77 |
sed -i \
|
69 |
78 |
-e "s/AC_INIT(kea,${PV}.*, kea-dev@lists.isc.org)/AC_INIT([kea], [${PVR}-gentoo], [kea-dev@lists.isc.org])/g" \
|
70 |
79 |
configure.ac || die
|
... | ... | |
79 |
88 |
src_configure() {
|
80 |
89 |
local myeconfargs=(
|
81 |
90 |
--disable-install-configurations
|
|
91 |
--disable-rpath
|
82 |
92 |
--disable-static
|
83 |
93 |
--enable-generate-messages
|
84 |
94 |
--enable-perfdhcp
|
85 |
95 |
--localstatedir="${EPREFIX}/var"
|
86 |
96 |
--runstatedir="${EPREFIX}/run"
|
87 |
97 |
--without-werror
|
|
98 |
--with-log4cplus
|
|
99 |
$(use_enable debug)
|
|
100 |
$(use_enable doc generate-docs)
|
88 |
101 |
$(use_enable test gtest)
|
89 |
102 |
$(use_enable shell)
|
90 |
103 |
$(use_with mysql)
|