# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-strategy/ufo-ai/ufo-ai-0.10.040218.ebuild,v 1.17 2006/02/23 22:33:15 tupone Exp $ inherit eutils flag-o-matic games DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game" HOMEPAGE="http://www.ufoai.net/" MY_PN=ufoai MY_P=${MY_PN}-2.0-RC6-source SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.bz2 \ http://www.decamps.info/pub/${PN}/${MY_PN}-2.0_base.tar.gz" # mirror://sourceforge/${MY_PN}/base.tar.bz2" LICENSE="GPL-2" KEYWORDS="~ppc ~x86 ~amd64" RDEPEND="|| ( ( x11-libs/libXxf86dga x11-libs/libXxf86vm ) virtual/x11 ) media-libs/jpeg media-libs/libvorbis" DEPEND="${RDEPEND} || ( x11-proto/xextproto virtual/x11 ) media-libs/libogg virtual/opengl virtual/glu app-arch/unzip" S=${WORKDIR}/${MY_P} src_compile() { filter-flags -fstack-protector #51116 if use amd64; then #emake release has bug http://sf.net/tracker/?func=detail&aid=1597268&group_id=157793&atid=805242 emake \ OPTCFLAGS="${CFLAGS}" \ || die "emake failed" else emake release \ OPTCFLAGS="${CFLAGS}" \ || die "emake failed" fi # build locale emake lang || die "emake failed: cannot make gettext translation files" cd po ; emake update-po || die "emake failed: cannot update the translation strings" } src_install() { #creates a dir. Handles $D transparently dodir "${GAMES_DATADIR}/${PN}/base" #install binaries and librairies if use ppc ; then ARCH=ppc DIST=release elif use amd64 ; then ARCH=x86_64 DIST=debug else ARCH=i386 DIST=release fi insinto "${GAMES_DATADIR}/${PN}" doins -r ${DIST}${ARCH}/* \ || die "doins failed" exeinto "${GAMES_DATADIR}/${PN}" doexe ${DIST}${ARCH}/{ref_glx.so,ufo,ufo2map} \ || die "doexe ufo" # install base data insinto "${GAMES_DATADIR}/${PN}/base" doins -r "${WORKDIR}"/base/* \ || die "doins of data failed" doexe ${DIST}${ARCH}/game.so \ || die "doexe game.so" # I have already compiled maps in base.tar.gz #dodir "${GAMES_DATADIR}/${PN}"/.gamedir #cd "${D}/${GAMES_DATADIR}/${PN}"/base/maps #emake || die "emake fails while building maps" games_make_wrapper ufo-ai ./ufo "${GAMES_DATADIR}/${PN}" prepgamesdirs }