Subject: minimizing package dependencies
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 07/16/2002 23:49:37

if there's a choice which other packages a given package can depend on,
e.g. it works without them, but may work better or give additional options
if they are available, should I include those other packages or should
I make them optional with Makefile variables?

mail/p5-Mail-SpamAssassin works without net/p5-Net-DNS and time/p5-Time-HiRes
(SA detects them at run time). p5-Net-DNS is used very often by users
(DNS blacklist lookup) but p5-Time-HiRes is only needed if people need to
get timing statistics for spam scoring rules, mainly for development

I thought about minimizing dependencies like this:

  SA_USE_DNS?=            NO

  .if ${SA_USE_DNS} != "NO"
  DEPENDS+=               p5-Net-DNS-[0-9]*:../../net/p5-Net-DNS
  .if ${SA_USE_TIME_HIRES} != "NO"
  DEPENDS+=               p5-Time-HiRes-[0-9]*:../../time/p5-Time-HiRes

On the other hand, the typical user will probably not look at the Makefile
and will not notice those options. This is true especially for users
of binary packages, I think.

Maybe I should adopt a mixed approach: add p5-Net-DNS and make p5-Time-HiRes