net-analyzer/nsat: Add build fix and missing dependencies for sys-libs/glibc-2.26
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 16 Sep 2017 19:27:42 +0000 (21:27 +0200)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sun, 17 Sep 2017 06:08:15 +0000 (08:08 +0200)
Testing done: Built against glibc-2.25[rpc] and glibc-2.26.

Closes: https://bugs.gentoo.org/371025

Package-Manager: Portage-2.3.8, Repoman-2.3.3

net-analyzer/nsat/files/nsat-1.5-libtirpc.patch [new file with mode: 0644]
net-analyzer/nsat/nsat-1.5-r3.ebuild

diff --git a/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch b/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch
new file mode 100644 (file)
index 0000000..3e9766b
--- /dev/null
@@ -0,0 +1,36 @@
+diff -ruN nsat.orig/configure.in nsat/configure.in
+--- nsat.orig/configure.in     2017-09-16 18:55:57.761877318 -0000
++++ nsat/configure.in  2017-09-16 19:00:24.689990798 -0000
+@@ -195,6 +195,8 @@
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS(select socket strdup strstr random srandom snprintf setsockopt initstate gettimeofday strerror)
+ 
++PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [AC_MSG_NOTICE([Using glibc rpc support])])
++
+ AC_OUTPUT(Makefile tools/Makefile src/Makefile src/mod/Makefile src/smb/Makefile src/libmix++/Makefile src/libmix++/mix/net.h)
+ 
+ AC_MSG_RESULT()
+diff -ruN nsat.orig/src/Makefile.in nsat/src/Makefile.in
+--- nsat.orig/src/Makefile.in  2017-09-16 18:55:58.116879119 -0000
++++ nsat/src/Makefile.in       2017-09-16 19:03:39.994778665 -0000
+@@ -36,7 +36,7 @@
+       @cd mod ; $(MAKE) modobj
+ 
+ ../nsat: modobj
+-      ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
++      ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} @TIRPC_LIBS@
+ 
+ pidalloc.o:
+       ${GPP} ${CFLAGS} -c pidalloc.cpp
+diff -ruN nsat.orig/src/mod/Makefile.in nsat/src/mod/Makefile.in
+--- nsat.orig/src/mod/Makefile.in      2002-01-21 17:16:24.000000000 -0000
++++ nsat/src/mod/Makefile.in   2017-09-16 19:02:15.547438001 -0000
+@@ -35,7 +35,7 @@
+       ${GPP} ${CFLAGS} -c osscan.cpp
+ 
+ rpc.o:
+-      ${GPP} ${CFLAGS} -c rpc.cpp
++      ${GPP} ${CFLAGS} @TIRPC_CFLAGS@ -c rpc.cpp
+ 
+ www.o:
+       ${GPP} ${CFLAGS} -c www.cpp
index 89af9c7ee256e0725e804c51fcc7780e2bbff07e..a320fe17fbc9c8994af122f50dec121fcb6a472e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -20,6 +20,13 @@ RDEPEND="
        )
        dev-libs/libmix
        net-libs/libpcap
+       || (    <sys-libs/glibc-2.26
+               (
+                       net-libs/libtirpc
+                       net-libs/libnsl
+                       net-libs/rpcsvc-proto
+               )
+       )
 "
 DEPEND="$RDEPEND"
 
@@ -31,6 +38,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${P}-strip.patch
        epatch "${FILESDIR}"/${P}-misc.patch
        epatch "${FILESDIR}"/${P}-va_list.patch
+       epatch "${FILESDIR}"/${P}-libtirpc.patch
        use amd64 && epatch "${FILESDIR}"/${P}-amd64-compat.patch
 
        sed -i \