From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1249174-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A0ECC1382C5
	for <garchives@archives.gentoo.org>; Mon,  8 Feb 2021 14:54:17 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7D9B7E0908;
	Mon,  8 Feb 2021 14:54:16 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 66381E0908
	for <gentoo-commits@lists.gentoo.org>; Mon,  8 Feb 2021 14:54:16 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C9A94340D3E
	for <gentoo-commits@lists.gentoo.org>; Mon,  8 Feb 2021 14:54:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 560E34C0
	for <gentoo-commits@lists.gentoo.org>; Mon,  8 Feb 2021 14:54:13 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1612796038.281e0e7ae7ed000d93843ad33319acf70c625c18.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-misc/chrony/chrony-9999.ebuild net-misc/chrony/metadata.xml
X-VCS-Directories: net-misc/chrony/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 281e0e7ae7ed000d93843ad33319acf70c625c18
X-VCS-Branch: master
Date: Mon,  8 Feb 2021 14:54:13 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a8f0f095-5abe-4915-884c-23303ac2549e
X-Archives-Hash: 575f8b61ebbf346714f829ccff92410b

commit:     281e0e7ae7ed000d93843ad33319acf70c625c18
Author:     Peter Alfredsen <crabbedhaloablution <AT> icloud <DOT> com>
AuthorDate: Tue Dec 15 11:43:10 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb  8 14:53:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=281e0e7a

net-misc/chrony: add nss support

NSS is no longer a null-option.

Do note that with --as-needed, chronyd will only link against libfreebl3.so, not other parts of NSS.
NSS, though, is kind of useless since it's only good for sechash support.

Signed-off-by: Peter Alfredsen <crabbedhaloablution <AT> icloud.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/chrony/chrony-9999.ebuild | 14 +++++++++-----
 net-misc/chrony/metadata.xml       |  1 +
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 705bbb05914..81b51b9af84 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -20,8 +20,13 @@ S="${WORKDIR}/${P/_/-}"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="+caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps +refclock +rtc samba +seccomp +sechash selinux"
-REQUIRED_USE="sechash? ( nettle )"
+IUSE="+caps +cmdmon html ipv6 libedit +nettle nss +ntp +phc pps +refclock +rtc samba +seccomp +sechash selinux"
+REQUIRED_USE="
+	sechash? ( || ( nettle nss  ) )
+	nettle? ( !nss )
+	!sechash? ( !nss )
+	!sechash? ( !nts? ( !nettle ) )
+	"
 RESTRICT="test"
 
 BDEPEND="nettle? ( virtual/pkgconfig )"
@@ -40,6 +45,7 @@ DEPEND="
 	)
 	libedit? ( dev-libs/libedit )
 	nettle? ( dev-libs/nettle:= )
+	nss? ( dev-libs/nss:= )
 	seccomp? ( sys-libs/libseccomp )
 	html? ( dev-ruby/asciidoctor )
 	pps? ( net-misc/pps-tools )
@@ -84,8 +90,6 @@ src_configure() {
 
 	tc-export CC PKG_CONFIG
 
-	# Note: ncurses and nss switches are mentioned in the configure script but
-	# do nothing
 	# not an autotools generated script
 	local myconf=(
 		$(use_enable seccomp scfilter)
@@ -94,6 +98,7 @@ src_configure() {
 		$(usex ipv6 '' --disable-ipv6)
 		$(usex libedit '' --without-editline)
 		$(usex nettle '' --without-nettle)
+		$(usex nss '' --without-nss)
 		$(usex ntp '' --disable-ntp)
 		$(usex phc '' --disable-phc)
 		$(usex pps '' --disable-pps)
@@ -109,7 +114,6 @@ src_configure() {
 		--sysconfdir="${EPREFIX}/etc/chrony"
 		--with-hwclockfile="${EPREFIX}/etc/adjtime"
 		--with-pidfile="${EPREFIX}/run/chrony/chronyd.pid"
-		--without-nss
 		--without-tomcrypt
 	)
 

diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml
index 6d7a44f2f91..fe7394a48bf 100644
--- a/net-misc/chrony/metadata.xml
+++ b/net-misc/chrony/metadata.xml
@@ -26,6 +26,7 @@
 		<flag name="cmdmon">Support for command and monitoring</flag>
 		<flag name="html">Install HTML documentation</flag>
 		<flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for hash functions</flag>
+		<flag name="nss">Use <pkg>dev-libs/nss</pkg> for hash functions</flag>
 		<flag name="ntp">Support for the Network Time Protocol (NTP)</flag>
 		<flag name="phc">Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface</flag>
 		<flag name="pps">Support for the Linux Pulse Per Second (PPS) interface</flag>