Fri Feb 22 21:12:25 2013 UTC ()
Look for dlpi interface before bpf, SunOS has both but this package assumes
that bpf means a BSD system and tries to then use sysctl etc.

Fixes build on SunOS.


(jperkin)
diff -r1.3 -r1.4 pkgsrc/devel/libnet10/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/devel/libnet10/patches/patch-ac

cvs diff -r1.3 -r1.4 pkgsrc/devel/libnet10/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/libnet10/distinfo 2009/07/26 20:14:44 1.3
+++ pkgsrc/devel/libnet10/distinfo 2013/02/22 21:12:25 1.4
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.3 2009/07/26 20:14:44 schmonz Exp $ 1$NetBSD: distinfo,v 1.4 2013/02/22 21:12:25 jperkin Exp $
2 2
3SHA1 (libnet-1.0.2a.tar.gz) = 804eaf43bb90f93e505d46a9668c914a112bf136 3SHA1 (libnet-1.0.2a.tar.gz) = 804eaf43bb90f93e505d46a9668c914a112bf136
4RMD160 (libnet-1.0.2a.tar.gz) = 43dd2edc31e56b42792727b88d81342dc26d3308 4RMD160 (libnet-1.0.2a.tar.gz) = 43dd2edc31e56b42792727b88d81342dc26d3308
5Size (libnet-1.0.2a.tar.gz) = 140191 bytes 5Size (libnet-1.0.2a.tar.gz) = 140191 bytes
6SHA1 (patch-aa) = fa71db191c421aa1b36d1107236645fdde0bc8f9 6SHA1 (patch-aa) = fa71db191c421aa1b36d1107236645fdde0bc8f9
7SHA1 (patch-ab) = 56a2cb8b214529fdaacdbc6154ec2fc88edfa1c8 7SHA1 (patch-ab) = 56a2cb8b214529fdaacdbc6154ec2fc88edfa1c8
8SHA1 (patch-ac) = 8a329e6f71fea449d6f7bf913c34627285452b66 8SHA1 (patch-ac) = 73c68c9e6ca1dfc751cf8d5b00444fa38ae87e70
9SHA1 (patch-ad) = 44256848f62919540893913469d88f5a7177d742 9SHA1 (patch-ad) = 44256848f62919540893913469d88f5a7177d742
10SHA1 (patch-ae) = 12777de08a91b76d1b0194b39551215bab74222f 10SHA1 (patch-ae) = 12777de08a91b76d1b0194b39551215bab74222f

cvs diff -r1.1.1.1 -r1.2 pkgsrc/devel/libnet10/patches/patch-ac (expand / switch to unified diff)

--- pkgsrc/devel/libnet10/patches/patch-ac 2007/02/18 18:36:21 1.1.1.1
+++ pkgsrc/devel/libnet10/patches/patch-ac 2013/02/22 21:12:25 1.2
@@ -1,16 +1,19 @@ @@ -1,16 +1,19 @@
1$NetBSD: patch-ac,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ 1$NetBSD: patch-ac,v 1.2 2013/02/22 21:12:25 jperkin Exp $
2 2
3--- configure.orig 2001-01-18 09:59:33.000000000 +1300 3Look for dlpi before bpf, SunOS has both but this package assumes
 4bpf is only on BSD systems and tries to use sysctl etc.
 5
 6--- configure.orig 2001-01-17 20:59:33.000000000 +0000
