git: 3ed1ef0df46d - main - net/gupnp14: Add gupnp14 1.4.3 (copied from gupnp)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 26 Apr 2022 15:04:03 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ed1ef0df46d77ea5a5b8ecd6101a0ee274c20d6

commit 3ed1ef0df46d77ea5a5b8ecd6101a0ee274c20d6
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-04-26 14:45:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-04-26 15:01:09 +0000

    net/gupnp14: Add gupnp14 1.4.3 (copied from gupnp)
    
    - Add PORTSCOUT
---
 net/Makefile                                       |  1 +
 net/gupnp14/Makefile                               | 50 ++++++++++++++++++++++
 net/gupnp14/distinfo                               |  3 ++
 .../files/patch-libgupnp-gupnp-control-point.c     | 11 +++++
 net/gupnp14/pkg-descr                              | 13 ++++++
 net/gupnp14/pkg-plist                              | 30 +++++++++++++
 6 files changed, 108 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index 83f2635e9370..ea28c28d96cb 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -230,6 +230,7 @@
     SUBDIR += gupnp-igd
     SUBDIR += gupnp-tools
     SUBDIR += gupnp-ui
+    SUBDIR += gupnp14
     SUBDIR += gutenfetch
     SUBDIR += gwhois
     SUBDIR += h323plus
