# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit ghc-package DESCRIPTION="Haskell utilities for parsing, filtering, transforming and generating XML documentss." HOMEPAGE="http://http://www.cs.york.ac.uk/fp/HaXml/" SRC_URI="http://www.haskell.org/HaXml/${PN}-${PV}.tar.gz" LICENSE="LGPL" SLOT="0" KEYWORDS="x86" IUSE="doc" # actually, >=ghc-5.02 is ok # hugs and nhc98 are ok too, somebody might want to add support for them DEPEND="${DEPEND} >=virtual/ghc-6.0 doc? ( >=dev-haskell/haddock-0.6-r2 )" src_unpack() { unpack ${A} } src_compile() { ./configure --prefix=${D}/usr/bin \ || die "./configure failed" emake -j1 || die "make failed" # create documentation if requested if use doc; then emake -j1 haddock || die "make doc failed" fi # prepare installation of the pkg.conf-file ghc-setup-pkg ${S}/obj/ghc/pkg.conf # make sure the libdir is correct sed -i "s:\$libdir:`ghc-libdir`:" `ghc-localpkgconf` } src_install() { # fix so it installs into image dir echo ${D}`ghc-libdir` > obj/ghc/ghclibdir echo ${D}`ghc-libdir`/imports > obj/ghc/ghcincdir mkdir -p `cat obj/ghc/ghclibdir` mkdir -p `cat obj/ghc/ghcincdir` emake -j1 install-filesonly-ghc || die "make install failed" if use doc; then dohtml -r docs/* dodoc docs/icfp99.dvi docs/icfp99.ps.gz fi ghc-install-pkg }