mirror of
https://git.freebsd.org/ports.git
synced 2025-06-04 12:26:27 -04:00
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)
This commit is contained in:
parent
73182d47e7
commit
cf362d342e
10 changed files with 37 additions and 148 deletions
|
@ -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
|
||||
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
|
||||
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
|
||||
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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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 */
|
||||
}
|
|
@ -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)
|
|
@ -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}
|
Loading…
Add table
Reference in a new issue