commit:     d5603fb21d4c3303aa29e3b1641d9349ec21628c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 13:24:03 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 13:26:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5603fb2

net-dns/c-ares-1.32.2: fix for Darwin

macOS system headers are a bit messy nowadays, provide workaround for
missing bool definition and disable non-Prefix system integration

Closes: https://bugs.gentoo.org/935818
Closes: https://bugs.gentoo.org/932809
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 net-dns/c-ares/c-ares-1.32.2.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/net-dns/c-ares/c-ares-1.32.2.ebuild 
b/net-dns/c-ares/c-ares-1.32.2.ebuild
index d6ad901bd330..64e6e1c4f5b7 100644
--- a/net-dns/c-ares/c-ares-1.32.2.ebuild
+++ b/net-dns/c-ares/c-ares-1.32.2.ebuild
@@ -48,6 +48,20 @@ A__QA_CONFIG_IMPL_DECL_SKIP=(
        ConvertInterfaceLuidToNameA
 )
 
+src_prepare() {
+       default
+
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # warnings are default, but enable -std=c90 which doesn't define
+               # 'bool' which is a type used/assumed in macOS system headers
+               sed -i -e 's/-std=c90/& -Dbool=int/' configure{.ac,} || die
+               # sysconfig integration requires deep framework compatibility
+               # and is not really desired in Prefix
+               sed -i -e 's/__APPLE__/__DISABLED__/' \
+                       src/lib/ares_sysconfig_mac.c || die
+       fi
+}
+
 multilib_src_configure() {
        local myeconfargs=(
                --enable-symbol-hiding

Reply via email to