Modified: trunk/dports/lang/luajit/Portfile (112787 => 112788)
--- trunk/dports/lang/luajit/Portfile 2013-11-01 13:36:24 UTC (rev 112787)
+++ trunk/dports/lang/luajit/Portfile 2013-11-01 14:25:46 UTC (rev 112788)
@@ -4,7 +4,7 @@
name luajit
version 2.0.1
-revision 6
+revision 7
categories lang
platforms darwin
license BSD
@@ -33,20 +33,27 @@
PREFIX="${prefix}" \
Q=""
-post-patch {
- reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/etc/luajit.pc
+# 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} {
- # 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} {
+ post-patch {
+ reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/etc/luajit.pc
+ reinplace "s|5\\.1|5.2|g" ${worksrcpath}/src/luaconf.h ${worksrcpath}/etc/luajit.pc
+ }
- 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"
- }
+ configure.args-append ABIVER=$lua_version
+ build.args-append ABIVER=$lua_version
+ 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"
}
+post-patch {
+ reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/etc/luajit.pc
+}
+
destroot.args-append PREFIX="${prefix}"
post-destroot {