summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2017-06-21 18:20:04 +0000
committerbsiegert <bsiegert@pkgsrc.org>2017-06-21 18:20:04 +0000
commitac0e643cf44e3014a6936c037aa3e25758488d43 (patch)
tree61031a02d0988a3d368f37358abbf5431e67240e
parent6fd4c046be02d54833d2ddf616bdb70635d48e23 (diff)
downloadpkgsrc-ac0e643cf44e3014a6936c037aa3e25758488d43.tar.gz
Pullup ticket #5480 - requested by sevan
net/hping3: build fix Revisions pulled up: - net/hping3/Makefile 1.8 - net/hping3/distinfo 1.5 - net/hping3/options.mk 1.2 - net/hping3/patches/patch-aa 1.2 - net/hping3/patches/patch-ab 1.3 - net/hping3/patches/patch-ac 1.3 - net/hping3/patches/patch-ars.c 1.1 - net/hping3/patches/patch-ars.h 1.1 - net/hping3/patches/patch-gethostname.c 1.1 - net/hping3/patches/patch-libpcap__stuff.c 1.1 - net/hping3/patches/patch-sbignum.c 1.1 - net/hping3/patches/patch-sendip.c 1.1 --- 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.
-rw-r--r--net/hping3/Makefile9
-rw-r--r--net/hping3/distinfo14
-rw-r--r--net/hping3/options.mk3
-rw-r--r--net/hping3/patches/patch-aa4
-rw-r--r--net/hping3/patches/patch-ab19
-rw-r--r--net/hping3/patches/patch-ac36
-rw-r--r--net/hping3/patches/patch-ars.c15
-rw-r--r--net/hping3/patches/patch-ars.h16
-rw-r--r--net/hping3/patches/patch-gethostname.c15
-rw-r--r--net/hping3/patches/patch-libpcap__stuff.c16
-rw-r--r--net/hping3/patches/patch-sbignum.c16
-rw-r--r--net/hping3/patches/patch-sendip.c24
12 files changed, 160 insertions, 27 deletions
diff --git a/net/hping3/Makefile b/net/hping3/Makefile
index 0dcf4b035a8..79fc3bc76aa 100644
--- a/net/hping3/Makefile
+++ b/net/hping3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2015/09/06 12:08:06 wiedi Exp $
+# $NetBSD: Makefile,v 1.7.14.1 2017/06/21 18:20:04 bsiegert Exp $
#
DISTNAME= hping3-alpha-2
@@ -13,9 +13,8 @@ COMMENT= Command-line oriented TCP/IP packet assembler/analyzer
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"
diff --git a/net/hping3/distinfo b/net/hping3/distinfo
index 07b3ca9ee5f..2203400b5b0 100644
--- a/net/hping3/distinfo
+++ b/net/hping3/distinfo
@@ -1,9 +1,15 @@
-$NetBSD: distinfo,v 1.4 2015/11/04 00:35:04 agc Exp $
+$NetBSD: distinfo,v 1.4.12.1 2017/06/21 18:20:04 bsiegert 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
diff --git a/net/hping3/options.mk b/net/hping3/options.mk
index a941362b083..d49af04729c 100644
--- a/net/hping3/options.mk
+++ b/net/hping3/options.mk
@@ -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.1.1.1.58.1 2017/06/21 18:20:04 bsiegert 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
diff --git a/net/hping3/patches/patch-aa b/net/hping3/patches/patch-aa
index 0e54c5337f1..702a6a3ac4d 100644
--- a/net/hping3/patches/patch-aa
+++ b/net/hping3/patches/patch-aa
@@ -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.1.1.1.58.1 2017/06/21 18:20:04 bsiegert Exp $
+
+Use pkgsrc paths.
--- configure.orig 2004-06-04 08:39:10.000000000 +0200
+++ configure 2010-01-26 23:07:03.000000000 +0100
diff --git a/net/hping3/patches/patch-ab b/net/hping3/patches/patch-ab
index 6acf436e498..a30e7953ee7 100644
--- a/net/hping3/patches/patch-ab
+++ b/net/hping3/patches/patch-ab
@@ -1,8 +1,19 @@
-$NetBSD: patch-ab,v 1.2 2013/10/20 18:00:57 joerg Exp $
+$NetBSD: patch-ab,v 1.2.28.1 2017/06/21 18:20:04 bsiegert 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)
diff --git a/net/hping3/patches/patch-ac b/net/hping3/patches/patch-ac
index 78f996256ee..b23385ce0af 100644
--- a/net/hping3/patches/patch-ac
+++ b/net/hping3/patches/patch-ac
@@ -1,29 +1,39 @@
-$NetBSD: patch-ac,v 1.2 2015/02/23 18:27:09 joerg Exp $
+$NetBSD: patch-ac,v 1.2.18.1 2017/06/21 18:20:04 bsiegert 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
diff --git a/net/hping3/patches/patch-ars.c b/net/hping3/patches/patch-ars.c
new file mode 100644
index 00000000000..457c08b1ee1
--- /dev/null
+++ b/net/hping3/patches/patch-ars.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ars.c,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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
diff --git a/net/hping3/patches/patch-ars.h b/net/hping3/patches/patch-ars.h
new file mode 100644
index 00000000000..e15ee143d21
--- /dev/null
+++ b/net/hping3/patches/patch-ars.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-ars.h,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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>
diff --git a/net/hping3/patches/patch-gethostname.c b/net/hping3/patches/patch-gethostname.c
new file mode 100644
index 00000000000..c6f52330377
--- /dev/null
+++ b/net/hping3/patches/patch-gethostname.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-gethostname.c,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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];
diff --git a/net/hping3/patches/patch-libpcap__stuff.c b/net/hping3/patches/patch-libpcap__stuff.c
new file mode 100644
index 00000000000..a08f4dd362b
--- /dev/null
+++ b/net/hping3/patches/patch-libpcap__stuff.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-libpcap__stuff.c,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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"
+
diff --git a/net/hping3/patches/patch-sbignum.c b/net/hping3/patches/patch-sbignum.c
new file mode 100644
index 00000000000..87797043a58
--- /dev/null
+++ b/net/hping3/patches/patch-sbignum.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-sbignum.c,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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>
diff --git a/net/hping3/patches/patch-sendip.c b/net/hping3/patches/patch-sendip.c
new file mode 100644
index 00000000000..e78afcb26d4
--- /dev/null
+++ b/net/hping3/patches/patch-sendip.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-sendip.c,v 1.1.2.2 2017/06/21 18:20:04 bsiegert 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;