On Friday 28 April 2006 21:57, A. Khattri wrote:
> Does it make sense to make the value of RDEPEND in an ebuild depend on USE
> flags? Example: Im writing an ebuild that use either cvs or svn at
> runtime. I want to allow users to choose which one they want but make cvs
> the default. What's the best practice for scripting this in an ebuild?

RDEPEND="cvs? ( dev-util/cvs )
        svn? ( dev-util/subversion )
        !cvs? ( ! svn? ( dev-util/cvs ) )"

pkg_setup() {
        if ! use cvs && ! use svn ; then
                ewarn "Neither CVS nor Subversion use flags enabled, defaulting 
to CVS."
        fi
}


Carsten

Attachment: pgpoo7U4tVN4b.pgp
Description: PGP signature

Reply via email to