diff options
Diffstat (limited to 'games-strategy/freeciv/files/freeciv-20050408.ebuild')
-rw-r--r-- | games-strategy/freeciv/files/freeciv-20050408.ebuild | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/games-strategy/freeciv/files/freeciv-20050408.ebuild b/games-strategy/freeciv/files/freeciv-20050408.ebuild new file mode 100644 index 0000000..e4f77a7 --- /dev/null +++ b/games-strategy/freeciv/files/freeciv-20050408.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit games + +MY_P=${PN}-cvs-Apr-${PV:6:2} +S=${WORKDIR}/${MY_P} +DESCRIPTION="multiplayer strategy game (Civilization Clone)" +HOMEPAGE="http://www.freeciv.org/" +SRC_URI="ftp://ftp.freeciv.org/pub/freeciv/latest/${MY_P}.tar.bz2 + http://www.freeciv.org/ftp/contrib/sounds/sets/stdsounds2.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc" +IUSE="X Xaw3d gtk gtk2 nls readline esd imlib alsa zlib" + +RDEPEND="X? ( virtual/x11 ) + Xaw3d? ( x11-libs/Xaw3d ) + readline? ( sys-libs/readline ) + zlib? ( sys-libs/zlib ) + imlib? ( media-libs/imlib ) + esd? ( media-sound/esound ) + gtk? ( + gtk2? ( + >=x11-libs/gtk+-2.0.0 + >=dev-libs/glib-2.0.0 + >=dev-libs/atk-1.0.3 + >=x11-libs/pango-1.0.5 + ) + !gtk2? ( + =x11-libs/gtk+-1* + >=dev-libs/glib-1.2.5 + >=media-libs/imlib-1.9.2 + ) + ) + alsa? ( media-libs/alsa-lib )" + +# 2.0 dependancies added by AD Rutledge, not sure exactly what versions, +# this should be fixed if it requires a specific version or later +DEPEND="${RDEPEND} + nls? ( + sys-devel/gettext + >=sys-apps/sed-4 + )" + +src_compile() { + local myclient="no" + use X && myclient="xaw" + use Xaw3d && myclient="xaw3d" + if use gtk ; then + use gtk2 \ + && myclient="gtk-2.0" \ + || myclient="gtk" + fi + + egamesconf \ + --disable-dependency-tracking \ + $(use_with zlib) \ + $(use_with readline) \ + $(use_with imlib) \ + $(use_enable nls) \ + $(use_enable alsa) \ + --enable-client=${myclient} \ + || die "configure failed" + + # Grrrr, the locale location is hard-coded in configure.in to be + # '${prefix}/share/locale'. That is so wrong. (Bug 40253) + if use nls ; then + sed -i \ + -e "/LOCALEDIR/ s:\".*:\"${GAMES_DATADIR}/locale\":" config.h \ + || die "locale fixup failed" + fi + + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + insinto /usr/X11R6/lib/X11/app-defaults + doins data/Freeciv || die "doins failed" + + dodoc ChangeLog INSTALL NEWS \ + doc/{BUGS,CodingStyle,HACKING,HOWTOPLAY,PEOPLE,README*,TODO} + + # install sounds + cp -R ../stdsounds* "${D}${GAMES_DATADIR}/${PN}" + prepgamesdirs +} |