mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
115 lines
2.9 KiB
Bash
115 lines
2.9 KiB
Bash
SUMMARY="A C library for asynchronous DNS requests"
|
|
DESCRIPTION="c-ares is a modern DNS (stub) resolver library, written in C. \
|
|
It provides interfaces for asynchronous queries while trying to abstract the \
|
|
intricacies of the underlying DNS protocol. It was originally intended for \
|
|
applications which need to perform DNS queries without blocking, or need to \
|
|
perform multiple DNS queries in parallel."
|
|
HOMEPAGE="https://c-ares.org/"
|
|
COPYRIGHT="1998 Massachusetts Institute of Technology
|
|
2007 - 2023 Daniel Stenberg with many contributors"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/c-ares/c-ares/releases/download/v$portVersion/c-ares-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="912dd7cc3b3e8a79c52fd7fb9c0f4ecf0aaa73e45efda880266a2d6e26b84ef5"
|
|
SOURCE_DIR="c-ares-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="2.19.5"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
|
|
PROVIDES="
|
|
c_ares$secondaryArchSuffix = $portVersion compat >= 1
|
|
lib:libcares$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
c_ares${secondaryArchSuffix}_devel = $portVersion compat >= 1
|
|
devel:libcares$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
c_ares$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
c_ares${secondaryArchSuffix}_tools = $portVersion compat >= 1
|
|
cmd:adig$commandSuffix = $portVersion
|
|
cmd:ahost$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES_tools="
|
|
$REQUIRES
|
|
c_ares$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
# _tools was built on gcc2 before.
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
REPLACES_tools="c_ares_tools"
|
|
fi
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgtest$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
defineDebugInfoPackage c_ares$secondaryArchSuffix \
|
|
"$libDir"/libcares.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
|
-DCARES_BUILD_TESTS=ON \
|
|
-Wno-dev
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLib libcares
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake \
|
|
$manDir/man3
|
|
|
|
packageEntries tools \
|
|
$documentationDir \
|
|
$commandBinDir
|
|
}
|
|
|
|
# Reference results from x86 32 bits, hrev589999:
|
|
#[==========] 977 tests from 38 test suites ran. (65354 ms total)
|
|
#[ PASSED ] 974 tests.
|
|
#[ FAILED ] 3 tests, listed below:
|
|
#[ FAILED ] DefaultChannelTest.LiveGetNameInfoV6LinkLocal
|
|
#[ FAILED ] DefaultChannelTest.LiveGetNameInfoV6LinkLocal_virtualized
|
|
#[ FAILED ] TransportModes/ServerFailoverOptsMockEventThreadTest.ServerFailoverOpts/POLL_ipv6_DefaultUDP, where GetParam() = (4, 5, false)
|
|
TEST()
|
|
{
|
|
build$commandBinDir/arestest
|
|
}
|