[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] Help: How to handle multi svn sources
From:       Zac Medico <zmedico () gentoo ! org>
Date:       2009-07-29 20:59:56
Message-ID: 4A70B84C.1080708 () gentoo ! org
[Download RAW message or body]

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

["src_unpack" (text/plain)]

src_unpack() {
	subversion_fetch https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad
	use minimal || subversion_fetch https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-library
	use doc && subversion_fetch https://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad-doc
}


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic