what to do when base openssl isn't suitable
Don Lewis
truckman at FreeBSD.org
Sat Jul 2 17:41:18 UTC 2016
On 2 Jul, Shane Ambler wrote:
> On 02/07/2016 04:29, Don Lewis wrote:
>> I've got a port that does not work with base openssl because it looks
>> for libssl.pc. Other than that, I don't think it is picky about what
>> flavor of ports ssl is installed.
>
> If it is looking for libssl.pc then it is using pkg-config to get the
> CFLAGS/CXXFLAGS/LDFLAGS to use for openssl.
>
> Search the Makefiles for pkg-config openssl --cflags --libs or the
> variable substituted equivalent, then patch it to suit. If you want to
> use the system openssl then manually adding -lssl -lcrypto where it adds
> the result from pkg-config should work.
In this case, the configure script skips the call to pkg-config if
$libssl_CFLAGS is set. I was able to get a successful build by passing
the proper environment variables to configure without the need for
patching it. This is what I added to the ports Makefile:
.if ${SSL_DEFAULT} == base
. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
IGNORE= base OpenSSL in FreeBSD 9 is too old, specify a ports version of SSL by adding DEFAULT_VERSIONS+=ssl=... to /etc/make.conf and rebuild everything that needs SSL
. else
CONFIGURE_ENV+= libcrypto_CFLAGS="-I${OPENSSLINC}" \
libcrypto_LIBS="-L${OPENSSLLIB} -lcrypto" \
libssl_CFLAGS="-I${OPENSSLINC}" \
libssl_LIBS="-L${OPENSSLLIB} -lssl"
. endif
.endif
More information about the freebsd-ports
mailing list