public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] New version of heroes ebuild
@ 2001-07-09  5:23 Dan Armak
  2001-07-09  5:34 ` Thomas M. Beaudry
  2001-07-09  9:55 ` Daniel Robbins
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Armak @ 2001-07-09  5:23 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

The original version I posted installed a file into /doc: a very strange 
default on the part of the makefile. The ebuild now passes a special paramter 
to configure to make it install into /usr/share/doc/${P} as needed.

Dan Armak

[-- Attachment #2: heroes-0.11.ebuild --]
[-- Type: text/plain, Size: 2450 bytes --]

# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <ermak@netvision.net.il>
# /home/cvsroot/gentoo-x86/app-games/heroes/heroes-0.11.ebuild

P=heroes-0.11
A1=${P}.tar.gz
A2="heroes-data-1.1.tar.gz"
A3="heroes-sound-tracks-1.0.tar.gz"
A4="heroes-sound-effects-1.0.tar.gz"

# Is this needed for digest creation? What happens if ${A} isn't defined?
A="${A1} ${A2} ${A3} ${A4}"
S=${WORKDIR}/${P}
DESCRIPTION="heroes: an ultra-advanced multiplayer worms racing game"
SRC_URI="http://prdownloads.sourceforge.net/heroes/heroes-0.11.tar.gz
	 http://prdownloads.sourceforge.net/heroes/${A2}
	 http://prdownloads.sourceforge.net/heroes/${A3}
	 http://prdownloads.sourceforge.net/heroes/${A4}"
HOMEPAGE="http://heroes.sourceforge.net/"

# heroes can either link against SDL+SDL-mixer or, libGGI+libGII+libmikmod.
DEPEND="virtual/x11"
confopts="--prefix=/usr --host=${CHOST} --enable-html-doc=/usr/share/doc/${P} --disable-debug --disable-heroes-debug"

# The following means that SDL is used only if it's in the USE var.
# This conforms to the game's default of using ggi if possible and
# SDL as a fallback option.

if [ "`use sdl`" ]; then
    DEPEND="${DEPEND} media-libs/libsdl media-libs/sdl-mixer"
    confopts="${confopts} --with-sdl --with-sdl-mixer"
else # `use ggi` isn't checked since this is the game's default
    DEPEND="${DEPEND} media-libs/libggi media-libs/libgii
	    media-libs/libmikmod"
    confopts="${confopts} --with-ggi --with-mikmod"
fi

DEPEND="media-libs/libsdl media-libs/sdl-mixer virtual/x11"

src_unpack() {
    
    unpack ${A1} ${A2} ${A3} ${A4}
    
}

src_compile() {

    #main part
    cd ${WORKDIR}/heroes-0.11
    try ./configure ${confopts}
    try make
    
    #levels
    cd ${WORKDIR}/heroes-data-1.1
    try ./configure --prefix=/usr
    try make

    #sounds
    cd ${WORKDIR}/heroes-sound-effects-1.0
    try ./configure --prefix=/usr
    try make

    #music
    cd ${WORKDIR}/heroes-sound-tracks-1.0
    try ./configure --prefix=/usr
    try make

}

src_install () {

    #main part
    cd ${WORKDIR}/heroes-0.11
    try make DESTDIR=${D} install
    
    #levels
    cd ${WORKDIR}/heroes-data-1.1
    try make DESTDIR=${D} install

    #sounds
    cd ${WORKDIR}/heroes-sound-effects-1.0
    try make DESTDIR=${D} install

    #music
    cd ${WORKDIR}/heroes-sound-tracks-1.0
    try make DESTDIR=${D} install
    
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] New version of heroes ebuild
  2001-07-09  5:23 [gentoo-dev] New version of heroes ebuild Dan Armak
@ 2001-07-09  5:34 ` Thomas M. Beaudry
  2001-07-09  9:55 ` Daniel Robbins
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas M. Beaudry @ 2001-07-09  5:34 UTC (permalink / raw
  To: gentoo-dev

>The original version I posted installed a file into /doc: a very strange 
>default on the part of the makefile.
>
Not strange, that´s the GNU standard.  If you want to get really scared, 
take a look at a HURD installation.  It uses all the GNU standards for 
the directory tree.  Personally, I think they were taking some illegal 
drugs when they came up with the standards...




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] New version of heroes ebuild
  2001-07-09  5:23 [gentoo-dev] New version of heroes ebuild Dan Armak
  2001-07-09  5:34 ` Thomas M. Beaudry
@ 2001-07-09  9:55 ` Daniel Robbins
  2001-07-09 11:40   ` Dan Armak
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Robbins @ 2001-07-09  9:55 UTC (permalink / raw
  To: gentoo-dev

On Mon, Jul 09, 2001 at 02:19:59PM +0300, Dan Armak wrote:
> The original version I posted installed a file into /doc: a very strange 
> default on the part of the makefile. The ebuild now passes a special paramter 
> to configure to make it install into /usr/share/doc/${P} as needed.
> 
> DEPEND="virtual/x11"
> 
> if [ "`use sdl`" ]; then
>     DEPEND="${DEPEND} media-libs/libsdl media-libs/sdl-mixer"
>     confopts="${confopts} --with-sdl --with-sdl-mixer"
> else # `use ggi` isn't checked since this is the game's default
>     DEPEND="${DEPEND} media-libs/libggi media-libs/libgii
> 	    media-libs/libmikmod"
>     confopts="${confopts} --with-ggi --with-mikmod"
> fi
> 
> DEPEND="media-libs/libsdl media-libs/sdl-mixer virtual/x11"

OK, some notes.  First, notice that you just overwrote your DEPEND settings
with this line above, so any DEPEND tweaking you did previously was lost.  Did
you mean to use RDEPEND instead?  If so, it defaults to be the same a DEPEND if
not defined.

Next, you can use our handy DEPEND/RDEPEND syntax to do stuff like this:

DEPEND="virtual/x11 sdl? ( media-libs/libsdl media-libs/sdl-mixer ) ggi? ( media-libs/libggi media-libs/libgii )"

Also, it may not be good to use sdl *or* libggi.  Can one compile-in both
options?  If not, then the best approach (taking into account the current
functionality of the ebuild system) is to create two packages: heroes-sdl and
heroes-ggi.  Right now, there's no good way for Portage to choose between two
existing USE variables; ie. if ggi and sdl are defined, Portage has no way of
knowing which one should be preferred.

> src_unpack() {
>     
>     unpack ${A1} ${A2} ${A3} ${A4}
>     
> }

The default src_unpack function should perform this step for you, so you should
be able to remove the src_unpack() function from your ebuild. Also, the preferred
way of doing things now is to remove the A= definition from your ebuild and just
use SRC_URI:

SRC_URI="http://prdownloads.sourceforge.net/heroes/heroes-0.11.tar.gz
http://prdownloads.sourceforge.net/heroes/heroes-data-1.1.tar.gz
http://prdownloads.sourceforge.net/heroes/heroes-sound-tracks-1.0.tar.gz
http://prdownloads.sourceforge.net/heroes/heroes-sound-effects-1.0.tar.gz"

Other than that, it looks good and I look forward to playing it soon! :)

-- 
Daniel Robbins					<drobbins@gentoo.org>
President/CEO					http://www.gentoo.org 
Gentoo Technologies, Inc.			



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] New version of heroes ebuild
  2001-07-09  9:55 ` Daniel Robbins
@ 2001-07-09 11:40   ` Dan Armak
  2001-07-09 13:53     ` Daniel Robbins
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Armak @ 2001-07-09 11:40 UTC (permalink / raw
  To: gentoo-dev

On Monday 09 July 2001 18:54, you wrote:
> On Mon, Jul 09, 2001 at 02:19:59PM +0300, Dan Armak wrote:
> > The original version I posted installed a file into /doc: a very strange
> > default on the part of the makefile. The ebuild now passes a special
> > paramter to configure to make it install into /usr/share/doc/${P} as
> > needed.
> >
> > DEPEND="virtual/x11"
> >
> > if [ "`use sdl`" ]; then
> >     DEPEND="${DEPEND} media-libs/libsdl media-libs/sdl-mixer"
> >     confopts="${confopts} --with-sdl --with-sdl-mixer"
> > else # `use ggi` isn't checked since this is the game's default
> >     DEPEND="${DEPEND} media-libs/libggi media-libs/libgii
> > 	    media-libs/libmikmod"
> >     confopts="${confopts} --with-ggi --with-mikmod"
> > fi
> >
> > DEPEND="media-libs/libsdl media-libs/sdl-mixer virtual/x11"
>
> OK, some notes.  First, notice that you just overwrote your DEPEND settings
> with this line above, so any DEPEND tweaking you did previously was lost. 
> Did you mean to use RDEPEND instead?  If so, it defaults to be the same a
> DEPEND if not defined.

Terribly sorry! - my mistake. This is a line I thought I'd deleted or 
commented out. You should just delete it. Then it will be OK.

>
> Next, you can use our handy DEPEND/RDEPEND syntax to do stuff like this:
>
> DEPEND="virtual/x11 sdl? ( media-libs/libsdl media-libs/sdl-mixer ) ggi? (
> media-libs/libggi media-libs/libgii )"
>

Yes but: if the game needs either SDl of libGGI, this syntax doesn't make 
sure at least something is defined in DEPEND. If neither USE variable is set, 
niether lib will be installed and the game won't compile as it needs at least 
1 frontend lib.

> Also, it may not be good to use sdl *or* libggi.  Can one compile-in both
> options?  If not, then the best approach (taking into account the current
> functionality of the ebuild system) is to create two packages: heroes-sdl
> and heroes-ggi.  Right now, there's no good way for Portage to choose
> between two existing USE variables; ie. if ggi and sdl are defined, Portage
> has no way of knowing which one should be preferred.
>

Yes but: the heroes game developers themselves prefer SDL over GGI. This is 
because it is better maintained. (according to the readme file).
And no, you can't compile both options. Unless you patch the Makefile to 
compile 2 different executables. But in that case it's better to make 2 
diferent ebuilds - however, they will be mutually exclusive. But it's easy 
enough to separate into heroes-ggi and heroes-sdl. Do that if you think 
that's what's needed. 

> > src_unpack() {
> >
> >     unpack ${A1} ${A2} ${A3} ${A4}
> >
> > }
>
> The default src_unpack function should perform this step for you, so you
> should be able to remove the src_unpack() function from your ebuild. Also,
> the preferred way of doing things now is to remove the A= definition from
> your ebuild and just use SRC_URI:

I wasn't sure about that.

>
> SRC_URI="http://prdownloads.sourceforge.net/heroes/heroes-0.11.tar.gz
> http://prdownloads.sourceforge.net/heroes/heroes-data-1.1.tar.gz
> http://prdownloads.sourceforge.net/heroes/heroes-sound-tracks-1.0.tar.gz
> http://prdownloads.sourceforge.net/heroes/heroes-sound-effects-1.0.tar.gz"
>
> Other than that, it looks good and I look forward to playing it soon! :)

