summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-10 08:28:18 +0000
committerSam James <sam@gentoo.org>2023-01-10 08:34:43 +0000
commitc4659dffae0e01ee5790e7ffe78b1b1d417d4306 (patch)
tree1f05a55e487a5e1675f7b38af42d723781358ba9 /net-libs
parentlicenses: rename NPSL -> NPSL-0.92 (diff)
downloadgentoo-c4659dffae0e01ee5790e7ffe78b1b1d417d4306.tar.gz
gentoo-c4659dffae0e01ee5790e7ffe78b1b1d417d4306.tar.bz2
gentoo-c4659dffae0e01ee5790e7ffe78b1b1d417d4306.zip
net-libs/libnetfilter_conntrack: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch16
-rw-r--r--net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild59
2 files changed, 75 insertions, 0 deletions
diff --git a/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch
new file mode 100644
index 000000000000..7bb4a34765ae
--- /dev/null
+++ b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch
@@ -0,0 +1,16 @@
+https://bugzilla.netfilter.org/show_bug.cgi?id=1654
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,9 +55,9 @@ int main()
+ struct in6_addr addr6;
+ char buf[128];
+ if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
+- exit(1);
++ return 1;
+ else
+- exit(0);
++ return 0;
+ }
+ ]])],[ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop supports IPv6.])
+
diff --git a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild
new file mode 100644
index 000000000000..f470a2255d08
--- /dev/null
+++ b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info verify-sig
+
+DESCRIPTION="Programming interface (API) to the in-kernel connection tracking state table"
+HOMEPAGE="https://www.netfilter.org/projects/libnetfilter_conntrack/"
+SRC_URI="https://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2
+ verify-sig? ( https://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2.sig )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/netfilter.org.asc
+
+RDEPEND=">=net-libs/libmnl-1.0.3
+ >=net-libs/libnfnetlink-1.0.0"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ verify-sig? ( sec-keys/openpgp-keys-netfilter )"
+
+DOCS=( README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${PN}-1.0.9-configure-clang16.patch
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is lt 2 6 18 ; then
+ die "${PN} requires at least 2.6.18 kernel version"
+ fi
+
+ # netfilter core team has changed some option names with kernel 2.6.20
+ if kernel_is lt 2 6 20 ; then
+ CONFIG_CHECK="~IP_NF_CONNTRACK_NETLINK"
+ else
+ CONFIG_CHECK="~NF_CT_NETLINK"
+ fi
+
+ check_extra_config
+}
+
+src_prepare() {
+ default
+
+ # autoreconf only for clang 16 configure patch
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}