net-analyzer/netwatch: EAPI7->8, drop dead urls, lto+clang16 fixes

Also remove IUSE=doc and install the single pre-gen html
file uncoditionally.

May be an easy fix wrt #861203 but haven't looked, passing
-fno-strict-aliasing just as better than nothing (did need
a patch for lto mismatch either way).

Closes: https://bugs.gentoo.org/861203
Closes: https://bugs.gentoo.org/871375
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2022-10-09 07:02:52 -04:00
parent 52f383cc7c
commit 9f16edcdcd
3 changed files with 48 additions and 18 deletions

View File

@@ -0,0 +1,22 @@
https://bugs.gentoo.org/871375
--- a/dispdata.c
+++ b/dispdata.c
@@ -42,3 +42,3 @@
-extern destroy_program;
+extern int destroy_program;
extern Semaphore masterdo;
--- a/netwatch.c
+++ b/netwatch.c
@@ -608,2 +608,4 @@
void findaddr (u_int32_t searchaddr);
+int doeth ();
+int gh (int opt);
--- a/netwatch.h
+++ b/netwatch.h
@@ -220,2 +220,4 @@
char *servicenm( char *s, int port);
+void uthread_wait( long usec);
+int dokeyin (int force);

View File

@@ -0,0 +1,8 @@
Fix failure with -Werror=lto-type-mismatch
--- a/dispdata.c
+++ b/dispdata.c
@@ -96,3 +96,3 @@
#define MAXSTATUS 14
-#define STATUSSIZE 200
+#define STATUSSIZE 256
extern char status_lines[MAXSTATUS][STATUSSIZE];

View File

@@ -1,26 +1,25 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
EAPI=8
MY_PV=$(ver_cut 1-3)-$(ver_cut 4)
inherit autotools flag-o-matic
DESCRIPTION="Ethernet/PPP IP Packet Monitor"
HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html"
SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${PN}-$(ver_rs 3 -).tgz"
S="${WORKDIR}/${PN}-$(ver_cut 1-3)"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE="doc"
RDEPEND="sys-libs/ncurses"
RDEPEND="sys-libs/ncurses:="
DEPEND="
${RDEPEND}
sys-kernel/linux-headers
virtual/pkgconfig
"
sys-kernel/linux-headers"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-append_ldflags.patch
"${FILESDIR}"/${P}-open.patch
@@ -29,22 +28,23 @@ PATCHES=(
"${FILESDIR}"/${P}-includes.patch
"${FILESDIR}"/${P}-tinfo.patch
"${FILESDIR}"/${P}-fno-common.patch
"${FILESDIR}"/${P}-lto-mismatch.patch
"${FILESDIR}"/${P}-clang16.patch
)
S=${WORKDIR}/${PN}-$(ver_cut 1-3)
src_prepare() {
default
eautoreconf
append-flags -fno-strict-aliasing #861203
}
src_install() {
dosbin netresolv netwatch
doman netwatch.1
dodoc BUGS CHANGES README* TODO
einstalldocs
if use doc; then
docinto html
dodoc NetwatchKeyCommands.html
fi
docinto html
dodoc NetwatchKeyCommands.html
}