aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2021-06-15 16:17:15 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2021-06-15 16:17:15 +0000
commitcf362d342ecd7f14d40cec250dd25df3e94e5c66 (patch)
tree33128a4527cccdbae3d2775f181e6d99a369653a
parent73182d47e75a4f1082f75a9360a285b964f04e9b (diff)
downloadports-cf362d342ecd7f14d40cec250dd25df3e94e5c66.tar.gz
ports-cf362d342ecd7f14d40cec250dd25df3e94e5c66.zip
net/miniupnpd: Update to 2.1.20200510
From Tor Halvard Furulund: * Update to latest upstream. * Remove the extra patches as they are incorporated upstream From Emanuel Haupt: * Port cleanups PR: 246925 Reported by: Tor Halvard Furulund <squat@squat.no> Approved by: maintainer timeout, maintainer (previous version)
-rw-r--r--net/miniupnpd/Makefile56
-rw-r--r--net/miniupnpd/distinfo6
-rw-r--r--net/miniupnpd/files/enable_check_portinuse.patch11
-rw-r--r--net/miniupnpd/files/enable_igdv2.patch11
-rw-r--r--net/miniupnpd/files/enable_ipv6.patch11
-rw-r--r--net/miniupnpd/files/enable_leasefile.patch11
-rw-r--r--net/miniupnpd/files/enable_upnp_strict.patch11
-rw-r--r--net/miniupnpd/files/extra-patch-portinuse.c49
-rw-r--r--net/miniupnpd/files/patch-Makefile.bsd (renamed from net/miniupnpd/files/patch-Makefile)12
-rw-r--r--net/miniupnpd/files/pf_enable_filter_rules.patch11
10 files changed, 39 insertions, 150 deletions
diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile
index 779062a4bc17..cfafc0e36c2a 100644
--- a/net/miniupnpd/Makefile
+++ b/net/miniupnpd/Makefile
@@ -1,7 +1,7 @@
# Created by: Daniel O'Connor <darius@dons.net.au>
PORTNAME= miniupnpd
-PORTVERSION= 2.1.20190210
+PORTVERSION= 2.1.20200510
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= http://miniupnp.tuxfamily.org/files/ \
@@ -14,36 +14,40 @@ LICENSE= BSD3CLAUSE
USES= cpe ssl
CPE_VENDOR= miniupnp_project
-PLIST_FILES= etc/miniupnpd.conf.sample sbin/miniupnpd \
- man/man8/miniupnpd.8.gz
-MAKE_JOBS_UNSAFE=yes
USE_RC_SUBR= miniupnpd
+HAS_CONFIGURE= yes
+MAKE_JOBS_UNSAFE= yes
+
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
-OPTIONS_DEFINE= PF_FILTER_RULES CHECK_PORTINUSE IPV6 UPNP_IGDV2 UPNP_STRICT LEASEFILE
-PF_FILTER_RULES_DESC= Enable pf generation of filter rules
-CHECK_PORTINUSE_DESC= Check if ports are in use
-UPNP_IGDV2_DESC= Build an IGDv2 instead of an IGDv1
-UPNP_STRICT_DESC= More strict UPnP specification compliance
-LEASEFILE_DESC= Enable lease file
-
-PF_FILTER_RULES_EXTRA_PATCHES= ${PATCHDIR}/pf_enable_filter_rules.patch
-CHECK_PORTINUSE_EXTRA_PATCHES= ${PATCHDIR}/enable_check_portinuse.patch
-IPV6_EXTRA_PATCHES= ${PATCHDIR}/enable_ipv6.patch
-UPNP_IGDV2_EXTRA_PATCHES= ${PATCHDIR}/enable_igdv2.patch
-UPNP_STRICT_EXTRA_PATCHES= ${PATCHDIR}/enable_upnp_strict.patch
-LEASEFILE_EXTRA_PATCHES= ${PATCHDIR}/enable_leasefile.patch
-
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-portinuse.c
-.endif
+PLIST_FILES= etc/miniupnpd.conf.sample \
+ man/man8/miniupnpd.8.gz \
+ sbin/miniupnpd
+
+OPTIONS_DEFINE= CHECK_PORTINUSE IPV6 LEASEFILE UPNP_IGDV2 \
+ UPNP_STRICT
+OPTIONS_DEFAULT= AUTODETECT_FW
+OPTIONS_SINGLE= FIREWALL
+OPTIONS_SINGLE_FIREWALL= AUTODETECT_FW PF IPFW
+AUTODETECT_FW_DESC= Try to autodetect firewall type
+CHECK_PORTINUSE_DESC= Check if ports are in use
+IPFW_DESC= Use IPFW as firewall type
+LEASEFILE_DESC= Enable lease file
+PF_DESC= Use PF as firewall type
+UPNP_IGDV2_DESC= Build an IGDv2 instead of an IGDv1
+UPNP_STRICT_DESC= More strict UPnP specification compliance
+
+CHECK_PORTINUSE_CONFIGURE_ON= --portinuse
+IPV6_CONFIGURE_ON= --ipv6
+LEASEFILE_CONFIGURE_ON= --leasefile
+PF_CONFIGURE_ON= --firewall=pf
+UPNP_IGDV2_CONFIGURE_ON= --igd2
+UPNP_STRICT_CONFIGURE_ON= --strict
post-patch:
- ${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
- ${WRKSRC}/Makefile
-
+ @${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
+ ${WRKSRC}/Makefile.bsd
+
.include <bsd.port.mk>
diff --git a/net/miniupnpd/distinfo b/net/miniupnpd/distinfo
index 7735983d3f5f..1a5a458d1eeb 100644
--- a/net/miniupnpd/distinfo
+++ b/net/miniupnpd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1551791337
-SHA256 (miniupnpd-2.1.20190210.tar.gz) = 1aaecd25cf152d99557dfe80c7508af9cb06e97ecad4786ce5dafb4c958d196b
-SIZE (miniupnpd-2.1.20190210.tar.gz) = 235093
+TIMESTAMP = 1591038112
+SHA256 (miniupnpd-2.1.20200510.tar.gz) = 821e708f369cc1fb851506441fbc3a1f4a1b5a8bf8e84a9e71758a32f5127e8b
+SIZE (miniupnpd-2.1.20200510.tar.gz) = 245426
diff --git a/net/miniupnpd/files/enable_check_portinuse.patch b/net/miniupnpd/files/enable_check_portinuse.patch
deleted file mode 100644
index e6b46a974da4..000000000000
--- a/net/miniupnpd/files/enable_check_portinuse.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2014-04-22 00:37:51.000000000 -0700
-+++ genconfig.sh 2014-04-22 09:30:24.000000000 -0700
-@@ -401,7 +401,7 @@
- if [ -n "$PORTINUSE" ]; then
- echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE}
- else
-- echo "/*#define CHECK_PORTINUSE*/" >> ${CONFIGFILE}
-+ echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE}
- fi
- echo "" >> ${CONFIGFILE}
-
diff --git a/net/miniupnpd/files/enable_igdv2.patch b/net/miniupnpd/files/enable_igdv2.patch
deleted file mode 100644
index 2890f82fc25f..000000000000
--- a/net/miniupnpd/files/enable_igdv2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2014-04-11 01:16:49.000000000 -0700
-+++ genconfig.sh 2014-04-26 18:22:26.000000000 -0700
-@@ -436,7 +436,7 @@
- if [ -n "$IGD2" ]; then
- echo "#define IGD_V2" >> ${CONFIGFILE}
- else
-- echo "/*#define IGD_V2*/" >> ${CONFIGFILE}
-+ echo "#define IGD_V2" >> ${CONFIGFILE}
- fi
- echo "" >> ${CONFIGFILE}
-
diff --git a/net/miniupnpd/files/enable_ipv6.patch b/net/miniupnpd/files/enable_ipv6.patch
deleted file mode 100644
index 52e59733edef..000000000000
--- a/net/miniupnpd/files/enable_ipv6.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2014-04-11 01:16:49.000000000 -0700
-+++ genconfig.sh 2014-04-26 18:23:04.000000000 -0700
-@@ -417,7 +417,7 @@
- if [ -n "$IPV6" ]; then
- echo "#define ENABLE_IPV6" >> ${CONFIGFILE}
- else
-- echo "/*#define ENABLE_IPV6*/" >> ${CONFIGFILE}
-+ echo "#define ENABLE_IPV6" >> ${CONFIGFILE}
- fi
- echo "" >> ${CONFIGFILE}
-
diff --git a/net/miniupnpd/files/enable_leasefile.patch b/net/miniupnpd/files/enable_leasefile.patch
deleted file mode 100644
index 8806b3cce380..000000000000
--- a/net/miniupnpd/files/enable_leasefile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2014-04-22 00:37:51.000000000 -0700
-+++ genconfig.sh 2014-04-26 18:01:49.000000000 -0700
-@@ -393,7 +393,7 @@
- if [ -n "$LEASEFILE" ] ; then
- echo "#define ENABLE_LEASEFILE" >> ${CONFIGFILE}
- else
-- echo "/*#define ENABLE_LEASEFILE*/" >> ${CONFIGFILE}
-+ echo "#define ENABLE_LEASEFILE" >> ${CONFIGFILE}
- fi
- echo "" >> ${CONFIGFILE}
-
diff --git a/net/miniupnpd/files/enable_upnp_strict.patch b/net/miniupnpd/files/enable_upnp_strict.patch
deleted file mode 100644
index 78d15a95f358..000000000000
--- a/net/miniupnpd/files/enable_upnp_strict.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2014-04-11 01:16:49.000000000 -0700
-+++ genconfig.sh 2014-04-26 18:23:27.000000000 -0700
-@@ -472,7 +472,7 @@
- if [ -n "$STRICT" ] ; then
- echo "#define UPNP_STRICT" >> ${CONFIGFILE}
- else
-- echo "/*#define UPNP_STRICT*/" >> ${CONFIGFILE}
-+ echo "#define UPNP_STRICT" >> ${CONFIGFILE}
- fi
- echo "" >> ${CONFIGFILE}
-
diff --git a/net/miniupnpd/files/extra-patch-portinuse.c b/net/miniupnpd/files/extra-patch-portinuse.c
deleted file mode 100644
index 8ec4e68022d0..000000000000
--- a/net/miniupnpd/files/extra-patch-portinuse.c
+++ /dev/null
@@ -1,49 +0,0 @@
---- portinuse.c.orig 2017-11-02 17:38:02 UTC
-+++ portinuse.c
-@@ -280,7 +280,7 @@ static struct nlist list[] = {
- struct xinpgen *xig, *exig;
- struct xinpcb *xip;
- struct xtcpcb *xtp;
-- struct inpcb *inp;
-+ struct in_conninfo *inc;
- void *buf = NULL;
- size_t len;
-
-@@ -339,7 +339,8 @@ static struct nlist list[] = {
- free(buf);
- return -1;
- }
-- inp = &xtp->xt_inp;
-+ xip = &xtp->xt_inp;
-+ inc = &xip->inp_inc;
- break;
- case IPPROTO_UDP:
- xip = (struct xinpcb *)xig;
-@@ -349,21 +350,21 @@ static struct nlist list[] = {
- free(buf);
- return -1;
- }
-- inp = &xip->xi_inp;
-+ inc = &xip->inp_inc;
- break;
- default:
- abort();
- }
- /* no support for IPv6 */
-- if ((inp->inp_vflag & INP_IPV6) != 0)
-+ if ((xip->inp_vflag & INP_IPV6) != 0)
- continue;
- syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu",
-- (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport),
-- (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport),
-+ (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport),
-+ (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport),
- eport, (u_long)ip_addr.s_addr, iport
- );
-- if (eport == (unsigned)ntohs(inp->inp_lport)) {
-- if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) {
-+ if (eport == (unsigned)ntohs(inc->inc_lport)) {
-+ if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) {
- found++;
- break; /* don't care how many, just that we found at least one */
- }
diff --git a/net/miniupnpd/files/patch-Makefile b/net/miniupnpd/files/patch-Makefile.bsd
index 425f175bdd31..18b7f9c0c755 100644
--- a/net/miniupnpd/files/patch-Makefile
+++ b/net/miniupnpd/files/patch-Makefile.bsd
@@ -1,6 +1,6 @@
---- Makefile.orig 2018-05-08 01:27:03.541852000 +0800
-+++ Makefile 2018-05-08 01:28:27.611102000 +0800
-@@ -162,8 +162,7 @@
+--- Makefile.bsd.orig 2020-05-10 16:58:42 UTC
++++ Makefile.bsd
+@@ -121,8 +121,7 @@ LIBS += -lssl -lcrypto
INSTALLBINDIR = $(PREFIX)/sbin
INSTALLETCDIR = $(PREFIX)/etc
@@ -10,7 +10,7 @@
all: $(EXECUTABLES)
-@@ -181,10 +180,10 @@
+@@ -140,10 +139,10 @@ install: miniupnpd genuuid
$(INSTALL) -d $(DESTDIR)$(INSTALLBINDIR)
$(INSTALL) -m 755 miniupnpd $(DESTDIR)$(INSTALLBINDIR)
$(INSTALL) -d $(DESTDIR)$(INSTALLETCDIR)
@@ -24,8 +24,8 @@
# genuuid is using the uuid cli tool available under OpenBSD 4.0 in
# the uuid-1.5.0 package
-@@ -225,7 +224,7 @@
- testssdppktgen.c
+@@ -187,7 +186,7 @@ dox: miniupnpd.doxyconf
+ $(DOXYGEN) $>
miniupnpd: config.h $(ALLOBJS)
- $(CC) $(LDFLAGS) -o $@ $(ALLOBJS) $(LIBS)
diff --git a/net/miniupnpd/files/pf_enable_filter_rules.patch b/net/miniupnpd/files/pf_enable_filter_rules.patch
deleted file mode 100644
index 5d6ccc19248b..000000000000
--- a/net/miniupnpd/files/pf_enable_filter_rules.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- genconfig.sh.orig 2012-06-18 18:14:32.899227837 +0200
-+++ genconfig.sh 2012-06-18 18:14:45.089227683 +0200
-@@ -302,7 +302,7 @@
-
- echo "/* Uncomment the following line to enable generation of" >> ${CONFIGFILE}
- echo " * filter rules with pf */" >> ${CONFIGFILE}
--echo "/*#define PF_ENABLE_FILTER_RULES*/">> ${CONFIGFILE}
-+echo "#define PF_ENABLE_FILTER_RULES">> ${CONFIGFILE}
- echo "" >> ${CONFIGFILE}
-
- echo "/* Uncomment the following line to enable caching of results of" >> ${CONFIGFILE}