git: 1817b81260d9 - main - net-mgmt/gnu-ipcalc: Fix hardcoded path to geoip database

Emanuel Haupt ehaupt at FreeBSD.org
Fri Sep 10 17:21:13 UTC 2021


The branch main has been updated by ehaupt:

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

commit 1817b81260d995086bbb8dafed2b7a8b168a449d
Author:     Emanuel Haupt <ehaupt at FreeBSD.org>
AuthorDate: 2021-09-10 16:32:39 +0000
Commit:     Emanuel Haupt <ehaupt at FreeBSD.org>
CommitDate: 2021-09-10 16:32:39 +0000

    net-mgmt/gnu-ipcalc: Fix hardcoded path to geoip database
    
    PR:             258400
    Reported by:    freebsd at ohreally.nl
---
 net-mgmt/gnu-ipcalc/Makefile             | 6 ++++++
 net-mgmt/gnu-ipcalc/files/pkg-message.in | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/net-mgmt/gnu-ipcalc/Makefile b/net-mgmt/gnu-ipcalc/Makefile
index ded809a05f5b..89ae4cf4fc54 100644
--- a/net-mgmt/gnu-ipcalc/Makefile
+++ b/net-mgmt/gnu-ipcalc/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	ipcalc
 PORTVERSION=	1.0.1
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 PKGNAMEPREFIX=	gnu-
 
@@ -25,5 +26,10 @@ MAXMINDDB_DESC=	Enable GeoIP1 + GeoIP2 Support
 DOCS_BUILD_DEPENDS=		ronn:textproc/rubygem-ronn
 MAXMINDDB_LIB_DEPENDS=		libmaxminddb.so:net/libmaxminddb
 MAXMINDDB_MESON_ENABLED=	use_maxminddb
+MAXMINDDB_SUB_FILES=		pkg-message
+
+post-patch-MAXMINDDB-on:
+	@${REINPLACE_CMD} -e "s|/usr/share|${LOCALBASE}/share|g" \
+		${WRKSRC}/ipcalc-maxmind.c
 
 .include <bsd.port.mk>
diff --git a/net-mgmt/gnu-ipcalc/files/pkg-message.in b/net-mgmt/gnu-ipcalc/files/pkg-message.in
new file mode 100644
index 000000000000..e1299f5caf8f
--- /dev/null
+++ b/net-mgmt/gnu-ipcalc/files/pkg-message.in
@@ -0,0 +1,8 @@
+[
+{ type: install
+  message: <<EOM
+To obtain MaxMind's GeoIP tables, install net/geoipupdate
+and run %%LOCALBASE%%/bin/geoipupdate manually.
+EOM
+}
+]


More information about the dev-commits-ports-main mailing list