Date: Sat, 21 Mar 2015 11:04:08 +1030 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Naram Qashat <cyberbotx@cyberbotx.com>, freebsd-ports@FreeBSD.org Subject: Re: Is it possibly to detect which OpenSSL is used for a port? Message-ID: <550CBC80.5020607@ShaneWare.Biz> In-Reply-To: <1b89602a13f212214de4f70feaf3f11e.squirrel@www.cyberbotx.com> References: <1b89602a13f212214de4f70feaf3f11e.squirrel@www.cyberbotx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21/03/2015 04:32, Naram Qashat wrote: > This isn't quite what I'm looking for. I want to be able to tell within a > port's Makefile if the user wanted the base or ports OpenSSL to be used. > I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to > check for OpenSSL. This would work if the only form of OpenSSL was in > ports, but the base OpenSSL doesn't have a pkg-config file to use, so I > need to know which is going to be used so I can determine when this > pkg-config check can be removed. I created a new port devel/godot not long ago, it used pkg-config to find openssl so I set it to use openssl port as it was a quick easy fix till I got around to finding a better solution. I was then offered a patch to fix this, which removed a test whether "pkg config openssl" failed and changed 'pkg-config openssl --cflags --libs' to 'echo -lssl -lcrypto' https://svnweb.freebsd.org/ports/head/devel/godot/files/patch-platform_x11_detect.py?r1=377975&r2=380508 Having USE_OPENSSL=yes in your Makefile leads to LDFLAGS getting -rpath set to the location of the ssl libs. Therefore adding -lssl -lcrypto instead of the pkg-config response leads to finding the ssl libs based on the ssl option set at build time. Worst case you may need to re-order the LDFLAGS so that other "-L/path" entries are placed after the ssl search paths. If you still need tests then try testing ${OPENSSLBASE} == '/usr' # The makefile sets this variables: # OPENSSLBASE - "/usr" or ${LOCALBASE} # OPENSSLDIR - path to openssl # OPENSSLLIB - path to the libs # OPENSSLINC - path to the matching includes # OPENSSLRPATH - rpath for dynamic linker -- FreeBSD - the place to B...Software Developing Shane Ambler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?550CBC80.5020607>