Subject: Dealing with requirements in "" files
To: None <>
From: Matthias Scheler <>
List: tech-pkg
Date: 07/18/2007 14:33:01

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 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
BUILDLINK_API_DEPENDS.openssl+=	openssl>=0.9.6m
BUILDLINK_ABI_DEPENDS.openssl+=	openssl>=0.9.7inb1
    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/".

	Kind regards

Matthias Scheler