# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="York is a tile placement game loosely inspired by Carcassonne" HOMEPAGE="http://york.sf.net/" SRC_URI="mirror://sourceforge/${PN}/${PN}-src-${PV}.tar.gz mirror://sourceforge/${PN}/${PN}-data-${PV}.tar.gz http://york.sf.net/york_compile_fix.sh http://york.sf.net/york_data_file_patch.sh" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="x11-libs/wxGTK media-libs/libsdl app-shells/bash sys-apps/diffutils sys-apps/sed app-arch/zip app-arch/unzip" RDEPEND="x11-libs/wxGTK media-libs/libsdl" src_unpack() { unpack ${A} # Apply game data fix for road scoring /bin/bash ${DISTDIR}/york_data_file_patch.sh # Apply a compilation fix (not needed for me, but perhaps for others) cd ${S} /bin/bash ${DISTDIR}/york_compile_fix.sh # Use our CFLAGS sed -i -e "s:^\(CXXFLAGS=.*\)$:\1 ${CFLAGS}:" Makefile # Use the proper dir for game data sed -i -e "s:*\.dat:${GAMES_DATADIR}/${PN}/*.dat:" resource.cpp sed -i -e "s:base.dat:${GAMES_DATADIR}/${PN}/base.dat:" resource.h } src_compile() { emake || die "emake failed" } src_install() { # Binary is named "demo" - rename that to "york" mv demo york dogamesbin york dodoc COPYING README.txt # Don't forget the data file insinto ${GAMES_DATADIR}/${PN} doins ${WORKDIR}/base.dat }