summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-08-22 22:40:17 +0000
committerAlin Năstac <mrness@gentoo.org>2009-08-22 22:40:17 +0000
commitfce4119046e27914d5231cc111245f44e5273ce4 (patch)
tree1a4033b5dd54be207bf817c110f796f0173f1a63 /mail-filter
parentVersion bump (diff)
downloadgentoo-2-fce4119046e27914d5231cc111245f44e5273ce4.tar.gz
gentoo-2-fce4119046e27914d5231cc111245f44e5273ce4.tar.bz2
gentoo-2-fce4119046e27914d5231cc111245f44e5273ce4.zip
Use the real libmilter version iso sendmail version.
Install libmilter library in both forms, static and dynamic (#245950). (Portage version: 2.1.6.13/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/libmilter/ChangeLog10
-rw-r--r--mail-filter/libmilter/files/gentoo.config.m43
-rw-r--r--mail-filter/libmilter/files/libmilter-sharedlib.patch55
-rw-r--r--mail-filter/libmilter/libmilter-1.0.1.ebuild (renamed from mail-filter/libmilter/libmilter-8.14.3.ebuild)25
4 files changed, 86 insertions, 7 deletions
diff --git a/mail-filter/libmilter/ChangeLog b/mail-filter/libmilter/ChangeLog
index fc708796551a..8bf430f8b97c 100644
--- a/mail-filter/libmilter/ChangeLog
+++ b/mail-filter/libmilter/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for mail-filter/libmilter
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/libmilter/ChangeLog,v 1.19 2009/05/09 12:23:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/libmilter/ChangeLog,v 1.20 2009/08/22 22:40:17 mrness Exp $
+
+*libmilter-1.0.1 (22 Aug 2009)
+
+ 22 Aug 2009; Alin Năstac <mrness@gentoo.org> files/gentoo.config.m4,
+ +files/libmilter-sharedlib.patch, +libmilter-1.0.1.ebuild,
+ -libmilter-8.14.3.ebuild:
+ Use the real libmilter version iso sendmail version. Install libmilter
+ library in both forms, static and dynamic (#245950).
09 May 2009; Alin Năstac <mrness@gentoo.org> libmilter-8.14.3.ebuild:
Migrate to EAPI 2.
diff --git a/mail-filter/libmilter/files/gentoo.config.m4 b/mail-filter/libmilter/files/gentoo.config.m4
index 26f109ec50a2..5e1b55faa580 100644
--- a/mail-filter/libmilter/files/gentoo.config.m4
+++ b/mail-filter/libmilter/files/gentoo.config.m4
@@ -1,2 +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-sharedlib.patch b/mail-filter/libmilter/files/libmilter-sharedlib.patch
new file mode 100644
index 000000000000..05f2e025e39a
--- /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
++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-8.14.3.ebuild b/mail-filter/libmilter/libmilter-1.0.1.ebuild
index 1d735dba0308..d0484151fc23 100644
--- a/mail-filter/libmilter/libmilter-8.14.3.ebuild
+++ b/mail-filter/libmilter/libmilter-1.0.1.ebuild
@@ -1,14 +1,20 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/libmilter/libmilter-8.14.3.ebuild,v 1.8 2009/05/09 12:23:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/libmilter/libmilter-1.0.1.ebuild,v 1.1 2009/08/22 22:40:17 mrness Exp $
EAPI="2"
inherit eutils 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.3
+
DESCRIPTION="The Sendmail Filter API (Milter)"
HOMEPAGE="http://www.sendmail.org/"
-SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${PV}.tar.gz"
+SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz"
LICENSE="Sendmail"
SLOT="0"
@@ -18,32 +24,39 @@ IUSE="ipv6 poll"
DEPEND="!mail-mta/sendmail"
RDEPEND="${DEPEND}"
-S="${WORKDIR}/sendmail-${PV}"
+S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
src_prepare() {
+ 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:@@ENVDEF@@:${ENVDEF}:" \
+ 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 CC="$(tc-getCC)" || die "libmilter compilation failed"
+ emake -j1 MILTER_SOVER=${PV} || die "libmilter compilation failed"
popd
}
src_install () {
local MY_LIBDIR=/usr/$(get_libdir)
- dodir "${MY_LIBDIR}" /usr/include/libmilter
+ dodir "${MY_LIBDIR}"
emake DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
MSPQOWN=root CFOWN=root CFGRP=root \
+ MILTER_SOVER=${PV} \
install -C obj.*/libmilter \
|| die "install failed"