# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils gcc DESCRIPTION="MSX emulator that aims for perfection" HOMEPAGE="http://openmsx.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~sparc" IUSE="" DEPEND="dev-libs/libxml2 media-libs/libpng media-libs/sdl-image media-libs/libsdl sys-libs/zlib" src_unpack() { unpack ${P}.tar.gz cd ${S} # Remove all symlinking from the Makefile. epatch ${FILESDIR}/${PV}-nosymlinks.patch # Change the hardcoded default SystemDir. epatch ${FILESDIR}/${PV}-system-dir.patch # Add --help as a recognized commandline option. epatch ${FILESDIR}/${PV}-help-commandline-switch.patch autoconf || die "autoconf failed" } src_compile() { egamesconf || die "configure failed" emake || die "emake failed" } src_install() { # egamesinstall won't respect a new prefix, do it manually. make prefix="${D}${GAMES_DATADIR}/${PN}" \ mandir=${D}/usr/share/man \ infodir=${D}/usr/share/info \ datadir=${D}${GAMES_DATADIR} \ sysconfdir=${D}${GAMES_SYSCONFDIR} \ localstatedir=${D}${GAMES_STATEDIR} \ "$@" install || die "install failed" dosym ${GAMES_DATADIR}/${PN}/share/machines/National_CF-1200 ${GAMES_DATADIR}/${PN}/share/machines/msx1 dosym ${GAMES_DATADIR}/${PN}/share/machines/Philips_NMS_8250 ${GAMES_DATADIR}/${PN}/share/machines/msx2 dosym ${GAMES_DATADIR}/${PN}/share/machines/Panasonic_FS-A1FX ${GAMES_DATADIR}/${PN}/share/machines/msx2plus dosym ${GAMES_DATADIR}/${PN}/share/machines/Panasonic_FS-A1GT ${GAMES_DATADIR}/${PN}/share/machines/turbor # Move the binary into place mkdir -p ${D}${GAMES_BINDIR} mv ${D}${GAMES_DATADIR}/${PN}/bin/openmsx ${D}${GAMES_BINDIR}/openmsx rm -rf ${D}${GAMES_DATADIR}/${PN}/bin dodoc README AUTHORS NEWS dohtml -r doc/* # Clean up after dohtml cd ${D}${GAMES_DATADIR}/openmsx rm *.html rm *.png rm *.css dodoc *.txt dodoc *.tex prepgamesdirs }