# $Id: Portfile 50980 2009-05-14 19:41:55Z and.damore@macports.org $

PortSystem 1.0

name                    luarocks
version                 1.0
categories              devel
platforms               darwin
maintainers             and.damore
description             Manager for rocks, lua extensions.
long_description        LuaRocks is a deployment and management system for Lua modules. \
				LuaRocks allows you to install Lua modules as self-contained packages \
				called \"rocks\", which also contain version dependency information. This \
				information is used both at install time, so that when one rock is \
				requested all rocks it depends on are installed as well, and at run \
				time, so that when a module is required, the correct version is loaded. \
				LuaRocks supports both local and remote repositories, and multiple local \
				rocks trees.
homepage                http://www.luarocks.org/
master_sites           	http://luaforge.net/frs/download.php/3727/
depends_run		port:lua
universal_variant	no

configure.args		--with-lua=${prefix} \
			--scripts-dir=${prefix}/lib/luarocks/bin

variant md5 conflicts openssl description { Use md5 as checker } {
	configure.args-append	--with-md5-checker=md5sum
}
	
variant openssl conflicts md5 description { Use openssl as checker (default) } {
	configure.args-append	--with-md5-checker=openssl
	depends_run-append	port:openssl
}

if {![variant_isset md5]} {
	default_variants +openssl
}

variant wget conflicts curl description { Use wget as downloader } {
	configure.args-append	--with-downloader=wget
	depends_run-append	port:wget
}

variant curl conflicts wget description { Use curl as downloader (default) } {
	configure.args-append	--with-downloader=curl
	depends_run-append	port:curl
}

if {![variant_isset wget]} {
	default_variants +curl
}

checksums           md5     c884fe3fae925bb30f770361e70e784e \
                    sha1    96223c3da6257e5370d031221279b1c89731baef \
                    rmd160  b387194c589a9df4c4ffa40c880f6a7272985eed

