ChangeLog

# ChangeLog for games-strategy/freeciv
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeciv/ChangeLog,v 1.72 2008/06/19 04:53:17 mr_bones_ Exp $

*freeciv-2.1.5 (19 Jun 2008)

19 Jun 2008; Michael Sterrett
+freeciv-2.1.5.ebuild:
version bump

*freeciv-2.1.4 (29 Apr 2008)

29 Apr 2008; Tupone Alfredo +freeciv-2.1.4.ebuild:
Version bump to 2.1.4

11 Mar 2008; Chris Gianelloni freeciv-2.0.9.ebuild:
Moving to ~mips for repoman.

*freeciv-2.1.3 (26 Feb 2008)

26 Feb 2008; Tupone Alfredo +freeciv-2.1.3.ebuild:
Version bump to 2.1.3 Bug #207847 by Matthias Dahl

21 Jan 2008; Tupone Alfredo freeciv-2.1.1.ebuild,
freeciv-2.1.2.ebuild:
Adding dependency on libpng. Bug #206426 by Evil Compile Person

*freeciv-2.1.2 (21 Jan 2008)

21 Jan 2008; Tupone Alfredo +freeciv-2.1.2.ebuild:
Version bump to 2.1.2. Bug #206765 by Matthias Dahl

30 Nov 2007; Tupone Alfredo freeciv-2.0.9.ebuild,
freeciv-2.1.1.ebuild:
Fixing runtime depedency for gtk/Xaw3d/sdl selection

30 Nov 2007; Tupone Alfredo freeciv-2.0.9.ebuild,
freeciv-2.1.1.ebuild:
Removing unneeded dependency when dedicated. Bug #200840 by Luke-Jr

*freeciv-2.1.1 (29 Nov 2007)

29 Nov 2007; Michael Sterrett
+freeciv-2.1.1.ebuild:
version bump

