c_ares, enable x86_gcc2 for latest version, remove old (#8278)

This commit is contained in:
Schrijvers Luc
2023-04-04 16:20:16 +02:00
committed by GitHub
parent 4fe9972bc4
commit 9b34bc33eb
3 changed files with 8 additions and 156 deletions

View File

@@ -1,81 +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-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="3"
SOURCE_URI="http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz"
CHECKSUM_SHA256="3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db"
SOURCE_DIR="c-ares-1.10.0"
PATCHES="c_ares-1.10.0.patchset"
ARCHITECTURES="all"
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
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
}

View File

@@ -14,13 +14,13 @@ COPYRIGHT="2004-2018 by Daniel Stenberg et al
2012 Marko Kreen
2005 Dominick Meglio"
LICENSE="MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://c-ares.haxx.se/download/c-ares-$portVersion.tar.gz"
CHECKSUM_SHA256="1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf"
SOURCE_DIR="c-ares-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
ARCHITECTURES="all x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="2.5.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
@@ -59,9 +59,9 @@ defineDebugInfoPackage c_ares$secondaryArchSuffix \
BUILD()
{
cmake $cmakeDirArgs \
-DCMAKE_BUILD_TYPE='RelWithDebInfo' \
-Wno-dev -B build -S .
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE='RelWithDebInfo' \
$cmakeDirArgs \
-Wno-dev
make -C build $jobArgs
}
@@ -69,10 +69,11 @@ INSTALL()
{
make -C build install
prepareInstalledDevelLibs libcares
prepareInstalledDevelLib libcares
fixPkgconfig
packageEntries devel \
"$developDir" \
"$libDir/cmake" \
"$manDir/man3"
}

View File

@@ -1,68 +0,0 @@
From 0c1419ef8f9f44505eb183e8548d90542ddc7de1 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
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 <sys/select.h>
#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 <cpr420@gmail.com>
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