summaryrefslogtreecommitdiff
path: root/net/ngrep
diff options
context:
space:
mode:
authoragc <agc>1999-07-02 10:26:02 +0000
committeragc <agc>1999-07-02 10:26:02 +0000
commit0b81eff53f25d034e9ace52fc4dedb5c50dfb13d (patch)
treed67bec6a324cb59ea7cef3ee18917076594437c8 /net/ngrep
parentd82a82761119bd94b9bd249efef86e7188154806 (diff)
downloadpkgsrc-0b81eff53f25d034e9ace52fc4dedb5c50dfb13d.tar.gz
Make this package work on Solaris.
Diffstat (limited to 'net/ngrep')
-rw-r--r--net/ngrep/Makefile13
-rw-r--r--net/ngrep/patches/patch-aa34
-rw-r--r--net/ngrep/patches/patch-ab15
3 files changed, 60 insertions, 2 deletions
diff --git a/net/ngrep/Makefile b/net/ngrep/Makefile
index 904545c4add..3622a88407c 100644
--- a/net/ngrep/Makefile
+++ b/net/ngrep/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 1999/06/28 01:34:22 hubertf Exp $
+# $NetBSD: Makefile,v 1.2 1999/07/02 10:26:02 agc Exp $
#
DISTNAME= ngrep-1.31
@@ -8,8 +8,17 @@ MASTER_SITES= http://www.packetfactory.net/ngrep/
MAINTAINER= hubertf@netbsd.org
HOMEPAGE= http://www.packetfactory.net/ngrep/
-GNU_CONFIGURE= YES
+GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}/ngrep
ALL_TARGET= ngrep
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+DEPENDS+= libpcap-0.4:../../net/libpcap
+
+do-configure:
+ cd ${WRKSRC}; ./configure --prefix=${PREFIX}
+.endif
+
.include "../../mk/bsd.pkg.mk"
diff --git a/net/ngrep/patches/patch-aa b/net/ngrep/patches/patch-aa
new file mode 100644
index 00000000000..1e9ea14396a
--- /dev/null
+++ b/net/ngrep/patches/patch-aa
@@ -0,0 +1,34 @@
+$NetBSD: patch-aa,v 1.1 1999/07/02 10:26:03 agc Exp $
+
+Look in the correct place for the new net/bpf.h
+Hack alert - on Solaris, need -lxnet as well.
+
+--- configure 1999/07/02 09:35:44 1.1
++++ configure 1999/07/02 09:41:45
+@@ -1208,7 +1208,11 @@
+ echo $ac_n "checking for old version of bpf.h""... $ac_c" 1>&6
+ echo "configure:1210: checking for old version of bpf.h" >&5
+ if test -z "$pcapdir"; then
+- dir="/usr/include";
++ if test -f $prefix/include/net/bpf.h; then
++ dir="$prefix/include";
++ else
++ dir="/usr/include";
++ fi
+ else
+ dir="$pcapdir";
+ fi
+@@ -1275,7 +1279,12 @@
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+-LIBS="-lpcap $LIBS"
++case `uname -s` in
++SunOS)
++ LIBS="-lpcap -lxnet $LIBS" ;;
++*)
++ LIBS="-lpcap $LIBS" ;;
++esac
+ cat > conftest.$ac_ext <<EOF
+ #line 1281 "configure"
+ #include "confdefs.h"
diff --git a/net/ngrep/patches/patch-ab b/net/ngrep/patches/patch-ab
new file mode 100644
index 00000000000..3a9475df210
--- /dev/null
+++ b/net/ngrep/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1 1999/07/02 10:26:03 agc Exp $
+
+Use LDFLAGS when linking.
+
+--- Makefile.in 1999/07/02 10:17:46 1.1
++++ Makefile.in 1999/07/02 10:18:04
+@@ -18,7 +18,7 @@
+ MANDEST=@prefix@/man/man8
+
+ $(TARGET): $(OBJS)
+- $(CC) $(CFLAGS) -s -o $(TARGET) $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) ${LDFLAGS} -s -o $(TARGET) $(OBJS) $(LIBS)
+
+ debug: $(OBJS)
+ $(CC) $(CFLAGS) -g -o $(TARGET) $(OBJS) $(LIBS)