From 3059f20995d5ac642b7b4a38d538fdf1cc45d90d Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@koprulu.sector>
Date: Wed, 30 Nov 2022 07:22:57 +0000
Subject: gentoo auto-resync : 30:11:2022 - 07:22:56

---
 net-misc/Manifest.gz                     | Bin 55269 -> 55271 bytes
 net-misc/iputils/Manifest                |   5 +-
 net-misc/iputils/iputils-20221126.ebuild | 180 +++++++++++++++++++++++++++++++
 net-misc/iputils/iputils-99999999.ebuild |  36 ++++---
 4 files changed, 205 insertions(+), 16 deletions(-)
 create mode 100644 net-misc/iputils/iputils-20221126.ebuild

(limited to 'net-misc')

diff --git a/net-misc/Manifest.gz b/net-misc/Manifest.gz
index c0d24ad84f20..8da3ab4b4f0d 100644
Binary files a/net-misc/Manifest.gz and b/net-misc/Manifest.gz differ
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index 113c2f8aeb0c..1557116229d7 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,5 +1,8 @@
 DIST iputils-20211215.tar.gz 524567 BLAKE2B b88ff84be1d4d6a741f8f3514739ceff45ea40c475b5d4c2df8571fe84d4f1af9bc3fdce29e9ff393417671c75204261c8d64dde00473caa314b0aeb1fbf74ce SHA512 191062e51f7c8e8b38e3e4a96845adb77cd69f487d548c7cc578fad544443b4bc0dbe965d8f8e6fbda0a2f5b2fe2829789c05f873190c53d773245959298f6e9
+DIST iputils-20221126-docs.tar.xz 13000 BLAKE2B 8a9dae136f6555ed933f97d26be82a7d9ab228efd40cc03d065b39374f13000604e3bbbc856124076ec6934c92845d7b974eff64bbf65fc3a63a2266ba920e2f SHA512 efa60b618238b6e7614828a3c3a30e58ac311a82a686a28a186110cc28dae96f509199f057b1855b08954b1b5a3f6be63e0de6c0c028f4eb5f88c6dcd973a93b
+DIST iputils-20221126.tar.gz 511944 BLAKE2B 97bdc49810ce9e517211323e8e8ffd2f2be505704d67533db0e8f296701048b82c61b39062aab4a8fa148b29175636a657c2dcdd65e3a16b1572d2f392b8ecf0 SHA512 7fdfd76e6f2977039bc0930a1a5451f17319bf17beefc429751d99ffe143a83344d5b4cdbf008627bd70caafeadaf906a8b7c00393fa819e50d6c02b512c367f
 DIST iputils-manpages-20211215.tar.xz 17148 BLAKE2B 63a956805b01f57b070b6b4ceb32f6ddf4313c74203cde821fc2f6f16ab8de14861da31163adf496db555f1961592d4fbc2ba7a977ccb18773af3bdb8d3795c0 SHA512 eb8c8508221b06fc13bf196b01b11f3ec87cd77e25d89c088776e39d249e10a3915ebb39942805adee179b352543063ce3dac158d68783c68c23de550ec14eee
 EBUILD iputils-20211215.ebuild 4754 BLAKE2B f5e6b11dcf1642695fb3fe8be537a5df04359d397c28f7a86fff5b11c8dc37743597df22721d41bdd8c45f3f06f76325c236e3159602b15bc8cd1200d3389c41 SHA512 aa0565d5645f4acba4bfa3ca6d425e2538922ec9f3405ba1f4542941e7f21f5399e8709b71d76292a927109911226cdaa2be56ad63b62006e59a759556747bd5
-EBUILD iputils-99999999.ebuild 4285 BLAKE2B 39a671917897b5076e21dd0c413ef26553ee68883b9b972ae45f2de1fcc3d75fdcf9971b977ad6ce9eca52e2912ff0236524328dff61d3c2913d13a67fa09475 SHA512 4e3c9e4598d7517f06eddb38b6060421a3af035030b7a72d8ced53d335f0c5b1e6e8df3902edf9d719f124f4a13ad5f55f29d37fa0fe5d107487c1ccd124beed
+EBUILD iputils-20221126.ebuild 4431 BLAKE2B aa418284ea54caf444246af21b56e8e4cde1d960ac43605ffbb446062534ba630891568e0e170d3151b2c5512209445f25060c987ab659437b6ed5506f5a8952 SHA512 75230f732d0a80d0dc7a435aab6ab892cec68a60ba752188404de81a820a15c3860ef7427a300daf21cb5abb1b601ea49efb15f4a797b1a1274c199d84f9f11d
+EBUILD iputils-99999999.ebuild 4431 BLAKE2B aa418284ea54caf444246af21b56e8e4cde1d960ac43605ffbb446062534ba630891568e0e170d3151b2c5512209445f25060c987ab659437b6ed5506f5a8952 SHA512 75230f732d0a80d0dc7a435aab6ab892cec68a60ba752188404de81a820a15c3860ef7427a300daf21cb5abb1b601ea49efb15f4a797b1a1274c199d84f9f11d
 MISC metadata.xml 1034 BLAKE2B a1d9c98f71961b483d73229a2fbb8b272b2c1693f89fbe6921f657949da45c87fe7408aa8ce39059ba6ce3e79bb4621e4d303ed2302ab3363c5492e174fc2149 SHA512 8df2ddb2ea153af627c8c353af03675e70028017987c83e4d70ee9f1a97ae79c4fdfc8eb5987efaf8daeeb0955ef04a65315fe6033e71e9cb32e8059294716fd
