On Tue, 2007-01-30 at 06:27 +0000, Ciaran McCreesh wrote:
> [ Background: tr1 is a set of extensions to the C++ Standard Library
> giving various useful things like hash tables and smart pointers. There
> are partial implementations included in g++-4.1 and boost and full
> implementations available from Dinkumware. It is likely that a lot of
> C++ apps will start using it in the not too distant future. ]
> 
> What is the best way to handle packages that require parts of tr1? The
> options appear to be:
> 
> * Hard dep upon boost. This sucks for g++-4.1 users.
> 
> * Hard dep upon g++-4.1, which isn't available for all archs. This
> doesn't even work because there's no guarantee that >=4.1 is being used
> even if it's installed.

isn't it possible to check the version of gcc that is in _use_ in an
ebuild, like i can do in a configure script? if so, one could provide a 
"old-gcc" use flag that must be enabled when trying to build with
<gcc-4.1.0 (that actually pulls in boost etc.) and must not be enabled
when using >=gcc-4.1.0 ...

> 
> * || ( ) deps, and hope that if the user has 4.1 installed then they're
> using it. Since library implementations aren't runtime switchable, this
> will lead to breakages if users upgrade gcc and then remove boost.
> 

switching gcc versions may lead to breakage anyway if the user doesn't
know what he/she is doing.

> None of these are particularly nice...
> 

nope ... let's hope c++-0x comes out soon and that compiler vendors are
faster in implementing it than c++-98.

-- 
gentoo-dev@gentoo.org mailing list

Reply via email to