Lines 17-94
Link Here
|
17 |
LDFLAGS+= -L${LOCALBASE}/lib |
17 |
LDFLAGS+= -L${LOCALBASE}/lib |
18 |
INFO= msmtp |
18 |
INFO= msmtp |
19 |
|
19 |
|
20 |
OPTIONS_DEFINE= GSASL NLS IDN GNOMEKEYRING MSMTPQ |
20 |
OPTIONS_DEFINE= DOCS GSASL NLS IDN LIBSECRET MSMTPQ |
21 |
OPTIONS_RADIO= TLS |
21 |
OPTIONS_RADIO= TLS |
22 |
OPTIONS_RADIO_TLS= GNUTLS OPENSSL |
22 |
OPTIONS_RADIO_TLS= GNUTLS OPENSSL |
23 |
OPTIONS_DEFAULT= MSMTPQ OPENSSL |
23 |
OPTIONS_DEFAULT= MSMTPQ OPENSSL |
24 |
|
24 |
|
25 |
GSASL_DESC= GSASL support |
25 |
GSASL_DESC= GSASL support |
|
|
26 |
LIBSECRET_DESC= GNOME password management |
26 |
MSMTPQ_DESC= Install offline messaging scripts |
27 |
MSMTPQ_DESC= Install offline messaging scripts |
27 |
|
28 |
|
28 |
.include <bsd.port.options.mk> |
29 |
GSASL_CONFIGURE_WITH= libgsasl |
|
|
30 |
GSASL_LIB_DEPENDS= libgsasl.so:${PORTSDIR}/security/gsasl |
31 |
IDN_CONFIGURE_WITH= libidn |
32 |
IDN_LIB_DEPENDS= libidn.so:${PORTSDIR}/dns/libidn |
33 |
LIBSECRET_CONFIGURE_WITH= libsecret |
34 |
LIBSECRET_LIB_DEPENDS= libsecret-1.so:${PORTSDIR}/security/libsecret |
35 |
MSMTPQ_PORTDOCS= README.msmtpq |
36 |
NLS_CONFIGURE_OFF= --disable-nls |
37 |
NLS_CONFIGURE_ON= --enable-nls |
38 |
NLS_PLIST_SUB= NLS="" |
39 |
NLS_PLIST_SUB_OFF= NLS="@comment " |
40 |
NLS_USES= gettext |
29 |
|
41 |
|
30 |
.if ${PORT_OPTIONS:MGNUTLS} |
42 |
GNUTLS_CONFIGURE_ON= --with-ssl=gnutls |
31 |
LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls |
43 |
GNUTLS_LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls |
32 |
CONFIGURE_ARGS+= --with-ssl=gnutls |
44 |
OPENSSL_VARS= USE_OPENSSL=yes |
33 |
.elif ${PORT_OPTIONS:MOPENSSL} |
45 |
OPENSSL_CONFIGURE_ON= --with-ssl=openssl |
34 |
USE_OPENSSL= yes |
46 |
OPENSSL_CONFIGURE_ENV= libssl_CFLAGS="-I${OPENSSLINC}" \ |
35 |
CONFIGURE_ARGS+= --with-ssl=openssl |
|
|
36 |
CONFIGURE_ENV+= libssl_CFLAGS="-I${OPENSSLINC}" \ |
37 |
libssl_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" |
47 |
libssl_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" |
38 |
.else |
48 |
CERTSFILE= ${LOCALBASE}/share/certs/ca-root-nss.crt |
39 |
CONFIGURE_ARGS+= --with-ssl=no |
|
|
40 |
.endif |
41 |
|
49 |
|
|
|
50 |
.include <bsd.port.options.mk> |
51 |
|
42 |
.if ${PORT_OPTIONS:MGNUTLS} || ${PORT_OPTIONS:MOPENSSL} |
52 |
.if ${PORT_OPTIONS:MGNUTLS} || ${PORT_OPTIONS:MOPENSSL} |
43 |
RUN_DEPENDS+= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss |
53 |
RUN_DEPENDS+= ${CERTSFILE}:${PORTSDIR}/security/ca_root_nss |
44 |
.endif |
|
|
45 |
|
46 |
.if ${PORT_OPTIONS:MGSASL} |
47 |
LIB_DEPENDS+= libgsasl.so:${PORTSDIR}/security/gsasl |
48 |
CONFIGURE_ARGS+= --with-libgsasl |
49 |
.else |
54 |
.else |
50 |
CONFIGURE_ARGS+= --without-libgsasl |
55 |
CONFIGURE_ARGS+= --with-ssl=no |
51 |
.endif |
56 |
.endif |
52 |
|
57 |
|
53 |
.if ${PORT_OPTIONS:MIDN} |
|
|
54 |
LIB_DEPENDS+= libidn.so:${PORTSDIR}/dns/libidn |
55 |
CONFIGURE_ARGS+= --with-libidn |
56 |
.else |
57 |
CONFIGURE_ARGS+= --without-libidn |
58 |
.endif |
59 |
|
60 |
.if ${PORT_OPTIONS:MGNOMEKEYRING} |
61 |
CONFIGURE_ARGS+= --with-gnome-keyring |
62 |
LIB_DEPENDS+= libgnome-keyring.so:${PORTSDIR}/security/gnome-keyring |
63 |
.else |
64 |
CONFIGURE_ARGS+= --without-gnome-keyring |
65 |
.endif |
66 |
|
67 |
.if ${PORT_OPTIONS:MNLS} |
68 |
USES+= gettext |
69 |
CONFIGURE_ARGS+= --enable-nls |
70 |
PLIST_SUB+= NLS="" |
71 |
.else |
72 |
CONFIGURE_ARGS+= --disable-nls |
73 |
PLIST_SUB+= NLS="@comment " |
74 |
.endif |
75 |
|
76 |
.include <bsd.port.pre.mk> |
77 |
|
78 |
post-extract: |
58 |
post-extract: |
79 |
@${REINPLACE_CMD} -e 's|/etc/ssl/certs/ca\\-certificates.crt|${LOCALBASE}/share/certs/ca\\-root\\-nss.crt|' \ |
59 |
@${REINPLACE_CMD} -e 's|/etc/ssl/certs/ca\\-certificates.crt|${CERTSFILE}|' \ |
80 |
${WRKSRC}/doc/msmtp.1 |
60 |
${WRKSRC}/doc/msmtp.1 |
81 |
|
61 |
|
82 |
.if ${PORT_OPTIONS:MMSMTPQ} |
62 |
.if ${PORT_OPTIONS:MMSMTPQ} |
83 |
PLIST_SUB+= MSMTPQ="" |
63 |
post-stage: |
84 |
|
|
|
85 |
post-install: |
86 |
${INSTALL_SCRIPT} ${WRKSRC}/scripts/msmtpq/msmtp-queue ${STAGEDIR}${PREFIX}/bin |
64 |
${INSTALL_SCRIPT} ${WRKSRC}/scripts/msmtpq/msmtp-queue ${STAGEDIR}${PREFIX}/bin |
87 |
${INSTALL_SCRIPT} ${WRKSRC}/scripts/msmtpq/msmtpq ${STAGEDIR}${PREFIX}/bin |
65 |
${INSTALL_SCRIPT} ${WRKSRC}/scripts/msmtpq/msmtpq ${STAGEDIR}${PREFIX}/bin |
88 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
|
|
89 |
${INSTALL_DATA} ${WRKSRC}/scripts/msmtpq/README.msmtpq ${STAGEDIR}${DOCSDIR} |
90 |
.else |
91 |
PLIST_SUB+= MSMTPQ="@comment " |
92 |
.endif |
66 |
.endif |
93 |
|
67 |
|
94 |
.include <bsd.port.post.mk> |
68 |
.include <bsd.port.mk> |