diff --git a/net/gupnp14/Makefile b/net/gupnp14/Makefile
new file mode 100644
index 000000000000..d56402139df3
--- /dev/null
+++ b/net/gupnp14/Makefile
@@ -0,0 +1,50 @@
+# Created by: Martin Wilke <miwi@FreeBSD.org>
+
+PORTNAME=	gupnp
+PORTVERSION=	1.4.3
+CATEGORIES=	net
+MASTER_SITES=	GNOME
+PKGNAMESUFFIX=	14
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Framework for UPnP devices
+
+LICENSE=	LGPL20
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	glib>=2.66:devel/glib20 \
+		gobject-introspection>=1.36:devel/gobject-introspection \
+		gssdp14>=1.3.0:net/gssdp14 \
+		libsoup>=2.48.0:devel/libsoup
+LIB_DEPENDS=	libgssdp-1.2.so:net/gssdp14 \
+		libsoup-2.4.so:devel/libsoup \
+		libuuid.so:misc/e2fsprogs-libuuid
+
+USES=		compiler:c11 cpe gnome meson pkgconfig python:run shebangfix tar:xz
+USE_GNOME=	glib20 introspection:build libxml2
+
+MESON_ARGS=	-Dexamples=false -Dgtk_doc=false -Dintrospection=true
+USE_CSTD=	c11
+USE_LDCONFIG=	yes
+
+CONFLICTS_INSTALL=	gupnp
+
+CPE_VENDOR=	gnome
+
+PORTSCOUT=	limit:^1\.4\.
+
+SHEBANG_FILES=	tools/gupnp-binding-tool-1.2
+
+OPTIONS_DEFINE=	VAPI
+OPTIONS_SUB=	yes
+
+VAPI_BUILD_DEPENDS=	vala>=0.20:lang/vala
+VAPI_MESON_TRUE=	vapi
+
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == "clang"
+CPPFLAGS+=	-Wno-return-type
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/gupnp14/distinfo b/net/gupnp14/distinfo
new file mode 100644
index 000000000000..dfff7db40bc8
--- /dev/null
+++ b/net/gupnp14/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1643133665
+SHA256 (gupnp-1.4.3.tar.xz) = 14eda777934da2df743d072489933bd9811332b7b5bf41626b8032efb28b33ba
+SIZE (gupnp-1.4.3.tar.xz) = 154812
diff --git a/net/gupnp14/files/patch-libgupnp-gupnp-control-point.c b/net/gupnp14/files/patch-libgupnp-gupnp-control-point.c
new file mode 100644
index 000000000000..2705d6c17981
--- /dev/null
+++ b/net/gupnp14/files/patch-libgupnp-gupnp-control-point.c
@@ -0,0 +1,11 @@
+--- libgupnp/gupnp-control-point.c.orig	2018-11-12 22:04:49 UTC
++++ libgupnp/gupnp-control-point.c
+@@ -795,7 +795,7 @@ parse_usn (const char *usn,
+         /* Count elements */
+         count = g_strv_length (bits);
+ 
+-        if (count == 1) {
++        if (count == 1 || (count == 2 && strlen(bits[1]) == 0)) {
+                 /* uuid:device-UUID */
+ 
+                 *udn = bits[0];
diff --git a/net/gupnp14/pkg-descr b/net/gupnp14/pkg-descr
new file mode 100644
index 000000000000..1a17f56a449a
--- /dev/null
+++ b/net/gupnp14/pkg-descr
@@ -0,0 +1,13 @@
+GUPnP is an elegant, object-oriented open source framework for creating UPnP
+devices and control points, written in C using GObject and libsoup. The GUPnP
+API is intended to be easy to use, efficient and flexible. It provides the same
+set of features as libupnp, but shields the developer from most of UPnP's
+internals.
+
+GUPnP implements the UPnP specification: resource announcement and discovery,
+description, control, event notification, and presentation (GUPnP includes basic
+web server functionality through libsoup). GUPnP does not include helpers for
+construction or control of specific standardized resources (e.g. MediaServer);
+this is left for higher level libraries utilizing the GUPnP framework.
+
+WWW: https://wiki.gnome.org/Projects/GUPnP
diff --git a/net/gupnp14/pkg-plist b/net/gupnp14/pkg-plist
new file mode 100644
index 000000000000..9b37890ebc3f
--- /dev/null
+++ b/net/gupnp14/pkg-plist
@@ -0,0 +1,30 @@
+bin/gupnp-binding-tool-1.2
+include/gupnp-1.2/libgupnp/gupnp-acl.h
+include/gupnp-1.2/libgupnp/gupnp-context-filter.h
+include/gupnp-1.2/libgupnp/gupnp-context-manager.h
+include/gupnp-1.2/libgupnp/gupnp-context.h
+include/gupnp-1.2/libgupnp/gupnp-control-point.h
+include/gupnp-1.2/libgupnp/gupnp-device-info.h
+include/gupnp-1.2/libgupnp/gupnp-device-proxy.h
+include/gupnp-1.2/libgupnp/gupnp-device.h
+include/gupnp-1.2/libgupnp/gupnp-enums.h
+include/gupnp-1.2/libgupnp/gupnp-error.h
+include/gupnp-1.2/libgupnp/gupnp-resource-factory.h
+include/gupnp-1.2/libgupnp/gupnp-root-device.h
+include/gupnp-1.2/libgupnp/gupnp-service-info.h
+include/gupnp-1.2/libgupnp/gupnp-service-introspection.h
+include/gupnp-1.2/libgupnp/gupnp-service-proxy.h
+include/gupnp-1.2/libgupnp/gupnp-service.h
+include/gupnp-1.2/libgupnp/gupnp-types.h
+include/gupnp-1.2/libgupnp/gupnp-uuid.h
+include/gupnp-1.2/libgupnp/gupnp-white-list.h
+include/gupnp-1.2/libgupnp/gupnp-xml-doc.h
+include/gupnp-1.2/libgupnp/gupnp.h
+lib/girepository-1.0/GUPnP-1.2.typelib
+lib/libgupnp-1.2.so
+lib/libgupnp-1.2.so.1
+lib/libgupnp-1.2.so.1.104.3
+libdata/pkgconfig/gupnp-1.2.pc
+share/gir-1.0/GUPnP-1.2.gir
+%%VAPI%%share/vala/vapi/gupnp-1.2.deps
+%%VAPI%%share/vala/vapi/gupnp-1.2.vapi