From 102e3d98dc0e9bd663cfa3ec669c625b7d50e27f Mon Sep 17 00:00:00 2001 From: Mrowqa Date: Sat, 21 Dec 2013 14:51:02 +0100 Subject: [PATCH] Added recipe file for gloox library --- net-libs/gloox/gloox-1.0.9.recipe | 84 ++++++++++++++++++++++ net-libs/gloox/patches/gloox-1.0.9.patch | 90 ++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 net-libs/gloox/gloox-1.0.9.recipe create mode 100644 net-libs/gloox/patches/gloox-1.0.9.patch diff --git a/net-libs/gloox/gloox-1.0.9.recipe b/net-libs/gloox/gloox-1.0.9.recipe new file mode 100644 index 000000000..97a93298b --- /dev/null +++ b/net-libs/gloox/gloox-1.0.9.recipe @@ -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 + " diff --git a/net-libs/gloox/patches/gloox-1.0.9.patch b/net-libs/gloox/patches/gloox-1.0.9.patch new file mode 100644 index 000000000..efa188d33 --- /dev/null +++ b/net-libs/gloox/patches/gloox-1.0.9.patch @@ -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 ++#endif ++ ++#if defined HAVE_WCHAR_H ++#include ++#endif + ++#if __GNUC__ > 3 ++#include ++#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 ++#endif ++ ++#if defined HAVE_WCHAR_H ++#include ++#endif + ++#if __GNUC__ > 3 ++#include ++#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 ++#endif ++ ++#if defined HAVE_WCHAR_H ++#include ++#endif ++ ++#if __GNUC__ > 3 ++#include ++#endif + + #include "config.h" +