summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/iputils/Manifest1
-rw-r--r--net-misc/iputils/iputils-20231222.ebuild141
-rw-r--r--net-misc/iputils/iputils-99999999.ebuild26
3 files changed, 160 insertions, 8 deletions
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index eeedf8998123..c3237e9108d6 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,3 +1,4 @@
DIST iputils-20211215.tar.gz 524567 BLAKE2B b88ff84be1d4d6a741f8f3514739ceff45ea40c475b5d4c2df8571fe84d4f1af9bc3fdce29e9ff393417671c75204261c8d64dde00473caa314b0aeb1fbf74ce SHA512 191062e51f7c8e8b38e3e4a96845adb77cd69f487d548c7cc578fad544443b4bc0dbe965d8f8e6fbda0a2f5b2fe2829789c05f873190c53d773245959298f6e9
DIST iputils-20221126.tar.gz 511944 BLAKE2B 97bdc49810ce9e517211323e8e8ffd2f2be505704d67533db0e8f296701048b82c61b39062aab4a8fa148b29175636a657c2dcdd65e3a16b1572d2f392b8ecf0 SHA512 7fdfd76e6f2977039bc0930a1a5451f17319bf17beefc429751d99ffe143a83344d5b4cdbf008627bd70caafeadaf906a8b7c00393fa819e50d6c02b512c367f
+DIST iputils-20231222.tar.xz 445548 BLAKE2B a76d4e9741c4ce8d2a2b6337873400543c5bb51d61a794fdfed8c8f4228c41020f5203c8af7ca44a36877d246d4f67019d31f1a58e48c6fca7964d6ebc9d764b SHA512 33e1eb6d90d43909b23bc8f3ef2f349e6655deefe1d9d51880705e8e84674a82ed6721c805cec18f188667d83577e701d39ff515f9406d16eaadc64c4bc28221
DIST iputils-manpages-20211215.tar.xz 17148 BLAKE2B 63a956805b01f57b070b6b4ceb32f6ddf4313c74203cde821fc2f6f16ab8de14861da31163adf496db555f1961592d4fbc2ba7a977ccb18773af3bdb8d3795c0 SHA512 eb8c8508221b06fc13bf196b01b11f3ec87cd77e25d89c088776e39d249e10a3915ebb39942805adee179b352543063ce3dac158d68783c68c23de550ec14eee
diff --git a/net-misc/iputils/iputils-20231222.ebuild b/net-misc/iputils/iputils-20231222.ebuild
new file mode 100644
index 000000000000..2ca11e44d741
--- /dev/null
+++ b/net-misc/iputils/iputils-20231222.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+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/releases/download/${PV}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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
+ )
+ 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/tracepath4.8
+ dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+ fi
+
+ if use doc ; then
+ mv "${ED}"/usr/share/${PN} "${ED}"/usr/share/doc/${PF}/html || die
+ 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 f1fd401dbdc4..2ca11e44d741 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -11,7 +11,7 @@ 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"
+ SRC_URI="https://github.com/iputils/iputils/releases/download/${PV}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
@@ -40,16 +40,21 @@ DEPEND="
virtual/os-headers
"
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
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
@@ -68,10 +73,15 @@ src_configure() {
-Dsystemdunitdir=$(systemd_get_systemunitdir)
-DUSE_GETTEXT=$(usex nls true false)
$(meson_use !test SKIP_TESTS)
- -DBUILD_HTML_MANS=$(usex doc true false)
- -DBUILD_MANS=true
)
+ if [[ ${PV} == 9999 ]] ; then
+ emesonargs+=(
+ -DBUILD_HTML_MANS=$(usex doc true false)
+ -DBUILD_MANS=true
+ )
+ fi
+
meson_src_configure
}