BUILD_DEPENDS and libraries -- how to express build-time-only dependency on library?

Mel Flynn rflynn at acsalaska.net
Sun Apr 1 17:26:37 UTC 2012


On 4/1/2012 18:53, Lev Serebryakov wrote:
> Hello, Julien.
> You wrote 1 апреля 2012 г., 17:04:06:
> 
>>>    In case of static build of ported program, port need to have
>>> BUILD_DEPENDS on libraries. LIB_DEPENDS is not suitable here, because
>>> inc ase of static linkage, there will no dependency on livbrary in
>>> runtime.
>>>    But BUILD_DEPENDS search for files at absolute pathname or for
>>> executables.
>>>    Is it possible to express build-time-only dependency on library?
>> BUILD_DEPENDS=${LOCALBASE}/lib/libfoo.a:${PORTSDIR}/foo/libfoo ?
>  It works, but here are other problem: if iconv or gettext or
> something like this are used, they added after all libs anyway :(

The upstream build system _has_ to support linking to a static library.
Adding a dependency to a static version of a shared library, does not
magically change the upstream link logic.
You would use the above BUILD_DEPENDS only for libraries that only come
in static version, like hebrew/hspell.
Or when the upstream build system only links with the static version.

-- 
Mel


More information about the freebsd-ports mailing list