summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-28 21:22:18 +0000
committerjlam <jlam@pkgsrc.org>2001-06-28 21:22:18 +0000
commitb6802e9266826d34cf36e7a0cfaf3dbbc3fce7b1 (patch)
tree3fed743eba79f9d7cf0e9ee6f84c61b2f45186a4
parent5424c95f80f2d8683d12df5e3c33a9f799b4f71d (diff)
downloadpkgsrc-b6802e9266826d34cf36e7a0cfaf3dbbc3fce7b1.tar.gz
Check for openssl>=0.9.5a when depending on openssl.
-rw-r--r--security/openssl/buildlink.mk27
1 files changed, 23 insertions, 4 deletions
diff --git a/security/openssl/buildlink.mk b/security/openssl/buildlink.mk
index ce8590468d9..45821b66e9e 100644
--- a/security/openssl/buildlink.mk
+++ b/security/openssl/buildlink.mk
@@ -1,9 +1,10 @@
-# $NetBSD: buildlink.mk,v 1.2 2001/06/23 19:27:00 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.3 2001/06/28 21:22:18 jlam Exp $
#
# This Makefile fragment is included by packages that use OpenSSL.
#
# To use this Makefile fragment, simply:
#
+# (1) Optionally define USE_OPENSSL_095A.
# (1) Include this Makefile fragment in the package Makefile,
# (2) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
# search path, and
@@ -15,10 +16,24 @@ OPENSSL_BUILDLINK_MK= # defined
BUILDLINK_DEPENDS.openssl?= openssl-0.9.[56]*
-.if exists(/usr/include/openssl/ssl.h)
-_NEED_OPENSSL= NO
-.else
+# Check for a usable installed version of OpenSSL. Version must be greater
+# than 0.9.5a. If a usable version isn't present, then use the pkgsrc
+# OpenSSL package.
+#
+.include "../../mk/bsd.prefs.mk"
_NEED_OPENSSL= YES
+.if exists(/usr/include/openssl/opensslv.h)
+_OPENSSLV_H= /usr/include/openssl/opensslv.h
+_OPENSSL_VERSION!= ${AWK} '/.*OPENSSL_VERSION_NUMBER.*/ { print $$3 }' \
+ ${_OPENSSLV_H}
+_VALID_SSL_VERSIONS= 0x0090581fL
+_VALID_SSL_VERSIONS+= 0x0090600fL
+_VALID_SSL_VERSIONS+= 0x0090601fL
+.for PATTERN in ${_VALID_SSL_VERSIONS}
+.if ${_OPENSSL_VERSION:M${PATTERN}} != ""
+_NEED_OPENSSL= NO
+.endif
+.endfor
.endif
.if ${_NEED_OPENSSL} == "YES"
@@ -38,6 +53,10 @@ BUILDLINK_FILES.openssl+= lib/libRSAglue.*
BUILDLINK_FILES.openssl+= lib/libcrypto.*
BUILDLINK_FILES.openssl+= lib/libssl.*
+.if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
+.include "../../security/rsaref/buildlink.mk"
+.endif
+
BUILDLINK_TARGETS.openssl= openssl-buildlink
BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.openssl}