loose dependency

Hiroki Sato hrs at FreeBSD.org
Fri Mar 15 09:34:19 UTC 2019


Koichiro Iwao <meta at FreeBSD.org> wrote
  in <20190315013227.cspgdqyw7gzua2bu at icepick.vmeta.jp>:

me> On Thu, Mar 14, 2019 at 06:50:43PM +0100, Tijl Coosemans wrote:
me> > You mean building from ports versus poudriere?  Poudriere would always
me> > select ImageMagick6 with the BUILD_DEPENDS line above, but that's fine.
me> > 
me> > Options aren't a good interface for this because the user can select an
me> > option that conflicts with the installed version.  It's not really a
me> > port option but a system-wide option.  If this needs to be configurable
me> > for poudriere then an entry should be added to bsd.default-versions.mk.
me> > Then the BUILD_DEPENDS line above can become:
me> > 
me> > BUILD_DEPENDS=	convert:graphics/ImageMagick${IMAGEMAGICK_DEFAULT}
me> 
me> I'm still not sure whether OPTIONS for IM[67] are needed. tijl@ and
me> adamw@ say different thing but the below works fine for me in both ports
me> and pkg schenario. Even if IM6 installed, no problem for me.
me> 
me> BUILD_DEPENDS=	convert:graphics/ImageMagick7

 If I understand correctly, adamw@'s suggestion is like the
 following (please correct me if I am wrong):

OPTIONS_SINGLE=	IMAGEMAGICK
OPTIONS_SINGLE_IMAGEMAGICK= IM6 IM7
OPTIONS_DEFAULT=IM7
IM6_BUILD_DEPENDS=  convert:graphics/ImageMagick6
IM6_DESC= Use ImageMagick6
IM7_BUILD_DEPENDS=  convert:graphics/ImageMagick7
IM7_DESC= Use ImageMagick7

 I tend to agree with tijl@ about this, however.  As he stated, these
 options do not guarantee availability of the specified version and
 make the user confusing since IM7 may not be installed when IM6 is
 already installed, for example.  Just putting BUILD_DEPENDS line with
 a default version you want works in the same way.

 In the case of runtime dependency such as LIB_DEPENDS or RUN_DEPENDS,
 using OPTIONS and/or FLAVORS are a good idea in general, of course.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20190315/1e02923f/attachment.sig>


More information about the freebsd-ports mailing list