View | Details | Raw Unified | Return to bug 246925 | Differences between
and this patch

Collapse All | Expand All

(-)ports/net/miniupnpd/Makefile (-24 / +28 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	miniupnpd
4
PORTNAME=	miniupnpd
5
PORTVERSION=	2.1.20190210
5
PORTVERSION=	2.1.20200510
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	net
7
CATEGORIES=	net
8
MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
8
MASTER_SITES=	http://miniupnp.tuxfamily.org/files/ \
Lines 15-50 Link Here
15
15
16
USES=		cpe ssl
16
USES=		cpe ssl
17
CPE_VENDOR=	miniupnp_project
17
CPE_VENDOR=	miniupnp_project
18
PLIST_FILES=	etc/miniupnpd.conf.sample sbin/miniupnpd \
19
		man/man8/miniupnpd.8.gz
20
MAKE_JOBS_UNSAFE=yes
21
USE_RC_SUBR=	miniupnpd
18
USE_RC_SUBR=	miniupnpd
22
19
20
HAS_CONFIGURE=	yes
21
MAKE_JOBS_UNSAFE=	yes
22
23
CFLAGS+=	-I${OPENSSLINC}
23
CFLAGS+=	-I${OPENSSLINC}
24
LDFLAGS+=	-L${OPENSSLLIB}
24
LDFLAGS+=	-L${OPENSSLLIB}
25
25
26
OPTIONS_DEFINE=	PF_FILTER_RULES CHECK_PORTINUSE IPV6 UPNP_IGDV2 UPNP_STRICT LEASEFILE
26
PLIST_FILES=	etc/miniupnpd.conf.sample \
27
PF_FILTER_RULES_DESC=	Enable pf generation of filter rules
27
		man/man8/miniupnpd.8.gz \
28
CHECK_PORTINUSE_DESC=	Check if ports are in use
28
		sbin/miniupnpd
29
UPNP_IGDV2_DESC=	Build an IGDv2 instead of an IGDv1
30
UPNP_STRICT_DESC=	More strict UPnP specification compliance
31
LEASEFILE_DESC=	Enable lease file
32
29
33
PF_FILTER_RULES_EXTRA_PATCHES=	${PATCHDIR}/pf_enable_filter_rules.patch
30
OPTIONS_DEFINE=			CHECK_PORTINUSE IPV6 LEASEFILE UPNP_IGDV2 \
34
CHECK_PORTINUSE_EXTRA_PATCHES=	${PATCHDIR}/enable_check_portinuse.patch
31
				UPNP_STRICT
35
IPV6_EXTRA_PATCHES=	${PATCHDIR}/enable_ipv6.patch
32
OPTIONS_DEFAULT=		AUTODETECT_FW
36
UPNP_IGDV2_EXTRA_PATCHES=	${PATCHDIR}/enable_igdv2.patch
33
OPTIONS_SINGLE=			FIREWALL
37
UPNP_STRICT_EXTRA_PATCHES=	${PATCHDIR}/enable_upnp_strict.patch
34
OPTIONS_SINGLE_FIREWALL=	AUTODETECT_FW PF IPFW
38
LEASEFILE_EXTRA_PATCHES=	${PATCHDIR}/enable_leasefile.patch
35
AUTODETECT_FW_DESC=		Try to autodetect firewall type
36
CHECK_PORTINUSE_DESC=		Check if ports are in use
37
IPFW_DESC=			Use IPFW as firewall type
38
LEASEFILE_DESC=			Enable lease file
39
PF_DESC=			Use PF as firewall type
40
UPNP_IGDV2_DESC=		Build an IGDv2 instead of an IGDv1
41
UPNP_STRICT_DESC=		More strict UPnP specification compliance
39
42
40
.include <bsd.port.options.mk>
43
CHECK_PORTINUSE_CONFIGURE_ON=	--portinuse
44
IPV6_CONFIGURE_ON=		--ipv6
45
LEASEFILE_CONFIGURE_ON=		--leasefile
46
PF_CONFIGURE_ON=		--firewall=pf
47
UPNP_IGDV2_CONFIGURE_ON=	--igd2
48
UPNP_STRICT_CONFIGURE_ON=	--strict
41
49
42
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
50
post-patch:
43
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-portinuse.c
51
	@${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
44
.endif
52
	${WRKSRC}/Makefile.bsd
45
53
46
post-patch:
47
	${REINPLACE_CMD} -e 's|\(-lssl -lcrypto\)|$$(LDFLAGS) \1|g' \
48
	${WRKSRC}/Makefile
49
	
50
.include <bsd.port.mk>
54
.include <bsd.port.mk>
(-)ports/net/miniupnpd/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1551791337
1
TIMESTAMP = 1591038112
2
SHA256 (miniupnpd-2.1.20190210.tar.gz) = 1aaecd25cf152d99557dfe80c7508af9cb06e97ecad4786ce5dafb4c958d196b
2
SHA256 (miniupnpd-2.1.20200510.tar.gz) = 821e708f369cc1fb851506441fbc3a1f4a1b5a8bf8e84a9e71758a32f5127e8b
3
SIZE (miniupnpd-2.1.20190210.tar.gz) = 235093
3
SIZE (miniupnpd-2.1.20200510.tar.gz) = 245426
(-)ports/net/miniupnpd/files/enable_check_portinuse.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig	2014-04-22 00:37:51.000000000 -0700
2
+++ genconfig.sh	2014-04-22 09:30:24.000000000 -0700
3
@@ -401,7 +401,7 @@
4
 if [ -n "$PORTINUSE" ]; then
5
 	echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE}
6
 else
7
-	echo "/*#define CHECK_PORTINUSE*/" >> ${CONFIGFILE}
8
+	echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE}
9
 fi
