# $Id: Portfile 65849 2010-04-02 03:49:11Z ryandesign@macports.org $

PortSystem 1.0

name		hs-platform-cabal
set canonicalname	cabal-install
version		0.6.2
categories	devel haskell
maintainers	gwright
platforms	darwin

description	User interface to the Cabal build system (platform version).
long_description	\
		Cabal is a system for building and packaging Haskell	\
		libraries and programs It defines a common interface	\
		for package authors and distributors to easily build	\
		their applications in a portable way. Cabal is part of	\
		a larger infrastructure for distributing, organizing,	\
		and cataloging Haskell libraries and programs.

homepage	http://www.haskell.org/cabal
master_sites	http://hackage.haskell.org/packages/archive/${canonicalname}/${version}
distname	${canonicalname}-${version}

checksums	md5     8cb1c19233a9a114faf0eea7c46cb23e		\
		sha1    415bdf6ae7029b488b99c2da288af10634024ac7	\
		rmd160  f7ae2a8155b28ee1b736e9abf00c32fe55e7c80f

# Since cabal is an application, and the Haskell libraries are statically
# linked, the following are build dependencies and not lib dependencies:
depends_build	port:ghc			\
		port:hs-platform-zlib		\
		port:hs-platform-HTTP

universal_variant	no

configure	{ system "cd ${worksrcpath} && runhaskell Setup configure -v --ghc --prefix=${prefix} --with-gcc=${configure.cc}"
		}

build		{ system "cd ${worksrcpath} && runhaskell Setup build -v"
		}

destroot	{ system "cd ${worksrcpath} && runhaskell Setup copy --copy-prefix=${destroot}${prefix}"
                }

# platform components should not be livecheck'ed.
livecheck.type	none

