--- grfcodec-0_pre2306.ebuild 2011-05-04 10:26:28.652153006 -0400 +++ grfcodec-0_pre2306.ebuild 2011-03-30 22:11:50.490421454 -0400 @@ -1,41 +1,57 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-util/grfcodec/grfcodec-0_pre2306.ebuild,v 1.7 2010/10/15 13:49:56 maekke Exp $ +# $Header: $ -EAPI=2 -inherit eutils toolchain-funcs +EAPI=3 -MY_PV=${PV/0_pre/r} +SCM="" +if [ "${PV%9999}" != "${PV}" ] ; then + SCM=mercurial + EHG_REPO_URI="http://hg.openttdcoop.org/${PN}" +fi + +inherit toolchain-funcs ${SCM} + +MY_PV=${PV/_rc/-RC} DESCRIPTION="A suite of programs to modify openttd/Transport Tycoon Deluxe's GRF files" -HOMEPAGE="http://binaries.openttd.org/extra/grfcodec/" -SRC_URI="http://binaries.openttd.org/extra/grfcodec/${MY_PV}/${PN}-${MY_PV}-source.tar.bz2" +HOMEPAGE="http://dev.openttdcoop.org/projects/grfcodec" + +if [ "${PV%9999}" != "${PV}" ] ; then + SRC_URI="" +else + SRC_URI="http://binaries.openttd.org/extra/${PN}/${MY_PV}/${PN}-${MY_PV}-source.tar.gz" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm ppc ppc64 x86" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" IUSE="" -S=${WORKDIR}/${PN}-${MY_PV} - -DEPEND="dev-lang/perl - dev-libs/boost" +if [ "${PV%9999}" != "${PV}" ] ; then + S=${WORKDIR}/${PN} +else + S=${WORKDIR}/${PN}-${MY_PV}-source +fi + +DEPEND="!games-util/nforenum + dev-lang/perl + dev-libs/boost + media-libs/libpng" RDEPEND="" src_prepare() { - cat > Makefile.local <<-__EOF__ - CC = $(tc-getCC) +# Set up Makefile.local so that we respect CXXFLAGS/LDFLAGS +cat > Makefile.local <<-__EOF__ CXX = $(tc-getCXX) - CFLAGS = ${CFLAGS} CXXFLAGS = ${CXXFLAGS} LDOPT = ${LDFLAGS} - STRIP = : + UPX = V = 1 __EOF__ - - epatch "${FILESDIR}"/${P}-build.patch } src_install() { - dobin ${PN} grf{diff,merge} || die - dodoc *.txt Changelog || die + dobin ${PN} grf{diff,id,merge} nforenum || die + doman docs/*.1 || die + dodoc changelog.txt docs/*.txt || die }