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

2012-04-01 Thread Julien Laffaye

On 4/1/2012 2:58 PM, Lev Serebryakov wrote:

Hello, Ports.

   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 ?
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Chris Rees
On 1 April 2012 14:04, Julien Laffaye  wrote:
> On 4/1/2012 2:58 PM, Lev Serebryakov wrote:
>>
>> Hello, Ports.
>>
>>   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 ?

By the way, using LIB_DEPENDS is wrong for depending on static
libraries anyway; LIB_DEPENDS uses ldconfig to check for them, which
is for dynamic linking.

Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Lev Serebryakov
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 :(

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Chris Rees
On 1 April 2012 17: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 :(

Well, don't iconv and gettext require it?  In that case it needs
registering.  Otherwise iconv and gettext should have their deps
fixed

Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Lev Serebryakov
Hello, Chris.
You wrote 1 апреля 2012 г., 20:59:18:

    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 :(

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Mel Flynn
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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-01 Thread Lev Serebryakov
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 :(

-- 
// Black Lion AKA Lev Serebryakov 

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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

2012-04-09 Thread Chris Rees
On 1 April 2012 17:27, Lev Serebryakov  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 

# mess with dependencies

.include 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"