Mailing List Archive

Help: How to handle multi svn sources
HI Folks:
I'm not a ebuild guru, so I ask here directly.
Here I'm trying to update kicad package to support live svn repos.
But the problem I face here is, kicad seperate different sources base on
different USE flags
I slightly modified the ebuild files, but it simply doesn't work.
Any suggestion or advice, really appreciate!

Following is offended code, attached file is the ebuild file:

ESVN_REPO_URI="https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad
!minimal? (
https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-library )
doc? ( https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-doc)"

Dennis
Re: Help: How to handle multi svn sources [ In reply to ]
Dennis.Yxun wrote:
> HI Folks:
> I'm not a ebuild guru, so I ask here directly.
> Here I'm trying to update kicad package to support live svn repos.
> But the problem I face here is, kicad seperate different sources base on
> different USE flags
> I slightly modified the ebuild files, but it simply doesn't work.
> Any suggestion or advice, really appreciate!
>
> Following is offended code, attached file is the ebuild file:
>
> ESVN_REPO_URI="https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad
> !minimal? (
> https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-library )
> doc? (
> https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-doc )"
>
> Dennis

You can't embed USE conditionals inside ESVN_REPO_URI, since USE
conditionals like those are only supported in specific variables:
*DEPEND, RESTRICT, SRC_URI, PROPERTIES, and PROVIDE.

A brief examination of the subversion_fetch() function inside
/usr/portage/eclass/subversion.eclass suggests that ESVN_REPO_URI is
expected to be single-valued. So, I suspect that you will want to
define your own src_unpack() function (overriding
subversion_src_unpack) which will call subversion_fetch() as many
times as necessary. See the attached code for example.
--
Thanks,
Zac