Adrian Portelli wrote:
Jens Rehsack wrote:Hi, according to PR's pkg/39541, pkg/39542 and pkg/39543 I have one question: how can I add optional dependencies (e.g. devel/p5-IO-Socket depends on net/p5-Net-LibIDN, if available or special wanted or so)? The background is, PPI, IO::Socket (and some other CPAN modules) configures themself dependend whether those modules are installed or not. When I create packages (*.pkg), I want the dependencies recorded, so that I don't need manually interact which additional pkg's must be installed to get PPI running as wanted etc. Best regards, JensWhy not just use the options.mk framework for this ?
If I understand you correctly, you mean adding a file like the attached one (for devel/p5-Module-Build - unfinished one).
I would prefer some auto-detection, if possible ...
adrian.
/Jens
# $NetBSD$ PKG_OPTIONS_VAR= PKG_OPTIONS.p5-Module-Build PKG_SUPPORTED_OPTIONS= Module-Signature ExtUtils-ParseXS Pod-Readme PKG_SUGGESTED_OPTIONS= ExtUtils-ParseXS Pod-Readme .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:MModule-Signature) DEPENDS+= p5-Module-Signature>=0.55:../../security/p5-Module-Signature .endif .if !empty(PKG_OPTIONS:MExtUtils-ParseXS) DEPENDS+= p5-ExtUtils-ParseXS>=2.19:../../devel/p5-ExtUtils-ParseXS .endif .if !empty(PKG_OPTIONS:MPod-Readme) DEPENDS+= p5-Pod-Readme>=0.09:../../textproc/p5-Pod-Readme .endif