git: d362e6d9dbb4 - main - net/httping: Update to 3.7a and newer snapshot (bb94c6d)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 06 Jun 2024 18:23:47 UTC
The branch main has been updated by sunpoet:

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

commit d362e6d9dbb4a8d3e1692175df7434973c6f5e7f
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-06-06 18:22:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-06-06 18:22:27 +0000

    net/httping: Update to 3.7a and newer snapshot (bb94c6d)
    
    - Update WWW
    - Fix LICENSE
    - Update pkg-descr
    - Take maintainership
    
    Changes:        https://github.com/folkertvanheusden/HTTPing/commits/master
---
 net/httping/Makefile                   | 44 +++++++++++++++-------------------
 net/httping/distinfo                   |  6 ++---
 net/httping/files/patch-CMakeLists.txt | 30 +++++++++++++++++++++++
 net/httping/files/patch-Makefile       | 25 -------------------
 net/httping/files/patch-utils.h        |  8 -------
 net/httping/pkg-descr                  |  7 +++---
 net/httping/pkg-plist                  |  5 ++--
 7 files changed, 59 insertions(+), 66 deletions(-)

diff --git a/net/httping/Makefile b/net/httping/Makefile
index 38687b138c91..a436b8aad299 100644
--- a/net/httping/Makefile
+++ b/net/httping/Makefile
@@ -1,41 +1,35 @@
 PORTNAME=	httping
-PORTVERSION=	2.9
+PORTVERSION=	3.7a
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Ping-like tool for HTTP requests
-WWW=		https://github.com/folkertvanheusden/HTTPing
+WWW=		https://www.vanheusden.com/httping/ \
+		https://github.com/folkertvanheusden/HTTPing
 
-LICENSE=	GPLv2
+LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		gettext-runtime gettext-tools gmake localbase:ldflags ssl \
-		tar:tgz
+USES=		cmake pkgconfig localbase:ldflags ssl
+
+CMAKE_ARGS=	-DCMAKE_INSTALL_MANDIR=${PREFIX}/share/man/man1
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	folkertvanheusden
 GH_PROJECT=	HTTPing
+GH_TAGNAME=	bb94c6d
 
-OPTIONS_DEFINE=		FFTW NCURSES NLS
-OPTIONS_DEFAULT=	NCURSES
-OPTIONS_SUB=		NLS
+OPTIONS_DEFINE=	DOCS FFTW NCURSES NLS
+OPTIONS_DEFAULT=NCURSES
+OPTIONS_SUB=	yes
 
+FFTW_CMAKE_BOOL=	USE_FFTW
 FFTW_LIB_DEPENDS=	libfftw3.so:math/fftw3
-FFTW_MAKE_ENV=		FW=yes
-FFTW_MAKE_ENV_OFF=	FW=no
+NCURSES_CMAKE_BOOL=	USE_TUI
+NCURSES_LDFLAGS=	${NCURSESLIBS}
 NCURSES_USES=		ncurses
