c-ares: update to version 1.34.5. (#12833)

* c-ares: update to version 1.34.5.

* c-ares: drop gcc2 packages.
This commit is contained in:
OscarL
2025-09-09 11:42:39 -03:00
committed by GitHub
parent 95163a562e
commit 84ca5adbc0
3 changed files with 114 additions and 135 deletions

View File

@@ -1,114 +0,0 @@
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-2018 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="321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e"
SOURCE_DIR="c-ares-$portVersion"
PATCHES="c_ares-$portVersion.patchset"
ARCHITECTURES="all x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="2.6.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
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
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES_tools="
c_ares${secondaryArchSuffix}_tools = $portVersion compat >= 1
cmd:acountry$secondaryArchSuffix = $portVersion
cmd:adig$secondaryArchSuffix = $portVersion
cmd:ahost$secondaryArchSuffix = $portVersion
"
REQUIRES_tools="$REQUIRES
c_ares$secondaryArchSuffix == $portVersion base
"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage c_ares$secondaryArchSuffix \
"$libDir"/libcares.so.$libVersion
BUILD()
{
if [ "$targetArchitecture" = x86_gcc2 ]; then
tests=OFF
else
tests=ON
fi
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE='RelWithDebInfo' \
$cmakeDirArgs \
-DCARES_BUILD_TESTS=$tests \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libcares
fixPkgconfig
packageEntries devel \
"$developDir" \
"$libDir/cmake" \
"$manDir/man3"
if [ -z "$secondaryArchSuffix" ]; then
packageEntries tools \
"$documentationDir" \
"$binDir"
fi
if [ -n "$secondaryArchSuffix" ]; then
rm -rf "$documentationDir" "$binDir"
fi
}
TEST()
{
# [==========] 498 tests from 23 test suites ran. (307376 ms total)
# [ PASSED ] 390 tests.
# [ FAILED ] 108 tests, listed below:
build/bin/arestest
}

View File

@@ -0,0 +1,114 @@
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="7d935790e9af081c25c495fd13c2cfcda4792983418e96358ef6e7320ee06346"
SOURCE_DIR="c-ares-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.19.4"
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
}

View File

@@ -1,21 +0,0 @@
From e2f7247024986c5431fe70be12889108b1937397 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 9 Jun 2023 12:28:17 +0200
Subject: Fix missing prefix for pkgconfig file
diff --git a/libcares.pc.cmake b/libcares.pc.cmake
index f1213cf..1c32f2f 100644
--- a/libcares.pc.cmake
+++ b/libcares.pc.cmake
@@ -4,6 +4,7 @@
# | (_|_____| (_| | | | __/\__ \
# \___| \__,_|_| \___||___/
#
+prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_FULL_BINDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
--
2.37.3