OK. I'll learn from my mistakes :-)


Dan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] New version of heroes ebuild
  2001-07-09 11:40   ` Dan Armak
@ 2001-07-09 13:53     ` Daniel Robbins
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Robbins @ 2001-07-09 13:53 UTC (permalink / raw
  To: gentoo-dev

On Mon, Jul 09, 2001 at 08:39:57PM +0300, Dan Armak wrote:

> Yes but: the heroes game developers themselves prefer SDL over GGI. This is 
> because it is better maintained. (according to the readme file).
> And no, you can't compile both options. Unless you patch the Makefile to 
> compile 2 different executables. But in that case it's better to make 2 
> diferent ebuilds - however, they will be mutually exclusive. But it's easy 
> enough to separate into heroes-ggi and heroes-sdl. Do that if you think 
> that's what's needed. 

OK, as long as there's a reason to prefer SDL over GGI, then there's no
problem.

Best Regards,

-- 
Daniel Robbins					<drobbins@gentoo.org>
President/CEO					http://www.gentoo.org 
Gentoo Technologies, Inc.			



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-07-09 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-09  5:23 [gentoo-dev] New version of heroes ebuild Dan Armak
2001-07-09  5:34 ` Thomas M. Beaudry
2001-07-09  9:55 ` Daniel Robbins
2001-07-09 11:40   ` Dan Armak
2001-07-09 13:53     ` Daniel Robbins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox