Gentoo Archives: gentoo-dev

From: Daniel Robbins <drobbins@g.o>
To: gentoo-dev@××××××××××.org
Subject: Re: [gentoo-dev] New version of heroes ebuild
Date: Mon, 09 Jul 2001 09:54:50
Message-Id: 20010709095449.C14752@cvs.gentoo.org
In Reply to: [gentoo-dev] New version of heroes ebuild by Dan Armak
1 On Mon, Jul 09, 2001 at 02:19:59PM +0300, Dan Armak wrote:
2 > The original version I posted installed a file into /doc: a very strange
3 > default on the part of the makefile. The ebuild now passes a special paramter
4 > to configure to make it install into /usr/share/doc/${P} as needed.
5 >
6 > DEPEND="virtual/x11"
7 >
8 > if [ "`use sdl`" ]; then
9 > DEPEND="${DEPEND} media-libs/libsdl media-libs/sdl-mixer"
10 > confopts="${confopts} --with-sdl --with-sdl-mixer"
11 > else # `use ggi` isn't checked since this is the game's default
12 > DEPEND="${DEPEND} media-libs/libggi media-libs/libgii
13 > media-libs/libmikmod"
14 > confopts="${confopts} --with-ggi --with-mikmod"
15 > fi
16 >
17 > DEPEND="media-libs/libsdl media-libs/sdl-mixer virtual/x11"
18
19 OK, some notes. First, notice that you just overwrote your DEPEND settings
20 with this line above, so any DEPEND tweaking you did previously was lost. Did
21 you mean to use RDEPEND instead? If so, it defaults to be the same a DEPEND if
22 not defined.
23
24 Next, you can use our handy DEPEND/RDEPEND syntax to do stuff like this:
25
26 DEPEND="virtual/x11 sdl? ( media-libs/libsdl media-libs/sdl-mixer ) ggi? ( media-libs/libggi media-libs/libgii )"
27
28 Also, it may not be good to use sdl *or* libggi. Can one compile-in both
29 options? If not, then the best approach (taking into account the current
30 functionality of the ebuild system) is to create two packages: heroes-sdl and
31 heroes-ggi. Right now, there's no good way for Portage to choose between two
32 existing USE variables; ie. if ggi and sdl are defined, Portage has no way of
33 knowing which one should be preferred.
34
35 > src_unpack() {
36 >
37 > unpack ${A1} ${A2} ${A3} ${A4}
38 >
39 > }
40
41 The default src_unpack function should perform this step for you, so you should
42 be able to remove the src_unpack() function from your ebuild. Also, the preferred
43 way of doing things now is to remove the A= definition from your ebuild and just
44 use SRC_URI:
45
46 SRC_URI="http://prdownloads.sourceforge.net/heroes/heroes-0.11.tar.gz
47 http://prdownloads.sourceforge.net/heroes/heroes-data-1.1.tar.gz
48 http://prdownloads.sourceforge.net/heroes/heroes-sound-tracks-1.0.tar.gz
49 http://prdownloads.sourceforge.net/heroes/heroes-sound-effects-1.0.tar.gz"
50
51 Other than that, it looks good and I look forward to playing it soon! :)
52
53 --
54 Daniel Robbins <drobbins@g.o>
55 President/CEO http://www.gentoo.org
56 Gentoo Technologies, Inc.

Replies

Subject Author
Re: [gentoo-dev] New version of heroes ebuild Dan Armak <ermak@×××××××××××××.il>