-NCURSES_MAKE_ENV=	NC=yes
-NCURSES_MAKE_ENV_OFF=	NC=yes
-NLS_MAKE_ENV_OFF=	NO_GETTEXT=yes
-
-.include <bsd.port.pre.mk>
-
-# DragonFly seems to require this
-.if ${OPSYS} == FreeBSD
-MAKE_ENV+=	TFO=yes
-.endif
-
-post-patch-NCURSES-on:
-	@${REINPLACE_CMD} "s/-lncursesw/${NCURSESLIBS}/g" ${WRKSRC}/Makefile
+NLS_CMAKE_BOOL=		USE_GETTEXT
+NLS_USES=		gettext-runtime gettext-tools
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/httping/distinfo b/net/httping/distinfo
index adcc122778f8..434e3eaacaed 100644
--- a/net/httping/distinfo
+++ b/net/httping/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1668248438
-SHA256 (folkertvanheusden-HTTPing-v2.9_GH0.tar.gz) = 37da3c89b917611d2ff81e2f6c9e9de39d160ef0ca2cb6ffec0bebcb9b45ef5d
-SIZE (folkertvanheusden-HTTPing-v2.9_GH0.tar.gz) = 83674
+TIMESTAMP = 1717694660
+SHA256 (folkertvanheusden-HTTPing-v3.7a-bb94c6d_GH0.tar.gz) = 18911d26c05798f28721d56150358b37c69e577a8f67ac056978b2ba699c43c4
+SIZE (folkertvanheusden-HTTPing-v3.7a-bb94c6d_GH0.tar.gz) = 82257
diff --git a/net/httping/files/patch-CMakeLists.txt b/net/httping/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..74858e4bbc20
--- /dev/null
+++ b/net/httping/files/patch-CMakeLists.txt
@@ -0,0 +1,30 @@
+--- CMakeLists.txt.orig	2024-05-14 21:12:06 UTC
++++ CMakeLists.txt
+@@ -6,12 +6,12 @@ add_definitions(-DVERSION=\"${VERSION}\")
+ file (STRINGS "version" VERSION)
+ add_definitions(-DVERSION=\"${VERSION}\")
+ 
+-add_definitions(-DLOCALEDIR=\"/usr/local/share/locale\")
++add_definitions(-DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\")
+ 
+ set(SOURCES  colors.c cookies.c error.c fft.c gen.c help.c http.c io.c kalman.c main.c mssl.c nc.c res.c socks5.c tcp.c utils.c)
+ add_executable(httping ${SOURCES})
+ 
+-target_link_libraries(httping m)
++target_link_libraries(httping intl m)
+ 
+ if (USE_GETTEXT)
+ find_package(Intl REQUIRED)
+@@ -30,10 +30,12 @@ target_compile_options(httping PUBLIC ${NCURSES_CFLAGS
+ target_include_directories(httping PUBLIC ${NCURSES_INCLUDE_DIRS})
+ target_compile_options(httping PUBLIC ${NCURSES_CFLAGS_OTHER})
+ 
++if (USE_FFTW)
+ pkg_check_modules(FFTW3 fftw3)
+ target_link_libraries(httping ${FFTW3_LIBRARIES})
+ target_include_directories(httping PUBLIC ${FFTW3_INCLUDE_DIRS})
+ target_compile_options(httping PUBLIC ${FFTW3_CFLAGS_OTHER})
++endif ()
+ endif ()
+ 
+ pkg_check_modules(SSL libssl)
diff --git a/net/httping/files/patch-Makefile b/net/httping/files/patch-Makefile
deleted file mode 100644
index b57f3059e3d5..000000000000
--- a/net/httping/files/patch-Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
---- Makefile.orig	2022-10-29 19:34:27 UTC
-+++ Makefile
-@@ -32,11 +32,10 @@ TARGET=httping
- 
- LOCALEDIR=/usr/share/locale
- 
--DEBUG=yes
--WFLAGS=-Wall -W -Wextra -pedantic -D_FORTIFY_SOURCE=2
-+DEBUG?=no
- OFLAGS=
- CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" -DLOCALEDIR=\"$(LOCALEDIR)\"
--LDFLAGS+=-lm
-+LDFLAGS+=-lm -lintl
- 
- 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
deleted file mode 100644
index c04d32cda192..000000000000
--- a/net/httping/files/patch-utils.h
+++ /dev/null
@@ -1,8 +0,0 @@
---- 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-descr b/net/httping/pkg-descr
index 8fa8ad346426..a24a83ce0f3a 100644
--- a/net/httping/pkg-descr
+++ b/net/httping/pkg-descr
@@ -1,3 +1,4 @@
-Httping is like ping but for http-requests. Give it an url, and it will show
-you how long it takes to connect, send a request and retrieve the reply (only
-the headers).
+Httping is like 'ping' but for http-requests. Give it an url, and it'll show you
+how long it takes to connect, send a request and retrieve the reply (only the
+headers). Be aware that the transmission across the network also takes time! So
+it measures the latency of the webserver + network.
diff --git a/net/httping/pkg-plist b/net/httping/pkg-plist
index 569eb7da2120..ba09362c8eb5 100644
--- a/net/httping/pkg-plist
+++ b/net/httping/pkg-plist
@@ -1,6 +1,7 @@
 bin/httping
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/plot-json.py
 %%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