1 |
On Friday 28 April 2006 21:57, A. Khattri wrote: |
2 |
> Does it make sense to make the value of RDEPEND in an ebuild depend on USE |
3 |
> flags? Example: Im writing an ebuild that use either cvs or svn at |
4 |
> runtime. I want to allow users to choose which one they want but make cvs |
5 |
> the default. What's the best practice for scripting this in an ebuild? |
6 |
|
7 |
RDEPEND="cvs? ( dev-util/cvs ) |
8 |
svn? ( dev-util/subversion ) |
9 |
!cvs? ( ! svn? ( dev-util/cvs ) )" |
10 |
|
11 |
pkg_setup() { |
12 |
if ! use cvs && ! use svn ; then |
13 |
ewarn "Neither CVS nor Subversion use flags enabled, defaulting to CVS." |
14 |
fi |
15 |
} |
16 |
|
17 |
|
18 |
Carsten |