diff --git a/net-mgmt/gnu-ipcalc/Makefile b/net-mgmt/gnu-ipcalc/Makefile index 6da99bff662f..ded809a05f5b 100644 --- a/net-mgmt/gnu-ipcalc/Makefile +++ b/net-mgmt/gnu-ipcalc/Makefile @@ -1,29 +1,29 @@ # Created by: Emanuel Haupt PORTNAME= ipcalc -PORTVERSION= 0.2.3 -PORTREVISION= 1 +PORTVERSION= 1.0.1 CATEGORIES= net-mgmt PKGNAMEPREFIX= gnu- MAINTAINER= ehaupt@FreeBSD.org COMMENT= Modern network address calculation tool for IPv4 and IPv6 LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -CONFLICTS_INSTALL= ipcalc-[0-9]* - -USES= gmake localbase -USE_GITHUB= yes -GH_ACCOUNT= nmav +USES= localbase meson pkgconfig +USE_GITLAB= yes +GL_ACCOUNT= ipcalc +GL_COMMIT= 8dfa28013234755ef3ce3e157b3940eeaaa2b7df -MAKE_ENV+= USE_GEOIP=no USE_DYN_GEOIP=no +CONFLICTS_INSTALL= ipcalc-[0-9]* -PLIST_FILES= bin/ipcalc man/man1/ipcalc.1.gz +OPTIONS_DEFINE= DOCS MAXMINDDB +OPTIONS_SUB= yes +MAXMINDDB_DESC= Enable GeoIP1 + GeoIP2 Support -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1 +DOCS_BUILD_DEPENDS= ronn:textproc/rubygem-ronn +MAXMINDDB_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb +MAXMINDDB_MESON_ENABLED= use_maxminddb .include diff --git a/net-mgmt/gnu-ipcalc/distinfo b/net-mgmt/gnu-ipcalc/distinfo index 0c9e172f016b..6730f3b7a891 100644 --- a/net-mgmt/gnu-ipcalc/distinfo +++ b/net-mgmt/gnu-ipcalc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1527485817 -SHA256 (nmav-ipcalc-0.2.3_GH0.tar.gz) = c416f34d381a7333ad8aa8982fcfc88434818b3cc35a33b62a75c10f2a6af3c9 -SIZE (nmav-ipcalc-0.2.3_GH0.tar.gz) = 36596 +TIMESTAMP = 1631127796 +SHA256 (ipcalc-ipcalc-8dfa28013234755ef3ce3e157b3940eeaaa2b7df_GL0.tar.gz) = 1fda70e8c1ef2313f43d4c9beec089f4f31a959a3661b2ffaf70a702d5ab9272 +SIZE (ipcalc-ipcalc-8dfa28013234755ef3ce3e157b3940eeaaa2b7df_GL0.tar.gz) = 55588 diff --git a/net-mgmt/gnu-ipcalc/files/patch-Makefile b/net-mgmt/gnu-ipcalc/files/patch-Makefile deleted file mode 100644 index b04e1aff6956..000000000000 --- a/net-mgmt/gnu-ipcalc/files/patch-Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.orig 2017-05-15 12:33:58 UTC -+++ Makefile -@@ -1,7 +1,7 @@ - USE_GEOIP?=yes - USE_DYN_GEOIP?=yes - --LIBPATH?=/usr/lib64 -+#LIBPATH?=/usr/lib64 - #LIBPATH=/usr/lib/x86_64-linux-gnu - - LIBS?= -@@ -12,7 +12,6 @@ LDFLAGS=$(LIBS) - - ifeq ($(USE_GEOIP),yes) - ifeq ($(USE_DYN_GEOIP),yes) --LDFLAGS+=-ldl - CFLAGS+=-DUSE_GEOIP -DUSE_DYN_GEOIP -DLIBPATH="\"$(LIBPATH)\"" - else - LDFLAGS+=-lGeoIP diff --git a/net-mgmt/gnu-ipcalc/files/patch-deaggregate.c b/net-mgmt/gnu-ipcalc/files/patch-deaggregate.c new file mode 100644 index 000000000000..a09cb93c4eaa --- /dev/null +++ b/net-mgmt/gnu-ipcalc/files/patch-deaggregate.c @@ -0,0 +1,10 @@ +--- deaggregate.c.orig 2021-06-06 18:56:02 UTC ++++ deaggregate.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "ipcalc.h" + #include "ipv6.h" diff --git a/net-mgmt/gnu-ipcalc/files/patch-netsplit.c b/net-mgmt/gnu-ipcalc/files/patch-netsplit.c index c1381454370a..c31403d6336f 100644 --- a/net-mgmt/gnu-ipcalc/files/patch-netsplit.c +++ b/net-mgmt/gnu-ipcalc/files/patch-netsplit.c @@ -1,22 +1,22 @@ ---- netsplit.c.orig 2017-05-15 12:33:58 UTC +--- netsplit.c.orig 2021-06-06 18:56:02 UTC +++ netsplit.c @@ -32,9 +32,19 @@ #include #include #include +#include + #include "ipv6.h" #include "ipcalc.h" - ++ +#if defined(__FreeBSD__) || defined(__darwin__) || defined(__APPLE__) +#ifndef s6_addr16 +#define s6_addr16 __u6_addr.__u6_addr16 +#endif +#ifndef s6_addr32 +#define s6_addr32 __u6_addr.__u6_addr32 +#endif +#endif -+ + static const char *numtoquad(uint32_t num) { - static char quad[64]; diff --git a/net-mgmt/gnu-ipcalc/pkg-descr b/net-mgmt/gnu-ipcalc/pkg-descr index 44d06c8bafbc..8b16faa56ff8 100644 --- a/net-mgmt/gnu-ipcalc/pkg-descr +++ b/net-mgmt/gnu-ipcalc/pkg-descr @@ -1,11 +1,11 @@ This is a modern tool to assist in network address calculations for IPv4 and IPv6. It acts both as a tool to output human readable information about a network or address, as well as a tool suitable to be used by scripts or other programs. It supports printing a summary about the provided network address, multiple command line options per information to be printed, transparent IPv6 support, and in addition it will use libGeoIP if available to provide geographic information. -WWW: https://github.com/nmav/ipcalc/ +WWW: https://gitlab.com/ipcalc/ipcalc/ diff --git a/net-mgmt/gnu-ipcalc/pkg-plist b/net-mgmt/gnu-ipcalc/pkg-plist new file mode 100644 index 000000000000..e43eece9e7f0 --- /dev/null +++ b/net-mgmt/gnu-ipcalc/pkg-plist @@ -0,0 +1,2 @@ +bin/ipcalc +%%DOCS%%man/man1/ipcalc.1.gz