aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2021-09-08 21:28:02 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2021-09-08 21:28:45 +0000
commit5b60fcdb18e3e5bb5ae813ee4e82dfb7de997df2 (patch)
treeccca614e6c731c6030ef7d754c40d4b90c35e91e
parent0c3779a123d7731ef8168c271fd72d9064a45cfe (diff)
downloadports-5b60fcdb18e3e5bb5ae813ee4e82dfb7de997df2.tar.gz
ports-5b60fcdb18e3e5bb5ae813ee4e82dfb7de997df2.zip
net-mgmt/gnu-ipcalc: Update to 1.0.1
- Upstream has move to GitLab - Use meson instead of gmake - Optionally support GeoIP1 + GeoIP2 via net/libmaxminddb PR: 258363 (based on) Reported by: freebsd@ohreally.nl
-rw-r--r--net-mgmt/gnu-ipcalc/Makefile24
-rw-r--r--net-mgmt/gnu-ipcalc/distinfo6
-rw-r--r--net-mgmt/gnu-ipcalc/files/patch-Makefile19
-rw-r--r--net-mgmt/gnu-ipcalc/files/patch-deaggregate.c10
-rw-r--r--net-mgmt/gnu-ipcalc/files/patch-netsplit.c8
-rw-r--r--net-mgmt/gnu-ipcalc/pkg-descr2
-rw-r--r--net-mgmt/gnu-ipcalc/pkg-plist2
7 files changed, 32 insertions, 39 deletions
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,8 +1,7 @@
# Created by: Emanuel Haupt <ehaupt@FreeBSD.org>
PORTNAME= ipcalc
-PORTVERSION= 0.2.3
-PORTREVISION= 1
+PORTVERSION= 1.0.1
CATEGORIES= net-mgmt
PKGNAMEPREFIX= gnu-
@@ -12,18 +11,19 @@ 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 <bsd.port.mk>
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 <arpa/inet.h>
+ #include <netdb.h>
+ #include <ctype.h>
++#include <sys/socket.h>
+
+ #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,4 +1,4 @@
---- 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 <netinet/in.h>
@@ -6,8 +6,9 @@
#include <stdint.h>
+#include <sys/socket.h>
+ #include "ipv6.h"
#include "ipcalc.h"
-
++
+#if defined(__FreeBSD__) || defined(__darwin__) || defined(__APPLE__)
+#ifndef s6_addr16
+#define s6_addr16 __u6_addr.__u6_addr16
@@ -16,7 +17,6 @@
+#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
@@ -8,4 +8,4 @@ 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