pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/libmilter Allow use of base system libmilter if i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e1124221534d
branches:  trunk
changeset: 461961:e1124221534d
user:      markd <markd%pkgsrc.org@localhost>
date:      Wed Sep 24 12:43:57 2003 +0000

description:
Allow use of base system libmilter if it exists and is complete enough.

Closes PR 22708 from wiz.

diffstat:

 mail/libmilter/buildlink2.mk |  22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 006d96b1cbdc -r e1124221534d mail/libmilter/buildlink2.mk
--- a/mail/libmilter/buildlink2.mk      Wed Sep 24 12:33:22 2003 +0000
+++ b/mail/libmilter/buildlink2.mk      Wed Sep 24 12:43:57 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.2 2003/05/02 11:55:39 wiz Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2003/09/24 12:43:57 markd Exp $
 #
 # This Makefile fragment is included by packages that use libmilter.
 #
@@ -6,12 +6,30 @@
 .if !defined(LIBMILTER_BUILDLINK2_MK)
 LIBMILTER_BUILDLINK2_MK=       # defined
 
-BUILDLINK_PACKAGES+=                   libmilter
+.include "../../mk/bsd.prefs.mk"
+
 BUILDLINK_DEPENDS.libmilter?=          libmilter>=8.12.9nb1
 BUILDLINK_PKGSRCDIR.libmilter?=                ../../mail/libmilter
 
+.if exists(/usr/lib/libmilter.a)
+_MILTER_FILELIST!= ar t /usr/lib/libmilter.a
+.  if empty(_MILTER_FILELIST:Merrstring.o)
+_NEED_LIBMILTER=       YES
+.  else
+_NEED_LIBMILTER=       NO
+.  endif
+.else
+_NEED_LIBMILTER=       YES
+.endif
+
+.if ${_NEED_LIBMILTER} == "YES"
+BUILDLINK_PACKAGES+=           libmilter
 EVAL_PREFIX+=  BUILDLINK_PREFIX.libmilter=libmilter
 BUILDLINK_PREFIX.libmilter_DEFAULT=    ${LOCALBASE}
+.else
+BUILDLINK_PREFIX.libmilter=    /usr
+.endif
+
 BUILDLINK_FILES.libmilter+=    include/libmilter/mfapi.h
 BUILDLINK_FILES.libmilter+=    include/libmilter/mfdef.h
 BUILDLINK_FILES.libmilter+=    lib/libmilter.*



Home | Main Index | Thread Index | Old Index