Sun Aug 2 11:35:26 2009 UTC ()
add gupnp-0.12.8, a base UPnP library

There are (at least) four diffent (and conflicting) libraries for
UUID creation. I've added patches to use the NetBSD native one
which should be present on other BSDs too.
Other OSes likely want to use the Linux/e2fs one (which is in
pkgsrc-wip), this also would need some more extensive autoconf
changes.

Status:

Vendor Tag:	TNF
Release Tags:	pkgsrc_base


(drochner)
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/Makefile
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/PLIST
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/distinfo
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/DESCR
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/buildlink3.mk
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/patches/patch-aa
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/patches/patch-ab
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/patches/patch-ac
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/patches/patch-ad
diff -r0 -r1.1.1.1 pkgsrc/net/gupnp/patches/patch-ae

File Added: pkgsrc/net/gupnp/Makefile
# $NetBSD: Makefile,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $
#

DISTNAME=	gupnp-0.12.8
CATEGORIES=	net
MASTER_SITES=	http://www.gupnp.org/sources/gupnp/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.gupnp.org/
COMMENT=	Framework for UPnP devices

GNU_CONFIGURE=	yes
USE_LIBTOOL=	yes
USE_TOOLS+=	pkg-config
PKG_DESTDIR_SUPPORT= user-destdir

PKGCONFIG_OVERRIDE+=	gupnp-1.0.pc.in
REPLACE_PYTHON=	tools/gupnp-binding-tool

.include "../../lang/python/application.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../net/libsoup24/buildlink3.mk"
.include "../../net/gssdp/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/net/gupnp/PLIST
@comment $NetBSD: PLIST,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $
bin/gupnp-binding-tool
include/gupnp-1.0/libgupnp/gupnp-context.h
include/gupnp-1.0/libgupnp/gupnp-control-point.h
include/gupnp-1.0/libgupnp/gupnp-device-info.h
include/gupnp-1.0/libgupnp/gupnp-device-proxy.h
include/gupnp-1.0/libgupnp/gupnp-device.h
include/gupnp-1.0/libgupnp/gupnp-error.h
include/gupnp-1.0/libgupnp/gupnp-resource-factory.h
include/gupnp-1.0/libgupnp/gupnp-root-device.h
include/gupnp-1.0/libgupnp/gupnp-service-info.h
include/gupnp-1.0/libgupnp/gupnp-service-introspection.h
include/gupnp-1.0/libgupnp/gupnp-service-proxy.h
include/gupnp-1.0/libgupnp/gupnp-service.h
include/gupnp-1.0/libgupnp/gupnp-types.h
include/gupnp-1.0/libgupnp/gupnp.h
lib/libgupnp-1.0.la
lib/pkgconfig/gupnp-1.0.pc
share/gtk-doc/html/gupnp/GUPnPContext.html
share/gtk-doc/html/gupnp/GUPnPControlPoint.html
share/gtk-doc/html/gupnp/GUPnPDevice.html
share/gtk-doc/html/gupnp/GUPnPDeviceInfo.html
share/gtk-doc/html/gupnp/GUPnPDeviceProxy.html
share/gtk-doc/html/gupnp/GUPnPResourceFactory.html
share/gtk-doc/html/gupnp/GUPnPRootDevice.html
share/gtk-doc/html/gupnp/GUPnPService.html
share/gtk-doc/html/gupnp/GUPnPServiceInfo.html
share/gtk-doc/html/gupnp/GUPnPServiceIntrospection.html
share/gtk-doc/html/gupnp/GUPnPServiceProxy.html
share/gtk-doc/html/gupnp/api-device-control.html
share/gtk-doc/html/gupnp/api-device-impl.html
share/gtk-doc/html/gupnp/api-device-info.html
share/gtk-doc/html/gupnp/api-tools.html
share/gtk-doc/html/gupnp/api-utility.html
share/gtk-doc/html/gupnp/api.html
share/gtk-doc/html/gupnp/client-tutorial.html
share/gtk-doc/html/gupnp/glossary.html
share/gtk-doc/html/gupnp/gupnp-Error-codes.html
share/gtk-doc/html/gupnp/gupnp-Special-UPnP-types.html
share/gtk-doc/html/gupnp/gupnp-binding-tool.html
share/gtk-doc/html/gupnp/gupnp.devhelp
share/gtk-doc/html/gupnp/gupnp.devhelp2
share/gtk-doc/html/gupnp/home.png
share/gtk-doc/html/gupnp/index.html
share/gtk-doc/html/gupnp/index.sgml
share/gtk-doc/html/gupnp/ix01.html
share/gtk-doc/html/gupnp/left.png
share/gtk-doc/html/gupnp/overview.html
share/gtk-doc/html/gupnp/right.png
share/gtk-doc/html/gupnp/schemas-device.html
share/gtk-doc/html/gupnp/schemas-service.html
share/gtk-doc/html/gupnp/schemas.html
share/gtk-doc/html/gupnp/server-tutorial.html
share/gtk-doc/html/gupnp/style.css
share/gtk-doc/html/gupnp/tutorial.html
share/gtk-doc/html/gupnp/up.png

File Added: pkgsrc/net/gupnp/distinfo
$NetBSD: distinfo,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

SHA1 (gupnp-0.12.8.tar.gz) = b64bea62856b25e4c7f93faa32829f7bd3700aac
RMD160 (gupnp-0.12.8.tar.gz) = f2732d85d600b2f485ee69cd4169183728d881d9
Size (gupnp-0.12.8.tar.gz) = 475001 bytes
SHA1 (patch-aa) = 4446a062a086cc762680511514398fe45e933ed4
SHA1 (patch-ab) = e43380eac64d815fff1a1b62f73e35e1bdfb9633
SHA1 (patch-ac) = 6d33a9c2fd175ad7a8cbb49f55ddccf58009f1ad
SHA1 (patch-ad) = bc81da86498206d4f18e448bd40a8e0f834b55ae
SHA1 (patch-ae) = 4601bc1d9c56a509241c99e529ea65fe5bf7986c

File Added: pkgsrc/net/gupnp/DESCR
GUPnP implements the UPnP specification: resource announcement and discovery,
description, control, event notification, and presentation
(GUPnP includes basic web server functionality through libsoup).

File Added: pkgsrc/net/gupnp/buildlink3.mk
# $NetBSD: buildlink3.mk,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

BUILDLINK_TREE+=	gupnp

.if !defined(GUPNP_BUILDLINK3_MK)
GUPNP_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.gupnp+=	gupnp>=0.12.6
BUILDLINK_PKGSRCDIR.gupnp?=	../../net/gupnp

.include "../../devel/glib2/buildlink3.mk"
.include "../../net/libsoup24/buildlink3.mk"
.include "../../net/gssdp/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.endif	# GUPNP_BUILDLINK3_MK

BUILDLINK_TREE+=	-gupnp

File Added: pkgsrc/net/gupnp/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

--- libgupnp/gupnp-context.c.orig	2009-04-30 14:31:58.000000000 +0200
+++ libgupnp/gupnp-context.c
@@ -146,11 +146,13 @@ get_host_ip (const char *name)
                         p = inet_ntop (AF_INET,
                                        &s4->sin_addr, ip, sizeof (ip));
                         break;
+#if 0 /* XXX doesn't work with scoped addresses */
                 case AF_INET6:
                         s6 = (struct sockaddr_in6 *) ifa->ifa_addr;
                         p = inet_ntop (AF_INET6,
                                        &s6->sin6_addr, ip, sizeof (ip));
                         break;
+#endif
                 default:
                         continue; /* Unknown: ignore */
                 }
@@ -184,8 +186,8 @@ get_default_host_ip (void)
         unsigned long dest;
         gboolean found = FALSE;
         
