diff options
author | Sam James <sam@gentoo.org> | 2021-12-10 03:13:37 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-10 03:48:53 +0000 |
commit | 6b74ed44db7befe586920f769221134cb064adc4 (patch) | |
tree | 2508fc1c2ae685e1e3156aee2f4a67d69ab8f78c /net-analyzer/iptstate | |
parent | net-analyzer/mrtg: add 2.17.8 (diff) | |
download | gentoo-6b74ed44db7befe586920f769221134cb064adc4.tar.gz gentoo-6b74ed44db7befe586920f769221134cb064adc4.tar.bz2 gentoo-6b74ed44db7befe586920f769221134cb064adc4.zip |
net-analyzer/iptstate: add 2.2.7
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/iptstate')
5 files changed, 92 insertions, 0 deletions
diff --git a/net-analyzer/iptstate/Manifest b/net-analyzer/iptstate/Manifest index 54cbf6286e8e..f5163c1b7238 100644 --- a/net-analyzer/iptstate/Manifest +++ b/net-analyzer/iptstate/Manifest @@ -1 +1,2 @@ DIST iptstate-2.2.6.tar.bz2 28700 BLAKE2B 66e18425a4fed423a5a03c8f9ecbc87f4553a64475ab77144f3f37969eb6a399d52d7166bb68d9c9e80753163b841c71b42bfc13796e4a9d2c23db084740f3f5 SHA512 411b357aced384c52caac17b23f3c6bd631ff34d41b6000b90ff6dfc3cf20e36e46416d3691ac699b06f16d6042a42681b42a5d3594ce287aa6cf3b3b637c999 +DIST iptstate-2.2.7.tar.bz2 29994 BLAKE2B 0be657d4452b40b1835279bfa141b94e3db7adeeba141dede8456c64e4847efbb23197afab7e2452c9ad84c1be5eaffa1d9f7da15a5aaeb0c6fb28c1d62d6733 SHA512 43e258639e0f728d4a393d2dd7a834a6df1131da5291559a504800a0918dad3e010baaeb1bca66cb9a62bad6955f678be3302aac916fc956a525cdd7e9d0690a diff --git a/net-analyzer/iptstate/files/iptstate-2.2.7-respect-CPPFLAGS.patch b/net-analyzer/iptstate/files/iptstate-2.2.7-respect-CPPFLAGS.patch new file mode 100644 index 000000000000..6b658eac80bb --- /dev/null +++ b/net-analyzer/iptstate/files/iptstate-2.2.7-respect-CPPFLAGS.patch @@ -0,0 +1,18 @@ +From: Sam James <sam@gentoo.org> +Date: Fri, 10 Dec 2021 03:19:45 +0000 +Subject: [PATCH 3/3] Makefile: don't override CPPFLAGS + +There's no need to explicitly blank this and it prevents overrides +from the environment. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Makefile ++++ b/Makefile +@@ -26,7 +26,6 @@ CXXFILES?= iptstate.cc + + # THIS IS FOR NORMAL COMPILATION + LIBS?= $(shell $(PKG_CONFIG) --libs ncurses libnetfilter_conntrack) +-CPPFLAGS= + + ### YOU SHOULDN'T NEED TO CHANGE ANYTHING BELOW THIS + diff --git a/net-analyzer/iptstate/files/iptstate-2.2.7-respect-LDFLAGS.patch b/net-analyzer/iptstate/files/iptstate-2.2.7-respect-LDFLAGS.patch new file mode 100644 index 000000000000..41c875453926 --- /dev/null +++ b/net-analyzer/iptstate/files/iptstate-2.2.7-respect-LDFLAGS.patch @@ -0,0 +1,18 @@ +https://github.com/jaymzh/iptstate/pull/21 + +From: Sam James <sam@gentoo.org> +Date: Fri, 10 Dec 2021 03:10:49 +0000 +Subject: [PATCH 1/2] Makefile: respect LDFLAGS + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Makefile ++++ b/Makefile +@@ -49,7 +49,7 @@ iptstate: iptstate.cc Makefile + echo "+------------------------------------------------------------+" ;\ + echo ""; + +- $(CXX) $(CXXFLAGS) $(CXXFILES) -o iptstate $(LIBS) $(CPPFLAGS) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CXXFILES) -o iptstate $(LIBS) + @touch iptstate + + @\ diff --git a/net-analyzer/iptstate/files/iptstate-2.2.7-use-pkg-config.patch b/net-analyzer/iptstate/files/iptstate-2.2.7-use-pkg-config.patch new file mode 100644 index 000000000000..3896799f78ae --- /dev/null +++ b/net-analyzer/iptstate/files/iptstate-2.2.7-use-pkg-config.patch @@ -0,0 +1,21 @@ +https://github.com/jaymzh/iptstate/pull/21 + +From: Sam James <sam@gentoo.org> +Date: Fri, 10 Dec 2021 03:10:42 +0000 +Subject: [PATCH 2/2] Makefile: Use pkg-config + +Depending on platform, linking against ncurses may require -ltinfo as well, +and linking against netfilter_conntrack may require -lnetfilter too. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Makefile ++++ b/Makefile +@@ -25,7 +25,7 @@ CXXFLAGS?= -g -Wall -O2 -Werror=format-security -Wformat-truncation=0 + CXXFILES?= iptstate.cc + + # THIS IS FOR NORMAL COMPILATION +-LIBS?= -lncurses -lnetfilter_conntrack ++LIBS?= $(shell $(PKG_CONFIG) --libs ncurses libnetfilter_conntrack) + CPPFLAGS= + + ### YOU SHOULDN'T NEED TO CHANGE ANYTHING BELOW THIS diff --git a/net-analyzer/iptstate/iptstate-2.2.7.ebuild b/net-analyzer/iptstate/iptstate-2.2.7.ebuild new file mode 100644 index 000000000000..4d851b9e14b3 --- /dev/null +++ b/net-analyzer/iptstate/iptstate-2.2.7.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="IP Tables State displays states being kept by iptables in a top-like format" +HOMEPAGE="https://www.phildev.net/iptstate/ https://github.com/jaymzh/iptstate" +SRC_URI="https://github.com/jaymzh/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~x86" + +RDEPEND=">=sys-libs/ncurses-5.7-r7:= + >=net-libs/libnetfilter_conntrack-0.0.50" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.7-respect-LDFLAGS.patch + "${FILESDIR}"/${PN}-2.2.7-use-pkg-config.patch + "${FILESDIR}"/${PN}-2.2.7-respect-CPPFLAGS.patch +) + +src_configure() { + tc-export CXX PKG_CONFIG +} + +src_install() { + emake PREFIX="${D}"/usr install + dodoc BUGS Changelog CONTRIB README.md WISHLIST +} |