[106225] trunk/dports/lang/luajit/Portfile
and.damore at macports.org
and.damore at macports.org
Sun May 19 13:35:26 PDT 2013
Revision: 106225
https://trac.macports.org/changeset/106225
Author: and.damore at macports.org
Date: 2013-05-19 13:35:25 -0700 (Sun, 19 May 2013)
Log Message:
-----------
port luajit: put lua version checking in an if branch; #39149
Modified Paths:
--------------
trunk/dports/lang/luajit/Portfile
Modified: trunk/dports/lang/luajit/Portfile
===================================================================
--- trunk/dports/lang/luajit/Portfile 2013-05-19 20:30:53 UTC (rev 106224)
+++ trunk/dports/lang/luajit/Portfile 2013-05-19 20:35:25 UTC (rev 106225)
@@ -31,18 +31,21 @@
CFLAGS="${configure.cflags} ${configure.cppflags} [get_canonical_archflags]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags]" \
PREFIX="${prefix}" \
- ABIVER=[string range [lindex [lindex [registry_active lua] 0] 1] 0 2] \
Q=""
post-patch {
- set lua_version [string range [lindex [lindex [registry_active lua] 0] 1] 0 2]
- if {[vercmp $lua_version 5.2] >= 0} {
+ # luajit doesn't depends on lua but if lua 5.2 is installed we're going to change the conf file so we can use 5.2 extensions
+ if { ![catch {set lua_version [string range [lindex [lindex [registry_active lua] 0] 1] 0 2]}]
+ && [vercmp $lua_version 5.2] >= 0} {
+
reinplace "s|5\\.1|5.2|g" ${worksrcpath}/src/luaconf.h
+ destroot.args-append ABIVER=$lua_version
+ build.args-delete CFLAGS="${configure.cflags} ${configure.cppflags} [get_canonical_archflags]"
+ build.args-append CFLAGS="${configure.cflags} ${configure.cppflags} [get_canonical_archflags] -DLUAJIT_ENABLE_LUA52COMPAT"
}
- destroot.post_args-append ABIVER=$lua_version
}
-destroot.post_args-append PREFIX="${prefix}"
+destroot.args-append PREFIX="${prefix}"
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130519/ae754aad/attachment.html>
More information about the macports-changes
mailing list