summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam>2001-01-02 21:05:50 +0000
committerjlam <jlam>2001-01-02 21:05:50 +0000
commita179d952117fb5ec3bd56457106572eed2c96c7c (patch)
tree45071acd7336d548fe6591ea7139c60e39d8e850 /mail
parent3dc29e0d8e4cc4e2ed6ddd2a1c6465071343f7bc (diff)
downloadpkgsrc-a179d952117fb5ec3bd56457106572eed2c96c7c.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')
-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