diff --git a/net-misc/iputils/iputils-20221126.ebuild b/net-misc/iputils/iputils-20221126.ebuild
new file mode 100644
index 000000000000..9cb95e6d73a7
--- /dev/null
+++ b/net-misc/iputils/iputils-20221126.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors.  This avoids ugly issues while
+# building stages, and reduces dependencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag, all USE flags enabled and
+# tar ${S}/doc folder.
+
+EAPI=8
+
+PLOCALES="de fr ja pt_BR tr uk zh_CN"
+
+inherit fcaps meson plocale systemd toolchain-funcs
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+	inherit git-r3
+else
+	SRC_URI="
+		https://github.com/iputils/iputils/archive/${PV}.tar.gz -> ${P}.tar.gz
+		https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-docs.tar.xz
+	"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
+
+# We install ping unconditionally so BSD is listed by itself
+# See LICENSE on each release, it summaries per-component
+LICENSE="
+	BSD
+	arping? ( GPL-2+ )
+	clockdiff? ( BSD )
+	tracepath? ( GPL-2+ )
+"
+SLOT="0"
+IUSE="+arping caps clockdiff doc idn nls test tracepath"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	caps? ( sys-libs/libcap )
+	idn? ( net-dns/libidn2:= )
+	nls? ( virtual/libintl )
+"
+DEPEND="
+	${RDEPEND}
+	virtual/os-headers
+"
+BDEPEND="
+	virtual/pkgconfig
+	test? ( sys-apps/iproute2 )
+	nls? ( sys-devel/gettext )
+"
+
+if [[ ${PV} == *9999 ]] ; then
+	BDEPEND+="
+		app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-ns-stylesheets
+		app-text/docbook-xsl-stylesheets
+		dev-libs/libxslt
+	"
+fi
+
+src_prepare() {
+	default
+
+	plocale_get_locales > po/LINGUAS || die
+}
+
+src_configure() {
+	local emesonargs=(
+		-DUSE_CAP=$(usex caps true false)
+		-DUSE_IDN=$(usex idn true false)
+		-DBUILD_ARPING=$(usex arping true false)
+		-DBUILD_CLOCKDIFF=$(usex clockdiff true false)
+		-DBUILD_PING=true
+		-DBUILD_TRACEPATH=$(usex tracepath true false)
+		-DNO_SETCAP_OR_SUID=true
+		-Dsystemdunitdir=$(systemd_get_systemunitdir)
+		-DUSE_GETTEXT=$(usex nls true false)
+		$(meson_use !test SKIP_TESTS)
+	)
+
+	if [[ ${PV} == *9999 ]] ; then
+		emesonargs+=(
+			-DBUILD_HTML_MANS=$(usex doc true false)
+			-DBUILD_MANS=true
+		)
+	else
+		emesonargs+=(
+			-DBUILD_HTML_MANS=false
+			-DBUILD_MANS=false
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_compile() {
+	tc-export CC
+
+	meson_src_compile
+}
+
+src_test() {
+	if [[ ${EUID} != 0 ]] ; then
+		einfo "Tests require root privileges. Skipping ..."
+		return
+	fi
+
+	meson_src_test
+}
+
+src_install() {
+	meson_src_install
+
+	FILECAPS=( cap_net_raw usr/bin/ping )
+	use arping && FILECAPS+=( usr/bin/arping )
+	use clockdiff && FILECAPS+=( usr/bin/clockdiff )
+
+	dosym ping /usr/bin/ping4
+	dosym ping /usr/bin/ping6
+
+	if use tracepath ; then
+		dosym tracepath /usr/bin/tracepath4
+		dosym tracepath /usr/bin/tracepath6
+		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+	fi
+
+	if [[ ${PV} != *9999 ]] ; then
+		local -a man_pages
+		local -a html_man_pages
+
+		while IFS= read -r -u 3 -d $'\0' my_bin; do
+			my_bin=$(basename "${my_bin}")
+			[[ -z "${my_bin}" ]] && continue
+
+			if [[ -f "${WORKDIR}/${PN}-99999999-docs/doc/${my_bin}.8" ]] ; then
+				man_pages+=( ${my_bin}.8 )
+			fi
+
+			if [[ -f "${WORKDIR}/${PN}-99999999-docs/doc/${my_bin}.html" ]] ; then
+				html_man_pages+=( ${my_bin}.html )
+			fi
+		done 3< <(find "${ED}"/{bin,usr/bin,usr/sbin} -type f -perm -a+x -print0 2>/dev/null)
+
+		pushd "${WORKDIR}"/${PN}-99999999-docs/doc &>/dev/null || die
+		doman "${man_pages[@]}"
+		if use doc ; then
+			dodoc "${html_man_pages[@]}"
+		fi
+		popd &>/dev/null || die
+	else
+		if use doc ; then
+			mv "${ED}"/usr/share/${PN} "${ED}"/usr/share/doc/${PF}/html || die
+		fi
+	fi
+}
+
+pkg_preinst() {
+	local version_with_tftpd="<${CATEGORY}/${PN}-20211215"
+	if has_version "${version_with_tftpd}[traceroute6]" || has_version "${version_with_tftpd}[tftpd]" ; then
+		HAD_TFTPD_VERSION=1
+	fi
+}
+
+pkg_postinst() {
+	fcaps_pkg_postinst
+
+	if [[ ${HAD_TFTPD_VERSION} -eq 1 ]] ; then
+		ewarn "This upstream version (>= 20211215) drops two tools:"
+		ewarn "1. tftpd (alternatives: net-ftp/tftp-hpa, net-dns/dnsmasq)"
+		ewarn "2. traceroute6 (alternatives: net-analyzer/mtr, net-analyzer/traceroute)"
+		ewarn "Please install one of the listed alternatives if needed!"
+	fi
+}
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index 7f3760b7d4f5..9cb95e6d73a7 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -8,26 +8,34 @@
 # EGIT_COMMIT set to release tag, all USE flags enabled and
 # tar ${S}/doc folder.
 
-EAPI="7"
+EAPI=8
 
 PLOCALES="de fr ja pt_BR tr uk zh_CN"
 
 inherit fcaps meson plocale systemd toolchain-funcs
 
-if [[ ${PV} == 99999999 ]] ; then
+if [[ ${PV} == *9999 ]] ; then
 	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
 	inherit git-r3
 else
-	SRC_URI="https://github.com/iputils/iputils/archive/${PV}.tar.gz -> ${P}.tar.gz
-		https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-manpages-${PV}.tar.xz
-		https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
+	SRC_URI="
+		https://github.com/iputils/iputils/archive/${PV}.tar.gz -> ${P}.tar.gz
+		https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-docs.tar.xz
+	"
 	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
 fi
 
 DESCRIPTION="Network monitoring tools including ping and ping6"
 HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
 
-LICENSE="BSD GPL-2+ rdisc"
+# We install ping unconditionally so BSD is listed by itself
+# See LICENSE on each release, it summaries per-component
+LICENSE="
+	BSD
+	arping? ( GPL-2+ )
+	clockdiff? ( BSD )
+	tracepath? ( GPL-2+ )
+"
 SLOT="0"
 IUSE="+arping caps clockdiff doc idn nls test tracepath"
 RESTRICT="!test? ( test )"
@@ -47,7 +55,7 @@ BDEPEND="
 	nls? ( sys-devel/gettext )
 "
 
-if [[ ${PV} == 99999999 ]] ; then
+if [[ ${PV} == *9999 ]] ; then
 	BDEPEND+="
 		app-text/docbook-xml-dtd:4.2
 		app-text/docbook-xml-dtd:4.5
@@ -77,7 +85,7 @@ src_configure() {
 		$(meson_use !test SKIP_TESTS)
 	)
 
-	if [[ ${PV} == 99999999 ]] ; then
+	if [[ ${PV} == *9999 ]] ; then
 		emesonargs+=(
 			-DBUILD_HTML_MANS=$(usex doc true false)
 			-DBUILD_MANS=true
@@ -123,28 +131,26 @@ src_install() {
 		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
 	fi
 
-	if [[ ${PV} != 99999999 ]] ; then
+	if [[ ${PV} != *9999 ]] ; then
 		local -a man_pages
 		local -a html_man_pages
 
-		while IFS= read -r -u 3 -d $'\0' my_bin
-		do
+		while IFS= read -r -u 3 -d $'\0' my_bin; do
 			my_bin=$(basename "${my_bin}")
 			[[ -z "${my_bin}" ]] && continue
 
-			if [[ -f "${S}/doc/${my_bin}.8" ]] ; then
+			if [[ -f "${WORKDIR}/${PN}-99999999-docs/doc/${my_bin}.8" ]] ; then
 				man_pages+=( ${my_bin}.8 )
 			fi
 
-			if [[ -f "${S}/doc/${my_bin}.html" ]] ; then
+			if [[ -f "${WORKDIR}/${PN}-99999999-docs/doc/${my_bin}.html" ]] ; then
 				html_man_pages+=( ${my_bin}.html )
 			fi
 		done 3< <(find "${ED}"/{bin,usr/bin,usr/sbin} -type f -perm -a+x -print0 2>/dev/null)
 
-		pushd doc &>/dev/null || die
+		pushd "${WORKDIR}"/${PN}-99999999-docs/doc &>/dev/null || die
 		doman "${man_pages[@]}"
 		if use doc ; then
-			docinto html
 			dodoc "${html_man_pages[@]}"
 		fi
 		popd &>/dev/null || die
-- 
cgit v1.2.3