pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to add optional dependencies?

Adrian Portelli wrote:
Jens Rehsack wrote:

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
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,

Why not just use the 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 ...


# $NetBSD$

PKG_OPTIONS_VAR=        PKG_OPTIONS.p5-Module-Build

PKG_SUPPORTED_OPTIONS=  Module-Signature ExtUtils-ParseXS Pod-Readme


.include "../../mk/"

.if !empty(PKG_OPTIONS:MModule-Signature)
DEPENDS+=       p5-Module-Signature>=0.55:../../security/p5-Module-Signature
.if !empty(PKG_OPTIONS:MExtUtils-ParseXS)
DEPENDS+=       p5-ExtUtils-ParseXS>=2.19:../../devel/p5-ExtUtils-ParseXS
.if !empty(PKG_OPTIONS:MPod-Readme)
DEPENDS+=       p5-Pod-Readme>=0.09:../../textproc/p5-Pod-Readme

Home | Main Index | Thread Index | Old Index