pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/hping3



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed Jun 14 12:17:30 UTC 2017

Modified Files:
        pkgsrc/net/hping3: Makefile distinfo options.mk
        pkgsrc/net/hping3/patches: patch-aa patch-ab patch-ac
Added Files:
        pkgsrc/net/hping3/patches: patch-ars.c patch-ars.h patch-gethostname.c
            patch-libpcap__stuff.c patch-sbignum.c patch-sendip.c

Log Message:
Various patches and cleanups to fix build on Darwin and SunOS.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/net/hping3/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/hping3/distinfo
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/net/hping3/options.mk
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/net/hping3/patches/patch-aa
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/hping3/patches/patch-ab \
    pkgsrc/net/hping3/patches/patch-ac
cvs rdiff -u -r0 -r1.1 pkgsrc/net/hping3/patches/patch-ars.c \
    pkgsrc/net/hping3/patches/patch-ars.h \
    pkgsrc/net/hping3/patches/patch-gethostname.c \
    pkgsrc/net/hping3/patches/patch-libpcap__stuff.c \
    pkgsrc/net/hping3/patches/patch-sbignum.c \
    pkgsrc/net/hping3/patches/patch-sendip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/hping3/Makefile
diff -u pkgsrc/net/hping3/Makefile:1.7 pkgsrc/net/hping3/Makefile:1.8
--- pkgsrc/net/hping3/Makefile:1.7      Sun Sep  6 12:08:06 2015
+++ pkgsrc/net/hping3/Makefile  Wed Jun 14 12:17:30 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2015/09/06 12:08:06 wiedi Exp $
+# $NetBSD: Makefile,v 1.8 2017/06/14 12:17:30 jperkin Exp $
 #
 
 DISTNAME=              hping3-alpha-2
@@ -13,9 +13,8 @@ COMMENT=              Command-line oriented TCP/IP p
 LICENSE=               gnu-gpl-v2 AND original-bsd
 
 SUBST_CLASSES+=                paths
-SUBST_FILES.paths=     ${WRKSRC}/configure
-SUBST_FILES.paths+=    ${WRKSRC}/Makefile.in
-SUBST_STAGE.paths=      post-patch
+SUBST_STAGE.paths=      pre-configure
+SUBST_FILES.paths=     Makefile.in configure
 SUBST_SED.paths=       -e 's,@PREFIX@,${PREFIX},g'
 
 USE_TOOLS=             gmake
@@ -24,6 +23,8 @@ HAS_CONFIGURE=                yes
 
 CONFIGURE_ENV+=                INSTALL_MANPATH=${PKGMANDIR}
 
+CFLAGS.SunOS+=         -Du_int64_t=uint64_t
+
 INSTALLATION_DIRS=     sbin ${PKGMANDIR}/man8
 
 .include "options.mk"

Index: pkgsrc/net/hping3/distinfo
diff -u pkgsrc/net/hping3/distinfo:1.4 pkgsrc/net/hping3/distinfo:1.5
--- pkgsrc/net/hping3/distinfo:1.4      Wed Nov  4 00:35:04 2015
+++ pkgsrc/net/hping3/distinfo  Wed Jun 14 12:17:30 2017
@@ -1,9 +1,15 @@
-$NetBSD: distinfo,v 1.4 2015/11/04 00:35:04 agc Exp $
+$NetBSD: distinfo,v 1.5 2017/06/14 12:17:30 jperkin Exp $
 
 SHA1 (hping3-alpha-2.tar.gz) = 4115f74f234730e1bd6470f4ffb0f30e3759e56d
 RMD160 (hping3-alpha-2.tar.gz) = a1e43a2e4be64657dd7aa49a8211692d6b1673c3
 SHA512 (hping3-alpha-2.tar.gz) = c01cb443f201e39268790e2bca744e76e0819d29ce6b23e42116fbc30b9f21d4ab7a45cce14dd78bc23b9e0408d9190ded934d0becda21296a712c074ff3d11b
 Size (hping3-alpha-2.tar.gz) = 573396 bytes
