summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter/libmilter')
-rw-r--r--mail-filter/libmilter/Manifest1
-rw-r--r--mail-filter/libmilter/files/gentoo.config.m45
-rw-r--r--mail-filter/libmilter/files/libmilter-build-system.patch89
-rw-r--r--mail-filter/libmilter/files/libmilter-sharedlib.patch55
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2.ebuild67
-rw-r--r--mail-filter/libmilter/metadata.xml9
6 files changed, 226 insertions, 0 deletions
diff --git a/mail-filter/libmilter/Manifest b/mail-filter/libmilter/Manifest
new file mode 100644
index 000000000000..51477a733686
--- /dev/null
+++ b/mail-filter/libmilter/Manifest
@@ -0,0 +1 @@
+DIST sendmail.8.14.5.tar.gz 2092508 SHA256 fb65a86a0f87f12aefb933ee8990540f7a680a594f7fedfdd28918f3934bfb88 SHA512 178addd247f1c7c8ca90d70b9240db4cad4e55f0710d5df0fe979e5473a182d2035150c352836576a28bb2b9660b0d5ebfcd95269a156ac0d2c3dba3edb60452 WHIRLPOOL 2e073759a44d535629d9cce91da4a7082e085defeb9491a4470a8a8c8b18e1545129527c0138a74edb405a9c9724e5a597ee99c7852a423696c495ad8fef783f
diff --git a/mail-filter/libmilter/files/gentoo.config.m4 b/mail-filter/libmilter/files/gentoo.config.m4
new file mode 100644
index 000000000000..5e1b55faa580
--- /dev/null
+++ b/mail-filter/libmilter/files/gentoo.config.m4
@@ -0,0 +1,5 @@
+define(`confOPTIMIZE', `@@CFLAGS@@')
+define(`confLDOPTS', `@@LDFLAGS@@')
+define(`confCC', `@@CC@@')
+define(`confENVDEF', `@@ENVDEF@@')
+define(`confCCOPTS_SO', `-fPIC')
diff --git a/mail-filter/libmilter/files/libmilter-build-system.patch b/mail-filter/libmilter/files/libmilter-build-system.patch
new file mode 100644
index 000000000000..d9991d3d409b
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-build-system.patch
@@ -0,0 +1,89 @@
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 sendmail-8.14.3/devtools/M4/UNIX/defines.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/defines.m4 2006-10-06 07:44:44.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/defines.m4 2009-09-20 10:16:43.000000000 +0200
+@@ -26,7 +26,7 @@
+ CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
+ # Linker for libraries
+ LD= ifdef(`confLD', `confLD', `confCC')
+-LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
++LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
+ LDOPTS_SO= ${LDOPTS} ifdef(`confLDOPTS_SO', `confLDOPTS_SO', `-shared')
+
+ # Shell
+@@ -71,7 +71,7 @@
+ LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS')
+
+ # libraries required on your system
+-LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST')
++LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
+
+ # location of sendmail binary (usually /usr/sbin or /usr/lib)
+ BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 sendmail-8.14.3/devtools/M4/UNIX/executable.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/executable.m4 2006-10-06 07:44:44.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/executable.m4 2009-09-20 10:16:43.000000000 +0200
+@@ -30,12 +30,12 @@
+
+ ifdef(`bldNO_INSTALL', ,
+ `install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT ifdef(`bldTARGET_INST_DEP', `bldTARGET_INST_DEP')
+- ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'BINDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'BINDIR}; else :; fi ')
+- ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${bldINSTALL_DIR`'BINDIR}
++ ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'BINDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${bldBIN_TYPE`'BINOWN} -g ${bldBIN_TYPE`'BINGRP} -m ${bldBIN_TYPE`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${bldINSTALL_DIR`'BINDIR}"
+ ifdef(`bldTARGET_LINKS', `bldMAKE_TARGET_LINKS(${bldINSTALL_DIR`'BINDIR}/bldCURRENT_PRODUCT, ${bldCURRENT_PRODUCT`'TARGET_LINKS})')')
+
+ strip-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT
+- ${STRIP} ${STRIPOPTS} ${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT
++ ${STRIP} ${STRIPOPTS} "${DESTDIR}${bldINSTALL_DIR`'BINDIR}`'/bldCURRENT_PRODUCT"
+
+ bldCURRENT_PRODUCT-clean:
+ rm -f ${OBJS} bldCURRENT_PRODUCT ${MANPAGES}
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 sendmail-8.14.3/devtools/M4/UNIX/library.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/library.m4 2006-09-06 00:56:53.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/library.m4 2009-09-20 10:16:43.000000000 +0200
+@@ -27,8 +27,8 @@
+ ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
+
+ install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
+-ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
+- ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
++ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${LIBDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
+
+ bldCURRENT_PRODUCT-clean:
+ rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 sendmail-8.14.3/devtools/M4/UNIX/manpage.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/manpage.m4 2006-09-08 00:13:07.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/UNIX/manpage.m4 2009-09-20 10:16:43.000000000 +0200
+@@ -68,11 +68,11 @@
+ ifdef(`confNO_MAN_INSTALL', `divert(-1)', `dnl')
+ define(`bldMAN_INSTALL_CMD',
+ `ifdef(`confDONT_INSTALL_CATMAN', `dnl',
+-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}; else :; fi ')
+- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'')
++` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}"; else :; fi ')
++ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''")
+ ifdef(`confINSTALL_RAWMAN',
+-` ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN} ]; then confMKDIR -p ${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}; else :; fi ')
+- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')'
++` ifdef(`confMKDIR', `if [ ! -d "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'" ]; then confMKDIR -p "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'"; else :; fi ')
++ ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) "`${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}''", `dnl')'
+ )dnl
+ bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES')
+ ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl')
+diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2009-09-20 09:53:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4 2009-09-20 10:18:35.000000000 +0200
+@@ -32,9 +32,9 @@
+ MFAPI= ${SRCDIR}/inc`'lude/libmilter/mfapi.h
+ MFDEF= ${SRCDIR}/inc`'lude/libmilter/mfdef.h
+ install-mfapi: ${MFAPI}
+- if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
+- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
+- ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
++ if [ ! -d "${DESTDIR}${INCLUDEDIR}/libmilter" ]; then mkdir -p "${DESTDIR}${INCLUDEDIR}/libmilter"; else :; fi
++ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} "${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h"
++ ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} "${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h"
+ divert(0)
+
+ bldFINISH
diff --git a/mail-filter/libmilter/files/libmilter-sharedlib.patch b/mail-filter/libmilter/files/libmilter-sharedlib.patch
new file mode 100644
index 000000000000..43ec78612190
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-sharedlib.patch
@@ -0,0 +1,55 @@
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 1970-01-01 01:00:00.000000000 +0100
++++ sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4 2009-08-22 21:51:10.000000000 +0200
+@@ -0,0 +1,39 @@
++divert(-1)
++#
++# Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
++# All rights reserved.
++#
++# By using this file, you agree to the terms and conditions set
++# forth in the LICENSE file which can be found at the top level of
++# the sendmail distribution.
++#
++#
++# Definitions for Makefile construction for sendmail
++#
++divert(0)dnl
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
++bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
++bldPUSH_TARGET(bldCURRENT_PRODUCT`.so' bldCURRENT_PRODUCT`.a')dnl
++bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
++bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
++
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
++divert(bldTARGETS_SECTION)
++bldCURRENT_PRODUCT.so: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++ ${CCLINK} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so -Wl,confSONAME,bldCURRENT_PRODUCT.so.${MILTER_SOVER} ${bldCURRENT_PRODUCT`OBJS'} -lc ${LIBS}
++bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++ ${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
++ ${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
++ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
++
++install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a
++ifdef(`bldINSTALLABLE', ` ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}"; else :; fi ')
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${UBINMODE} bldCURRENT_PRODUCT.so "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so.${MILTER_SOVER}"
++ ${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.${MILTER_SOVER} "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so"
++ ${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
++
++bldCURRENT_PRODUCT-clean:
++ rm -f ${OBJS} bldCURRENT_PRODUCT.so bldCURRENT_PRODUCT.a ${MANPAGES}
++
++divert(0)
++COPTS+= confCCOPTS_SO
+diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4 2008-04-08 07:23:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4 2009-08-22 21:53:35.000000000 +0200
+@@ -9,7 +9,7 @@
+ SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
+ PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
+
+-bldPRODUCT_START(`library', `libmilter')
++bldPRODUCT_START(`milterlibrary', `libmilter')
+ define(`bldINSTALLABLE', `true')
+ define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
+ APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
diff --git a/mail-filter/libmilter/libmilter-1.0.2.ebuild b/mail-filter/libmilter/libmilter-1.0.2.ebuild
new file mode 100644
index 000000000000..2fd2c1753af9
--- /dev/null
+++ b/mail-filter/libmilter/libmilter-1.0.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils 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.14.5
+
+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 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="ipv6 poll"
+
+DEPEND="!mail-mta/sendmail
+ !mail-mta/sendmail"
+RDEPEND="!mail-mta/sendmail"
+
+S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-build-system.patch
+ epatch "${FILESDIR}"/${PN}-sharedlib.patch
+
+ local CC="$(tc-getCC)"
+ local ENVDEF="-DNETUNIX -DNETINET"
+ use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
+ use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1"
+
+ sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
+ -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} || die "libmilter compilation failed"
+ 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 \
+ || die "install failed"
+
+ dodoc libmilter/README
+ dohtml libmilter/docs/*
+}
diff --git a/mail-filter/libmilter/metadata.xml b/mail-filter/libmilter/metadata.xml
new file mode 100644
index 000000000000..a1e561b3b2d0
--- /dev/null
+++ b/mail-filter/libmilter/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+<longdescription>The Sendmail filter API (Milter)</longdescription>
+<use>
+ <flag name='poll'>Use poll instead of select</flag>
+</use>
+</pkgmetadata>