commit:     1585238a7ef26c4a913781265e82a54c0fb5414c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat May  2 10:15:10 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat May  2 10:43:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1585238a

net-misc/chrony: fix live ebuild

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 net-misc/chrony/chrony-4.0_pre2-r1.ebuild | 29 +++++++++++++++--
 net-misc/chrony/chrony-9999.ebuild        | 52 ++++++++++++++++++++++++-------
 2 files changed, 67 insertions(+), 14 deletions(-)

diff --git a/net-misc/chrony/chrony-4.0_pre2-r1.ebuild 
b/net-misc/chrony/chrony-4.0_pre2-r1.ebuild
index 503840b2754..322eeb92494 100644
--- a/net-misc/chrony/chrony-4.0_pre2-r1.ebuild
+++ b/net-misc/chrony/chrony-4.0_pre2-r1.ebuild
@@ -6,20 +6,33 @@ inherit systemd tmpfiles toolchain-funcs
 
 DESCRIPTION="NTP client and server programs"
 HOMEPAGE="https://chrony.tuxfamily.org/";
-SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz";
+
+if [[ ${PV} == "9999" ]]; then
+       EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git";
+
+       inherit git-r3
+else
+       SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz";
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
 LICENSE="GPL-2"
 SLOT="0"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
 IUSE="
        +adns +caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps readline 
+refclock +rtc
        +seccomp +sechash selinux
 "
+
 REQUIRED_USE="
        ?? ( libedit readline )
        sechash? ( nettle )
 "
 
+RESTRICT=test
+
+BDEPEND=""
+
 CDEPEND="
        caps? ( acct-group/ntp acct-user/ntp sys-libs/libcap )
        libedit? ( dev-libs/libedit )
@@ -27,17 +40,21 @@ CDEPEND="
        readline? ( >=sys-libs/readline-4.1-r4:= )
        seccomp? ( sys-libs/libseccomp )
 "
+
 DEPEND="
        ${CDEPEND}
        html? ( dev-ruby/asciidoctor )
        pps? ( net-misc/pps-tools )
 "
+
 RDEPEND="
        ${CDEPEND}
        selinux? ( sec-policy/selinux-chronyd )
 "
 
-RESTRICT=test
+if [[ ${PV} == "9999" ]]; then
+       BDEPEND+=" virtual/w3m"
+fi
 
 S="${WORKDIR}/${P/_/-}"
 
@@ -48,6 +65,7 @@ PATCHES=(
 
 src_prepare() {
        default
+
        sed -i \
                -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
                doc/* examples/* || die
@@ -117,6 +135,11 @@ src_configure() {
 }
 
 src_compile() {
+       if [[ ${PV} == "9999" ]]; then
+               # uses w3m
+               emake -C doc man txt
+       fi
+
        emake all docs $(usex html '' 'ADOC=true')
 }
 

diff --git a/net-misc/chrony/chrony-9999.ebuild 
b/net-misc/chrony/chrony-9999.ebuild
index 06eeb9fa032..322eeb92494 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -2,39 +2,60 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit git-r3 tmpfiles systemd toolchain-funcs
+inherit systemd tmpfiles toolchain-funcs
 
 DESCRIPTION="NTP client and server programs"
 HOMEPAGE="https://chrony.tuxfamily.org/";
-EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git/";
+
+if [[ ${PV} == "9999" ]]; then
+       EGIT_REPO_URI="https://git.tuxfamily.org/chrony/chrony.git";
+
+       inherit git-r3
+else
+       SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz";
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
 LICENSE="GPL-2"
 SLOT="0"
 
-KEYWORDS=""
 IUSE="
-       +adns +caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock 
+rtc
-       +seccomp selinux
+       +adns +caps +cmdmon html ipv6 libedit +nettle +ntp +phc pps readline 
+refclock +rtc
+       +seccomp +sechash selinux
 "
+
 REQUIRED_USE="
        ?? ( libedit readline )
+       sechash? ( nettle )
 "
 
+RESTRICT=test
+
+BDEPEND=""
+
 CDEPEND="
        caps? ( acct-group/ntp acct-user/ntp sys-libs/libcap )
        libedit? ( dev-libs/libedit )
+       nettle? ( dev-libs/nettle:= )
        readline? ( >=sys-libs/readline-4.1-r4:= )
        seccomp? ( sys-libs/libseccomp )
 "
+
 DEPEND="
        ${CDEPEND}
-       dev-ruby/asciidoctor
+       html? ( dev-ruby/asciidoctor )
        pps? ( net-misc/pps-tools )
 "
+
 RDEPEND="
        ${CDEPEND}
        selinux? ( sec-policy/selinux-chronyd )
 "
-RESTRICT=test
+
+if [[ ${PV} == "9999" ]]; then
+       BDEPEND+=" virtual/w3m"
+fi
+
 S="${WORKDIR}/${P/_/-}"
 
 PATCHES=(
@@ -44,6 +65,7 @@ PATCHES=(
 
 src_prepare() {
        default
+
        sed -i \
                -e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
                doc/* examples/* || die
@@ -88,15 +110,16 @@ src_configure() {
                $(usex caps '' --disable-linuxcaps)
                $(usex cmdmon '' --disable-cmdmon)
                $(usex ipv6 '' --disable-ipv6)
+               $(usex nettle '' --without-nettle)
                $(usex ntp '' --disable-ntp)
                $(usex phc '' --disable-phc)
                $(usex pps '' --disable-pps)
                $(usex refclock '' --disable-refclock)
                $(usex rtc '' --disable-rtc)
+               $(usex sechash '' --disable-sechash)
                ${CHRONY_EDITLINE}
                ${EXTRA_ECONF}
                --chronysockdir="${EPREFIX}/run/chrony"
-               --disable-sechash
                --docdir="${EPREFIX}/usr/share/doc/${PF}"
                --mandir="${EPREFIX}/usr/share/man"
                --prefix="${EPREFIX}/usr"
@@ -112,7 +135,12 @@ src_configure() {
 }
 
 src_compile() {
-       emake all docs
+       if [[ ${PV} == "9999" ]]; then
+               # uses w3m
+               emake -C doc man txt
+       fi
+
+       emake all docs $(usex html '' 'ADOC=true')
 }
 
 src_install() {
@@ -129,8 +157,10 @@ src_install() {
 
        newtmpfiles - chronyd.conf <<<"d /run/chrony 0750 $(usex caps 'ntp ntp' 
'root root')"
 
-       docinto html
-       dodoc doc/*.html
+       if use html; then
+               docinto html
+               dodoc doc/*.html
+       fi
 
        keepdir /var/{lib,log}/chrony
 

Reply via email to