summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWynn Wolf Arbor <wolf@oriole.systems>2020-06-09 16:12:24 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-06-28 13:40:58 +0300
commit874649cd8388e2959d55ab0eb51cc4654ce86837 (patch)
tree588c064adcc0b73383a3a2329340bcc183f27a01 /mail-filter/libmilter
parentapp-admin/syslog-summary: remove file magic dep (diff)
downloadgentoo-874649cd8388e2959d55ab0eb51cc4654ce86837.tar.gz
gentoo-874649cd8388e2959d55ab0eb51cc4654ce86837.tar.bz2
gentoo-874649cd8388e2959d55ab0eb51cc4654ce86837.zip
mail-filter/libmilter: Fix build on musl
The build on musl currently fails in two different places. Firstly, the sys/cdefs.h header is not available on musl. sendmail already includes all necessary compatibility definitions for cdefs.h in its 'libsm' library, but these are turned off through a platform specific header file when building on Linux. Since gcc processes -include options after all -D or -U options, we can't simply pass '-DSM_CONF_SYS_CDEFS_H=0' in the ebuild. Instead, for now, patch the Linux platform header file directly. Secondly, musl does not include the getipnodeby* function family. Pass '-DNEEDSGETIPNODE' to fix this. Closes: https://bugs.gentoo.org/712628 Signed-off-by: Wynn Wolf Arbor <wolf@oriole.systems> Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'mail-filter/libmilter')
-rw-r--r--mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch11
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2_p1.ebuild6
2 files changed, 17 insertions, 0 deletions
diff --git a/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
new file mode 100644
index 000000000000..6dc4ac63105e
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
@@ -0,0 +1,11 @@
+--- a/include/sm/os/sm_os_linux.h 2020-06-09 11:57:46.789786561 +0200
++++ b/include/sm/os/sm_os_linux.h 2020-06-09 11:57:49.174781812 +0200
+@@ -33,7 +33,7 @@
+ # endif /* LINUX_VERSION_CODE */
+ #endif /* SM_CONF_SHM */
+
+-#define SM_CONF_SYS_CDEFS_H 1
++#define SM_CONF_SYS_CDEFS_H 0
+ #ifndef SM_CONF_SEM
+ # define SM_CONF_SEM 2
+ #endif /* SM_CONF_SEM */
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
index f2d436b1e73d..e197eb05925d 100644
--- a/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
+++ b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
@@ -42,6 +42,12 @@ src_prepare() {
use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1"
+ if use elibc_musl; then
+ use ipv6 && ENVDEF="${ENVDEF} -DNEEDSGETIPNODE"
+
+ eapply "${FILESDIR}/${PN}-musl-disable-cdefs.patch"
+ fi
+
sed -e "s|@@CFLAGS@@|${CFLAGS}|" \
-e "s:@@LDFLAGS@@:${LDFLAGS}:" \
-e "s:@@CC@@:${CC}:" \