loose dependency

Tijl Coosemans tijl at FreeBSD.org
Thu Mar 14 17:51:58 UTC 2019


On Thu, 14 Mar 2019 11:20:09 -0600 Adam Weinberger <adamw at adamw.org>
wrote:
> On Thu, Mar 14, 2019 at 10:41 AM Koichiro Iwao <meta at freebsd.org> wrote:
>> On Thu, Mar 14, 2019 at 02:33:30PM +0100, Tijl Coosemans wrote:  
>>> Like hrs already said: since this is a build dependency you can just
>>> write:
>>>
>>> BUILD_DEPENDS=        convert:graphics/ImageMagick6
>>>
>>> This does not install ImageMagick6 if 7 is installed.  It will only
>>> install 6 if convert does not exist.  It is a loose dependency.  
>>
>> I understand now. This is what I wanted. Perfect!
>>  
>>> This is not the case for RUN_DEPENDS because dependencies in a package
>>> are currently specified using package names (including version).  They
>>> would have to be specified using features where multiple packages can
>>> then provide a feature.  
>>
>> That's good to know. I'd been thinking the only difference between RUN_
>> and BUILD_DEPENDS is when the dependency is checked.  
> 
> This makes building from ports behave differently from pkg. Please,
> just make an OPTIONS_SINGLE for it, and default it to the current
> version (7), not the old version.

You mean building from ports versus poudriere?  Poudriere would always
select ImageMagick6 with the BUILD_DEPENDS line above, but that's fine.

Options aren't a good interface for this because the user can select an
option that conflicts with the installed version.  It's not really a
port option but a system-wide option.  If this needs to be configurable
for poudriere then an entry should be added to bsd.default-versions.mk.
Then the BUILD_DEPENDS line above can become:

BUILD_DEPENDS=	convert:graphics/ImageMagick${IMAGEMAGICK_DEFAULT}


More information about the freebsd-ports mailing list