Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Apr 2012 19:25:58 +0200
From:      Mel Flynn <rflynn@acsalaska.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: BUILD_DEPENDS and libraries -- how to express build-time-only dependency on library?
Message-ID:  <4F788FA6.8090706@acsalaska.net>
In-Reply-To: <498407961.20120401205358@serebryakov.spb.ru>
References:  <792848519.20120401165840@serebryakov.spb.ru> <4F785246.60804@freebsd.org> <498407961.20120401205358@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F788FA6.8090706>