summaryrefslogtreecommitdiff
path: root/mail/imap-uw
diff options
context:
space:
mode:
authorjlam <jlam>2001-01-02 21:05:50 +0000
committerjlam <jlam>2001-01-02 21:05:50 +0000
commit1a713e6826b915bafb9b3f3a1e044e9ec7a1de49 (patch)
tree45071acd7336d548fe6591ea7139c60e39d8e850 /mail/imap-uw
parent66f6e180249a8fc85952d41fc3c003747a24884f (diff)
downloadpkgsrc-1a713e6826b915bafb9b3f3a1e044e9ec7a1de49.tar.gz
Depending on whether we use the in-tree OpenSSL or pkgsrc OpenSSL, the default
certificates directory is /etc/openssl/certs or ${PREFIX}/certs. Pass the correct directory to the c-client library build so that SSL authentication works as expected regardless of which version of NetBSD we use.
Diffstat (limited to 'mail/imap-uw')
-rw-r--r--mail/imap-uw/Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile
index e07a533cc5d..9042717dbef 100644
--- a/mail/imap-uw/Makefile
+++ b/mail/imap-uw/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2000/12/17 18:25:43 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2001/01/02 21:05:50 jlam Exp $
DISTNAME= imap-2000a
PKGNAME= imap-uw-2000a
@@ -30,7 +30,7 @@ NO_CONFIGURE= # defined
USE_SSL= # defined
MAKE_ENV+= SSLBASE="${SSLBASE}"
-MAKE_ENV+= SSLCERTS="/etc/openssl/certs"
+MAKE_ENV+= SSLCERTS="${SSL_CERT_DIR}"
ALL_TARGET+= CC="${LIBTOOL} ${CC}"
ALL_TARGET+= EXTRACFLAGS="${CFLAGS}"
ALL_TARGET+= SPECIALAUTHENTICATORS="ssl"
@@ -68,3 +68,17 @@ do-install:
done
.include "../../mk/bsd.pkg.mk"
+
+# The in-tree OpenSSL uses /etc/openssl/certs as the default location for
+# certificates, while the pkgsrc OpenSSL uses ${PREFIX}/certs. Define
+# SSL_CERT_DIR appropriately using a shell expression, and make sure that
+# it's only executed once to optimize the build.
+#
+.if !defined(SSL_CERT_DIR)
+SSL_CERT_DIR!= if ${TEST} -d /etc/openssl/certs; then \
+ ${ECHO} /etc/openssl/certs; \
+ else \
+ ${ECHO} ${PREFIX}/certs; \
+ fi
+MAKEFLAGS+= SSL_CERT_DIR="${SSL_CERT_DIR}"
+.endif