From owner-freebsd-ports@FreeBSD.ORG Sun Apr 1 17:26:37 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 447941065672 for ; Sun, 1 Apr 2012 17:26:37 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 112678FC14 for ; Sun, 1 Apr 2012 17:26:36 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id E3ABD7E849 for ; Sun, 1 Apr 2012 09:26:34 -0800 (AKDT) Message-ID: <4F788FA6.8090706@acsalaska.net> Date: Sun, 01 Apr 2012 19:25:58 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <792848519.20120401165840@serebryakov.spb.ru> <4F785246.60804@freebsd.org> <498407961.20120401205358@serebryakov.spb.ru> In-Reply-To: <498407961.20120401205358@serebryakov.spb.ru> Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Subject: Re: BUILD_DEPENDS and libraries -- how to express build-time-only dependency on library? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 17:26:37 -0000 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