pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/hping3 Various patches and cleanups to fix build o...
details: https://anonhg.NetBSD.org/pkgsrc/rev/700f4e28b1d2
branches: trunk
changeset: 363666:700f4e28b1d2
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Wed Jun 14 12:17:30 2017 +0000
description:
Various patches and cleanups to fix build on Darwin and SunOS.
diffstat:
net/hping3/Makefile | 9 ++++---
net/hping3/distinfo | 14 ++++++++---
net/hping3/options.mk | 3 +-
net/hping3/patches/patch-aa | 4 ++-
net/hping3/patches/patch-ab | 19 ++++++++++++---
net/hping3/patches/patch-ac | 36 +++++++++++++++++++-----------
net/hping3/patches/patch-ars.c | 15 ++++++++++++
net/hping3/patches/patch-ars.h | 16 +++++++++++++
net/hping3/patches/patch-gethostname.c | 15 ++++++++++++
net/hping3/patches/patch-libpcap__stuff.c | 16 +++++++++++++
net/hping3/patches/patch-sbignum.c | 16 +++++++++++++
net/hping3/patches/patch-sendip.c | 24 ++++++++++++++++++++
12 files changed, 160 insertions(+), 27 deletions(-)
diffs (288 lines):
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/Makefile
--- a/net/hping3/Makefile Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/Makefile Wed Jun 14 12:17:30 2017 +0000
@@ -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 @@
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 @@
CONFIGURE_ENV+= INSTALL_MANPATH=${PKGMANDIR}
+CFLAGS.SunOS+= -Du_int64_t=uint64_t
+
INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
.include "options.mk"
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/distinfo
--- a/net/hping3/distinfo Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/distinfo Wed Jun 14 12:17:30 2017 +0000
@@ -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
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/options.mk
--- a/net/hping3/options.mk Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/options.mk Wed Jun 14 12:17:30 2017 +0000
@@ -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 @@
.include "../../lang/tcl/buildlink3.mk"
.else
CONFIGURE_ARGS+= --no-tcl
+CONFIGURE_ENV+= TCLSH=/nonexistent
.endif
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-aa
--- a/net/hping3/patches/patch-aa Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/patches/patch-aa Wed Jun 14 12:17:30 2017 +0000
@@ -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
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-ab
--- a/net/hping3/patches/patch-ab Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/patches/patch-ab Wed Jun 14 12:17:30 2017 +0000
@@ -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 $
+
+Use pkgsrc flags/paths.
---- 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 @@
+--- 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 -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-ac
--- a/net/hping3/patches/patch-ac Wed Jun 14 12:15:54 2017 +0000
+++ b/net/hping3/patches/patch-ac Wed Jun 14 12:17:30 2017 +0000
@@ -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
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-ars.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-ars.c Wed Jun 14 12:17:30 2017 +0000
@@ -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
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-ars.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-ars.h Wed Jun 14 12:17:30 2017 +0000
@@ -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>
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-gethostname.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-gethostname.c Wed Jun 14 12:17:30 2017 +0000
@@ -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];
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-libpcap__stuff.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-libpcap__stuff.c Wed Jun 14 12:17:30 2017 +0000
@@ -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"
+
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-sbignum.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-sbignum.c Wed Jun 14 12:17:30 2017 +0000
@@ -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>
diff -r bc63860dcc3e -r 700f4e28b1d2 net/hping3/patches/patch-sendip.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hping3/patches/patch-sendip.c Wed Jun 14 12:17:30 2017 +0000
@@ -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