# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils MY_PN="mcd" MY_PV="${PV//./_}" DESCRIPTION="The Physics Centipede Invasion. Smashup waggly shmup, 'Mu-cade'." HOMEPAGE="http://www.asahi-net.or.jp/~cs8k-cyu/windows/mcd_e.html" SRC_URI="http://www.asahi-net.or.jp/~cs8k-cyu/windows/${MY_PN}${MY_PV}.zip" LICENSE="BSD" SLOT="0" KEYWORDS="~x86 ~ppc" DEPEND="media-libs/libsdl media-libs/mesa media-libs/sdl-mixer dev-games/ode dev-libs/libbulletml-d" S="${WORKDIR}/${MY_PN}" pkg_setup() { # gcc must be built with "d" USE-FLAG if ! built_with_use sys-devel/gcc d; then ewarn "sys-devel/gcc must be built with d for this package" ewarn "to function." die "recompile gcc with USE=\"d\"" fi } src_unpack(){ unpack ${A} epatch ${FILESDIR}/${P}.diff } src_compile() { emake || die } src_install() { dogamesbin ${PN} local datadir=${GAMES_DATADIR}/${PN} dodir ${datadir} cp -r barrage images sounds ${D}/${datadir} dodoc readme* prepgamesdirs } pkg_postinst() { local statedir=${GAMES_STATEDIR}/${PN} if [ ! -d ${statedir} ]; then mkdir -p ${statedir} chmod ug+rw ${statedir} fi if [ ! -d ${statedir}/replay ]; then mkdir -p ${statedir}/replay chmod ug+rw ${statedir}/replay fi if [ ! -e ${statedir}/${PN}.prf ]; then touch ${statedir}/${PN}.prf chmod ug+rw ${statedir}/${PN}.prf fi }