From 4333d7be1c7182f9561357a5d0976941c61fffc1 Mon Sep 17 00:00:00 2001 From: John Regan Date: Sun, 7 Feb 2016 08:55:21 -0600 Subject: [PATCH] Postfix: enable build on musl --- srcpkgs/postfix/patches/fix-building-on-musl.patch | 13 +++++++++++++ srcpkgs/postfix/template | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/postfix/patches/fix-building-on-musl.patch diff --git a/srcpkgs/postfix/patches/fix-building-on-musl.patch b/srcpkgs/postfix/patches/fix-building-on-musl.patch new file mode 100644 index 00000000000..2dc55dc5ae5 --- /dev/null +++ b/srcpkgs/postfix/patches/fix-building-on-musl.patch @@ -0,0 +1,13 @@ +diff --git src/util/sys_defs.h src/util/sys_defs.h +index 5b381af..416676e 100644 +--- src/util/sys_defs.h ++++ src/util/sys_defs.h +@@ -812,7 +812,7 @@ extern int initgroups(const char *, int); + #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) + #endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \ +- || (__GLIBC__ < 2) ++ || (defined(__GLIBC__) && (__GLIBC__ < 2)) + #define CANT_USE_SEND_RECV_MSG + #define DEF_SMTP_CACHE_DEMAND 0 + #else diff --git a/srcpkgs/postfix/template b/srcpkgs/postfix/template index d3ffa01b815..f937e1c26d2 100644 --- a/srcpkgs/postfix/template +++ b/srcpkgs/postfix/template @@ -1,7 +1,7 @@ # Template file for 'postfix' pkgname=postfix version=3.0.3 -revision=2 +revision=3 short_desc="High-performance mail transport agent" maintainer="Juan RP " license="IBM Public License 1.0, BSD-alike" @@ -18,6 +18,10 @@ if [ "$CROSS_BUILD" ]; then hostmakedepends+=" ${pkgname}" fi +case "${XBPS_TARGET_MACHINE}" in + *-musl) CFLAGS+=" -DNO_NIS" ;; +esac + system_accounts="postfix" postfix_homedir="/var/spool/postfix" system_groups="postdrop"