Added recipe and patch for libnice.

This commit is contained in:
Steven Kou
2015-12-27 00:36:54 +00:00
parent 67fc7ce756
commit b8ea14288c
2 changed files with 162 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
SUMMARY="A library for establishing peer-to-peer UDP data streams"
DESCRIPTION="Libnice is an implementation of the IETF's Interactive \
Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal \
Utilities for NAT (STUN) standard (RFC 5389).
ICE is useful for applications that want to establish peer-to-peer UDP \
data streams. It automates the process of traversing NATs and provides \
security against some attackes. It also allows applications to create \
reliable streams using a TCP over UDP layer."
HOMEPAGE="http://nice.freedesktop.org/wiki"
COPYRIGHT="2006-2011 Collabora Ltd.
2006-2011 Nokia Corporation"
LICENSE="MPL v1.1
GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="http://nice.freedesktop.org/releases/libnice-0.1.13.tar.gz"
CHECKSUM_SHA256="61112d9f3be933a827c8365f20551563953af6718057928f51f487bfe88419e1"
PATCHES="libnice-0.1.13.patchset"
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libnice$secondaryArchSuffix = $portVersion
lib:libnice$secondaryArchSuffix = $portVersion
lib:libstun$secondaryArchSuffix = $portVersion
cmd:sdp_example$secondaryArchSuffix = $portVersion
cmd:simple_example$secondaryArchSuffix = $portVersion
cmd:stunbdc$secondaryArchSuffix = $portVersion
cmd:stund$secondaryArchSuffix = $portVersion
cmd:threaded_example$secondaryArchSuffix = $portVersion
"
PROVIDES_devel="
libnice${secondaryArchSuffix}_devel = $portVersion
devel:libnice$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgio_2.0$secondaryArchSuffix
lib:libgmodule_2.0$secondaryArchSuffix
lib:libz_2.0$secondaryArchSuffix
lib:libgobject_2.0$secondaryArchSuffix
lib:libffi_2.0$secondaryArchSuffix
lib:libgthread_2.0$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libintl_2.0$secondaryArchSuffix
lib:libiconv_2.0$secondaryArchSuffix
"
REQUIRES_devel="
libnice$secondaryArchSuffix == $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libglib_2.0$secondaryArchSuffix
devel:libgio_2.0$secondaryArchSuffix
devel:libgmodule_2.0$secondaryArchSuffix
devel:libgobject_2.0$secondaryArchSuffix
devel:libgthread_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:gtkdocize
cmd:aclocal
cmd:libtoolize
cmd:ld$secondaryArchSuffix
"
BUILD()
{
CFLAGS="-D_BSD_SOURCE" runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libnice
fixPkgconfig
packageEntries devel $developDir
}

View File

@@ -0,0 +1,78 @@
From eb06445b68534c827944fe5a7e741dd15f441cc7 Mon Sep 17 00:00:00 2001
From: Steven Kou <kouyongkang@gmail.com>
Date: Mon, 28 Dec 2015 00:20:46 +0000
Subject: Patched configure.ac to search for socket under network.
diff --git a/configure.ac b/configure.ac
index 223b883..3c279e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,10 +164,10 @@ AS_IF([test "x$enable_compile_warnings" = "xerror"],[
])
#
-# Fixes for Solaris
+# Fixes for Solaris and Haiku
#
AC_SEARCH_LIBS([inet_pton],[nsl])
-AC_SEARCH_LIBS([socket],[socket inet])
+AC_SEARCH_LIBS([socket],[socket inet network])
case $host in
*-*-solaris* )
AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
--
2.2.2
From 1d53cba7655e887f810ef5c5faa5730321f10653 Mon Sep 17 00:00:00 2001
From: Steven Kou <kouyongkang@gmail.com>
Date: Mon, 28 Dec 2015 00:24:06 +0000
Subject: Patched agent/interfaces.c to compile under Haiku.
diff --git a/agent/interfaces.c b/agent/interfaces.c
index 0fa2fd7..0fe034f 100644
--- a/agent/interfaces.c
+++ b/agent/interfaces.c
@@ -46,7 +46,7 @@
#include "interfaces.h"
#include "agent-priv.h"
-#ifdef G_OS_UNIX
+#if defined(G_OS_UNIX) || defined(G_OS_HAIKU)
#include <stdio.h>
#include <stdlib.h>
@@ -60,7 +60,7 @@
#include <netinet/in.h>
#include <netdb.h>
-#ifdef __sun
+#if defined(__sun) || defined(G_OS_HAIKU)
#include <sys/sockio.h>
#endif
@@ -73,8 +73,8 @@
#endif /* G_OS_UNIX */
-#if (defined(G_OS_UNIX) && defined(HAVE_GETIFADDRS)) || defined(G_OS_WIN32)
-/* Works on both UNIX and Windows. Magic! */
+#if ((defined(G_OS_UNIX) || defined(G_OS_HAIKU)) && defined(HAVE_GETIFADDRS)) || defined(G_OS_WIN32)
+/* Works on both UNIX/Haiku and Windows. Magic! */
static gchar *
sockaddr_to_string (const struct sockaddr *addr)
{
@@ -97,7 +97,7 @@ sockaddr_to_string (const struct sockaddr *addr)
}
#endif
-#ifdef G_OS_UNIX
+#if defined(G_OS_UNIX) || defined(G_OS_HAIKU)
#ifdef HAVE_GETIFADDRS
--
2.2.2