4+++ configure 7+++ configure
5@@ -506,7 +506,7 @@ fi 8@@ -506,7 +506,7 @@ fi
6  9
7 ac_ext=c 10 ac_ext=c
8 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 11 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
9-ac_cpp='$CPP $CPPFLAGS' 12-ac_cpp='$CPP $CPPFLAGS'
10+ac_cpp='${CC-cc} -E $CPPFLAGS' 13+ac_cpp='${CC-cc} -E $CPPFLAGS'
11 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 14 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
12 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 15 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
13 cross_compiling=$ac_cv_prog_cc_cross 16 cross_compiling=$ac_cv_prog_cc_cross
14@@ -778,7 +778,7 @@ echo "configure:778: checking whether th 17@@ -778,7 +778,7 @@ echo "configure:778: checking whether th
15  18
16 ac_ext=c 19 ac_ext=c
@@ -19,40 +22,60 @@ $NetBSD: patch-ac,v 1.1.1.1 2007/02/18 1 @@ -19,40 +22,60 @@ $NetBSD: patch-ac,v 1.1.1.1 2007/02/18 1
19+ac_cpp='${CC-cc} -E $CPPFLAGS' 22+ac_cpp='${CC-cc} -E $CPPFLAGS'
20 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 23 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
21 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 24 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
22 cross_compiling=$ac_cv_prog_cc_cross 25 cross_compiling=$ac_cv_prog_cc_cross
23@@ -806,7 +806,7 @@ fi 26@@ -806,7 +806,7 @@ fi
24 rm -fr conftest* 27 rm -fr conftest*
25 ac_ext=c 28 ac_ext=c
26 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 29 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
27-ac_cpp='$CPP $CPPFLAGS' 30-ac_cpp='$CPP $CPPFLAGS'
28+ac_cpp='${CC-cc} -E $CPPFLAGS' 31+ac_cpp='${CC-cc} -E $CPPFLAGS'
29 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 32 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
30 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 33 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
31 cross_compiling=$ac_cv_prog_cc_cross 34 cross_compiling=$ac_cv_prog_cc_cross
32@@ -1284,7 +1284,7 @@ fi 35@@ -1284,7 +1284,13 @@ fi
33 echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6 36 echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6
34 echo "configure:1286: checking low-level packet interface type" >&5 37 echo "configure:1286: checking low-level packet interface type" >&5
35  38
36-if test -r /dev/bpf0 ; then 39-if test -r /dev/bpf0 ; then
37+if test -r /dev/bpf0 -o -r /dev/bpf -o -r /usr/include/net/bpf.h ; then 40+if test -r /usr/include/sys/dlpi.h ; then
 41+ LL_INT_TYPE=dlpi
 42+ echo "$ac_t""found dlpi" 1>&6
 43+ cat >> confdefs.h <<\EOF
 44+#define HAVE_DLPI 1
 45+EOF
 46+elif test -r /dev/bpf0 -o -r /dev/bpf -o -r /usr/include/net/bpf.h ; then
38 LL_INT_TYPE=bpf 47 LL_INT_TYPE=bpf
39 echo "$ac_t""found bpf" 1>&6 48 echo "$ac_t""found bpf" 1>&6
40 elif test -r /usr/include/net/pfilt.h ; then 49 elif test -r /usr/include/net/pfilt.h ; then
41@@ -1416,7 +1416,7 @@ fi 50@@ -1299,13 +1305,6 @@ elif test -r /usr/include/sys/net/nit.h
 51 elif test -r /usr/include/net/raw.h ; then
 52 LL_INT_TYPE=snoop
 53 echo "$ac_t""found snoop" 1>&6
 54-elif test -r /usr/include/sys/dlpi.h ; then
 55- LL_INT_TYPE=dlpi
 56- echo "$ac_t""found dlpi" 1>&6
 57- cat >> confdefs.h <<\EOF
 58-#define HAVE_DLPI 1
 59-EOF
 60-
 61 elif test -r /usr/include/linux/socket.h ; then
 62 LL_INT_TYPE=sockpacket
 63 echo "$ac_t""found SOCK_PACKET" 1>&6
 64@@ -1416,7 +1415,7 @@ fi
42  65
43  66
44 fi 67 fi
45-elif test -c /dev/bpf0 ; then # check again in case not readable 68-elif test -c /dev/bpf0 ; then # check again in case not readable
46+elif test -c /dev/bpf0 -o -c /dev/bpf ; then # check again in case not readable 69+elif test -c /dev/bpf0 -o -c /dev/bpf ; then # check again in case not readable
47 LL_INT_TYPE=bpf 70 LL_INT_TYPE=bpf
48 echo "$ac_t""found bpf" 1>&6 71 echo "$ac_t""found bpf" 1>&6
49 elif test -c /dev/enet ; then # check again in case not readable 72 elif test -c /dev/enet ; then # check again in case not readable
50@@ -1577,7 +1577,7 @@ done 73@@ -1577,7 +1576,7 @@ done
51 BIN_PREFIX="$prefix/bin/" 74 BIN_PREFIX="$prefix/bin/"
52 ;; 75 ;;
53  76
54-*freebsd*) 77-*freebsd*)
55+*freebsd* | *dragonfly*) 78+*freebsd* | *dragonfly*)
56 cat >> confdefs.h <<\EOF 79 cat >> confdefs.h <<\EOF
57 #define LIBNET_BSDISH_OS 1 80 #define LIBNET_BSDISH_OS 1
58 EOF 81 EOF