diff --git a/www/varnish-ip2location/Makefile b/www/varnish-ip2location/Makefile index 577eca0b3c13..01f20b0d28ed 100644 --- a/www/varnish-ip2location/Makefile +++ b/www/varnish-ip2location/Makefile @@ -1,44 +1,45 @@ # Created by: Ryan Steinmetz PORTNAME= ip2location PORTVERSION= 1.0.3 +PORTREVISION= 1 CATEGORIES= www PKGNAMEPREFIX= varnish- MAINTAINER= zi@FreeBSD.org COMMENT= Varnish Module (vmod) for ip2location LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.TXT LIB_DEPENDS= libIP2Location.so:net/ip2location BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} -USES= autoreconf:build libtool pkgconfig python:build varnish:6 +USES= autoreconf:build libtool pkgconfig python:build varnish:7 USE_LDCONFIG= yes PLIST_FILES= lib/varnish/vmods/libvmod_ip2location.so GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-static INSTALL_TARGET= install-strip DOCSDIR= ${PREFIX}/share/doc/vmod-dynamic MAKE_JOBS_UNSAFE= yes CFLAGS+= -I${WRKSRC}/src USE_GITHUB= yes GH_ACCOUNT= ip2location GH_PROJECT= ${PORTNAME}-varnish -GH_TAGNAME= 25928cf +GH_TAGNAME= b24b36e OPTIONS_DEFINE= DOCS post-extract: @(cd ${WRKDIR} && ${LN} -sf IP2Location-Varnish-${GH_TAGNAME} \ ${PORTNAME}-${PKGNAMEPREFIX}${GH_TAGNAME}) pre-configure: (cd ${WRKSRC} && ${SH} ./autogen.sh) .include diff --git a/www/varnish-ip2location/distinfo b/www/varnish-ip2location/distinfo index d7fff7a2c57c..f9aa9c41c473 100644 --- a/www/varnish-ip2location/distinfo +++ b/www/varnish-ip2location/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1649178745 -SHA256 (ip2location-ip2location-varnish-1.0.3-25928cf_GH0.tar.gz) = d10c85a42efa5aed788fe6fc30e5761a057b63e99643e6a466dd2aca736a6111 -SIZE (ip2location-ip2location-varnish-1.0.3-25928cf_GH0.tar.gz) = 7056 +TIMESTAMP = 1649431734 +SHA256 (ip2location-ip2location-varnish-1.0.3-b24b36e_GH0.tar.gz) = 3c8e5220c6a1807cde5dc53a76201ef3674e73afee94b61e1180edbe707e930f +SIZE (ip2location-ip2location-varnish-1.0.3-b24b36e_GH0.tar.gz) = 6667 diff --git a/www/varnish-ip2location/files/patch-Makefile.am b/www/varnish-ip2location/files/patch-Makefile.am index 1b317c8a93c8..4ebde7be637f 100644 --- a/www/varnish-ip2location/files/patch-Makefile.am +++ b/www/varnish-ip2location/files/patch-Makefile.am @@ -1,25 +1,25 @@ ---- Makefile.am.orig 2020-07-31 00:31:08 UTC +--- Makefile.am.orig 2020-11-29 23:51:52 UTC +++ Makefile.am @@ -5,18 +5,11 @@ SUBDIRS = src DISTCHECK_CONFIGURE_FLAGS = \ VMOD_DIR='$${libdir}/varnish/vmods' -doc_DATA = README.rst LICENSE -dist_man_MANS = vmod_ip2location.3 -EXTRA_DIST = README.rst LICENSE CHANGES.rst +doc_DATA = +dist_man_MANS = +EXTRA_DIST = LICENSE CHANGES.rst MAINTAINERCLEANFILES = $(dist_man_MANS) -vmod_ip2location.3: README.rst -if HAVE_RST2MAN - ${RST2MAN} README.rst $@ -else -- @echo "========================================" -- @echo "You need rst2man installed to make dist" +vmod_ip2location.3: @echo "========================================" +- @echo "You need rst2man installed to make dist" +- @echo "========================================" - @false -endif diff --git a/www/varnish-ip2location/files/patch-src_vmod__ip2location.c b/www/varnish-ip2location/files/patch-src_vmod__ip2location.c index 3808b3447dc6..3f2ff55e821a 100644 --- a/www/varnish-ip2location/files/patch-src_vmod__ip2location.c +++ b/www/varnish-ip2location/files/patch-src_vmod__ip2location.c @@ -1,14 +1,44 @@ ---- src/vmod_ip2location.c.orig 2020-07-24 05:30:13 UTC +--- src/vmod_ip2location.c.orig 2020-11-29 23:51:52 UTC +++ src/vmod_ip2location.c -@@ -12,6 +12,11 @@ - #include - #include +@@ -6,6 +6,11 @@ + + #include +#ifdef __FreeBSD__ +#include +#define gcvt(v, d, c) sprintf(c, "%*g", d, v); +#endif + #include "cache/cache.h" - /* Varnish < 6.2 compat */ + #ifndef VRT_H_INCLUDED +@@ -13,12 +18,19 @@ + #endif + + void +-i2pl_free(void *obj) ++ip2l_free(VRT_CTX, void *obj) + { + AN(obj); ++ CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); + IP2Location_close((IP2Location *)obj); + } + ++static const struct vmod_priv_methods ip2l_methods[1] = {{ ++ .magic = VMOD_PRIV_METHODS_MAGIC, ++ .type = "vmod_std_ip2location", ++ .fini = ip2l_free ++}}; ++ + VCL_VOID + vmod_init_db(VRT_CTX, struct vmod_priv *priv, char *filename, char *memtype) + { +@@ -51,7 +63,7 @@ vmod_init_db(VRT_CTX, struct vmod_priv *priv, char *fi + IP2Location_set_lookup_mode(IP2LocationObj, mtype); + + priv->priv = IP2LocationObj; +- priv->free = i2pl_free; ++ priv->methods = ip2l_methods; + } + + static VCL_STRING