Right now, perl-module.eclass sets internal SRC_PREP variable within perl-module_src_prep() to disallow preparing the sources twice. What is the motivation for this? I don't see a reason why an ebuild could call this function twice mistakenly. Considering that this functions work in cwd and does not rely on absolute paths, there's no reason to not use it twice, e.g. to build two perl modules in a single ebuild. This is a case in net-im/ekg2 ebuild which (optionally) builds two related perl modules supplied with the program. I suggest removing that check or stating a clear way to reuse the perl-module eclass functions to build multiple perl modules.
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/perl-module.eclass?r1=1.10&r2=1.11 "break up compile function, as we might need to patch the Makefile (CORBA-ORBit)" You can set SRC_PREP="no" again. (net-firewall/psad does it -- ebuild seems to be a bit b0rked.)
(In reply to comment #1) > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/perl-module.eclass?r1=1.10&r2=1.11 > "break up compile function, as we might need to patch the Makefile > (CORBA-ORBit)" Looking at the diff, it seems that such an attempt is no longer necessary with EAPI 2+ (not to mention it's ugly).
(In reply to comment #0) > eclass functions to build multiple perl modules. I would personally generally oppose the idea to build multiple perl modules within a single ebuild. It just seems like its being done wrong if somebody was actually doing that. Granted there may be cases where its unavoidable, but that would be a last-option for me. I'd sooner ask for the package to be split into several separate ebuilds that all used one source archive than have one package install several different equivalent distributions itself.
Well, that package no longer a case but the eclass and a few ebuilds still need cleaning up. Some ebuilds, for example, unnecessarily call 'perl-module_src_prep' just before calling 'perl-module_src_compile'. And the current SRC_PREP behaviour helps with such an ugly tricks.
This type of change in behaviour should be changed with an EAPI update.
The code from src_prep was moved to src_configure (including the block against double-calling) and all calls to src_prep in the tree replaced by src_configure. src_prep will be removed. [Note, src_prep != src_prepare] The block against double-calling remains for now, but I suggest we remove it in EAPI=6.
Will die if called twice in EAPI=6
(In reply to Andreas K. Hüttel from comment #7) > Will die if called twice in EAPI=6 Err, did you read this bug? Then please at least store the state per-directory rather than globally, since this explicitly prevents building two perl modules in one ebuild.
(In reply to Michał Górny from comment #8) > (In reply to Andreas K. Hüttel from comment #7) > > Will die if called twice in EAPI=6 > > Err, did you read this bug? Then please at least store the state > per-directory rather than globally, since this explicitly prevents building > two perl modules in one ebuild. OK fine then let's just ignore the condition silently instead. I have no clue how much breaks if you run the phases twice though. Happy hacking everyone.
This is fixed for EAPI=6 ebuilds.