Gentoo Archives: gentoo-dev

From: Jason Rhinelander <jason@××××××××××××××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] ebuild optional dependencies question
Date: Mon, 18 Oct 2004 17:16:52
Message-Id: 4173FA81.3090108@gossamer-threads.com
1 I've recently created a MySQL-4.1.x ebuild (bug 62582), but, as reported
2 in the bug, it breaks a couple modules (notably, Perl's DBD-mysql and
3 ruby's mysql module). Realistically, the pseudo-dependency for this
4 package needs to be something like:
5
6 if DBD-mysql is installed:
7 post-depend on DBD-mysql >= 2.9004
8 if ruby's mysql module is installed
9 post-depend on mysql-ruby >= 2.5
10
11 Putting both in PDEPEND would seem wrong as it forces both on people who
12 might use only one or neither. The following ought to more-or-less
13 accomplish it:
14
15 PDEPEND="perl? ( >=dev-perl/DBD-mysql )
16 ruby? ( >=dev-ruby/mysql-ruby-2.5 )"
17
18 The current mysql ebuild does this for "perl" (it also includes an
19 unnecessary dev-perl/DBI dependency). However, I've seen comments in
20 the past that give me the impression that using USE flags ONLY for
21 dependencies, such as the 'ruby' flag above, is discouraged (the 'perl'
22 USE flag is also used elsewhere in the ebuild).
23
24 Is there an alternative, established way of dealing with a situation
25 like this, or is the PDEPEND USE-flags above the best way?
26
27 --
28 -- Jason Rhinelander
29 -- Gossamer Threads, Inc.
30
31 --
32 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] ebuild optional dependencies question Ciaran McCreesh <ciaranm@g.o>
Re: [gentoo-dev] ebuild optional dependencies question Michael Cummings <mcummings@g.o>