Date: Sat, 2 Jul 2016 10:41:09 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: FreeBSD@ShaneWare.Biz Cc: freebsd-ports@FreeBSD.org Subject: Re: what to do when base openssl isn't suitable Message-ID: <201607021741.u62Hf9xk096553@gw.catspoiler.org> In-Reply-To: <5777A241.4040108@ShaneWare.Biz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607021741.u62Hf9xk096553>