source: trunk/dports/devel/luarocks/Portfile

Last change on this file was 146326, checked in by takeshi@…, 21 months ago

luarocks: update to 2.3.0, using PortGroup github

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 146326 2016-03-05 08:54:47Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        keplerproject luarocks 2.3.0 v
8license             MIT
9categories          devel
10platforms           darwin
11maintainers         nomaintainer
12supported_archs     noarch
13
14description         Manager for rocks, lua extensions.
15long_description    \
16    LuaRocks is a deployment and management system for Lua modules that allows \
17    you to install self-contained modules (\"rocks\") which also contain \
18    version dependency information. It handles both install time dependencies \
19    and runtime version check. LuaRocks supports local and remote \
20    repositories, and multiple local rocks trees.
21
22homepage            http://www.luarocks.org/
23depends_lib         port:lua
24
25checksums           rmd160  7b435a44d738aac1a37436cb8fab6b14ae5deb10 \
26                    sha256  0e44e4246ee602dcc623b4a2c329a2c57627a598018d3474e30c28a91fe5276d
27
28configure.args      --with-lua=${prefix} \
29                    --rocks-tree=${prefix}/share/${name}
30
31patchfiles          patch-src_luarocks_cfg.diff
32post-patch {
33    reinplace   "s|%PREFIX%|${prefix}|g"       ${worksrcpath}/src/luarocks/cfg.lua
34    reinplace "s|%COMPILER%|${configure.cc}|g" ${worksrcpath}/src/luarocks/cfg.lua
35}
36
37pre-configure {
38    configure.args-append  --lua-version=[string range [lindex [lindex [registry_active lua] 0] 1] 0 2]
39}
40
41post-configure {
42    reinplace -E "/ln -nfs/s|\\\$\\\(DESTDIR\\\)\\\$\\\(BINDIR\\\)/|${prefix}/bin/|" ${worksrcpath}/Makefile
43}
44
45use_parallel_build  no
46
47variant md5 conflicts openssl description { Use md5 as checker } {
48    configure.args-append   --with-md5-checker=md5sum
49}
50   
51variant openssl conflicts md5 description { Use openssl as checker } {
52    configure.args-append   --with-md5-checker=openssl
53    depends_run-append  path:lib/libssl.dylib:openssl
54}
55
56if {![variant_isset md5]} {
57    default_variants +openssl
58}
59
60variant wget conflicts curl description { Use wget as downloader } {
61    configure.args-append   --with-downloader=wget
62    depends_run-append  port:wget
63}
64
65variant curl conflicts wget description { Use curl as downloader } {
66    configure.args-append   --with-downloader=curl
67    depends_run-append  port:curl
68}
69
70if {![variant_isset wget]} {
71    default_variants +curl
72}
73
74destroot.keepdirs  ${destroot}${prefix}/share/luarocks/
75post-destroot {
76    xinstall -m 755 -d ${destroot}${prefix}/share/luarocks/
77}
78notes "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"
79
Note: See TracBrowser for help on using the repository browser.