Bug 81392 - Error in Makefile of security/amavisd-new if using mail/sendmail from port
Summary: Error in Makefile of security/amavisd-new if using mail/sendmail from port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florent Thoumie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-23 11:50 UTC by Henri Hennebert
Modified: 2005-06-05 16:49 UTC (History)
0 users

See Also:


Attachments
file.diff (213 bytes, patch)
2005-05-23 11:50 UTC, Henri Hennebert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Hennebert 2005-05-23 11:50:06 UTC
To install amavis-milter if sendmail is not installed as part of the
base system (NO_SENDMAIL=true in /etc/make.conf) and mail/sendmail from
ports is used:

1. You MUST configure mail/sendmail with SENDMAIL_WITH_SHARED_MILTER=yes
   to create /usr/local/lib/libmilter.so

2. You must change Makefile in security/amavisd-new to place the line
   `.include <bsd.port.pre.mk>' before the line checking for libmilter.so.

Fix: Apply this patch:

+.include <bsd.port.pre.mk>
+
 .if !exists(/usr/lib/libmilter.so) && !exists(${PREFIX}/lib/libmilter.so)
 AMAVIS_NOMILTER="@comment "
 .endif
@@ -79,8 +81,6 @@
                -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
                -e 's,%%PREFIX%%,${PREFIX},g' \
                -e 's,%%RC_SUBR%%,${RC_SUBR},g'
-
-.include <bsd.port.pre.mk>

 .if defined(WITH_MYSQL)
 RUN_DEPENDS+=  ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql

Moreover I think there is a better solution (no more
SENDMAIL_WITH_SHARED_MILTER=yes in the build of mail/sendmail) because
amavis-milter is statically linked against libmilter.a:



-.if !exists(/usr/lib/libmilter.so) && !exists(${PREFIX}/lib/libmilter.so)
+.include <bsd.port.pre.mk>
+
+.if !exists(/usr/lib/libmilter.a) && !exists(${PREFIX}/lib/libmilter.a)
 AMAVIS_NOMILTER="@comment "
 .endif

@@ -79,8 +81,6 @@
                -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
                -e 's,%%PREFIX%%,${PREFIX},g' \
                -e 's,%%RC_SUBR%%,${RC_SUBR},g'
-
-.include <bsd.port.pre.mk>

 .if defined(WITH_MYSQL)
 RUN_DEPENDS+=  ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql

Thank you for your time,

Henri--9SLdVfGy41iRmWEKzgFeoXobwY9sELSszspDO53PnJKnkUSm
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       Mon May 23 12:36:54 2005
+++ Makefile    Mon May 23 12:40:29 2005
@@ -56,6 +56,8 @@
                PGSQL   "PgSQL support"         off \
                LDAP    "LDAP support"          off
Comment 1 Florent Thoumie freebsd_committer freebsd_triage 2005-05-31 10:36:04 UTC
State Changed
From-To: open->feedback

Forward PR to maintainer. 


Comment 2 Florent Thoumie freebsd_committer freebsd_triage 2005-05-31 10:36:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flz

Grab.
Comment 3 Florent Thoumie 2005-05-31 10:37:31 UTC
     Dear maintainer, could you review the following PR ?

> http://www.freebsd.org/cgi/query-pr.cgi?pr=81392

-- 
Florent Thoumie
flz@xbsd.org
Comment 4 Blaz Zupan 2005-06-05 12:34:18 UTC
>    Dear maintainer, could you review the following PR ?
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=81392

I agree that the second solution in the patch (verify that 
/usr/lib/libmilter.a exists instead of libmilter.so) is the best one, please 
commit.
Comment 5 Florent Thoumie freebsd_committer freebsd_triage 2005-06-05 16:49:47 UTC
State Changed
From-To: feedback->closed

Committed, thanks!