aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsbz <sbz@FreeBSD.org>2013-05-13 06:01:25 +0800
committersbz <sbz@FreeBSD.org>2013-05-13 06:01:25 +0800
commit613946a2a1b241eadeaa0986a4d88e1a5a78e5f8 (patch)
tree352b097a3a3e748397346e472a7a2b35e5917b72
parent42355a61fc1fe5103f70ff41d747a4c9592987da (diff)
downloadfreebsd-ports-gnome-613946a2a1b241eadeaa0986a4d88e1a5a78e5f8.tar.gz
freebsd-ports-gnome-613946a2a1b241eadeaa0986a4d88e1a5a78e5f8.tar.zst
freebsd-ports-gnome-613946a2a1b241eadeaa0986a4d88e1a5a78e5f8.zip
- Fix BROKEN after r317848 commit
- Patch Makefile to disable libmissing - Support bmake by using ${ECHO_CMD} instead of ${TRUE} Reported by: linimon
-rw-r--r--security/dsniff/Makefile17
-rw-r--r--security/dsniff/files/patch-Makefile.in55
2 files changed, 66 insertions, 6 deletions
diff --git a/security/dsniff/Makefile b/security/dsniff/Makefile
index b58257452dc9..373b191cb406 100644
--- a/security/dsniff/Makefile
+++ b/security/dsniff/Makefile
@@ -12,9 +12,8 @@ MAINTAINER= sbz@FreeBSD.org
COMMENT= Various sniffing utilities for penetration testing
LICENSE= BSD
-BROKEN= tries to link with both libnet1.0 and libnet1.1
-BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10 \
+BUILD_DEPENDS= ${LOCALBASE}/lib/libnet10/libnet.a:${PORTSDIR}/net/libnet10 \
${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids
GNU_CONFIGURE= yes
@@ -30,7 +29,13 @@ MAN8= arpspoof.8 ${PORTNAME}.8 macof.8 mailsnarf.8 tcpkill.8 \
tcpnice.8 urlsnarf.8 filesnarf.8 dnsspoof.8 msgsnarf.8 \
sshmitm.8 webmitm.8
-LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
+LIBNET_VERSION= 10
+LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet${LIBNET_VERSION}-config
+LIBNET_INC= "`${LIBNET_CONFIG} --defines` `${LIBNET_CONFIG} --cflags`"
+# ugly hack because net/libnet10 doesn't install shared library, only static archive
+# so we can't use libnet-config10 --libs to retrieve linker flags
+LIBNET_LIB= "-L${LOCALBASE}/include/libnet${LIBNET_VERSION} \
+ ${LOCALBASE}/lib/libnet${LIBNET_VERSION}/libnet.a"
.include <bsd.port.pre.mk>
@@ -38,7 +43,7 @@ LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
# the corresponding library and additional linker flags.
LIBNIDS_GLIB2?=
.if exists(${LOCALBASE}/lib/libnids.a)
-LIBNIDS_GLIB2!= nm -u ${LOCALBASE}/lib/libnids.a | ${GREP} g_thread_init || ${TRUE}
+LIBNIDS_GLIB2!= nm -u ${LOCALBASE}/lib/libnids.a | ${GREP} g_thread_init || ${ECHO_CMD}
.endif
.if !empty(LIBNIDS_GLIB2)
@@ -58,8 +63,8 @@ post-patch:
@${REINPLACE_CMD} -Ee \
's|libnet-config|${LIBNET_CONFIG:T}|; \
s|test -f \$${prefix}/include/libnet.h|${TRUE}|; \
- s|(LNETINC=).*|\1"`${LIBNET_CONFIG} --cflags`"|; \
- s|(LNETLIB=).*|\1"`${LIBNET_CONFIG} --libs`"|' \
+ s|(LNETINC=).*|\1${LIBNET_INC}|; \
+ s|(LNETLIB=).*|\1${LIBNET_LIB}|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.if !empty(LIBNIDS_GLIB2)
diff --git a/security/dsniff/files/patch-Makefile.in b/security/dsniff/files/patch-Makefile.in
new file mode 100644
index 000000000000..0e3e94f38ce9
--- /dev/null
+++ b/security/dsniff/files/patch-Makefile.in
@@ -0,0 +1,55 @@
+--- ./Makefile.in.orig 2000-12-15 21:03:26.000000000 +0100
++++ ./Makefile.in 2013-03-15 07:33:57.000000000 +0100
+@@ -26,7 +26,7 @@
+ LNETLIB = @LNETLIB@
+
+ NIDSINC = @NIDSINC@
+-NIDSLIB = @NIDSLIB@
++NIDSLIB = @NIDSLIB@ `pkg-config --libs gthread-2.0` `pkg-config --libs gthread-2.0` `pkg-config --libs gthread-2.0`
+
+ DBINC = @DBINC@
+ DBLIB = @DBLIB@
+@@ -37,9 +37,8 @@
+ X11INC = @X_CFLAGS@
+ X11LIB = @X_LIBS@ @X_PRE_LIBS@ -lXmu -lX11 @X_EXTRA_LIBS@
+
+-INCS = -I. $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC) \
+- -I$(srcdir)/missing
+-LIBS = @LIBS@ -L$(srcdir) -lmissing
++INCS = -I. $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC)
++LIBS = @LIBS@ -L$(srcdir) -lmd
+
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+@@ -76,7 +75,7 @@
+ .c.o:
+ $(CC) $(CFLAGS) $(INCS) -c $(srcdir)/$*.c
+
+-all: libmissing.a $(PROGS)
++all: $(PROGS)
+
+ mount.c: mount.x
+ rpcgen -h mount.x -o mount.h
+@@ -86,13 +85,6 @@
+ rpcgen -h nfs_prot.x -o nfs_prot.h
+ rpcgen -c nfs_prot.x -o nfs_prot.c
+
+-$(LIBOBJS):
+- $(CC) $(CFLAGS) $(INCS) -c $(srcdir)/missing/$*.c
+-
+-libmissing.a: $(LIBOBJS)
+- ar -cr $@ $(LIBOBJS)
+- $(RANLIB) $@
+-
+ dsniff: $(HDRS) $(SRCS) $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB)
+
+@@ -153,7 +145,7 @@
+ done
+
+ clean:
+- rm -f *.o *~ $(GEN) libmissing.a $(PROGS) webmitm.crt
++ rm -f *.o *~ $(GEN) $(PROGS) webmitm.crt
+
+ distclean: clean
+ rm -f Makefile config.h config.cache config.log config.status