# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-roguelike/falconseye/falconseye-1.9.4a.ebuild,v 1.7 2004/06/24 23:12:29 agriffis Exp $ inherit eutils games DESCRIPTION="A graphical version of nethack (unofficially developed version 1.94)" HOMEPAGE="http://falconseye.sourceforge.net/" SRC_URI="http://cage.ugent.be/~jdemeyer/nethack/nethack-341-jtp-194a.tar.bz2" KEYWORDS="x86 ppc ~amd64" LICENSE="nethack" SLOT="0" IUSE="timidity mplayer nosound" DEPEND="media-libs/libsdl dev-util/yacc dev-util/byacc" RDEPEND="media-libs/libsdl !nosound?( timidity?(media-sound/timidity++) !timidity? ( (media-sound/alsa-utils) ) !mplayer?(virtual/mpg123) mplayer?(media-video/mplayer))" S=${WORKDIR}/nethack-341-jtp-194a src_unpack() { unpack ${A} cd ${S} source sys/unix/setup.sh cd ../../ epatch ${FILESDIR}/${PV}-gentoo-paths.patch epatch ${FILESDIR}/${PV}-default-options.patch sed -i "s:GENTOO_STATEDIR:${GAMES_STATEDIR}/${PN}:" include/unixconf.h || die "setting statedir" sed -i "s:GENTOO_HACKDIR:${GAMES_DATADIR}/${PN}:" include/config.h || die "seting hackdir" if use nosound; then sed -i 's:play_music=1:play_music=0:' win/jtp/gamedata/config/jtp_opts.txt sed -i 's:play_effects=1:play_effects=0:' win/jtp/gamedata/config/jtp_opts.txt else if use timidity; then sed -i 's:/usr/local/bin/timidity:/usr/bin/timidity:' win/jtp/gamedata/config/jtp_opts.txt else sed -i 's:/usr/local/bin/timidity -idqq:/usr/bin/aplaymidi:' win/jtp/gamedata/config/jtp_opts.txt fi if use mplayer; then sed -i 's:/usr/bin/mpg123 -q:/usr/bin/mplayer -quiet:' win/jtp/gamedata/config/jtp_opts.txt fi fi } src_compile() { emake -j1 \ GAME=falconseye \ CFLAGS="${CFLAGS} -I../include -I../win/jtp" \ || die "game failed" cd doc emake || die "doc failed" } src_install() { emake \ GAMEPERM=0755 \ PREFIX=${D}/usr \ GAME=falconseye \ GAMEUID=${GAMES_USER} \ GAMEGRP=${GAMES_GROUP} \ GAMEDIR=${D}/${GAMES_DATADIR}/${PN} \ VARDIR=${D}/${GAMES_STATEDIR}/${PN} \ SHELLDIR=${D}/${GAMES_BINDIR} \ install \ || die "install failed" dosed "s:${D}/::" ${GAMES_BINDIR}/falconseye sed 's:nethack:falconseye:g' doc/nethack.6 > doc/falconseye.6 doman doc/falconseye.6 dodoc ChangeLog README falcon.txt prepgamesdirs chmod -R g+w ${D}/${GAMES_STATEDIR} } pkg_postinst() { games_pkg_postinst echo if !use nosound; then einfo "MP3 and MIDI players are set according to your USE flags" echo if use timidity ; then einfo "You've emerge with 'timidity' USE flag:" einfo "You also need soundfonts for timidity, if you don't" einfo "know what that is, do:" echo einfo "emerge media-sound/timidity-eawpatches" else einfo "You've emerge with 'aplaymidi' for playing midi:" einfo "You have to set environment variable ALSA_OUTPUT_PORTS" einfo "You can see available ports with 'aplaymidi -l'" fi fi echo einfo "Remember that you can always change your falconseye's" einfo "music and sound settings by modifiying" einfo "${GAMES_DATADIR}/${PN}/config/jtp_opts.txt" }