summaryrefslogtreecommitdiff
path: root/net-analyzer/iptstate
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/iptstate')
-rw-r--r--net-analyzer/iptstate/Manifest5
-rw-r--r--net-analyzer/iptstate/files/iptstate-2.2.7-respect-CPPFLAGS.patch18
-rw-r--r--net-analyzer/iptstate/files/iptstate-2.2.7-respect-LDFLAGS.patch18
-rw-r--r--net-analyzer/iptstate/files/iptstate-2.2.7-use-pkg-config.patch21
-rw-r--r--net-analyzer/iptstate/iptstate-2.2.7.ebuild34
5 files changed, 96 insertions, 0 deletions
diff --git a/net-analyzer/iptstate/Manifest b/net-analyzer/iptstate/Manifest
index f69fd815ab99..06da4645e34f 100644
--- a/net-analyzer/iptstate/Manifest
+++ b/net-analyzer/iptstate/Manifest
@@ -1,4 +1,9 @@
AUX iptstate-2.2.5-gentoo.patch 675 BLAKE2B e24ec3afa9c75a097d0a1d27c4e63e125b909590db52e49a8789ac66e00ea308f5e63b2f7d55a09fbc6de728db5812563ea3e31b9908386cd5ad76330b4e862b SHA512 e78debad0e63c8cb6c41b84a058b597a29366c73bbf06766271179b2b7570e5770c5fe82d239a2d3ddf7bd8d42856ecfaf01fd020e66acbc5842dc598e63a90c
+AUX iptstate-2.2.7-respect-CPPFLAGS.patch 504 BLAKE2B 5797e1bbefcc52ad86d33ccf0665e7750ca9203f58fca7c2a2d1b254c4f9ba6e649890fee12a4ce3cd0342aedd3f58a1498d86a33af7ac5f44483aea3a56419b SHA512 97d295ca8b9dbc2cdba813b03233a3e8c3017b886a7ea037f8eac6e1d270f3fa9b1ebd1c173655bfdf8d1112849c82b3bc0e19b38f1c56585823df5d2e5990b2
+AUX iptstate-2.2.7-respect-LDFLAGS.patch 538 BLAKE2B 07603b7b06d7bfad425f77c9b053ee22df1cd97278356f49e036114d98747460054c19985bfd1dbc58477ab58c50db1674eac728d5be8ae1c463c5b21262ef11 SHA512 741e01d40a42a488fed95833b17a42b30772d512f07467ecbedf19b55d6f0985e87550e2a1873c02c500349ea2a72c0e278c9fdb550741087c7d84de14374f0e
+AUX iptstate-2.2.7-use-pkg-config.patch 704 BLAKE2B d57febf25748c8b94ac892d7fed1c3c9765bab730163fa8e101a79927bbf2fef19ae2935b9dff170970fd6038c175df5a52a335536be68d29a472db146cfe59a SHA512 dd886bbe30c16b3bb2cb85c873780cd9edee6eb0a90fbbd2bfe5bfa16de237c7c1f33df0cee84cac17bc00cf3ff579f378d0d0114c94ecdefcb4cf44f73c2102
DIST iptstate-2.2.6.tar.bz2 28700 BLAKE2B 66e18425a4fed423a5a03c8f9ecbc87f4553a64475ab77144f3f37969eb6a399d52d7166bb68d9c9e80753163b841c71b42bfc13796e4a9d2c23db084740f3f5 SHA512 411b357aced384c52caac17b23f3c6bd631ff34d41b6000b90ff6dfc3cf20e36e46416d3691ac699b06f16d6042a42681b42a5d3594ce287aa6cf3b3b637c999
+DIST iptstate-2.2.7.tar.bz2 29994 BLAKE2B 0be657d4452b40b1835279bfa141b94e3db7adeeba141dede8456c64e4847efbb23197afab7e2452c9ad84c1be5eaffa1d9f7da15a5aaeb0c6fb28c1d62d6733 SHA512 43e258639e0f728d4a393d2dd7a834a6df1131da5291559a504800a0918dad3e010baaeb1bca66cb9a62bad6955f678be3302aac916fc956a525cdd7e9d0690a
EBUILD iptstate-2.2.6.ebuild 778 BLAKE2B 253e3316bf2dba271b93c401b40588a70049a4aa4e758557e86fe22d4528cebbb9f06717e6fc6143ebd99fef296f9dd0ab111870aff7e38112cab583a7e1606b SHA512 9b13e2253bc7cfd1adf7e95c19064c73f933b683245f32e0cba10148ee827d5fefbb96ee5c898cecb7a5d4c51da36f724938a1087823f13c13f979674b81b5c6
+EBUILD iptstate-2.2.7.ebuild 884 BLAKE2B 04eb6257a8f8b19b61f711c3dab97603694bc5c6829d44f0430d48027da7920fb226725d37e43affa9f8dad13158697a701fa8e38e2663145102f5a8af1ce52b SHA512 6f4c5a1765c91d89436bd0152a930bd6d391b8b1d85d97930f8bdbd86ad2417b57179b649c87d001281c2b97e20b30010d6ba0bf5d12bc3e80debb65d9734b20
MISC metadata.xml 414 BLAKE2B 614d653c3ef40f47c7b2eb9e2713091f5ff0dcf7ee1f849a22b69c1b72357c0267def97acd94d3409f45fec58f1b2c4473ea79f2357d6f61d28d0a32bdf41150 SHA512 e0a0666e076c9b275398947a0a13a7a2403a0a067536541d42c26d399cb2c56c1827ca202d253113b3d87b507fee2bbd01f8a7f33baa72cf35602daf0786b23c
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
+}