git: 781504a56a94 - main - net/httping: Update to 2.9

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Sat, 12 Nov 2022 11:15:05 UTC
The branch main has been updated by ehaupt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=781504a56a944bc6bc4c4008aed988b992424524

commit 781504a56a944bc6bc4c4008aed988b992424524
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2022-11-12 11:14:59 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2022-11-12 11:14:59 +0000

    net/httping: Update to 2.9
    
    - Update to 2.9
    - No longer support disabling SSL in late 2022
    - Make NLS optional
    - Convert to use OPTIONS helpers
    - Pacify portclippy
    - Reformat with portfmt
---
 net/httping/Makefile             | 61 +++++++++++++++-------------------------
 net/httping/distinfo             |  6 ++--
 net/httping/files/patch-Makefile | 13 +++++++--
 net/httping/files/patch-utils.h  |  8 ++++++
 net/httping/pkg-plist            |  6 ++++
 5 files changed, 50 insertions(+), 44 deletions(-)

diff --git a/net/httping/Makefile b/net/httping/Makefile
index 67a1d53dde5d..2c4cff7697ea 100644
--- a/net/httping/Makefile
+++ b/net/httping/Makefile
@@ -1,49 +1,36 @@
 PORTNAME=	httping
-PORTVERSION=	2.5
-PORTREVISION=	1
+PORTVERSION=	2.9
+DISTVERSIONPREFIX=	v
 CATEGORIES=	net
-MASTER_SITES=	https://www.vanheusden.com/httping/ \
-		LOCAL/ehaupt
 
 MAINTAINER=	ehaupt@FreeBSD.org
 COMMENT=	Ping-like tool for HTTP requests
-WWW=		https://www.vanheusden.com/httping/
+WWW=		https://github.com/folkertvanheusden/HTTPing
 
 LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		gmake gettext tar:tgz
+USES=		gettext-runtime gettext-tools gmake localbase:ldflags ssl \
+		tar:tgz
+USE_GITHUB=	yes
+GH_ACCOUNT=	folkertvanheusden
+GH_PROJECT=	HTTPing
 
-PLIST_FILES=	bin/httping man/man1/httping.1.gz
+OPTIONS_DEFINE=		FFTW NCURSES NLS
+OPTIONS_DEFAULT=	NCURSES
+OPTIONS_SUB=		NLS
 
-OPTIONS_DEFINE=	NCURSES FFTW SSL
+FFTW_LIB_DEPENDS=	libfftw3.so:math/fftw3
+FFTW_MAKE_ENV=		FW=yes
+FFTW_MAKE_ENV_OFF=	FW=no
+NCURSES_USES=		ncurses
+NCURSES_MAKE_ENV=	NC=yes
+NCURSES_MAKE_ENV_OFF=	NC=yes
+NLS_MAKE_ENV_OFF=	NO_GETTEXT=yes
 
-OPTIONS_DEFAULT=NCURSES SSL
-NCURSES_USES=	ncurses
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MNCURSES}
-MAKE_ENV+=	NC=yes
-CFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-.else
-MAKE_ENV+=	NC=no
-.endif
-
-.if ${PORT_OPTIONS:MFFTW}
-MAKE_ENV+=	FW=yes
-LIB_DEPENDS+=	libfftw3.so:math/fftw3
-.else
-MAKE_ENV+=	FW=no
-.endif
-
-.if ${PORT_OPTIONS:MSSL}
-MAKE_ENV+=	SSL=yes
-USES+=		ssl
-.else
-MAKE_ENV+=	SSL=no
-.endif
+.include <bsd.port.pre.mk>
 
+# DragonFly seems to require this
 .if ${OPSYS} == FreeBSD
 MAKE_ENV+=	TFO=yes
 .endif
@@ -51,8 +38,4 @@ MAKE_ENV+=	TFO=yes
 post-patch-NCURSES-on:
 	@${REINPLACE_CMD} "s/-lncursesw/${NCURSESLIBS}/g" ${WRKSRC}/Makefile
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
-
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/httping/distinfo b/net/httping/distinfo
index ac4ad9569d22..adcc122778f8 100644
--- a/net/httping/distinfo
+++ b/net/httping/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1473774147
-SHA256 (httping-2.5.tgz) = 3e895a0a6d7bd79de25a255a1376d4da88eb09c34efdd0476ab5a907e75bfaf8
-SIZE (httping-2.5.tgz) = 71400
+TIMESTAMP = 1668248438
+SHA256 (folkertvanheusden-HTTPing-v2.9_GH0.tar.gz) = 37da3c89b917611d2ff81e2f6c9e9de39d160ef0ca2cb6ffec0bebcb9b45ef5d
+SIZE (folkertvanheusden-HTTPing-v2.9_GH0.tar.gz) = 83674
diff --git a/net/httping/files/patch-Makefile b/net/httping/files/patch-Makefile
index 256b3b07b7f8..b57f3059e3d5 100644
--- a/net/httping/files/patch-Makefile
+++ b/net/httping/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig	2015-02-10 12:39:25 UTC
+--- Makefile.orig	2022-10-29 19:34:27 UTC
 +++ Makefile
-@@ -33,11 +33,10 @@ TARGET=httping
+@@ -32,11 +32,10 @@ TARGET=httping
  
  LOCALEDIR=/usr/share/locale
  
@@ -14,3 +14,12 @@
  
  PACKAGE=$(TARGET)-$(VERSION)
  PREFIX?=/usr
+@@ -81,7 +80,7 @@ endif
+ ifeq ($(NC),yes)
+ CFLAGS+=-DNC
+ OBJS+=nc.o
+-LDFLAGS+=-lncursesw
++LDFLAGS+=-lncursesw -ltinfow
+ endif
+ 
+ ifeq ($(FW),yes)
diff --git a/net/httping/files/patch-utils.h b/net/httping/files/patch-utils.h
new file mode 100644
index 000000000000..c04d32cda192
--- /dev/null
+++ b/net/httping/files/patch-utils.h
@@ -0,0 +1,8 @@
+--- utils.h.orig	2022-10-29 19:34:27 UTC
++++ utils.h
+@@ -16,4 +16,4 @@ char * format_value(double value, int digits_sig, int 
+ #define min(x, y)	((x) < (y) ? (x) : (y))
+ #define max(x, y)	((x) > (y) ? (x) : (y))
+ 
+-void myusleep(useconds_t v);
++void myusleep(__useconds_t v);
diff --git a/net/httping/pkg-plist b/net/httping/pkg-plist
new file mode 100644
index 000000000000..569eb7da2120
--- /dev/null
+++ b/net/httping/pkg-plist
@@ -0,0 +1,6 @@
+bin/httping
+%%NLS%%share/locale/nl/LC_MESSAGES/httping.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/httping.mo
+share/man/man1/httping.1.gz
+share/man/nl/man1/httping-nl.1.gz
+share/man/ru/man1/httping-ru.1.gz