1 # makefile for use of: sendmail milter lib
2 # Date created: 08 Nov 2006
7 # a port shall includes this file after bsd.ports.pre.mk
8 # .include "${PORTSDIR}/${PKGCATEGORY}/sendmail/bsd.milter.mk"
10 # the user/port can now set this options in the makefiles.
12 # WITH_SENDMAIL_STATIC_MILTER= - Use static milter lib
14 # WITH_SENDMAIL_BASE=yes - Use milter in the base
15 # WITH_SENDMAIL_PORT=yes - Use milter from ports
17 # If unspecified, check for the lib exist in the base system,
18 # but gives an installed port preference over it.
21 # Overrideable defaults:
23 # SENDMAIL_MILTER_PORT?= libmilter
25 # The makefile sets this variables:
26 # MILTERBASE - "/usr" or ${LOCALBASE}
27 # MILTERINC - path to the matching includes
28 # MILTERLIB - path to the libs
29 # MILTERRPATH - rpath for dynamic linker
31 # The makefile extend this variables:
37 # MAKE_ENV - extended with the variables above
38 # CONFIGURE_ENV - extended with LDFLAGS
39 # BUILD_DEPENDS - are added if needed
40 # RUN_DEPENDS - are added if needed
42 Milter_Include_MAINTAINER= dinoex@FreeBSD.org
44 .if !defined(WITH_SENDMAIL_BASE) && \
45 !defined(WITH_SENDMAIL_PORT)
46 .if exists(${LOCALBASE}/lib/libmilter.a) || \
47 !exists(/usr/lib/libmilter.a)
48 WITH_SENDMAIL_PORT=yes
50 WITH_SENDMAIL_BASE=yes
54 .if defined(WITH_SENDMAIL_PORT)
56 .if defined(WITH_SENDMAIL_STATIC_MILTER)
57 BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:mail/${SENDMAIL_MILTER_PORT}
59 LIB_DEPENDS+= libmilter.so.${MILTER_SOVER}:mail/${SENDMAIL_MILTER_PORT}
62 SENDMAIL_MILTER_PORT?= libmilter
64 MILTERBASE?= ${LOCALBASE}
65 MILTERINC= -I${MILTERBASE}/include
66 MILTERRPATH= ${MILTERBASE}/lib
67 MILTERLIB= -L${MILTERBASE}/lib -Wl,-rpath,${MILTERRPATH}
69 .if !defined(WITHOUT_MILTER_CFLAGS)
79 .if defined(WITH_SENDMAIL_BASE)
81 MILTERRPATH= ${DESTDIR}/usr/lib:${LOCALBASE}/lib
82 MILTERLIB= -Wl,-rpath,${MILTERRPATH}
85 .if !defined(WITHOUT_MILTER_LDFLAGS)