Subject: Dealing with requirements in "buildlink3.mk" files
To: None <tech-pkg@NetBSD.org>
From: Matthias Scheler <tron@zhadum.org.uk>
List: tech-pkg
Date: 07/18/2007 14:33:01
Hello,
I've just changed our "openssl" package to provide thread support. I would
now like to allow a package to request an OpenSSL version which supports
that feature. The problems I need to solve are:
1.) What is the "knob" to turn this on? Is a variable called
"USE_OPENSSH_THREADS" correct?
2.) If the application sets "USE_OPENSSH_THREADS" to "yes" the
buildlink3 file would have to do something like this:
.if !empty(OPENSSL_BUILDLINK3_MK:M+)
.if defined(USE_OPENSSH_THREADS) && !empty(USE_OPENSSH_THREADS:M[Yy][Ee][Ss])
BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7inb4
BUILDLINK_ABI_DEPENDS.openssl+= openssl>=0.9.7inb4
.else
BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.6m
BUILDLINK_ABI_DEPENDS.openssl+= openssl>=0.9.7inb1
.endif
But this would reject older builtin OpenSSL versions even if they
support threads.
3.) Check whether the builtin OpenSSL supports threads isn't very difficult,
"grep '^#.*define.*OPENSSL_THREADS' ${SSLBASE}/openssl/opensslconf.h"
should do the trick. What's the best way to put that into the
somewhat complicated "pkgsrc/security/openssl/builtin.mk".
Kind regards
--
Matthias Scheler http://zhadum.org.uk/