Added recipe file for gloox library

This commit is contained in:
Mrowqa
2013-12-21 14:51:02 +01:00
parent 6f7420b318
commit 102e3d98dc
2 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
DESCRIPTION="
Rock-solid, full-featured Jabber/XMPP client library, written in clean
ANSI C++
"
SUMMARY="Full-featured Jabber/XMPP client library, written in clean ANSI C++"
HOMEPAGE="http://camaya.net/gloox/"
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2012 Jakob Schröter"
SRC_URI="http://camaya.net/download/gloox-1.0.9.tar.bz2"
CHECKSUM_MD5="48fc9aa5210c2a1ce253751a4d38e19c"
REVISION="1"
ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
PATCHES="gloox-1.0.9.patch"
PROVIDES="
gloox$secondaryArchSuffix = $portVersion
lib:libgloox$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libssl$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libssl$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
openssl$secondaryArchSuffix
openssl${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:libtoolize
cmd:aclocal
cmd:autoconf
cmd:automake
"
BUILD()
{
libtoolize --force --copy --install
aclocal
autoconf
automake
runConfigure ./configure
make
}
INSTALL()
{
make install
# prepare development lib links
prepareInstalledDevelLib libgloox
# devel package
packageEntries devel $developDir
}
TEST()
{
make check
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
gloox${secondaryArchSuffix}_devel = $portVersion
devel:gloox$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
gloox$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,90 @@
diff --git a/configure.ac b/configure.ac
index 402c399..20555ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR(src/gloox.cpp)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
-AM_CONFIG_HEADER(config.h.unix)
+AC_CONFIG_HEADER(config.h.unix)
AC_SUBST(VERSION)
@@ -326,8 +326,8 @@ AC_MSG_RESULT($getaddrinfo)
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(unistd.h strings.h errno.h arpa/nameser.h)
-AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)])
+AC_CHECK_HEADERS(unistd.h wchar.h string.h cstring.h strings.h errno.h arpa/nameser.h)
+AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(network,setsockopt)])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
diff --git a/src/connectiontcpbase.cpp b/src/connectiontcpbase.cpp
index 2da70c0..b28f8e8 100644
--- a/src/connectiontcpbase.cpp
+++ b/src/connectiontcpbase.cpp
@@ -10,7 +10,17 @@
This software is distributed without any warranty.
*/
+#if defined HAVE_STRING_H
+#include <string.h>
+#endif
+
+#if defined HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#if __GNUC__ > 3
+#include <cstring>
+#endif
#include "gloox.h"
diff --git a/src/connectiontcpserver.cpp b/src/connectiontcpserver.cpp
index 68c8f7b..236ce8e 100644
--- a/src/connectiontcpserver.cpp
+++ b/src/connectiontcpserver.cpp
@@ -10,7 +10,17 @@
This software is distributed without any warranty.
*/
+#if defined HAVE_STRING_H
+#include <string.h>
+#endif
+
+#if defined HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+#if __GNUC__ > 3
+#include <cstring>
+#endif
#include "gloox.h"
diff --git a/src/dns.cpp b/src/dns.cpp
index fd72c57..e03d99a 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -10,6 +10,17 @@
This software is distributed without any warranty.
*/
+#if defined HAVE_STRING_H
+#include <string.h>
+#endif
+
+#if defined HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+
+#if __GNUC__ > 3
+#include <cstring>
+#endif
#include "config.h"