-SHA1 (patch-aa) = 25c2d447d8cc0374a27fa3de4e8bc0c1cfa2ce6c
-SHA1 (patch-ab) = 46aa447ee7efa477a07fe46119524de8b93708f7
-SHA1 (patch-ac) = b0f96f21b8cac82a835dc8d2814eb6a39b132355
+SHA1 (patch-aa) = 00eaef5063c9f6c70604c1aa873529936b854dd9
+SHA1 (patch-ab) = c8da38efbf33cc6fba9d32f3742479c4f1c3fb60
+SHA1 (patch-ac) = 885e260521b5f38d11e42871629caa9c9085c2d6
+SHA1 (patch-ars.c) = 17c677bdce8f58386eef2d234a37159ff2e87dd7
+SHA1 (patch-ars.h) = b06eaf399631a05acdd5d69f2241d092ed82b8c7
+SHA1 (patch-gethostname.c) = ba1fa4747c6001efc794f0b55ab36944abdd8854
+SHA1 (patch-libpcap__stuff.c) = 730224fa5d7e242444a112ae53959f3dfdbb35f0
+SHA1 (patch-sbignum.c) = 0b2fb0053c7189d1fdf96007f84649ae8fb96884
+SHA1 (patch-sendip.c) = e5cba9b45766b6906279f6351ea936d0768627cf

Index: pkgsrc/net/hping3/options.mk
diff -u pkgsrc/net/hping3/options.mk:1.1.1.1 pkgsrc/net/hping3/options.mk:1.2
--- pkgsrc/net/hping3/options.mk:1.1.1.1        Sun Mar 14 18:37:58 2010
+++ pkgsrc/net/hping3/options.mk        Wed Jun 14 12:17:30 2017
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+# $NetBSD: options.mk,v 1.2 2017/06/14 12:17:30 jperkin Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.hping3
 PKG_SUPPORTED_OPTIONS=         tcl
@@ -13,4 +13,5 @@ PKG_SUGGESTED_OPTIONS=
 .include "../../lang/tcl/buildlink3.mk"
 .else
 CONFIGURE_ARGS+=        --no-tcl
+CONFIGURE_ENV+=                TCLSH=/nonexistent
 .endif

Index: pkgsrc/net/hping3/patches/patch-aa
diff -u pkgsrc/net/hping3/patches/patch-aa:1.1.1.1 pkgsrc/net/hping3/patches/patch-aa:1.2
--- pkgsrc/net/hping3/patches/patch-aa:1.1.1.1  Sun Mar 14 18:37:58 2010
+++ pkgsrc/net/hping3/patches/patch-aa  Wed Jun 14 12:17:30 2017
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.1.1.1 2010/03/14 18:37:58 pettai Exp $
+$NetBSD: patch-aa,v 1.2 2017/06/14 12:17:30 jperkin Exp $
+
+Use pkgsrc paths.
 
 --- configure.orig     2004-06-04 08:39:10.000000000 +0200
 +++ configure  2010-01-26 23:07:03.000000000 +0100

Index: pkgsrc/net/hping3/patches/patch-ab
diff -u pkgsrc/net/hping3/patches/patch-ab:1.2 pkgsrc/net/hping3/patches/patch-ab:1.3
--- pkgsrc/net/hping3/patches/patch-ab:1.2      Sun Oct 20 18:00:57 2013
+++ pkgsrc/net/hping3/patches/patch-ab  Wed Jun 14 12:17:30 2017
@@ -1,8 +1,19 @@
-$NetBSD: patch-ab,v 1.2 2013/10/20 18:00:57 joerg Exp $
+$NetBSD: patch-ab,v 1.3 2017/06/14 12:17:30 jperkin Exp $
 