10
 echo "" >> ${CONFIGFILE}
11
 
(-)ports/net/miniupnpd/files/enable_igdv2.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig	2014-04-11 01:16:49.000000000 -0700
2
+++ genconfig.sh	2014-04-26 18:22:26.000000000 -0700
3
@@ -436,7 +436,7 @@
4
 if [ -n "$IGD2" ]; then
5
 	echo "#define IGD_V2" >> ${CONFIGFILE}
6
 else
7
-	echo "/*#define IGD_V2*/" >> ${CONFIGFILE}
8
+	echo "#define IGD_V2" >> ${CONFIGFILE}
9
 fi
10
 echo "" >> ${CONFIGFILE}
11
 
(-)ports/net/miniupnpd/files/enable_ipv6.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig	2014-04-11 01:16:49.000000000 -0700
2
+++ genconfig.sh	2014-04-26 18:23:04.000000000 -0700
3
@@ -417,7 +417,7 @@
4
 if [ -n "$IPV6" ]; then
5
 	echo "#define ENABLE_IPV6" >> ${CONFIGFILE}
6
 else
7
-	echo "/*#define ENABLE_IPV6*/" >> ${CONFIGFILE}
8
+	echo "#define ENABLE_IPV6" >> ${CONFIGFILE}
9
 fi
10
 echo "" >> ${CONFIGFILE}
11
 
(-)ports/net/miniupnpd/files/enable_leasefile.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig   2014-04-22 00:37:51.000000000 -0700
2
+++ genconfig.sh	2014-04-26 18:01:49.000000000 -0700
3
@@ -393,7 +393,7 @@
4
 if [ -n "$LEASEFILE" ] ; then
5
 	echo "#define ENABLE_LEASEFILE" >> ${CONFIGFILE}
6
 else
7
-	echo "/*#define ENABLE_LEASEFILE*/" >> ${CONFIGFILE}
8
+	echo "#define ENABLE_LEASEFILE" >> ${CONFIGFILE}
9
 fi
10
 echo "" >> ${CONFIGFILE}
11
 
(-)ports/net/miniupnpd/files/enable_upnp_strict.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig	2014-04-11 01:16:49.000000000 -0700
2
+++ genconfig.sh	2014-04-26 18:23:27.000000000 -0700
3
@@ -472,7 +472,7 @@
4
 if [ -n "$STRICT" ] ; then
5
 	echo "#define UPNP_STRICT" >> ${CONFIGFILE}
6
 else
7
-	echo "/*#define UPNP_STRICT*/" >> ${CONFIGFILE}
8
+	echo "#define UPNP_STRICT" >> ${CONFIGFILE}
9
 fi
