# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit ghc-package fixheadtails MY_PN=HaXml MY_P=${MY_PN}-${PV} DESCRIPTION="Haskell utilities for parsing, filtering, transforming and generating XML documentss." HOMEPAGE="http://www.haskell.org/HaXml/" SRC_URI="http://www.haskell.org/HaXml/${MY_P}.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=">=virtual/ghc-6.0 doc? ( >=dev-haskell/haddock-0.6-r2 )" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} ht_fix_file ${S}/configure } src_compile() { ./configure --prefix=${D}/usr/bin \ --buildwith=ghc \ || 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) > ${S}/obj/ghc/ghclibdir echo ${D}/$(ghc-libdir)/imports > ${S}/obj/ghc/ghcincdir #mkdir -p ${D}$(ghc-libdir)/import 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 }