# $Id: Portfile 114431 2013-12-08 09:48:42Z and.damore@macports.org $ PortSystem 1.0 name luarocks version 2.0.13 revision 2 license MIT categories devel platforms darwin maintainers nomaintainer supported_archs noarch description Manager for rocks, lua extensions. long_description \ LuaRocks is a deployment and management system for Lua modules that allows \ you to install self-contained modules (\"rocks\") which also contain \ version dependency information. It handles both install time dependencies \ and runtime version check. LuaRocks supports local and remote \ repositories, and multiple local rocks trees. homepage http://www.luarocks.org/ master_sites http://luarocks.org/releases/ depends_run port:lua checksums rmd160 9e119eb45b15a30ffb5cd1e341bdc87570543ae7 \ sha256 5eac098dcde65ca417930be42ccbd1a1cd151d5aebd8cc17898231de8289edb2 configure.args --with-lua=${prefix} \ --rocks-tree=${prefix}/share/${name} patchfiles patch-src_luarocks_cfg.diff post-patch { reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/src/luarocks/cfg.lua reinplace "s|%COMPILER%|${configure.cc}|g" ${worksrcpath}/src/luarocks/cfg.lua } pre-configure { configure.args-append --lua-version=[string range [lindex [lindex [registry_active lua] 0] 1] 0 2] } post-configure { reinplace -E "/ln -nfs/s|\\\$\\\(DESTDIR\\\)\\\$\\\(BINDIR\\\)/|${prefix}/bin/|" ${worksrcpath}/Makefile } use_parallel_build no 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 } { 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 } { configure.args-append --with-downloader=curl depends_run-append port:curl } if {![variant_isset wget]} { default_variants +curl } destroot.keepdirs ${destroot}${prefix}/share/luarocks/ post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/luarocks/ } notes "If you upgraded lua from 5.1 to 5.2 you'll need to reinstall your rocks, you can find a list of the previous installed rocks in ${prefix}/share/${name}/lib/lua/5.1 and in ~/.luarocks/ . Note that these previously installed rocks may be listed as installed but luarocks.require function will not be able to load them"