From 45dfa333221675d41193580eb0e12f8c1070e6cd Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 26 Feb 2016 18:43:46 +0000 Subject: [PATCH] c_ares: add recipe for version 1.11.0 --- net-dns/c_ares/c_ares-1.11.0.recipe | 85 +++++++++++++++++++ net-dns/c_ares/patches/c_ares-1.11.0.patchset | 68 +++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 net-dns/c_ares/c_ares-1.11.0.recipe create mode 100644 net-dns/c_ares/patches/c_ares-1.11.0.patchset diff --git a/net-dns/c_ares/c_ares-1.11.0.recipe b/net-dns/c_ares/c_ares-1.11.0.recipe new file mode 100644 index 000000000..b43060943 --- /dev/null +++ b/net-dns/c_ares/c_ares-1.11.0.recipe @@ -0,0 +1,85 @@ +SUMMARY="A C library for asynchronous DNS requests" +DESCRIPTION="This is c-ares, an asynchronous resolver library. It is intended \ +for applications which need to perform DNS queries without blocking, or need \ +to perform multiple DNS queries in parallel. The primary examples of such \ +applications are servers which communicate with multiple clients and programs \ +with graphical user interfaces." +HOMEPAGE="http://c-ares.haxx.se/" +COPYRIGHT=" 2004-2013 by Daniel Stenberg et al + 1998-2013 by the Massachusetts Institute of Technology + 1987-2001 The Regents of the University of California + 1996-2004 by Internet Software Consortium + 2009 by Jakub Hrozek + 2010 Jeremy Lal + 2012 Marko Kreen + 2005 Dominick Meglio" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="http://c-ares.haxx.se/download/c-ares-$portVersion.tar.gz" +CHECKSUM_SHA256="b3612e6617d9682928a1d50c1040de4db6519f977f0b25d40cf1b632900b3efd" +SOURCE_DIR="c-ares-$portVersion" +PATCHES="c_ares-$portVersion.patchset" + +ARCHITECTURES="x86 !x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86 !x86_gcc2" + +PROVIDES=" + c_ares$secondaryArchSuffix = $portVersion compat >= 1 + lib:libcares$secondaryArchSuffix = 2.1 compat >= 2 + " +if [ -z "$secondaryArchSuffix" ]; then + PROVIDES="$PROVIDES + cmd:ahost$secondaryArchSuffix = $portVersion compat >= 1 + cmd:adig$secondaryArchSuffix = $portVersion compat >= 1 + cmd:acountry$secondaryArchSuffix = $portVersion compat >= 1 + " +fi + +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + c_ares${secondaryArchSuffix}_devel = $portVersion compat >= 1 + devel:libcares$secondaryArchSuffix = 2.1 compat >= 2 + " +REQUIRES_devel=" + c_ares$secondaryArchSuffix == $portVersion + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + " + +BUILD() +{ + autoconf + runConfigure ./configure + make +} + +INSTALL() +{ + make install + + # remove libtool file + rm $libDir/libcares.la + + prepareInstalledDevelLibs libcares + fixPkgconfig + packageEntries devel $developDir \ + $manDir/man3 + + if [ -z "$secondaryArchSuffix" ]; then + mkdir -p $binDir + cp -af .libs/ahost .libs/adig .libs/acountry $binDir + mkdir -p $manDir/man1 + cp -af ahost.1 adig.1 acountry.1 $manDir/man1 + fi +} diff --git a/net-dns/c_ares/patches/c_ares-1.11.0.patchset b/net-dns/c_ares/patches/c_ares-1.11.0.patchset new file mode 100644 index 000000000..7b3a159a6 --- /dev/null +++ b/net-dns/c_ares/patches/c_ares-1.11.0.patchset @@ -0,0 +1,68 @@ +From 0c1419ef8f9f44505eb183e8548d90542ddc7de1 Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Wed, 30 Oct 2013 15:41:17 -0600 +Subject: applying patch c_ares-1.10.0.patch + + +diff --git a/ares.h b/ares.h +index 9b3f376..b871032 100644 +--- a/ares.h ++++ b/ares.h +@@ -38,7 +38,7 @@ + require it! */ + #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ +- defined(ANDROID) || defined(__ANDROID__) ++ defined(ANDROID) || defined(__ANDROID__) || defined(__HAIKU__) + #include + #endif + #if (defined(NETWARE) && !defined(__NOVELL_LIBC__)) +diff --git a/ares_private.h b/ares_private.h +index ab5be5a..b884fda 100644 +--- a/ares_private.h ++++ b/ares_private.h +@@ -65,6 +65,11 @@ + + #define PATH_HOSTS "InetDBase:Hosts" + ++#elif defined(__HAIKU__) ++ ++#define PATH_RESOLV_CONF "/boot/system/settings/network/resolv.conf" ++#define PATH_HOSTS "/boot/system/settings/network/hosts" ++ + #else + + #define PATH_RESOLV_CONF "/etc/resolv.conf" +-- +1.8.3.4 + + +From 3287466624c281088ae83001e96e9391d0f5b97d Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Wed, 30 Oct 2013 15:52:39 -0600 +Subject: Search for libnetwork + + +diff --git a/configure.ac b/configure.ac +index 5c02450..423ce64 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -222,6 +222,15 @@ then + ]) + fi + ++if test "$HAVE_GETHOSTBYNAME" != "1" ++then ++ dnl gethostbyname in the network lib? ++ AC_CHECK_LIB(network, gethostbyname, ++ [HAVE_GETHOSTBYNAME="1" ++ LIBS="$LIBS -lnetwork" ++ ]) ++fi ++ + dnl At least one system has been identified to require BOTH nsl and socket + dnl libs at the same time to link properly. + if test "$HAVE_GETHOSTBYNAME" != "1" +-- +1.8.3.4 +