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

Chris Rees crees at FreeBSD.org
Mon Apr 9 08:34:43 UTC 2012


On 1 April 2012 17:27, Lev Serebryakov <lev at freebsd.org> wrote:
> Hello, Chris.
> You wrote 1 апреля 2012 г., 21:22:36:
>
>>>>>>    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 :(
>>> Well, don't iconv and gettext require it?  In that case it needs
>>> registering.  Otherwise iconv and gettext should have their deps
>>> fixed....
>>   My port builds with static linkage. After port is built and
>> installed, it doesn't need any other ports in system. But if I use
>> USE_ICONV, and, later do something like this:
>
>> OLD_LIB_DEPENDS:=
>> ${LIB_DEPENDS:S!^!${LOCALBASE}/lib/lib!:C!(\.[0-9]+)?:!.a:!}
>> BUILD_DEPENDS+=         ${OLD_LIB_DEPENDS}
>> LIB_DEPENDS=
>>  I have proper BUILD_DEPENDS which is built from MY libraries, but
>> iconv, gettext & Ko are in LIB_DEPENDS anyway :(
>  USE_GETTEXT could be set to "build" but not USE_ICONV and USE_BDB.
> And all my manipulations with *_DEPENDS goes before effect of these
> options :(

I suppose bsd.port.pre.mk doesn't help here, does it?

USE_ICONV= yes
USE_BDB= yes

.include <bsd.port.pre.mk>

# mess with dependencies

.include <bsd.port.post.mk>


More information about the freebsd-ports mailing list