# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Glasgow Haskell Compiler -- from Debian" HOMEPAGE="http://packages.debian.org/ http://haskell.org/ghc/" SRC_URI="amd64? (http://debian-amd64.alioth.debian.org/pure64/pool/unstable/main/amd64/g/ghc6/ghc6_6.2.1-5_amd64.deb)" LICENSE="as-is" KEYWORDS="-* ~amd64" SLOT="0" DEPEND="app-arch/dpkg dev-lang/perl" RDEPEND="virtual/libc dev-lang/perl sys-libs/readline sys-libs/ncurses dev-libs/gmp" PROVIDE="virtual/ghc" S="${WORKDIR}" src_unpack() { for i in ${A}; do dpkg -x ${DISTDIR}/${i} . done } src_install() { # Copy it mkdir -p ${D}/opt/ghc for i in lib share; do cp -rl usr/$i/ghc-6.2.1 ${D}/opt/ghc/$i done # Provide package.conf pushd ${D}/opt/ghc/lib cp -a package.conf.shipped package.conf popd # Generate symlinks in ${D}/opt/ghc/bin mkdir -p ${D}/opt/ghc/bin pushd ${D}/opt/ghc/bin ln -s ../lib/bin/ghc ghc6 ln -s ../lib/bin/ghci ghci6 ln -s ghc6 ghc ln -s ghci6 ghci popd # Adjust paths in ${D}/opt/ghc/lib/bin pushd ${D}/opt/ghc/lib/bin perl -i -ne 's#/usr/lib/ghc-6.2.1#/opt/ghc/lib#g; s#/usr/share/ghc-6.2.1#/opt/ghc/share#g;print' \ ghc-6.2.1 ghci-6.2.1 ghcprof hsc2hs ghc-pkg-6.2.1 popd }