git: 28e7dd2da0ec - main - net/bittwist: Update to 3.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 27 May 2023 04:25:48 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=28e7dd2da0ec52b42d09dc3084cb7800c1f0294a

commit 28e7dd2da0ec52b42d09dc3084cb7800c1f0294a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-05-27 04:07:26 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-05-27 04:07:26 +0000

    net/bittwist: Update to 3.0
    
    - Update MASTER_SITES
    - Use DISTVERSIONPREFIX instead of DISTNAME
    - Update WWW
    - Add LICENSE
    - Update pkg-descr
    - Take maintainership
    
    Changes:        https://bittwist.sourceforge.io/news.html
---
 net/bittwist/Makefile             | 38 ++++++++++++++++++++++++++------------
 net/bittwist/distinfo             |  5 +++--
 net/bittwist/files/patch-Makefile | 29 -----------------------------
 net/bittwist/pkg-descr            | 19 ++++++++++++++++---
 4 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/net/bittwist/Makefile b/net/bittwist/Makefile
index ac808a8843ab..455ae1e520cc 100644
--- a/net/bittwist/Makefile
+++ b/net/bittwist/Makefile
@@ -1,20 +1,34 @@
 PORTNAME=	bittwist
-PORTVERSION=	1.1
+PORTVERSION=	3.0
+DISTVERSIONPREFIX=	bsd-
 CATEGORIES=	net
-MASTER_SITES=	SF/${PORTNAME}/_BSD/Bit-Twist%20${PORTVERSION}
-DISTNAME=	${PORTNAME}-bsd-${PORTVERSION}
+MASTER_SITES=	SF/bittwist/BSD/Bit-Twist%20${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Libpcap-based Ethernet packet generator, with PCAP editor
-WWW=		http://bittwist.sourceforge.net
+WWW=		https://bittwist.sourceforge.io/
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USES=		dos2unix gmake
-DOS2UNIX_FILES=	Makefile
+LICENSE=	GPLv2+
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-PLIST_FILES=	bin/bittwist bin/bittwistb bin/bittwiste \
-		man/man1/bittwist.1.gz \
-		man/man1/bittwistb.1.gz \
-		man/man1/bittwiste.1.gz
+USES=		dos2unix
+
+LDFLAGS+=	-lpcap
+
+PLIST_FILES=	bin/bittwist \
+		bin/bittwiste \
+		share/man/man1/bittwist.1.gz \
+		share/man/man1/bittwiste.1.gz
+
+DOS2UNIX_FILES=	COPYING
+
+do-build:
+	${CC} ${CFLAGS} ${LDFLAGS} ${WRKSRC}/src/bittwist.c -o ${WRKSRC}/src/bittwist
+	${CC} ${CFLAGS} ${LDFLAGS} ${WRKSRC}/src/bittwiste.c -o ${WRKSRC}/src/bittwiste
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/bin/ ${STAGEDIR}${PREFIX}/share/man/man1/
+	${INSTALL_PROGRAM} ${WRKSRC}/src/bittwist ${WRKSRC}/src/bittwiste ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_MAN} ${WRKSRC}/doc/bittwist.1 ${WRKSRC}/doc/bittwiste.1 ${STAGEDIR}${PREFIX}/share/man/man1/
 
 .include <bsd.port.mk>
diff --git a/net/bittwist/distinfo b/net/bittwist/distinfo
index 8940bb4a2f43..638396d1f09e 100644
--- a/net/bittwist/distinfo
+++ b/net/bittwist/distinfo
@@ -1,2 +1,3 @@
-SHA256 (bittwist-bsd-1.1.tar.gz) = 8868da8516360c3de630f748df69b2b545440c2c71fc59fc5c71f6dd53e26457
-SIZE (bittwist-bsd-1.1.tar.gz) = 44987
+TIMESTAMP = 1685016878
+SHA256 (bittwist-bsd-3.0.tar.gz) = 68ad273f9f9269c5901ae36dfa167775578498ef9d41cb401ede4f3a55775115
+SIZE (bittwist-bsd-3.0.tar.gz) = 39798
diff --git a/net/bittwist/files/patch-Makefile b/net/bittwist/files/patch-Makefile
deleted file mode 100644
index 346daa8b558a..000000000000
--- a/net/bittwist/files/patch-Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.orig	2016-06-20 15:56:31 UTC
-+++ Makefile
-@@ -1,6 +1,6 @@
- SHELL = /bin/sh
- 
--prefix = /usr/local
-+prefix = ${PREFIX}
- exec_prefix = ${prefix}
- bindir = ${exec_prefix}/bin
- mandir = ${prefix}/man/man1
-@@ -31,12 +31,12 @@ clean:
- 	rm -f $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste
- 
- install:
--	mkdir -p $(bindir)
--	chmod 755 $(bindir)
--	$(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(bindir)
--	mkdir -p $(mandir)
--	chmod 755 $(mandir)
--	$(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(mandir)
-+	mkdir -p $(DESTDIR)$(bindir)
-+	chmod 755 $(DESTDIR)$(bindir)
-+	$(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwistb $(SRC)/bittwiste $(DESTDIR)$(bindir)
-+	mkdir -p $(DESTDIR)$(mandir)
-+	chmod 755 $(DESTDIR)$(mandir)
-+	$(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwistb.1 $(DOC)/bittwiste.1 $(DESTDIR)$(mandir)
- 
- uninstall:
- 	rm -f $(bindir)/bittwist $(bindir)/bittwistb $(bindir)/bittwiste
diff --git a/net/bittwist/pkg-descr b/net/bittwist/pkg-descr
index b5edb143616e..dc6c46ac518f 100644
--- a/net/bittwist/pkg-descr
+++ b/net/bittwist/pkg-descr
@@ -1,3 +1,16 @@
-A libpcap-based ethernet packet generator, capable of replaying traffic
-from a pcap file, and an editor to allow you to change the contents of a
-trace file on the fly.
+Bit-Twist is a simple yet powerful libpcap-based Ethernet packet generator. It
+is designed to complement tcpdump, which by itself has done a great job at
+capturing network traffic.
+
+These are just a few significant features that makes Bit-Twist unique and stands
+out as one of the best Ethernet packet generator package made available to the
+open source community.
+- Runs on Linux, BSD, macOS, and Windows
+- Send multiple trace files at a time
+- Send packets at a specific speed or line rate in Mbps
+- Comprehensive trace file editor with control over most fields in Ethernet,
+  ARP, IP, ICMP, TCP, and UDP headers with automatic header checksum correction
+- Append user payload to existing packets after a specific header
+- Select a specific range of packets and save them in another trace file
+- Highly scriptable - with proper manipulation you can turn Bit-Twist into an
+  extremely flexible packet generator tool!