Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags

Attention [personal profile] robbat2 or other Gentoo wizards

Tuesday, January 17th, 2006 01:51 pm

Once I get my Gentoo install working happily, I suppose I'm going to need to make ebuilds for several packages I use that don't now have any.  These include my favorite programming editor, Xcoral, and my multithreaded Perl ICB client, ICBM.

Now, there's a problem with this.  It's easy to make one package dependent on another package.  However, ICBM will not work unless Perl is built with ithreads support, and, for reasons that utterly and completely baffle and mystify me, to the best of my knowledge no OS or Linux distribution ships Perl by default with ithreads enabled.

So the question this raises is, is there any way to specify in an ebuild, "This package ICBM requires package dev-lang/perl, and requires that dev-lang/perl be built with USE=ithreads"?

Tags:
Tuesday, January 17th, 2006 11:13 am (UTC)
There's no way to specify this in DEPEND or RDEPEND that I know of, but there are functions you can use within the ebuild to determine whether a specific USE flag was used to build the dependency, and abort the build (with an appropriate error message.) It's in the eutils eclass, and named "built_with_use".

So you could do something like:

inherit eutils;
...
if ! built_with_use dev-lang/perl ithreads; then
eerror "You MUST re-emerge perl with the ithreads USE flag"
die "Current perl installation not threaded"
fi
Tuesday, January 17th, 2006 11:21 am (UTC)
Thanks! That would work perfectly. :)
Tuesday, January 17th, 2006 03:02 pm (UTC)
built_with_use is your best bet for the moment, at least until Portage2.2 is finalized.

Look at net-misc/asterisk/asterisk-1.0.10.ebuild for the best way of doing the ithreads check, as you need to take libperl into account as well.

After Portage2.2, you'll be able to do
RDEPEND="dev-lang/perl[+ithreads]"
:-)
This feature has been a _very_ long time in coming.
Wednesday, January 18th, 2006 08:22 am (UTC)
Cool. :) About how far out is portage 2.2? Is it available unstable yet?