31 Oct 2007; Michael Sterrett freeciv-2.1.0.ebuild:
add sdl patch to ebuild from Andrei Slavoiu (bug #197697)

*freeciv-2.1.0 (31 Oct 2007)

31 Oct 2007; Michael Sterrett
+freeciv-2.1.0.ebuild:
version bump (bug #197644)

12 May 2007; Stefan Schweizer freeciv-2.0.9.ebuild:
Fix unavailable stdsounds3.tar.gz url

12 Mar 2007; Marius Mauch freeciv-2.0.9.ebuild:
Replacing einfo with elog

14 Feb 2007; Michael Sterrett
-freeciv-2.0.8-r1.ebuild, -freeciv-2.0.8-r2.ebuild, freeciv-2.0.9.ebuild:
removed buggy 2.0.8 version

*freeciv-2.0.9 (14 Feb 2007)

14 Feb 2007; Tristan Heaven -files/freeciv.png,
freeciv-2.0.8-r1.ebuild, freeciv-2.0.8-r2.ebuild, +freeciv-2.0.9.ebuild:
Version bump, bug #166461

23 Nov 2006; Francesco Riosa freeciv-2.0.8-r2.ebuild:
dev-db/mysql => virtual/mysql

12 Nov 2006; Michael Cummings
freeciv-2.0.8-r2.ebuild:
Marking amd64 stable, bug 153507 revisited

05 Nov 2006; Joshua freeciv-2.0.8-r2.ebuild:
Mark stable for ppc64.

31 Oct 2006; Danny van Dyk freeciv-2.0.8-r1.ebuild,
freeciv-2.0.8-r2.ebuild:
Added missing dep on media-libs/libpng. Marked stable on amd64.

27 Oct 2006; Joseph Jezak freeciv-2.0.8-r2.ebuild:
Marked ppc stable.

05 Oct 2006; Tristan Heaven freeciv-2.0.8-r1.ebuild,
freeciv-2.0.8-r2.ebuild:
Fix gettext dependency

03 Oct 2006; Gustavo Zacarias
freeciv-2.0.8-r2.ebuild:
Stable on sparc

*freeciv-2.0.8-r2 (15 Sep 2006)

15 Sep 2006; +freeciv-2.0.8-r2.ebuild:
Adding authentication capability. Bug #139027 by

29 Aug 2006; Joshua Kinard freeciv-2.0.8-r1.ebuild:
Marked stable on mips.

*freeciv-2.0.8-r1 (07 Aug 2006)

07 Aug 2006; Michael Sterrett
+files/freeciv-2.0.8-DoS.patch, -freeciv-2.0.8.ebuild,
+freeciv-2.0.8-r1.ebuild:
add upstream patch for DoS issue (bug #141563); rev bumped to force out

30 Jul 2006; Joshua Kinard freeciv-2.0.8.ebuild:
Add pkgconfig as a DEP because freeciv needs it to find gtk. If gtk is
merged from binpkg, the possibility exists for pkgconfig to not get merged
due to being only in gtk's DEP and not RDEP.

13 Jul 2006; Joshua Kinard freeciv-2.0.8.ebuild:
Added x11-proto/xextproto to DEPEND to satisfy a need for shape.h, and
marked unstable on mips.

22 Mar 2006; +files/freeciv.png, freeciv-2.0.8.ebuild:
Icon for menu entries, bug #125344 by Raymond Lewis Rebbeck

12 Mar 2006; Simon Stelling freeciv-2.0.8.ebuild:
stable on amd64 wrt bug 125304

09 Mar 2006; Jose Luis Rivero freeciv-2.0.8.ebuild:
Stable on alpha wrt security bug #125304

08 Mar 2006; Lars Weiler freeciv-2.0.8.ebuild:
Stable on ppc (tested by AT mabi).

07 Mar 2006; Gustavo Zacarias freeciv-2.0.8.ebuild:
Stable on sparc wrt security #125304

07 Mar 2006; Michael Sterrett freeciv-2.0.8.ebuild:
security stablize for bug #125304

*freeciv-2.0.8 (06 Mar 2006)

06 Mar 2006; Michael Sterrett
+freeciv-2.0.8.ebuild:
version bump

20 Jan 2006; Chris Gianelloni -freeciv-2.0.5.ebuild,
freeciv-2.0.7.ebuild:
Marking stable and removing older versions.

20 Jan 2006; Chris Gianelloni freeciv-2.0.5.ebuild,
freeciv-2.0.7.ebuild:
Added modular X dependencies and closing bug #119730.

*freeciv-2.0.7 (07 Nov 2005)

07 Nov 2005; Michael Sterrett
+freeciv-2.0.7.ebuild:
version bump

*freeciv-2.0.6 (28 Sep 2005)

28 Sep 2005; Michael Sterrett
+freeciv-2.0.6.ebuild:
version bump

20 Sep 2005; Michael Sterrett
-freeciv-1.14.2.ebuild:
remove freeciv-1 now that freeciv-2 is well established

20 Sep 2005; Michael Sterrett freeciv-2.0.5.ebuild:
remove gtk2 use flag; fix src_install; tidy

19 Sep 2005; Michael Sterrett
-freeciv-2.0.3.ebuild, -freeciv-2.0.4.ebuild:
clean old versions

10 Sep 2005; Aron Griffis freeciv-2.0.5.ebuild:
Mark 2.0.5 stable on alpha

*freeciv-2.0.5 (04 Sep 2005)

04 Sep 2005; Michael Sterrett
+freeciv-2.0.5.ebuild:
version bump

*freeciv-2.0.4 (30 Jul 2005)

30 Jul 2005; Michael Sterrett
-freeciv-1.14.1.ebuild, freeciv-1.14.2.ebuild, -freeciv-2.0.1.ebuild,
-freeciv-2.0.2.ebuild, freeciv-2.0.3.ebuild, +freeciv-2.0.4.ebuild:
version bump; clean older ebuilds

*freeciv-2.0.3 (13 Jul 2005)

13 Jul 2005; Michael Sterrett
+freeciv-2.0.3.ebuild:
version bump

*freeciv-2.0.2 (19 Jun 2005)

19 Jun 2005; Michael Sterrett
+freeciv-2.0.2.ebuild:
version bump

17 Jun 2005; Michael Hanselmann freeciv-2.0.1.ebuild:
Stable on ppc.

15 Jun 2005; Chris Gianelloni freeciv-1.14.1.ebuild,
freeciv-1.14.2.ebuild, freeciv-2.0.1.ebuild:
Removed INSTALL file.

08 Jun 2005; Gustavo Zacarias freeciv-2.0.1.ebuild:
Stable on sparc

05 Jun 2005; Marcus D. Hanwell freeciv-2.0.1.ebuild:
Stable on amd64.

05 Jun 2005; Michael Sterrett freeciv-2.0.1.ebuild:
stable on x86

17 May 2005; Jose Luis Rivero freeciv-2.0.1.ebuild:
Keyworded ~alpha

16 May 2005; Jose Luis Rivero freeciv-1.14.2.ebuild:
Keyworded ~alpha

*freeciv-2.0.1 (01 May 2005)

01 May 2005; Michael Sterrett
+freeciv-2.0.1.ebuild:
version bump (bug #67109) - ebuild submitted by TGL

28 Dec 2004; Ciaran McCreesh :
Change encoding to UTF-8 for GLEP 31 compliance

23 Nov 2004; Michael Sterrett freeciv-1.14.2.ebuild:
removed unused ogg/vorbis dep for gtk

*freeciv-1.14.2 (11 Sep 2004)

11 Sep 2004; Michael Sterrett +freeciv-1.14.2.ebuild:
version bump (bug #63552)

03 Jun 2004; Aron Griffis freeciv-1.14.1.ebuild:
Fix use invocation

27 Mar 2004; Michael Sterrett freeciv-1.14.1.ebuild:
remove unused sdl from IUSE

19 Mar 2004; Michael Sterrett freeciv-1.14.1.ebuild:
fix ugly depend screw up with readline

03 Feb 2004; Michael Sterrett freeciv-1.14.1.ebuild:
locale fix for bug 40253; add USE readline support

28 Jan 2004; freeciv-1.14.1.ebuild:
marked stable on sparc

21 Jan 2004; Michael Sterrett freeciv-1.14.1.ebuild:
replace deprecated USE flag structure with supported method

06 Jan 2004; Michael Sterrett freeciv-1.14.1.ebuild:
added install of stdsounds2 from the freeciv site (to address bug 36178)

*freeciv-1.14.1 (03 Jan 2004)

03 Jan 2004; Mike Frysinger :
Version bump + clean up #35803.

21 Nov 2003; Michael Sterrett
freeciv-1.15.0_alpha20030901.ebuild:
remove misnamed cvs snap

*freeciv-1.14.1_beta4 (21 Nov 2003)

21 Nov 2003; Michael Sterrett
freeciv-1.14.1_beta4.ebuild:
add beta version with better gtk2 handling

13 Oct 2003; Jason Wever
freeciv-1.15.0_alpha20030901.ebuild:
Added ~sparc keyword.

*freeciv-1.14.1_beta1 (17 Sep 2003)

17 Sep 2003; Michael Sterrett
freeciv-1.14.1_beta1.ebuild:
Add the beta for Gentoo testing pleasure.

*freeciv-1.15.0_alpha20030901 (01 Sep 2003)

01 Sep 2003; Michael Sterrett
freeciv-1.15.0_alpha20030901.ebuild:
Add the current cvs snapshot since it seems to be more stable.

12 Jun 2003; freeciv-1.14.0-r1.ebuild:
add Header

*freeciv-1.14.0-r1 (6 Jun 2003)
6 Jun 2003; Michael Nazaroff freeciv-1.14.0-r1.ebuild:
enabled gtk2 support if gtk2 is in the USE flag added more explicit
depenencies. Thanks to Kalen Petersen and Mathias Hasselmann.

*freeciv-1.14.0 (21 Jan 2003)
21 Jan 2003; Thomas Raschbacher freeciv-1.14.0.ebuild:
version bump

01 May 2003; Lars Weiler freeciv-1.14.0.ebuild
Added KEYWORD ~ppc

*freeciv-1.13.0 (28 Jul 2002)

28 Jul 2002; Daniel Ahlberg freeciv-1.13.0.ebuild :

Version bump. Foundt by Antoine Hersen .

*freeciv-1.12.0-r2 (29 Mar 2002)

17 jul 2002; Jose Alberto Suárez López freeciv-1.12.0-r2.ebuild :
Added LICENSE, KEYWORDS.

29 Mar 2002; Seemant Kulleen freeciv-1.12.0-r2.ebuild :

jasonr@myrealbox.com (Jason Draugluin Ritchie) suggested cleaning up the
ebuild, and boy! was he right. So, the grammar has been updated, and the
USE flag checks are now slightly more flexible.

*freeciv-1.12.0-r1 (1 Feb 2002)

17 jul 2002; Jose Alberto Suárez López freeciv-1.12.0-r1.ebuild :
Added LICENSE, KEYWORDS.

1 Feb 2002; G.Bevin ChangeLog :

Added initial ChangeLog which should be updated whenever the package is
updated in any way. This changelog is targetted to users. This means that the
comments should well explained and written in clean English. The details about
writing correct changelogs are explained in the skel.ChangeLog file which you
can find in the root directory of the portage repository.

Manifest

DIST freeciv-2.0.9.tar.bz2 8875323 RMD160 e79cfc1d00f4f1b7ff28e84aca42dd2ef1e158d5 SHA1 9e1b64a96f38821abadc636621d276f70dedd686 SHA256 e7f1eb6a240db4c48396d8920d103b8cf275b510e304dbbd2af6bb8ab5db4a98
DIST freeciv-2.1.4.tar.bz2 29531378 RMD160 60c106c9cf13f43b4fe0580e26c9dc506e956e75 SHA1 7be2507b9788015acc2cb1f13c8da95b5489c200 SHA256 d6a1867782ee86ac364e7feec0db78eb88cad795253fee84b6de3e687d33491c
DIST freeciv-2.1.5.tar.bz2 29568407 RMD160 f66c94e25943664341006decf485303960de7ce7 SHA1 2b49458aa26e47fe75e90f68b899efb7e9443e09 SHA256 f2a4eb38bba4b9ed64c844c984b86fba49d4de8387b5983cc5d2ff5711db1a26
DIST freeciv.png 3657 RMD160 6f283d6031b7b4ae3da21ddd5145084f147a7acd SHA1 929520ea26f3e3093f8ab1984ffd61c99c154511 SHA256 50af34df5f43fb90844561ea5f91bbf1fbb762d15ea56811e39c7ad3f2cc0160
DIST stdsounds3.tar.gz 118278 RMD160 46bb5fef4b2d3acf9959b3228c962bdf6591ea09 SHA1 103d02a0702687fb038f5187a321f8074b4ebfb5 SHA256 a3cc2be93c006c3a9492349aa4552bf059e45efc94135f09241877c221ae1bfa
EBUILD freeciv-2.0.9.ebuild 4689 RMD160 dbe388841e02360cdccb403c89cdc7bc104a2577 SHA1 ae3b23b2f0aa05808412fd43377de4574977c6ae SHA256 2de85d58f254e062b5fda03b682c7e35353ac929b6386545bbfc6f50e12178cb
EBUILD freeciv-2.1.4.ebuild 4916 RMD160 9e7324d0bd89d44ea40e750aeba3d8b1fcb71ae8 SHA1 0b6d2f701f9f1e30e99b0c6d2283ccefd689935c SHA256 a6851bd50a9e21775a7bbd8c856c6f2628ccee6c6cf0e95ef65c9431228f8c39
EBUILD freeciv-2.1.5.ebuild 4919 RMD160 d730dee3a7ad3396db2ffd18538c91cdce8cc7ce SHA1 8956b8dce2af135dde5c10e2dde270fe3be7eb42 SHA256 7df212ad1bdbe7ff219496c84cfc0c4dfd6de810a488c265ab6532ccb02a9405
MISC ChangeLog 11351 RMD160 e43c98a523ce991ef37f2c0ef37dd0228bc2a4dc SHA1 b267a37cf795035dae5699e518c4f128883c8829 SHA256 45d71081fb395d7fc05eb796be89e2e47424c371e6f35f00489352e4480ea1ba
MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3

freeciv-2.0.9.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeciv/freeciv-2.0.9.ebuild,v 1.7 2008/03/11 05:44:40 wolf31o2 Exp $

inherit eutils games

MY_P=${PN}-${PV/_/-}
DESCRIPTION="multiplayer strategy game (Civilization Clone)"
HOMEPAGE="http://www.freeciv.org/"
SRC_URI="ftp://ftp.freeciv.org/pub/freeciv/stable/${MY_P}.tar.bz2
mirror://gentoo/${PN}.png
!dedicated? (
alsa? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
esd? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
sdl? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
)"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 ~mips ppc ppc64 sparc x86"
IUSE="alsa auth dedicated esd gtk nls readline sdl Xaw3d"

RDEPEND="readline? ( sys-libs/readline )
!dedicated? (
nls? ( virtual/libintl )
gtk? ( >=x11-libs/gtk+-2 )
!gtk? (
media-libs/libpng
Xaw3d? ( x11-libs/Xaw3d )
!Xaw3d? ( x11-libs/libXaw )
)
alsa? (
media-libs/alsa-lib
media-libs/audiofile
)
esd? ( media-sound/esound )
sdl? ( media-libs/sdl-mixer )
auth? ( virtual/mysql )
)"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
!dedicated? (
gtk? ( dev-util/pkgconfig )
x11-proto/xextproto
)"

S=${WORKDIR}/${MY_P}

pkg_setup() {
games_pkg_setup
if ! use dedicated ; then
if use gtk ; then
elog "The Freeciv Client will be built with the GTK+-2 toolkit"
elif use Xaw3d ; then
elog "The Freeciv Client will be built with the Xaw3d toolkit"
else
elog "The Freeciv Client will be built with the Xaw toolkit"
fi
if ! use esd && ! use alsa && ! use sdl ; then
ewarn
ewarn "To enable sound support in civclient, you must enable"
ewarn "at least one of this USE flags: alsa, esd, sdl"
ewarn
fi
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

# install locales in /usr/share/locale
sed -i \
-e 's:^\(localedir = \).*:\1/usr/share/locale:' \
intl/Makefile.in po/Makefile.in.in \
|| die "sed failed"
sed -i \
-e 's:$datadir/locale:/usr/share/locale:' \
configure \
|| die "sed failed"

# change .desktop category so it is not gnome specific
sed -i \
-e 's:^\(Categories=GNOME;Application;Game;Strategy;\):Categories=Application;Game;StrategyGame;:' \
-e 's:^\(Icon=\).*:\1freeciv.png:' \
bootstrap/freeciv.desktop.in \
|| die "sed failed"
# install the .desktop in /usr/share/applications
sed -i \
-e 's:^\(desktopfiledir = \).*:\1/usr/share/applications:' \
client/Makefile.in \
|| die "sed failed"

# remove civclient manpage if dedicated server
if use dedicated ; then
sed -i \
-e '/man_MANS = /s:civclient.6::' \
doc/man/Makefile.in \
|| die "sed failed"
fi
}

src_compile() {
local mysoundconf
local myclient

if use dedicated ; then
mysoundconf="--disable-alsa --disable-esd --disable-sdl-mixer"
myclient="no"
else
myclient="xaw"
use Xaw3d && myclient="xaw3d"
if use gtk ; then
myclient="gtk-2.0"
fi
#FIXME --enable-{alsa,esd,sdl-mixer} actually disable them...
#FIXME ==> use --disable-* only, and autodetect to enable.
use alsa || mysoundconf="${mysoundconf} --disable-alsa"
use esd || mysoundconf="${mysoundconf} --disable-esd"
use sdl || mysoundconf="${mysoundconf} --disable-sdl-mixer"
fi

egamesconf \
--disable-dependency-tracking \
--with-zlib \
$(use_enable auth) \
$(use_enable nls) \
$(use_with readline) \
--enable-client=${myclient} \
${mysoundconf} \
|| die "egamesconf failed"

emake || die "emake failed"
}

src_install() {
emake DESTDIR="${D}" install || die "emake install failed"

if ! use dedicated ; then
# Install the app-defaults if Xaw/Xaw3d toolkit
if ! use gtk ; then
insinto /etc/X11/app-defaults
doins data/Freeciv || die "doins failed"
fi
# Install sounds if at least one sound plugin was built
if use alsa || use esd || use sdl ; then
insinto "${GAMES_DATADIR}"/${PN}
doins -r ../data/stdsounds* || die "doins sounds failed"
fi
# Create and install the html manual. It can't be done for dedicated
# servers, because the 'civmanual' tool is then not built. Also
# delete civmanual from the GAMES_BINDIR, because it's then useless.
# Note: to have it localized, it should be ran from _postinst, or
# something like that, but then it's a PITA to avoid orphan files...
./manual/civmanual || die "civmanual failed"
dohtml manual*.html || die "dohtml failed"
rm -f "${D}/${GAMES_BINDIR}"/civmanual
fi

dodoc ChangeLog NEWS \
doc/{BUGS,CodingStyle,HACKING,HOWTOPLAY,PEOPLE,README*,TODO}

doicon "${DISTDIR}"/${PN}.png
prepgamesdirs
}

freeciv-2.1.4.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeciv/freeciv-2.1.4.ebuild,v 1.1 2008/04/29 20:19:12 tupone Exp $

inherit eutils games

MY_P=${PN}-${PV/_/-}
DESCRIPTION="multiplayer strategy game (Civilization Clone)"
HOMEPAGE="http://www.freeciv.org/"
SRC_URI="ftp://ftp.freeciv.org/pub/freeciv/stable/${MY_P}.tar.bz2
mirror://gentoo/${PN}.png
!dedicated? (
alsa? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
esd? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
sdl? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
)"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="alsa auth dedicated esd gtk nls readline sdl Xaw3d"

RDEPEND="readline? ( sys-libs/readline )
!dedicated? (
nls? ( virtual/libintl )
gtk? ( >=x11-libs/gtk+-2 )
!gtk? (
Xaw3d? ( x11-libs/Xaw3d )
!Xaw3d? (
sdl? (
media-libs/libsdl
media-libs/sdl-image
media-libs/freetype
)
!sdl? ( x11-libs/libXaw )
)
)
media-libs/libpng
alsa? (
media-libs/alsa-lib
media-libs/audiofile
)
esd? ( media-sound/esound )
sdl? ( media-libs/sdl-mixer )
auth? ( virtual/mysql )
)"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
!dedicated? (
gtk? ( dev-util/pkgconfig )
x11-proto/xextproto
)"

S=${WORKDIR}/${MY_P}

pkg_setup() {
games_pkg_setup
if ! use dedicated ; then
if use gtk ; then
elog "The Freeciv Client will be built with the GTK+-2 toolkit"
elif use Xaw3d ; then
elog "The Freeciv Client will be built with the Xaw3d toolkit"
elif use sdl ; then
elog "The Freeciv Client will be built with the SDL toolkit"
else
elog "The Freeciv Client will be built with the Xaw toolkit"
fi
if ! use esd && ! use alsa && ! use sdl ; then
ewarn
ewarn "To enable sound support in civclient, you must enable"
ewarn "at least one of this USE flags: alsa, esd, sdl"
ewarn
fi
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

# install locales in /usr/share/locale
sed -i \
-e 's:^\(localedir = \).*:\1/usr/share/locale:' \
intl/Makefile.in po/Makefile.in.in \
|| die "sed failed"
sed -i \
-e 's:$datadir/locale:/usr/share/locale:' \
configure \
|| die "sed failed"

# change .desktop category so it is not gnome specific
sed -i \
-e 's:^\(Categories=GNOME;Application;Game;Strategy;\):Categories=Application;Game;StrategyGame;:' \
-e 's:^\(Icon=\).*:\1freeciv.png:' \
bootstrap/freeciv.desktop.in \
|| die "sed failed"
# install the .desktop in /usr/share/applications
sed -i \
-e 's:^\(desktopfiledir = \).*:\1/usr/share/applications:' \
client/Makefile.in \
|| die "sed failed"

# remove civclient manpage if dedicated server
if use dedicated ; then
sed -i \
-e '/man_MANS = /s:civclient.6::' \
doc/man/Makefile.in \
|| die "sed failed"
fi
}

src_compile() {
local mysoundconf
local myclient

if use dedicated ; then
mysoundconf="--disable-alsa --disable-esd --disable-sdl-mixer"
myclient="no"
else
myclient="xaw"
use sdl && myclient="sdl"
use Xaw3d && myclient="xaw3d"
if use gtk ; then
myclient="gtk-2.0"
fi
#FIXME --enable-{alsa,esd,sdl-mixer} actually disable them...
#FIXME ==> use --disable-* only, and autodetect to enable.
use alsa || mysoundconf="${mysoundconf} --disable-alsa"
use esd || mysoundconf="${mysoundconf} --disable-esd"
use sdl || mysoundconf="${mysoundconf} --disable-sdl-mixer"
fi

egamesconf \
--disable-dependency-tracking \
--with-zlib \
$(use_enable auth) \
$(use_enable nls) \
$(use_with readline) \
--enable-client=${myclient} \
${mysoundconf} \
|| die "egamesconf failed"

emake || die "emake failed"
}

src_install() {
emake DESTDIR="${D}" install || die "emake install failed"

if ! use dedicated ; then
# Install the app-defaults if Xaw/Xaw3d toolkit
if ! use gtk && ! use sdl ; then
insinto /etc/X11/app-defaults
doins data/Freeciv || die "doins failed"
fi
# Install sounds if at least one sound plugin was built
if use alsa || use esd || use sdl ; then
insinto "${GAMES_DATADIR}"/${PN}
doins -r ../data/stdsounds* || die "doins sounds failed"
fi
# Create and install the html manual. It can't be done for dedicated
# servers, because the 'civmanual' tool is then not built. Also
# delete civmanual from the GAMES_BINDIR, because it's then useless.
# Note: to have it localized, it should be ran from _postinst, or
# something like that, but then it's a PITA to avoid orphan files...
./manual/civmanual || die "civmanual failed"
dohtml manual*.html || die "dohtml failed"
rm -f "${D}/${GAMES_BINDIR}"/civmanual
fi

dodoc ChangeLog NEWS doc/{BUGS,CodingStyle,HACKING,HOWTOPLAY,README*,TODO}

doicon "${DISTDIR}"/${PN}.png
prepgamesdirs
}

freeciv-2.1.5.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/freeciv/freeciv-2.1.5.ebuild,v 1.1 2008/06/19 04:53:17 mr_bones_ Exp $

inherit eutils games

MY_P=${PN}-${PV/_/-}
DESCRIPTION="multiplayer strategy game (Civilization Clone)"
HOMEPAGE="http://www.freeciv.org/"
SRC_URI="ftp://ftp.freeciv.org/pub/freeciv/stable/${MY_P}.tar.bz2
mirror://gentoo/${PN}.png
!dedicated? (
alsa? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
esd? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
sdl? (
ftp://ftp.freeciv.org/freeciv/contrib/audio/soundsets/stdsounds3.tar.gz )
)"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="alsa auth dedicated esd gtk nls readline sdl Xaw3d"

RDEPEND="readline? ( sys-libs/readline )
!dedicated? (
nls? ( virtual/libintl )
gtk? ( >=x11-libs/gtk+-2 )
!gtk? (
Xaw3d? ( x11-libs/Xaw3d )
!Xaw3d? (
sdl? (
media-libs/libsdl
media-libs/sdl-image
media-libs/freetype
)
!sdl? ( x11-libs/libXaw )
)
)
media-libs/libpng
alsa? (
media-libs/alsa-lib
media-libs/audiofile
)
esd? ( media-sound/esound )
sdl? ( media-libs/sdl-mixer )
auth? ( virtual/mysql )
)"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
!dedicated? (
gtk? ( dev-util/pkgconfig )
x11-proto/xextproto
)"

S=${WORKDIR}/${MY_P}

pkg_setup() {
games_pkg_setup
if ! use dedicated ; then
if use gtk ; then
elog "The Freeciv Client will be built with the GTK+-2 toolkit"
elif use Xaw3d ; then
elog "The Freeciv Client will be built with the Xaw3d toolkit"
elif use sdl ; then
elog "The Freeciv Client will be built with the SDL toolkit"
else
elog "The Freeciv Client will be built with the Xaw toolkit"
fi
if ! use esd && ! use alsa && ! use sdl ; then
ewarn
ewarn "To enable sound support in civclient, you must enable"
ewarn "at least one of this USE flags: alsa, esd, sdl"
ewarn
fi
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

# install locales in /usr/share/locale
sed -i \
-e 's:^\(localedir = \).*:\1/usr/share/locale:' \
intl/Makefile.in po/Makefile.in.in \
|| die "sed failed"
sed -i \
-e 's:$datadir/locale:/usr/share/locale:' \
configure \
|| die "sed failed"

# change .desktop category so it is not gnome specific
sed -i \
-e 's:^\(Categories=GNOME;Application;Game;Strategy;\):Categories=Application;Game;StrategyGame;:' \
-e 's:^\(Icon=\).*:\1freeciv.png:' \
bootstrap/freeciv.desktop.in \
|| die "sed failed"
# install the .desktop in /usr/share/applications
sed -i \
-e 's:^\(desktopfiledir = \).*:\1/usr/share/applications:' \
client/Makefile.in \
|| die "sed failed"

# remove civclient manpage if dedicated server
if use dedicated ; then
sed -i \
-e '/man_MANS = /s:civclient.6::' \
doc/man/Makefile.in \
|| die "sed failed"
fi
}

src_compile() {
local mysoundconf
local myclient

if use dedicated ; then
mysoundconf="--disable-alsa --disable-esd --disable-sdl-mixer"
myclient="no"
else
myclient="xaw"
use sdl && myclient="sdl"
use Xaw3d && myclient="xaw3d"
if use gtk ; then
myclient="gtk-2.0"
fi
#FIXME --enable-{alsa,esd,sdl-mixer} actually disable them...
#FIXME ==> use --disable-* only, and autodetect to enable.
use alsa || mysoundconf="${mysoundconf} --disable-alsa"
use esd || mysoundconf="${mysoundconf} --disable-esd"
use sdl || mysoundconf="${mysoundconf} --disable-sdl-mixer"
fi

egamesconf \
--disable-dependency-tracking \
--with-zlib \
$(use_enable auth) \
$(use_enable nls) \
$(use_with readline) \
--enable-client=${myclient} \
${mysoundconf} \
|| die "egamesconf failed"

emake || die "emake failed"
}

src_install() {
emake DESTDIR="${D}" install || die "emake install failed"

if ! use dedicated ; then
# Install the app-defaults if Xaw/Xaw3d toolkit
if ! use gtk && ! use sdl ; then
insinto /etc/X11/app-defaults
doins data/Freeciv || die "doins failed"
fi
# Install sounds if at least one sound plugin was built
if use alsa || use esd || use sdl ; then
insinto "${GAMES_DATADIR}"/${PN}
doins -r ../data/stdsounds* || die "doins sounds failed"
fi
# Create and install the html manual. It can't be done for dedicated
# servers, because the 'civmanual' tool is then not built. Also
# delete civmanual from the GAMES_BINDIR, because it's then useless.
# Note: to have it localized, it should be ran from _postinst, or
# something like that, but then it's a PITA to avoid orphan files...
./manual/civmanual || die "civmanual failed"
dohtml manual*.html || die "dohtml failed"
rm -f "${D}/${GAMES_BINDIR}"/civmanual
fi

dodoc ChangeLog NEWS doc/{BUGS,CodingStyle,HACKING,HOWTOPLAY,README*,TODO}

doicon "${DISTDIR}"/${PN}.png
prepgamesdirs
}

metadata.xml




games