import gssdp 0.10.0

GObject-based API for handling resource discovery and announcement over
SSDP.

ok aja@
This commit is contained in:
jasper 2011-07-04 15:18:31 +00:00
parent 0e1fe19b8a
commit fc945fa436
7 changed files with 181 additions and 0 deletions

38
net/gssdp/Makefile Normal file
View File

@ -0,0 +1,38 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $
COMMENT= API for handling SSDP resource discovery and announcement
GNOME_PROJECT= gssdp
GNOME_VERSION= 0.10.0
SHARED_LIBS += gssdp-1.0 0.0 # 2.0
CATEGORIES= net devel
# LGPLv2
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
MODULES= devel/gettext \
x11/gnome
WANTLIB += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 c cairo
WANTLIB += drm expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
WANTLIB += gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pcre pixman-1 png pthread pthread-stubs soup-2.4 xcb
WANTLIB += xcb-render xcb-shm xml2 z
BUILD_DEPENDS= devel/gobject-introspection
LIB_DEPENDS= devel/libsoup \
x11/gtk+2
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-introspection \
--disable-gtk-doc
.include <bsd.port.mk>

5
net/gssdp/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (gssdp-0.10.0.tar.bz2) = ve1Y0lN2Qg1JxC5pHdwlLA==
RMD160 (gssdp-0.10.0.tar.bz2) = Ply7eD38RwgfhJR2BnpRrudsJ0w=
SHA1 (gssdp-0.10.0.tar.bz2) = ZkV5wkZhkh6oS0w6HXJ9N+1FMUo=
SHA256 (gssdp-0.10.0.tar.bz2) = xA9CVVCQu1T5F1g3yGpEchA44VzVqH5bsT7D1k+1rec=
SIZE (gssdp-0.10.0.tar.bz2) = 300952

View File

@ -0,0 +1,62 @@
$OpenBSD: patch-libgssdp_gssdp-socket-functions_c,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $
From 31c9cabc36c6959ef43be63af047c9b6f8490632 Mon Sep 17 00:00:00 2001
From: Jens Georg <mail@jensge.org>
Date: Thu, 30 Jun 2011 21:51:11 +0200
Subject: [PATCH] Fix functionality on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=653775
--- libgssdp/gssdp-socket-functions.c.orig Wed Dec 1 16:07:59 2010
+++ libgssdp/gssdp-socket-functions.c Mon Jul 4 15:58:37 2011
@@ -90,8 +90,13 @@ gssdp_socket_option_set (GSocket *socket,
gboolean
gssdp_socket_enable_loop (GSocket *socket,
- gboolean enable,
+ gboolean _enable,
GError **error) {
+#if defined(__OpenBSD__)
+ guint8 enable = (guint8) _enable;
+#else
+ gboolean enable = _enable;
+#endif
return gssdp_socket_option_set (socket,
IPPROTO_IP,
IP_MULTICAST_LOOP,
@@ -102,8 +107,13 @@ gssdp_socket_enable_loop (GSocket *socket,
gboolean
gssdp_socket_set_ttl (GSocket *socket,
- int ttl,
+ int _ttl,
GError **error) {
+#if defined(__OpenBSD__)
+ guint8 ttl = (guint8) _ttl;
+#else
+ int ttl = _ttl;
+#endif
return gssdp_socket_option_set (socket,
IPPROTO_IP,
IP_MULTICAST_TTL,
@@ -143,14 +153,19 @@ gssdp_socket_mcast_interface_set (GSocket *socket
error);
}
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(__OpenBSD__)
gboolean
gssdp_socket_reuse_address (GSocket *socket,
gboolean enable,
GError **error) {
return gssdp_socket_option_set (socket,
SOL_SOCKET,
+#if defined(__OpenBSD__)
+ SO_REUSEPORT,
+#else
SO_REUSEADDR,
+#endif
+
(char *) &enable,
sizeof (enable),
error);

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-libgssdp_gssdp-socket-source_c,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $
From 31c9cabc36c6959ef43be63af047c9b6f8490632 Mon Sep 17 00:00:00 2001
From: Jens Georg <mail@jensge.org>
Date: Thu, 30 Jun 2011 21:51:11 +0200
Subject: [PATCH] Fix functionality on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=653775
From 8fb19991b891f3244367895db8935c51e331fe26 Mon Sep 17 00:00:00 2001
From: Jens Georg <mail@jensge.org>
Date: Thu, 30 Jun 2011 13:43:53 +0000
Subject: Add missing goto on error while setting TTL
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=653733
--- libgssdp/gssdp-socket-source.c.orig Mon Jul 4 15:58:35 2011
+++ libgssdp/gssdp-socket-source.c Mon Jul 4 15:58:37 2011
@@ -212,6 +212,7 @@ gssdp_socket_source_do_init (GInitable *initable,
inner_error,
"Failed to set TTL");
+ goto error;
}
/* Set up additional things according to the type of socket desired */
if (self->priv->type == GSSDP_SOCKET_SOURCE_TYPE_MULTICAST) {
@@ -250,7 +251,7 @@ gssdp_socket_source_do_init (GInitable *initable,
SSDP_PORT);
}
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined (__OpenBSD__)
/* normally g_socket_bind does this, but it is disabled on
* windows since SO_REUSEADDR has different semantics
* there. Nevertheless, there's no way without for

2
net/gssdp/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
GObject-based API for handling resource discovery and announcement over
SSDP.

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $
@lib lib/libgssdp-1.0.so.${LIBgssdp-1.0_VERSION}

37
net/gssdp/pkg/PLIST Normal file
View File

@ -0,0 +1,37 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $
%%SHARED%%
@bin bin/gssdp-device-sniffer
include/gssdp-1.0/
include/gssdp-1.0/libgssdp/
include/gssdp-1.0/libgssdp/gssdp-client.h
include/gssdp-1.0/libgssdp/gssdp-error.h
include/gssdp-1.0/libgssdp/gssdp-resource-browser.h
include/gssdp-1.0/libgssdp/gssdp-resource-group.h
include/gssdp-1.0/libgssdp/gssdp.h
lib/girepository-1.0/
lib/girepository-1.0/GSSDP-1.0.typelib
lib/libgssdp-1.0.a
lib/libgssdp-1.0.la
lib/pkgconfig/
lib/pkgconfig/gssdp-1.0.pc
share/gir-1.0/
share/gir-1.0/GSSDP-1.0.gir
share/gssdp/
share/gssdp/gssdp-device-sniffer.ui
share/gtk-doc/
share/gtk-doc/html/
share/gtk-doc/html/gssdp/
share/gtk-doc/html/gssdp/GSSDPClient.html
share/gtk-doc/html/gssdp/GSSDPResourceBrowser.html
share/gtk-doc/html/gssdp/GSSDPResourceGroup.html
share/gtk-doc/html/gssdp/ch01.html
share/gtk-doc/html/gssdp/gssdp-Error-codes.html
share/gtk-doc/html/gssdp/gssdp.devhelp
share/gtk-doc/html/gssdp/gssdp.devhelp2
share/gtk-doc/html/gssdp/home.png
share/gtk-doc/html/gssdp/index.html
share/gtk-doc/html/gssdp/index.sgml
share/gtk-doc/html/gssdp/left.png
share/gtk-doc/html/gssdp/right.png
share/gtk-doc/html/gssdp/style.css
share/gtk-doc/html/gssdp/up.png