using security/openssl in a port

Chris H portmaster at BSDforge.com
Fri Jan 5 02:37:10 UTC 2018


On Fri, 5 Jan 2018 15:11:00 +1300 "Matthew Luckie" <mjl at luckie.org.nz> said

> Hi,
> 
> I maintain a port that has a new release which requires openssl 1.0.2 to
> build.  FreeBSD 10.3 and 10.4 both have openssl 1.0.1, and 11 onwards
> have 1.0.2.  Is there a magic way to have this port depend on ports
> openssl for freebsd releases without openssl 1.0.2?  I ran
> 
> find /usr/ports -exec grep "security/openssl" {} \; -print
> 
> and didn't find anything that I could use as a recipe.  USES = ssl
> doesn't seem to be it either.
> 
> Matthew
Hello Matthew,
Have a look at ports/Mk/bsd.port.mk
In there you will find some clues for defining rules for building
for specific (bsd)OS versions -- like >=XXXXX, or .if OSREL <=XXXXXX ...
As well as only permitting build/install when the correct version
of security/openssl is found in the systems ports tree.
It's well commented, and should give you some good options to try.
It will also give some good clues to search the ports tree for. Where
you can simply copy someone else's work verbatim. :-)

You might also try the following alternative for searching;
cd /usr/ports
find . | xargs <string-to-search-for>

HTH

--Chris




More information about the freebsd-ports mailing list