Gentoo Archives: gentoo-dev

From: Dan Armak <ermak@×××××××××××××.il>
To: gentoo-dev@××××××××××.org
Subject: Re: [gentoo-dev] New version of heroes ebuild
Date: Mon, 09 Jul 2001 11:39:50
Message-Id: 01070920395701.00654@localhost
In Reply to: Re: [gentoo-dev] New version of heroes ebuild by Daniel Robbins
1 On Monday 09 July 2001 18:54, you wrote:
2 > On Mon, Jul 09, 2001 at 02:19:59PM +0300, Dan Armak wrote:
3 > > The original version I posted installed a file into /doc: a very strange
4 > > default on the part of the makefile. The ebuild now passes a special
5 > > paramter to configure to make it install into /usr/share/doc/${P} as
6 > > needed.
7 > >
8 > > DEPEND="virtual/x11"
9 > >
10 > > if [ "`use sdl`" ]; then
11 > > DEPEND="${DEPEND} media-libs/libsdl media-libs/sdl-mixer"
12 > > confopts="${confopts} --with-sdl --with-sdl-mixer"
13 > > else # `use ggi` isn't checked since this is the game's default
14 > > DEPEND="${DEPEND} media-libs/libggi media-libs/libgii
15 > > media-libs/libmikmod"
16 > > confopts="${confopts} --with-ggi --with-mikmod"
17 > > fi
18 > >
19 > > DEPEND="media-libs/libsdl media-libs/sdl-mixer virtual/x11"
20 >
21 > OK, some notes. First, notice that you just overwrote your DEPEND settings
22 > with this line above, so any DEPEND tweaking you did previously was lost.
23 > Did you mean to use RDEPEND instead? If so, it defaults to be the same a
24 > DEPEND if not defined.
25
26 Terribly sorry! - my mistake. This is a line I thought I'd deleted or
27 commented out. You should just delete it. Then it will be OK.
28
29 >
30 > Next, you can use our handy DEPEND/RDEPEND syntax to do stuff like this:
31 >
32 > DEPEND="virtual/x11 sdl? ( media-libs/libsdl media-libs/sdl-mixer ) ggi? (
33 > media-libs/libggi media-libs/libgii )"
34 >
35
36 Yes but: if the game needs either SDl of libGGI, this syntax doesn't make
37 sure at least something is defined in DEPEND. If neither USE variable is set,
38 niether lib will be installed and the game won't compile as it needs at least
39 1 frontend lib.
40
41 > Also, it may not be good to use sdl *or* libggi. Can one compile-in both
42 > options? If not, then the best approach (taking into account the current
43 > functionality of the ebuild system) is to create two packages: heroes-sdl
44 > and heroes-ggi. Right now, there's no good way for Portage to choose
45 > between two existing USE variables; ie. if ggi and sdl are defined, Portage
46 > has no way of knowing which one should be preferred.
47 >
48
49 Yes but: the heroes game developers themselves prefer SDL over GGI. This is
50 because it is better maintained. (according to the readme file).
51 And no, you can't compile both options. Unless you patch the Makefile to
52 compile 2 different executables. But in that case it's better to make 2
53 diferent ebuilds - however, they will be mutually exclusive. But it's easy
54 enough to separate into heroes-ggi and heroes-sdl. Do that if you think
55 that's what's needed.
56
57 > > src_unpack() {
58 > >
59 > > unpack ${A1} ${A2} ${A3} ${A4}
60 > >
61 > > }
62 >
63 > The default src_unpack function should perform this step for you, so you
64 > should be able to remove the src_unpack() function from your ebuild. Also,
65 > the preferred way of doing things now is to remove the A= definition from
66 > your ebuild and just use SRC_URI:
67
68 I wasn't sure about that.
69
70 >
71 > SRC_URI="http://prdownloads.sourceforge.net/heroes/heroes-0.11.tar.gz
72 > http://prdownloads.sourceforge.net/heroes/heroes-data-1.1.tar.gz
73 > http://prdownloads.sourceforge.net/heroes/heroes-sound-tracks-1.0.tar.gz
74 > http://prdownloads.sourceforge.net/heroes/heroes-sound-effects-1.0.tar.gz"
75 >
76 > Other than that, it looks good and I look forward to playing it soon! :)
77
78 OK. I'll learn from my mistakes :-)
79
80
81 Dan

Replies

Subject Author
Re: [gentoo-dev] New version of heroes ebuild Daniel Robbins <drobbins@g.o>