aboutsummaryrefslogtreecommitdiffstats
path: root/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-06-10 12:16:52 +0200
committerWynn Wolf Arbor2020-06-10 12:16:52 +0200
commit74066c403a6ee86ab6d97d0fbf91c457b726be6a (patch)
tree8f20313c33d7a3b03d8434c57b5791303ca5b740 /mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
parent0761346aaefa642b3b8008299bf6cc239fb53751 (diff)
downloadpramantha-74066c403a6ee86ab6d97d0fbf91c457b726be6a.tar.gz
mail-filter/libmilter: Add 1.0.2_p1
This ebuild contains fixes for musl-based systems. See [1]. [1] https://github.com/gentoo/gentoo/pull/16139 Package-Manager: Portage-2.3.99, Repoman-2.3.22
Diffstat (limited to 'mail-filter/libmilter/libmilter-1.0.2_p1.ebuild')
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2_p1.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
new file mode 100644
index 0000000..22db7ce
--- /dev/null
+++ b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs
+
+# This library is part of sendmail, but it does not share the version number with it.
+# In order to find the right libmilter version number, check SMFI_VERSION definition
+# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
+# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
+SENDMAIL_VER=8.15.2
+
+DESCRIPTION="The Sendmail Filter API (Milter)"
+HOMEPAGE="http://www.sendmail.org/"
+SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz"
+
+LICENSE="Sendmail"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
+IUSE="ipv6 poll"
+
+DEPEND="!mail-mta/sendmail
+ !mail-mta/sendmail"
+RDEPEND="!mail-mta/sendmail"
+
+S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
+
+# build system patch copied from sendmail ebuild
+# glibc patch from opensuse
+PATCHES=(
+ "${FILESDIR}/sendmail-8.14.6-build-system.patch"
+ "${FILESDIR}/${PN}-sharedlib.patch"
+ "${FILESDIR}/${PN}-glibc-2.30.patch"
+ )
+
+src_prepare() {
+ default
+
+ local CC="$(tc-getCC)"
+ local ENVDEF="-DNETUNIX -DNETINET"
+ 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-stack-size.patch"
+ eapply "${FILESDIR}/${PN}-musl-disable-cdefs.patch"
+ fi
+
+ sed -e "s|@@CFLAGS@@|${CFLAGS} -USM_CONF_SYS_CDEFS_H|" \
+ -e "s:@@LDFLAGS@@:${LDFLAGS}:" \
+ -e "s:@@CC@@:${CC}:" \
+ -e "s:@@ENVDEF@@:${ENVDEF}:" \
+ "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \
+ || die "failed to generate site.config.m4"
+}
+
+src_compile() {
+ pushd libmilter
+ emake -j1 MILTER_SOVER=${PV}
+ popd
+}
+
+src_install() {
+ local MY_LIBDIR=/usr/$(get_libdir)
+ dodir "${MY_LIBDIR}"
+ emake DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+ SBINOWN=root SBINGRP=0 UBINOWN=root UBINGRP=0 \
+ LIBOWN=root LIBGRP=0 GBINOWN=root GBINGRP=0 \
+ MANOWN=root MANGRP=0 INCOWN=root INCGRP=0 \
+ MSPQOWN=root CFOWN=root CFGRP=0 \
+ MILTER_SOVER=${PV} \
+ install -C obj.*/libmilter
+
+ dodoc libmilter/README
+ dodoc libmilter/docs/*
+}