10
 echo "" >> ${CONFIGFILE}
11
 
(-)ports/net/miniupnpd/files/extra-patch-portinuse.c (-49 lines)
Lines 1-49 Link Here
1
--- portinuse.c.orig	2017-11-02 17:38:02 UTC
2
+++ portinuse.c
3
@@ -280,7 +280,7 @@ static struct nlist list[] = {
4
 	struct xinpgen *xig, *exig;
5
 	struct xinpcb *xip;
6
 	struct xtcpcb *xtp;
7
-	struct inpcb *inp;
8
+	struct in_conninfo *inc;
9
 	void *buf = NULL;
10
 	size_t len;
11
 
12
@@ -339,7 +339,8 @@ static struct nlist list[] = {
13
 				free(buf);
14
 				return -1;
15
 			}
16
-			inp = &xtp->xt_inp;
17
+			xip = &xtp->xt_inp;
18
+			inc = &xip->inp_inc;
19
 			break;
20
 		case IPPROTO_UDP:
21
 			xip = (struct xinpcb *)xig;
22
@@ -349,21 +350,21 @@ static struct nlist list[] = {
23
 				free(buf);
24
 				return -1;
25
 			}
26
-			inp = &xip->xi_inp;
27
+			inc = &xip->inp_inc;
28
 			break;
29
 		default:
30
 			abort();
31
 		}
32
 		/* no support for IPv6 */
33
-		if ((inp->inp_vflag & INP_IPV6) != 0)
34
+		if ((xip->inp_vflag & INP_IPV6) != 0)
35
 			continue;
36
 		syslog(LOG_DEBUG, "%08lx:%hu %08lx:%hu <=> %hu %08lx:%hu",
37
-		       (u_long)inp->inp_laddr.s_addr, ntohs(inp->inp_lport),
38
-		       (u_long)inp->inp_faddr.s_addr, ntohs(inp->inp_fport),
39
+		       (u_long)inc->inc_laddr.s_addr, ntohs(inc->inc_lport),
40
+		       (u_long)inc->inc_faddr.s_addr, ntohs(inc->inc_fport),
41
 		       eport, (u_long)ip_addr.s_addr, iport
42
 		);
