# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit ghc-package DESCRIPTION="An interface generator for Haskell" HOMEPAGE="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/" SRC_URI="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~ppc" IUSE="" DEPEND=">=virtual/ghc-6.0 >=dev-haskell/cabal-1.0.1" RDEPEND="" src_unpack() { unpack ${A} ( cd ${S}; sed -i /'^Category:'/'aBuild-Depends: base,haskell98' c2hs.cabal ) } src_compile() { ./Setup.hs configure \ --ghc --prefix=/usr \ --with-compiler="$(ghc-getghc)" \ --with-hc-pkg="$(ghc-getghcpkg)" \ || die "setup configure failed" ./Setup.hs build || die "setup build failed" } src_install() { exeinto /usr/bin doexe c2hs/c2hs exeinto /usr/lib/${P} doexe dist/build/c2hs/c2hs insinto /usr/lib/${P} doins c2hs/lib/C2HS.hs dodoc AUTHORS ChangeLog README }