-#if defined(__FreeBSD__)
-	if ((fp = popen ("netstat -r -f inet -n -W", "r"))) {
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+	if ((fp = popen ("netstat -r -f inet -n", "r"))) {
 		char buffer[BUFSIZ];
 
 		char destination[32];

File Added: pkgsrc/net/gupnp/patches/Attic/patch-ab
$NetBSD: patch-ab,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

--- libgupnp/gupnp-control-point.c.orig	2009-04-30 13:54:20.000000000 +0200
+++ libgupnp/gupnp-control-point.c
@@ -572,7 +572,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];

File Added: pkgsrc/net/gupnp/patches/Attic/patch-ac
$NetBSD: patch-ac,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

--- configure.orig	2009-06-02 14:25:31.000000000 +0200
+++ configure
@@ -12882,15 +12882,13 @@ if test -n "$LIBGUPNP_CFLAGS"; then
                             gmodule-2.0 \\
                             gssdp-1.0 >= 0.6 \\
                             libsoup-2.4 >= 2.4.1 \\
-                            libxml-2.0 \\
-                            uuid\"") >&5
+                            libxml-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.18 \
                             gobject-2.0 >= 2.18 \
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid") 2>&5
+                            libxml-2.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
@@ -12899,8 +12897,7 @@ if test -n "$LIBGUPNP_CFLAGS"; then
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid" 2>/dev/null`
+                            libxml-2.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -12916,15 +12913,13 @@ if test -n "$LIBGUPNP_LIBS"; then
                             gmodule-2.0 \\
                             gssdp-1.0 >= 0.6 \\
                             libsoup-2.4 >= 2.4.1 \\
-                            libxml-2.0 \\
-                            uuid\"") >&5
+                            libxml-2.0\"") >&5
   ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.18 \
                             gobject-2.0 >= 2.18 \
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid") 2>&5
+                            libxml-2.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
@@ -12933,8 +12928,7 @@ if test -n "$LIBGUPNP_LIBS"; then
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid" 2>/dev/null`
+                            libxml-2.0" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -12957,16 +12951,14 @@ fi
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid" 2>&1`
+                            libxml-2.0" 2>&1`
         else
 	        LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.18 \
                             gobject-2.0 >= 2.18 \
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid" 2>&1`
+                            libxml-2.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBGUPNP_PKG_ERRORS" >&5
@@ -12976,8 +12968,7 @@ fi
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid) were not met:
+                            libxml-2.0) were not met:
 
 $LIBGUPNP_PKG_ERRORS
 
@@ -12993,8 +12984,7 @@ $as_echo "$as_me: error: Package require
                             gmodule-2.0 \
                             gssdp-1.0 >= 0.6 \
                             libsoup-2.4 >= 2.4.1 \
-                            libxml-2.0 \
-                            uuid) were not met:
+                            libxml-2.0) were not met:
 
 $LIBGUPNP_PKG_ERRORS
 

File Added: pkgsrc/net/gupnp/patches/Attic/patch-ad
$NetBSD: patch-ad,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

--- libgupnp/gupnp-service.c.orig	2009-06-02 14:10:25.000000000 +0200
+++ libgupnp/gupnp-service.c
@@ -30,7 +30,11 @@
 #include <gobject/gvaluecollector.h>
 #include <gmodule.h>
 #include <libsoup/soup-date.h>
+#if defined(__NetBSD__)
+#include <uuid.h>
+#else
 #include <uuid/uuid.h>
+#endif
 #include <string.h>
 #include "gupnp-service.h"
 #include "gupnp-root-device.h"
@@ -843,9 +847,19 @@ generate_sid (void)
 {
         uuid_t id;
         char out[39];
-
+#if defined(__NetBSD__)
+	char *myout;
+#endif
+
+#if defined(__NetBSD__)
+	uuid_create(&id, 0);
+	uuid_to_string(&id, &myout, 0);
+	strncpy(out, myout, sizeof(out));
+	free(myout);
+#else
         uuid_generate (id);
         uuid_unparse (id, out);
+#endif
 
         return g_strdup_printf ("uuid:%s", out);
 }

File Added: pkgsrc/net/gupnp/patches/Attic/patch-ae
$NetBSD: patch-ae,v 1.1.1.1 2009/08/02 11:35:26 drochner Exp $

--- gupnp-1.0.pc.in.orig	2009-04-30 13:54:20.000000000 +0200
+++ gupnp-1.0.pc.in
@@ -9,4 +9,4 @@ Version: @VERSION@
 Libs: -L${libdir} -lgupnp-1.0
 Cflags: -I${includedir}/gupnp-1.0
 Requires: gssdp-1.0 libxml-2.0 libsoup-2.4
-Requires.Private: uuid gmodule-2.0
+Requires.Private: gmodule-2.0