43
-		if (eport == (unsigned)ntohs(inp->inp_lport)) {
44
-			if (inp->inp_laddr.s_addr == INADDR_ANY || inp->inp_laddr.s_addr == ip_addr.s_addr) {
45
+		if (eport == (unsigned)ntohs(inc->inc_lport)) {
46
+			if (inc->inc_laddr.s_addr == INADDR_ANY || inc->inc_laddr.s_addr == ip_addr.s_addr) {
47
 				found++;
48
 				break;  /* don't care how many, just that we found at least one */
49
 			}
(-)ports/net/miniupnpd/files/patch-Makefile (-35 lines)
Lines 1-35 Link Here
1
--- Makefile.orig	2018-05-08 01:27:03.541852000 +0800
2
+++ Makefile	2018-05-08 01:28:27.611102000 +0800
3
@@ -162,8 +162,7 @@
4
 
5
 INSTALLBINDIR = $(PREFIX)/sbin
6
 INSTALLETCDIR = $(PREFIX)/etc
7
-# INSTALLMANDIR = $(PREFIX)/man
8
-INSTALLMANDIR = /usr/share/man
9
+INSTALLMANDIR = $(MANPREFIX)/man
10
 
11
 all:	$(EXECUTABLES)
12
 
13
@@ -181,10 +180,10 @@
14
 	$(INSTALL) -d $(DESTDIR)$(INSTALLBINDIR)
15
 	$(INSTALL) -m 755 miniupnpd $(DESTDIR)$(INSTALLBINDIR)
16
 	$(INSTALL) -d $(DESTDIR)$(INSTALLETCDIR)
17
-	$(INSTALL) -b miniupnpd.conf $(DESTDIR)$(INSTALLETCDIR)
18
+	$(INSTALL) -b miniupnpd.conf $(DESTDIR)$(INSTALLETCDIR)/miniupnpd.conf.sample
19
 	# TODO : install man page correctly
20
-#	$(INSTALL) -d $(INSTALLMANDIR)
21
-#	$(INSTALL) miniupnpd.8 $(INSTALLMANDIR)/cat8/miniupnpd.0
22
+	$(INSTALL) -d $(DESTDIR)$(INSTALLMANDIR)/man8
23
+	$(INSTALL) miniupnpd.8 $(DESTDIR)$(INSTALLMANDIR)/man8/miniupnpd.8
24
 
25
 # genuuid is using the uuid cli tool available under OpenBSD 4.0 in
26
 # the uuid-1.5.0 package
27
@@ -225,7 +224,7 @@
28
 	testssdppktgen.c
29
 
30
 miniupnpd: config.h $(ALLOBJS)
31
-	$(CC) $(LDFLAGS) -o $@ $(ALLOBJS) $(LIBS)
32
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ALLOBJS) $(LIBS)
33
 
34
 # BSDmake :
35
 #	$(CC) $(LDFLAGS) -o $@ $> $(LIBS)
(-)ports/net/miniupnpd/files/patch-Makefile.bsd (+35 lines)
Line 0 Link Here
1
--- Makefile.bsd.orig	2020-05-10 16:58:42 UTC
2
+++ Makefile.bsd
3
@@ -121,8 +121,7 @@ LIBS += -lssl -lcrypto
4
 
5
 INSTALLBINDIR = $(PREFIX)/sbin
6
 INSTALLETCDIR = $(PREFIX)/etc
7
-# INSTALLMANDIR = $(PREFIX)/man
8
-INSTALLMANDIR = /usr/share/man
9
+INSTALLMANDIR = $(MANPREFIX)/man
10
 
11
 all:	$(EXECUTABLES)
12
 
13
@@ -140,10 +139,10 @@ install:	miniupnpd genuuid
14
 	$(INSTALL) -d $(DESTDIR)$(INSTALLBINDIR)
15
 	$(INSTALL) -m 755 miniupnpd $(DESTDIR)$(INSTALLBINDIR)
16
 	$(INSTALL) -d $(DESTDIR)$(INSTALLETCDIR)
17
-	$(INSTALL) -b miniupnpd.conf $(DESTDIR)$(INSTALLETCDIR)
18
+	$(INSTALL) -b miniupnpd.conf $(DESTDIR)$(INSTALLETCDIR)/miniupnpd.conf.sample
19
 	# TODO : install man page correctly
20
-#	$(INSTALL) -d $(INSTALLMANDIR)
21
-#	$(INSTALL) miniupnpd.8 $(INSTALLMANDIR)/cat8/miniupnpd.0
22
+	$(INSTALL) -d $(DESTDIR)$(INSTALLMANDIR)/man8
23
+	$(INSTALL) miniupnpd.8 $(DESTDIR)$(INSTALLMANDIR)/man8/miniupnpd.8
24
 
25
 # genuuid is using the uuid cli tool available under OpenBSD 4.0 in
26
 # the uuid-1.5.0 package
27
@@ -187,7 +186,7 @@ dox:	miniupnpd.doxyconf
28
 	$(DOXYGEN) $>
29
 
30
 miniupnpd: config.h $(ALLOBJS)
31
-	$(CC) $(LDFLAGS) -o $@ $(ALLOBJS) $(LIBS)
32
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ALLOBJS) $(LIBS)
33
 
34
 # BSDmake :
35
 #	$(CC) $(LDFLAGS) -o $@ $> $(LIBS)
(-)ports/net/miniupnpd/files/pf_enable_filter_rules.patch (-11 lines)
Lines 1-11 Link Here
1
--- genconfig.sh.orig	2012-06-18 18:14:32.899227837 +0200
2
+++ genconfig.sh	2012-06-18 18:14:45.089227683 +0200
3
@@ -302,7 +302,7 @@
4
 
5
 echo "/* Uncomment the following line to enable generation of" >> ${CONFIGFILE}
6
 echo " * filter rules with pf */" >> ${CONFIGFILE}
7
-echo "/*#define PF_ENABLE_FILTER_RULES*/">> ${CONFIGFILE}
8
+echo "#define PF_ENABLE_FILTER_RULES">> ${CONFIGFILE}
9
 echo "" >> ${CONFIGFILE}
10
 
11
 echo "/* Uncomment the following line to enable caching of results of" >> ${CONFIGFILE}

Return to bug 246925