From dd41c7d4ea9b7a5e325fcebd493cbab7370a9915 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 19 Nov 2022 18:45:09 +0000 Subject: net-analyzer/yersinia: further Clang 16 fixes Bug: https://bugs.gentoo.org/879719 Signed-off-by: Sam James --- .../yersinia-0.8.2-configure-clang16-deux.patch | 36 +++++++++++++ net-analyzer/yersinia/yersinia-0.8.2-r1.ebuild | 61 --------------------- net-analyzer/yersinia/yersinia-0.8.2-r2.ebuild | 62 ++++++++++++++++++++++ 3 files changed, 98 insertions(+), 61 deletions(-) create mode 100644 net-analyzer/yersinia/files/yersinia-0.8.2-configure-clang16-deux.patch delete mode 100644 net-analyzer/yersinia/yersinia-0.8.2-r1.ebuild create mode 100644 net-analyzer/yersinia/yersinia-0.8.2-r2.ebuild (limited to 'net-analyzer/yersinia') diff --git a/net-analyzer/yersinia/files/yersinia-0.8.2-configure-clang16-deux.patch b/net-analyzer/yersinia/files/yersinia-0.8.2-configure-clang16-deux.patch new file mode 100644 index 000000000000..209020eae714 --- /dev/null +++ b/net-analyzer/yersinia/files/yersinia-0.8.2-configure-clang16-deux.patch @@ -0,0 +1,36 @@ +From 5db403f8aa4101589f33246eaa23b5f31228fc3b Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 19 Nov 2022 18:43:26 +0000 +Subject: [PATCH] configure: fix -Wimplicit-function-declaration, + -Wimplicit-int + +Clang 16 makes -Wimplicit-function-declaration and -Wimplicit-int errors by default. Unfortunately, +this can lead to misconfiguration or miscompilation of software as configure +tests may then return the wrong result. + +For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], +or the (new) c-std-porting mailing list [3]. + +[0] https://lwn.net/Articles/913505/ +[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 +[2] https://wiki.gentoo.org/wiki/Modern_C_porting +[3] hosted at lists.linux.dev. + +Followup to 6414681ae99d6a0f460f827648f114aa3cb2e419. + +Signed-off-by: Sam James +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -79,8 +79,10 @@ AC_DEFUN([AC_LBL_UNALIGNED_ACCESS], + # include + # include + # include ++# include ++# include + unsigned char a[[5]] = { 1, 2, 3, 4, 5 }; +- main() { ++ int main(void) { + unsigned int i; + pid_t pid; + int status; + diff --git a/net-analyzer/yersinia/yersinia-0.8.2-r1.ebuild b/net-analyzer/yersinia/yersinia-0.8.2-r1.ebuild deleted file mode 100644 index 0d001464a4d2..000000000000 --- a/net-analyzer/yersinia/yersinia-0.8.2-r1.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools flag-o-matic - -DESCRIPTION="A framework for layer 2 attacks" -HOMEPAGE="http://www.yersinia.net/" -SRC_URI="https://github.com/tomac/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="gtk ncurses" - -RDEPEND=" - >=net-libs/libnet-1.1.2 - >=net-libs/libpcap-0.9.4 - ncurses? ( >=sys-libs/ncurses-5.5:= ) - gtk? ( - dev-libs/glib:2 - x11-libs/gdk-pixbuf - =x11-libs/gtk+-2* - ) -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO ) - -PATCHES=( - "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch - "${FILESDIR}"/${PN}-0.7.3-tinfo.patch - "${FILESDIR}"/${PN}-0.8.2-configure-clang16.patch -) - -src_prepare() { - default - - if ! use gtk; then - # bug #514802 - sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die - fi - - eautoreconf -} - -src_configure() { - append-cflags -fcommon - - econf \ - --enable-admin \ - --with-pcap-includes=/usr/include \ - $(use_with ncurses) \ - $(use_enable gtk) -} - -src_compile() { - emake CFLAGS="${CFLAGS}" -} diff --git a/net-analyzer/yersinia/yersinia-0.8.2-r2.ebuild b/net-analyzer/yersinia/yersinia-0.8.2-r2.ebuild new file mode 100644 index 000000000000..be2de6bbc614 --- /dev/null +++ b/net-analyzer/yersinia/yersinia-0.8.2-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="A framework for layer 2 attacks" +HOMEPAGE="http://www.yersinia.net/" +SRC_URI="https://github.com/tomac/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="gtk ncurses" + +RDEPEND=" + >=net-libs/libnet-1.1.2 + >=net-libs/libpcap-0.9.4 + ncurses? ( >=sys-libs/ncurses-5.5:= ) + gtk? ( + dev-libs/glib:2 + x11-libs/gdk-pixbuf + =x11-libs/gtk+-2* + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch + "${FILESDIR}"/${PN}-0.7.3-tinfo.patch + "${FILESDIR}"/${PN}-0.8.2-configure-clang16.patch + "${FILESDIR}"/${PN}-0.8.2-configure-clang16-deux.patch +) + +src_prepare() { + default + + if ! use gtk; then + # bug #514802 + sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die + fi + + eautoreconf +} + +src_configure() { + append-cflags -fcommon + + econf \ + --enable-admin \ + --with-pcap-includes=/usr/include \ + $(use_with ncurses) \ + $(use_enable gtk) +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} -- cgit v1.2.3-65-gdbad