On Fri 08/03/2019 02:49, Stuart Henderson wrote:
> On 2019/03/07 07:05, Björn Ketelaars wrote:
> > Diff below brings miniupnpc to the latest version (2.1). Changelog can
> > be found at
> > http://miniupnp.free.fr/files/changelog.php?file=miniupnpc-2.1.tar.gz
> >
> > Major of SHARED_LIB has been bumped as symbols have been removed.
> > Removed python multipackage as there are no ports that depend on it.
>
> Consumers will need REVISION bumps due to the pkgpath change.
>
> > Build tested its consumers, and run tested against miniupnpd.
>
> The rest looks good and if nobody objects to removing py-miniupnpc
> then removing the python bits simplifies the port a lot.
>
> One other comment, though it's not new:
>
> > +WANTLIB += c
> >
> > USE_GMAKE= Yes
> > MAKE_ENV= APIVERSION=${LIBminiupnpc_VERSION} \
>
> If you pass APIVERSION in via MAKE_FLAGS instead of MAKE_ENV ....
>
> > @@ -32,21 +14,7 @@ MAKE_ENV= APIVERSION=${LIBminiupnpc_VERS
> <snip>
> > -$OpenBSD: patch-Makefile,v 1.5 2018/12/08 22:11:40 ajacoutot Exp $
> > ---- Makefile.orig Fri Jan 31 14:57:23 2014
> > -+++ Makefile Mon Feb 3 12:26:26 2014
> > -@@ -55,7 +55,7 @@ ifeq (SunOS, $(OS))
> > +$OpenBSD: patch-Makefile,v 1.5 2018/12/08 22:11:40 ajacoutot Exp $ Index:
> > Makefile
> > +Index: Makefile
> > +--- Makefile.orig
> > ++++ Makefile
> > +@@ -69,7 +69,7 @@ ifneq (, $(findstring sun, $(OS)))
> > endif
> >
> > # APIVERSION is used to build SONAME
> > --APIVERSION = 10
> > -+APIVERSION ?= 10
> > +-APIVERSION = 17
> > ++APIVERSION ?= 17
>
> .... you can likely get rid of this part of the patch ^^
Yes, you are right concerning bumping the consumers. I will address this
ASAP, assuming that nobody objects getting rid of the python bits.
Passing APIVERSION via MAKE_FLAGS did work. Thanks!
I found an issue with generating miniupnpc.pc: the wrong prefix was
used. As a fix I removed MAKE_ENV and changed *_FLAGS. New diff
attached.
Objections against getting rid of py-miniupnpc? OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpc/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile 8 Dec 2018 22:11:40 -0000 1.10
+++ Makefile 8 Mar 2019 06:07:04 -0000
@@ -1,52 +1,19 @@
# $OpenBSD: Makefile,v 1.10 2018/12/08 22:11:40 ajacoutot Exp $
-COMMENT-main= UPnP IGD client lightweight library
-COMMENT-python= python module for miniupnpc
+COMMENT= UPnP IGD client lightweight library
-MODPY_EGG_VERSION= 1.9
+DISTNAME= miniupnpc-2.1
-DISTNAME= miniupnpc-${MODPY_EGG_VERSION}
+SHARED_LIBS += miniupnpc 3.0
-PKGNAME-main= ${DISTNAME}
-PKGNAME-python= py-${DISTNAME}
+WANTLIB += c
-REVISION-main= 3
-REVISION-python=0
-
-SHARED_LIBS += miniupnpc 2.0
-
-WANTLIB-main += c
-
-LIB_DEPENDS-python=${MODPY_LIB_DEPENDS}
-WANTLIB-python += ${MODPY_WANTLIB} pthread
-
-MASTER_SITES= ${HOMEPAGE}files/
-
-MULTI_PACKAGES= -main -python
-
-MODULES= lang/python
+MAKE_FLAGS= APIVERSION=${LIBminiupnpc_VERSION}
+FAKE_FLAGS= PREFIX=${TRUEPREFIX}
USE_GMAKE= Yes
-MAKE_ENV= APIVERSION=${LIBminiupnpc_VERSION} \
- INSTALLPREFIX=${DESTDIR}${PREFIX}
-
-FAKE_FLAGS= DESTDIR=
-# Override variables from the python module.
-CONFIGURE_STYLE= simple
-CONFIGURE_SCRIPT= updateminiupnpcstrings.sh
-CATEGORIES-main= net
-RUN_DEPENDS-main= # empty
-
-pre-configure:
- ${SUBST_CMD} ${WRKSRC}/Makefile
-
-post-build:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${MAKE_FLAGS} pythonmodule
-
-post-install:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
- ${MAKE_PROGRAM} ${MAKE_FLAGS} installpythonmodule
+CONFIGURE_STYLE= simple
+CONFIGURE_SCRIPT= updateminiupnpcstrings.sh
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpc/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 3 Feb 2014 13:30:52 -0000 1.4
+++ distinfo 8 Mar 2019 06:07:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (miniupnpc-1.9.tar.gz) = KSPkU+iAu5SePU2p+D3Ty28IlG013guGTQM5z3CTRGQ=
-SIZE (miniupnpc-1.9.tar.gz) = 74230
+SHA256 (miniupnpc-2.1.tar.gz) = 4Z+14B6lpwfiqMuW9Tf72fOpE9U9gEoyZeOuqz0gZMY=
+SIZE (miniupnpc-2.1.tar.gz) = 91914
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpc/patches/patch-Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 patch-Makefile
--- patches/patch-Makefile 8 Dec 2018 22:11:40 -0000 1.5
+++ patches/patch-Makefile 8 Mar 2019 06:07:04 -0000
@@ -1,43 +1,21 @@
-$OpenBSD: patch-Makefile,v 1.5 2018/12/08 22:11:40 ajacoutot Exp $
---- Makefile.orig Fri Jan 31 14:57:23 2014
-+++ Makefile Mon Feb 3 12:26:26 2014
-@@ -55,7 +55,7 @@ ifeq (SunOS, $(OS))
- endif
-
- # APIVERSION is used to build SONAME
--APIVERSION = 10
-+APIVERSION ?= 10
-
- SRCS = igd_desc_parse.c miniupnpc.c minixml.c minisoap.c miniwget.c \
- upnpc.c upnpcommands.c upnpreplyparse.c testminixml.c \
-@@ -123,7 +123,7 @@ INSTALLPREFIX ?= $(PREFIX)/usr
+$OpenBSD: patch-Makefile,v 1.5 2018/12/08 22:11:40 ajacoutot Exp $ Index:
Makefile
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -149,7 +149,7 @@ endif
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR)
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
-INSTALLDIRMAN = $(INSTALLPREFIX)/share/man
+INSTALLDIRMAN = $(INSTALLPREFIX)/man
+ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig
FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
- ifneq ($(OS), AmigaOS)
-@@ -144,11 +144,11 @@ check: validateminixml validateminiwget validateupnpre
- everything: all $(EXECUTABLES_ADDTESTS)
-
- pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py
-- python setup.py build
-+ ${MODPY_BIN} setup.py build
- touch $@
-
- installpythonmodule: pythonmodule
-- python setup.py install
-+ ${MODPY_BIN} setup.py install --prefix=$(PREFIX)
-
- pythonmodule3: $(LIBRARY) miniupnpcmodule.c setup.py
- python3 setup.py build
-@@ -195,7 +195,6 @@ install: updateversion $(FILESTOINSTALL)
+@@ -238,7 +238,6 @@ install: updateversion $(FILESTOINSTALL)
$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
- ifneq ($(OS), AmigaOS)
+ ifeq (, $(findstring amiga, $(OS)))
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
- ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
+ $(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
+ $(INSTALL) -m 644 miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
endif
- $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
- ifeq ($(OS), AmigaOS)
Index: patches/patch-igd_desc_parse_c
===================================================================
RCS file: patches/patch-igd_desc_parse_c
diff -N patches/patch-igd_desc_parse_c
--- patches/patch-igd_desc_parse_c 3 Nov 2015 13:58:51 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-igd_desc_parse_c,v 1.1 2015/11/03 13:58:51 dcoppa Exp $
-
-commit 79cca974a4c2ab1199786732a67ff6d898051b78
-Author: Thomas Bernard <[email protected]>
-Date: Tue Sep 15 15:32:33 2015 +0200
-
-igd_desc_parse.c: fix buffer overflow
-
-http://talosintel.com/reports/TALOS-2015-0035/
-
---- igd_desc_parse.c.orig Mon Apr 11 11:19:37 2011
-+++ igd_desc_parse.c Tue Nov 3 12:08:09 2015
-@@ -15,7 +15,9 @@
- void IGDstartelt(void * d, const char * name, int l)
- {
- struct IGDdatas * datas = (struct IGDdatas *)d;
-- memcpy( datas->cureltname, name, l);
-+ if(l >= MINIUPNPC_URL_MAXSIZE)
-+ l = MINIUPNPC_URL_MAXSIZE-1;
-+ memcpy(datas->cureltname, name, l);
- datas->cureltname[l] = '\0';
- datas->level++;
- if( (l==7) && !memcmp(name, "service", l) ) {
Index: patches/patch-miniupnpcmodule_c
===================================================================
RCS file: /cvs/ports/net/miniupnp/miniupnpc/patches/patch-miniupnpcmodule_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-miniupnpcmodule_c
--- patches/patch-miniupnpcmodule_c 17 May 2013 10:59:31 -0000 1.2
+++ patches/patch-miniupnpcmodule_c 8 Mar 2019 06:07:04 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-miniupnpcmodule_c,v 1.2
Fix error: expected expression before '/' token
---- miniupnpcmodule.c.orig Thu Aug 30 10:15:18 2012
-+++ miniupnpcmodule.c Thu May 16 13:09:01 2013
-@@ -256,9 +256,9 @@ Py_END_ALLOW_THREADS
+Index: miniupnpcmodule.c
+--- miniupnpcmodule.c.orig
++++ miniupnpcmodule.c
+@@ -323,9 +323,9 @@ Py_END_ALLOW_THREADS
}
else
{
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- patches/patch-setup_py 3 Feb 2014 13:30:52 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-setup_py,v 1.4 2014/02/03 13:30:52 dcoppa Exp $
-
-Fix version
-
---- setup.py.orig Thu May 16 13:55:03 2013
-+++ setup.py Thu May 16 13:55:15 2013
-@@ -10,7 +10,7 @@ from distutils.core import setup, Extension
- from distutils import sysconfig
- sysconfig.get_config_vars()["OPT"] = ''
- sysconfig.get_config_vars()["CFLAGS"] = ''
--setup(name="miniupnpc", version="1.7",
-+setup(name="miniupnpc", version="1.9",
- ext_modules=[
- Extension(name="miniupnpc", sources=["miniupnpcmodule.c"],
- extra_objects=["libminiupnpc.a"])
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR 8 Mar 2019 06:07:04 -0000
@@ -0,0 +1,3 @@
+miniupnpc, the MiniUPnP client library, enables applications to access
+the services provided by an UPnP "Internet Gateway Device" present on
+the network. In UPnP terminology, it is a UPnP Control Point.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- pkg/DESCR-main 13 Jan 2012 09:23:09 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-miniupnpc, the MiniUPnP client library, enables applications to access
-the services provided by an UPnP "Internet Gateway Device" present on
-the network. In UPnP terminology, it is a UPnP Control Point.
Index: pkg/DESCR-python
===================================================================
RCS file: pkg/DESCR-python
diff -N pkg/DESCR-python
--- pkg/DESCR-python 13 Jan 2012 09:23:09 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-Python module for miniupnpc.
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST 8 Mar 2019 06:07:04 -0000
@@ -0,0 +1,20 @@
+@comment $OpenBSD: PLIST-main,v 1.3 2018/09/04 12:46:17 espie Exp $
+@pkgpath miniupnp/miniupnpc,-main
+bin/external-ip
+@bin bin/upnpc
+include/miniupnpc/
+include/miniupnpc/igd_desc_parse.h
+include/miniupnpc/miniupnpc.h
+include/miniupnpc/miniupnpc_declspec.h
+include/miniupnpc/miniupnpctypes.h
+include/miniupnpc/miniwget.h
+include/miniupnpc/portlistingparse.h
+include/miniupnpc/upnpcommands.h
+include/miniupnpc/upnpdev.h
+include/miniupnpc/upnperrors.h
+include/miniupnpc/upnpreplyparse.h
+lib/libminiupnpc.a
+@lib lib/libminiupnpc.so.${LIBminiupnpc_VERSION}
+lib/pkgconfig/miniupnpc.pc
+@man man/man3/miniupnpc.3
+share/doc/pkg-readmes/${PKGSTEM}
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- pkg/PLIST-main 4 Sep 2018 12:46:17 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-@comment $OpenBSD: PLIST-main,v 1.3 2018/09/04 12:46:17 espie Exp $
-bin/external-ip
-@bin bin/upnpc
-include/miniupnpc/
-include/miniupnpc/declspec.h
-include/miniupnpc/igd_desc_parse.h
-include/miniupnpc/miniupnpc.h
-include/miniupnpc/miniupnpctypes.h
-include/miniupnpc/miniwget.h
-include/miniupnpc/portlistingparse.h
-include/miniupnpc/upnpcommands.h
-include/miniupnpc/upnperrors.h
-include/miniupnpc/upnpreplyparse.h
-lib/libminiupnpc.a
-@lib lib/libminiupnpc.so.${LIBminiupnpc_VERSION}
-@man man/man3/miniupnpc.3
-share/doc/pkg-readmes/${PKGSTEM}
Index: pkg/PLIST-python
===================================================================
RCS file: pkg/PLIST-python
diff -N pkg/PLIST-python
--- pkg/PLIST-python 13 Jan 2012 09:23:09 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-@comment $OpenBSD: PLIST-python,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
-lib/python${MODPY_VERSION}/site-packages/miniupnpc-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
-lib/python${MODPY_VERSION}/site-packages/miniupnpc.so
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/README 8 Mar 2019 06:07:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: README-main,v 1.3 2018/09/04 12:46:17 espie Exp $
+
++-----------------------------------------------------------------------
+| Running ${PKGSTEM} on OpenBSD
++-----------------------------------------------------------------------
+
+For proper functionality, multicast(4) needs to be enabled. To do so,
+add the following line to /etc/rc.conf.local(8):
+ multicast=YES
+
+Otherwise, local LAN IP address must be specified on the upnpc command
+line, using the '-m' option. e.g.:
+
+$ upnpc -m 192.168.2.78 -l
Index: pkg/README-main
===================================================================
RCS file: pkg/README-main
diff -N pkg/README-main
--- pkg/README-main 4 Sep 2018 12:46:17 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: README-main,v 1.3 2018/09/04 12:46:17 espie Exp $
-
-+-----------------------------------------------------------------------
-| Running ${PKGSTEM} on OpenBSD
-+-----------------------------------------------------------------------
-
-For proper functionality, multicast(4) needs to be enabled. To do so,
-add the following line to /etc/rc.conf.local(8):
- multicast=YES
-
-Otherwise, local LAN IP address must be specified on the upnpc command
-line, using the '-m' option. e.g.:
-
-$ upnpc -m 192.168.2.78 -l