commit:     d57c699afeb1df34ac362f360473ea81258df3ab
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 16 15:47:54 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Sep 16 15:48:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d57c699a

net-analyzer/dsniff: Fix build against glibc-2.26, bug 370645

The autotools patch does the absolute minimum for a successful build;
more elegant solutions are certainly possible.
Buildtested against glibc-2.25 (with included rpc support) and glibc-2.26
(without).

Closes: https://bugs.gentoo.org/370645
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild     | 13 +++++++++++-
 net-analyzer/dsniff/files/2.4_beta1-libtirpc.patch | 24 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild 
b/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild
index 9878f4b54d2..0ea1f57476b 100644
--- a/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -22,6 +22,14 @@ DEPEND="net-libs/libpcap
        !libressl? ( dev-libs/openssl:0= )
        libressl? ( dev-libs/libressl:0= )
        >=sys-libs/db-4:*
+       || (    <sys-libs/glibc-2.26[rpc]
+               (
+                       >=sys-libs/glibc-2.26
+                       net-libs/rpcsvc-proto
+                       net-libs/libtirpc
+                       net-libs/libnsl
+               )
+       )
        X? ( x11-libs/libXmu )"
 RDEPEND="${DEPEND}"
 
@@ -53,6 +61,9 @@ src_prepare() {
        # bug #538462
        epatch "${FILESDIR}"/${PV}-macof-size-calculation.patch
 
+       # allow building against libtirpc, needed for glibc-2.26, bug 381391
+       epatch "${FILESDIR}"/${PV}-libtirpc.patch
+
        eautoreconf
 }
 

diff --git a/net-analyzer/dsniff/files/2.4_beta1-libtirpc.patch 
b/net-analyzer/dsniff/files/2.4_beta1-libtirpc.patch
new file mode 100644
index 00000000000..5f8b1169d21
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.4_beta1-libtirpc.patch
@@ -0,0 +1,24 @@
+diff -ruN dsniff-2.4.orig/Makefile.in dsniff-2.4/Makefile.in
+--- dsniff-2.4.orig/Makefile.in        2017-09-16 12:20:13.001953108 -0000
++++ dsniff-2.4/Makefile.in     2017-09-16 12:37:32.452792454 -0000
+@@ -37,8 +37,8 @@
+ X11INC        = @X_CFLAGS@
+ X11LIB        = @X_LIBS@ @X_PRE_LIBS@ -lXmu -lX11 @X_EXTRA_LIBS@
+ 
+-INCS  = -I. $(X11INC) -I$(srcdir)/missing 
+-LIBS  = @LIBS@ -L$(srcdir) -lmissing
++INCS  = -I. $(X11INC) -I$(srcdir)/missing @TIRPC_CFLAGS@
++LIBS  = @LIBS@ -L$(srcdir) -lmissing @TIRPC_LIBS@
+ 
+ INSTALL       = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+diff -ruN dsniff-2.4.orig/configure.in dsniff-2.4/configure.in
+--- dsniff-2.4.orig/configure.in       2017-09-16 12:20:07.346916686 -0000
++++ dsniff-2.4/configure.in    2017-09-16 12:33:42.559167188 -0000
+@@ -338,4 +338,6 @@
+ AC_SUBST(SSLINC)
+ AC_SUBST(SSLLIB)
+ 
++PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [AC_MSG_NOTICE([Using glibc rpc 
support])])
++
+ AC_OUTPUT(Makefile)

Reply via email to