---- Makefile.in.orig   2004-04-10 01:38:56.000000000 +0200
-+++ Makefile.in        2010-01-26 23:35:22.000000000 +0100
-@@ -50,14 +50,14 @@
+Use pkgsrc flags/paths.
+
+--- Makefile.in.orig   2004-04-09 23:38:56.000000000 +0000
++++ Makefile.in
+@@ -9,7 +9,7 @@
+ CC= gcc
+ AR=/usr/bin/ar
+ RANLIB=/usr/bin/ranlib
+-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
++CCOPT= $(CFLAGS) @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
+ DEBUG= -g
+ #uncomment the following if you need libpcap based build under linux
+ #(not raccomanded)
+@@ -50,14 +50,14 @@ libars.a: $(ARSOBJ)
        $(RANLIB) $@
  
  hping3: byteorder.h $(OBJ)
Index: pkgsrc/net/hping3/patches/patch-ac
diff -u pkgsrc/net/hping3/patches/patch-ac:1.2 pkgsrc/net/hping3/patches/patch-ac:1.3
--- pkgsrc/net/hping3/patches/patch-ac:1.2      Mon Feb 23 18:27:09 2015
+++ pkgsrc/net/hping3/patches/patch-ac  Wed Jun 14 12:17:30 2017
@@ -1,29 +1,39 @@
-$NetBSD: patch-ac,v 1.2 2015/02/23 18:27:09 joerg Exp $
+$NetBSD: patch-ac,v 1.3 2017/06/14 12:17:30 jperkin Exp $
+
+Use system macros if available.
 
 --- bytesex.h.orig     2003-08-31 17:23:48.000000000 +0000
 +++ bytesex.h
-@@ -7,19 +7,18 @@
+@@ -7,11 +7,25 @@
  #ifndef ARS_BYTESEX_H
  #define ARS_BYTESEX_H
  
 -#if   defined(__i386__) \
--      || defined(__alpha__) \
--      || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
++#ifdef __NetBSD__
 +#include <sys/endian.h>
++#endif
 +
-+#if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
++#if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN - 0)
++#define BYTE_ORDER_LITTLE_ENDIAN
++#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == _LITTLE_ENDIAN - 0)
 +#define BYTE_ORDER_LITTLE_ENDIAN
-+#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == _LITTLE_ENDIAN)
++#elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
++#define BYTE_ORDER_LITTLE_ENDIAN
++#elif defined(__i386__) || defined(__LITTLE_ENDIAN__) \
+       || defined(__alpha__) \
+       || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
  #define BYTE_ORDER_LITTLE_ENDIAN
 -#elif         defined(__mc68000__) \
--      || defined (__sparc__) \
--      || defined (__sparc) \
--      || defined (__PPC__) \
--      || defined (__BIG_ENDIAN__) \
--      || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
-+#elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN)
++#elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN - 0)
++#define BYTE_ORDER_BIG_ENDIAN
++#elif defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && (__BYTE_ORDER == _BIG_ENDIAN - 0)
 +#define BYTE_ORDER_BIG_ENDIAN
-+#elif defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && (__BYTE_ORDER == _BIG_ENDIAN)
++#elif  defined(__mc68000__) \
+       || defined (__sparc__) \
+       || defined (__sparc) \
+       || defined (__PPC__) \
+@@ -19,7 +33,7 @@
+       || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
  #define BYTE_ORDER_BIG_ENDIAN
  #else
 -# error can not find the byte order for this architecture, fix bytesex.h

Added files:

