diff options
author | jlam <jlam@pkgsrc.org> | 2001-07-20 01:54:50 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-07-20 01:54:50 +0000 |
commit | f79b2df20a2446d953dd624071a51110e3323693 (patch) | |
tree | 6d9f8aabbde093754bfda4e47b3bda4514dece0f /security | |
parent | 7b1d3cb4652a3602fe1254e08c29dca10e7c0c60 (diff) | |
download | pkgsrc-f79b2df20a2446d953dd624071a51110e3323693.tar.gz |
Mechanical changes to buildlink.mk files to use EVAL_PREFIX to set
BUILDLINK_PREFIX.<pkgname>. This allows buildlink to find X11BASE packages
regardless of whether they were installed before or after xpkgwedge was
installed. Idea by Alistair Crooks <agc@pkgsrc.org>.
Also overhaul code to specify the minimum version of OpenSSL needed by
a dependent package. We now set USE_OPENSSL_VERSION to the version number
in <openssl/opensslv.h>. Idea also by Alistair Crooks <agc@pkgsrc.org>.
Diffstat (limited to 'security')
-rw-r--r-- | security/openssl/buildlink.mk | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/security/openssl/buildlink.mk b/security/openssl/buildlink.mk index c0b140b5723..d38efe1741d 100644 --- a/security/openssl/buildlink.mk +++ b/security/openssl/buildlink.mk @@ -1,10 +1,11 @@ -# $NetBSD: buildlink.mk,v 1.6 2001/07/18 18:03:16 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.7 2001/07/20 01:54:51 jlam Exp $ # # This Makefile fragment is included by packages that use OpenSSL. # # To use this Makefile fragment, simply: # -# (1) Optionally define USE_OPENSSL_096 to require openssl>=0.9.6. +# (1) Optionally define USE_OPENSSL_VERSION to the mininum OpenSSL version +# number in <openssl/opensslv.h>, i.e. 0x0090600fL, etc. # (2) Include this Makefile fragment in the package Makefile, # (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header # search path, and @@ -16,38 +17,63 @@ OPENSSL_BUILDLINK_MK= # defined .include "../../mk/bsd.buildlink.mk" +# OpenSSL version numbers from <openssl/opensslv.h> +OPENSSL_VERSION_095A= 0x0090581fL +OPENSSL_VERSION_096= 0x0090600fL +OPENSSL_VERSION_096A= 0x0090601fL +OPENSSL_VERSION_096B= 0x0090602fL + # 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" +USE_OPENSSL_VERSION?= ${OPENSSL_VERSION_095A} + +# Associate OpenSSL dependency with version number. +.if ${USE_OPENSSL_VERSION} == ${OPENSSL_VERSION_095A} +BUILDLINK_DEPENDS.openssl= {openssl-0.9.5a,openssl>=0.9.6} +.else +BUILDLINK_DEPENDS.openssl= openssl>=0.9.6 +.endif + _NEED_OPENSSL= YES -.if exists(/usr/include/openssl/opensslv.h) _OPENSSLV_H= /usr/include/openssl/opensslv.h +.if exists(${_OPENSSLV_H}) _OPENSSL_VERSION!= ${AWK} '/.*OPENSSL_VERSION_NUMBER.*/ { print $$3 }' \ ${_OPENSSLV_H} -BUILDLINK_DEPENDS.openssl= {openssl-0.9.5a,openssl>=0.9.6} -_VALID_SSL_VERSIONS= 0x0090581fL -.if defined(USE_OPENSSL_096) -BUILDLINK_DEPENDS.openssl= openssl>=0.9.6 -_VALID_SSL_VERSIONS= 0x0090600fL + +_VALID_SSL_VERSIONS= ${OPENSSL_VERSION_095A} + +.if ${USE_OPENSSL_VERSION} == ${OPENSSL_VERSION_096} # OpenSSL 0.9.6 +_VALID_SSL_VERSIONS= ${OPENSSL_VERSION_096} +.else +_VALID_SSL_VERSIONS+= ${OPENSSL_VERSION_096} +.endif + +.if ${USE_OPENSSL_VERSION} == ${OPENSSL_VERSION_096A} # OpenSSL 0.9.6a +_VALID_SSL_VERSIONS+= ${OPENSSL_VERSION_096A} .else -_VALID_SSL_VERSIONS+= 0x0090600fL +_VALID_SSL_VERSIONS+= ${OPENSSL_VERSION_096A} +.endif + +.if ${USE_OPENSSL_VERSION} == ${OPENSSL_VERSION_096B} # OpenSSL 0.9.6b +_VALID_SSL_VERSIONS= ${OPENSSL_VERSION_096B} +.else +_VALID_SSL_VERSIONS+= ${OPENSSL_VERSION_096B} .endif -_VALID_SSL_VERSIONS+= 0x0090601fL -_VALID_SSL_VERSIONS+= 0x0090602fL .for PATTERN in ${_VALID_SSL_VERSIONS} .if ${_OPENSSL_VERSION:M${PATTERN}} != "" _NEED_OPENSSL= NO .endif .endfor -.endif +.endif # exists(${_OPENSSLV_H}) .if ${_NEED_OPENSSL} == "YES" DEPENDS+= ${BUILDLINK_DEPENDS.openssl}:../../security/openssl -BUILDLINK_PREFIX.openssl= ${LOCALBASE} -SSLBASE= ${LOCALBASE} +EVAL_PREFIX+= BUILDLINK_PREFIX.openssl=openssl +SSLBASE= ${BUILDLINK_PREFIX.openssl} SSLCERTS= ${SSLBASE}/certs .else BUILDLINK_PREFIX.openssl= /usr |