commit:     28cc33c3d07f21aa30dd7a391864e7e1f81b8b47
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 16 04:54:26 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 16 05:33:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28cc33c3

net-analyzer/tcpdump: use live template

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/tcpdump/tcpdump-4.99.0.ebuild | 19 ++++++++++++-----
 net-analyzer/tcpdump/tcpdump-9999.ebuild   | 34 ++++++++++++++++++------------
 2 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/net-analyzer/tcpdump/tcpdump-4.99.0.ebuild 
b/net-analyzer/tcpdump/tcpdump-4.99.0.ebuild
index 03742866ec3..98642f21786 100644
--- a/net-analyzer/tcpdump/tcpdump-4.99.0.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.99.0.ebuild
@@ -7,18 +7,26 @@ inherit autotools
 
 DESCRIPTION="A tool for network monitoring and data acquisition"
 HOMEPAGE="https://www.tcpdump.org/ 
https://github.com/the-tcpdump-group/tcpdump";
-SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz";
-S="${WORKDIR}/${PN}-${P/_}"
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump";
+else
+       
SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz";
+       S="${WORKDIR}/${PN}-${P/_}"
+
+       KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 
sparc x86 ~amd64-linux ~x86-linux"
+fi
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 
~amd64-linux ~x86-linux"
 IUSE="+drop-root libressl +smi +ssl +samba suid test"
+REQUIRED_USE="test? ( samba )"
+
 # Assorted failures: bug #768498
 RESTRICT="test"
-REQUIRED_USE="test? ( samba )"
 
-BDEPEND="drop-root? ( virtual/pkgconfig )"
 RDEPEND="
        net-libs/libpcap
        drop-root? (
@@ -43,6 +51,7 @@ DEPEND="
                dev-lang/perl
        )
 "
+BDEPEND="drop-root? ( virtual/pkgconfig )"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-9999-libdir.patch

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild 
b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index 17c0eed4bfe..db5f72d97ac 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -3,22 +3,30 @@
 
 EAPI=7
 
-inherit autotools git-r3
+inherit autotools
 
 DESCRIPTION="A tool for network monitoring and data acquisition"
-HOMEPAGE="
-       https://www.tcpdump.org/
-       https://github.com/the-tcpdump-group/tcpdump
-"
-EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump";
+HOMEPAGE="https://www.tcpdump.org/ 
https://github.com/the-tcpdump-group/tcpdump";
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump";
+else
+       
SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz";
+       S="${WORKDIR}/${PN}-${P/_}"
+
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 
~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
 
 LICENSE="BSD"
 SLOT="0"
 IUSE="+drop-root libressl +smi +ssl +samba suid test"
-
-RESTRICT="!test? ( test )"
 REQUIRED_USE="test? ( samba )"
 
+# Assorted failures: bug #768498
+RESTRICT="test"
+
 RDEPEND="
        net-libs/libpcap
        drop-root? (
@@ -36,9 +44,6 @@ RDEPEND="
                acct-user/pcap
        )
 "
-BDEPEND="
-       drop-root? ( virtual/pkgconfig )
-"
 DEPEND="
        ${RDEPEND}
        test? (
@@ -46,13 +51,14 @@ DEPEND="
                dev-lang/perl
        )
 "
+BDEPEND="drop-root? ( virtual/pkgconfig )"
+
 PATCHES=(
        "${FILESDIR}"/${PN}-9999-libdir.patch
 )
 
 src_prepare() {
        default
-
        eautoreconf
 }
 
@@ -67,7 +73,7 @@ src_configure() {
 }
 
 src_test() {
-       if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
+       if [[ ${EUID} -ne 0 ]] || ! use drop-root ; then
                emake check
        else
                ewarn "If you want to run the test suite, make sure you either"
@@ -81,7 +87,7 @@ src_install() {
        dodoc *.awk
        dodoc CHANGES CREDITS README.md
 
-       if use suid; then
+       if use suid ; then
                fowners root:pcap /usr/sbin/tcpdump
                fperms 4110 /usr/sbin/tcpdump
        fi

Reply via email to