Files
haikuports/net-dns/c_ares/c_ares-1.13.0.recipe
2018-05-30 07:08:12 +02:00

86 lines
2.2 KiB
Bash

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="https://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="2"
SOURCE_URI="https://c-ares.haxx.se/download/c-ares-$portVersion.tar.gz"
CHECKSUM_SHA256="03f708f1b14a26ab26c38abd51137640cb444d3ec72380b21b20f1a8d2861da7"
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.2.0 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.2.0 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
}