From 313a7c107264edb9e01304036ba9e8b381dd0229 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Sat, 13 Jan 2018 15:51:45 -0500 Subject: [PATCH] mDNSResponder: update to 878.1.1 and fix build #10780 - Use byacc instead of bison - Explicitly set OPTIONALTARG to extra targets and set BISON to byacc - Add patch to fix builds on musl by defining missing type and constants --- srcpkgs/mDNSResponder/patches/musl.patch | 22 ++++++++++++++++++++++ srcpkgs/mDNSResponder/template | 8 ++++---- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/mDNSResponder/patches/musl.patch diff --git a/srcpkgs/mDNSResponder/patches/musl.patch b/srcpkgs/mDNSResponder/patches/musl.patch new file mode 100644 index 00000000000..87781fc275a --- /dev/null +++ b/srcpkgs/mDNSResponder/patches/musl.patch @@ -0,0 +1,22 @@ +--- ./mDNSPosix/nss_mdns.c ++++ ./mDNSPosix/nss_mdns.c +@@ -379,7 +379,19 @@ + #define ENTNAME hostent + #define DATABASE "hosts" + ++#ifdef __GLIBC__ + #include ++#else ++enum nss_status ++{ ++ NSS_STATUS_TRYAGAIN = -2, ++ NSS_STATUS_UNAVAIL, ++ NSS_STATUS_NOTFOUND, ++ NSS_STATUS_SUCCESS, ++ NSS_STATUS_RETURN ++}; ++#define NETDB_INTERNAL NULL ++#endif + // For nss_status + #include + // For hostent diff --git a/srcpkgs/mDNSResponder/template b/srcpkgs/mDNSResponder/template index 71221049cff..070950e5f56 100644 --- a/srcpkgs/mDNSResponder/template +++ b/srcpkgs/mDNSResponder/template @@ -1,14 +1,14 @@ # Template file for 'mDNSResponder' pkgname=mDNSResponder -version=567 +version=878.1.1 revision=1 -hostmakedepends="flex" +hostmakedepends="flex byacc" short_desc="Implements the Bonjour/Zeroconf protocol" maintainer="Juan RP " license="Apache-2.0, 3-clause-BSD" homepage="http://opensource.apple.com/" distfiles="http://opensource.apple.com/tarballs/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=3239d9bb1e1e017be1ae12cff90802194b6e0312de628a1f324530b00b833018 +checksum=655e83a78796cb7e944a05111d980617afa290e238e7ce26647105f3ab4461ee conf_files="/etc/nss_mdns.conf" conflicts="nss-mdns>=0" @@ -17,7 +17,7 @@ do_build() { sed -i "s,cc ,$CC ,g" Clients/Makefile cd mDNSPosix sed -i 's,/var/run,/run,g' Makefile - make os=linux HAVE_IPV6=1 CC=$CC LD="$CC -shared $LDFLAGS" CFLAGS_DEBUG="$CFLAGS $CPPFLAGS" STRIP=echo + make os=linux HAVE_IPV6=1 CC=$CC LD="$CC -shared $LDFLAGS" CFLAGS_DEBUG="$CFLAGS $CPPFLAGS" STRIP=echo OPTIONALTARG="dnsextd nss_mdns" BISON=byacc } do_install() { cd mDNSPosix