Index: pkgsrc/net/hping3/patches/patch-ars.c
diff -u /dev/null pkgsrc/net/hping3/patches/patch-ars.c:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-ars.c       Wed Jun 14 12:17:30 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-ars.c,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+Darwin compatibility, from Homebrew.
+
+--- ars.c.orig 2004-04-14 12:30:18.000000000 +0000
++++ ars.c
+@@ -914,7 +914,7 @@ int ars_bsd_fix(struct ars_packet *pkt,
+               return -ARS_INVALID;
+       }
+       ip = (struct ars_iphdr*) packet;
+-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
++#if defined OSTYPE_DARWIN || OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
+       ip->tot_len = ntohs(ip->tot_len);
+       ip->frag_off = ntohs(ip->frag_off);
+ #endif
Index: pkgsrc/net/hping3/patches/patch-ars.h
diff -u /dev/null pkgsrc/net/hping3/patches/patch-ars.h:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-ars.h       Wed Jun 14 12:17:30 2017
@@ -0,0 +1,16 @@
+$NetBSD: patch-ars.h,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+SunOS requires alloca.h
+
+--- ars.h.orig 2004-06-04 07:22:38.000000000 +0000
++++ ars.h
+@@ -11,6 +11,9 @@
+ #define _BSD_SOCKLEN_T_ int
+ #endif
+ 
++#ifdef __sun
++#include <alloca.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <string.h>
Index: pkgsrc/net/hping3/patches/patch-gethostname.c
diff -u /dev/null pkgsrc/net/hping3/patches/patch-gethostname.c:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-gethostname.c       Wed Jun 14 12:17:30 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-gethostname.c,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+Delete conflicting strlcpy definition.
+
+--- gethostname.c.orig 2003-09-01 00:22:06.000000000 +0000
++++ gethostname.c
+@@ -18,8 +18,6 @@
+ #include <arpa/inet.h>
+ #include <string.h>
+ 
+-size_t strlcpy(char *dst, const char *src, size_t siz);
+-
+ char *get_hostname(char* addr)
+ {
+       static char answer[1024];
Index: pkgsrc/net/hping3/patches/patch-libpcap__stuff.c
diff -u /dev/null pkgsrc/net/hping3/patches/patch-libpcap__stuff.c:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-libpcap__stuff.c    Wed Jun 14 12:17:30 2017
@@ -0,0 +1,16 @@
+$NetBSD: patch-libpcap__stuff.c,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+Fix include ordering to avoid redefined bpf_* symbols.
+
+--- libpcap_stuff.c.orig       2004-04-09 23:38:56.000000000 +0000
++++ libpcap_stuff.c
+@@ -16,8 +16,8 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+-#include <pcap.h>
+ #include <net/bpf.h>
++#include <pcap.h>
+ 
+ #include "globals.h"
+ 
Index: pkgsrc/net/hping3/patches/patch-sbignum.c
diff -u /dev/null pkgsrc/net/hping3/patches/patch-sbignum.c:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-sbignum.c   Wed Jun 14 12:17:30 2017
@@ -0,0 +1,16 @@
+$NetBSD: patch-sbignum.c,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+SunOS requires alloca.h
+
+--- sbignum.c.orig     2003-10-02 08:21:42.000000000 +0000
++++ sbignum.c
+@@ -40,6 +40,9 @@
+  * 12 Sep 2003: Fixed a memory leak in mpz_tostr().
+  */
+ 
++#ifdef __sun
++#include <alloca.h>
++#endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
Index: pkgsrc/net/hping3/patches/patch-sendip.c
diff -u /dev/null pkgsrc/net/hping3/patches/patch-sendip.c:1.1
--- /dev/null   Wed Jun 14 12:17:30 2017
+++ pkgsrc/net/hping3/patches/patch-sendip.c    Wed Jun 14 12:17:30 2017
@@ -0,0 +1,24 @@
+$NetBSD: patch-sendip.c,v 1.1 2017/06/14 12:17:30 jperkin Exp $
+
+Darwin compatibility, from Homebrew.
+
+--- sendip.c.orig      2004-04-09 23:38:56.000000000 +0000
++++ sendip.c
+@@ -48,7 +48,7 @@ void send_ip (char* src, char *dst, char
+       ip->ihl         = (IPHDR_SIZE + optlen + 3) >> 2;
+       ip->tos         = ip_tos;
+ 
+-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
++#if defined OSTYPE_DARWIN || OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
+ /* FreeBSD */
+ /* NetBSD */
+       ip->tot_len     = packetsize;
+@@ -73,7 +73,7 @@ void send_ip (char* src, char *dst, char
+                       htons((unsigned short) src_id);
+       }
+ 
+-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
++#if defined OSTYPE_DARWIN || OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
+ /* FreeBSD */
+ /* NetBSD */
+       ip->frag_off    |= more_fragments;



Home | Main Index | Thread Index | Old Index