Skip to content

Commit

Permalink
net-misc/openntpd: remove libressl support
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
  • Loading branch information
Zlogene committed Apr 30, 2021
1 parent c5c69e3 commit beea04c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
1 change: 0 additions & 1 deletion net-misc/openntpd/metadata.xml
Expand Up @@ -17,6 +17,5 @@
</longdescription>
<use>
<flag name="constraints">Enable HTTPS TLS time constraint support</flag>
<flag name="libressl">Enable HTTPS TLS time constraint support using <pkg>dev-libs/libressl</pkg></flag>
</use>
</pkgmetadata>
10 changes: 4 additions & 6 deletions net-misc/openntpd/openntpd-6.2_p3-r2.ebuild
Expand Up @@ -14,11 +14,10 @@ SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
IUSE="libressl selinux"
IUSE="selinux"

DEPEND="
!net-misc/ntp[-openntpd]
libressl? ( dev-libs/libressl:0= )"
!net-misc/ntp[-openntpd]"

RDEPEND="
${DEPEND}
Expand Down Expand Up @@ -47,15 +46,14 @@ src_prepare() {
sed -i 's:servers pool.ntp.org:#servers pool.ntp.org:' ntpd.conf || die
printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die

# disable constraint config if libressl not enabled
use libressl || sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
}

src_configure() {
econf \
--with-privsep-user=openntpd \
--with-privsep-path=/var/lib/openntpd/chroot \
$(use_enable libressl https-constraint)
--disable-https-constraint
}

src_install() {
Expand Down
7 changes: 2 additions & 5 deletions net-misc/openntpd/openntpd-6.8_p1-r1.ebuild
Expand Up @@ -14,14 +14,11 @@ SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="constraints libressl selinux"
IUSE="constraints selinux"

DEPEND="
!net-misc/ntp[-openntpd]
constraints? (
libressl? ( dev-libs/libressl:= )
!libressl? ( dev-libs/libretls:= )
)"
constraints? ( dev-libs/libretls:= )"

RDEPEND="
${DEPEND}
Expand Down
13 changes: 5 additions & 8 deletions net-misc/openntpd/openntpd-6.8_p1.ebuild
@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
Expand All @@ -14,12 +14,10 @@ SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="libressl selinux"
IUSE="selinux"

DEPEND="
!net-misc/ntp[-openntpd]
libressl? ( dev-libs/libressl:0= )"

!net-misc/ntp[-openntpd]"
RDEPEND="
${DEPEND}
acct-group/openntpd
Expand All @@ -43,14 +41,13 @@ src_prepare() {
sed -i 's:^server:#server:g' ntpd.conf || die
printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die

# disable constraint config if libressl not enabled
use libressl || sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
}

src_configure() {
econf \
--with-privsep-user=openntpd \
$(use_enable libressl https-constraint)
--disable-https-constraint
}

src_install() {
Expand Down

0 comments on commit beea04c

Please sign in to comment.