diff options
author | nia <nia@pkgsrc.org> | 2020-07-11 15:30:52 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-07-11 15:30:52 +0000 |
commit | 9889ae6de90029b87e82a7c158587e6e0a6a56d7 (patch) | |
tree | 78897c84d5f5a0c507cd4bf84381a58f1341fba7 /lang/lua | |
parent | ea14bf4b9d3f316b3c32747a5e273a684e9c6661 (diff) | |
download | pkgsrc-9889ae6de90029b87e82a7c158587e6e0a6a56d7.tar.gz |
lua/module.mk: Avoid compiling Lua 5.3 modules with -ansi
Diffstat (limited to 'lang/lua')
-rw-r--r-- | lang/lua/module.mk | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lang/lua/module.mk b/lang/lua/module.mk index 0399357dc42..405082925b6 100644 --- a/lang/lua/module.mk +++ b/lang/lua/module.mk @@ -1,4 +1,4 @@ -# $NetBSD: module.mk,v 1.9 2020/07/11 15:14:30 nia Exp $ +# $NetBSD: module.mk,v 1.10 2020/07/11 15:30:52 nia Exp $ # # This Makefile fragment is intended to be included by packages that # install Lua modules. @@ -75,4 +75,12 @@ LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} LDFLAGS.Darwin+= -bundle -undefined dynamic_lookup .endif +.if ${_LUA_VERSION} != "51" && ${_LUA_VERSION} != "52" +# Any Lua>=5.3 module using these flags is invalid, +# since Lua 5.3 and newer require "long long". +BUILDLINK_TRANSFORM+= opt:-ansi:-std=c99 +BUILDLINK_TRANSFORM+= opt:-std=c89:-std=c99 +BUILDLINK_TRANSFORM+= opt:-std=c90:-std=c99 +.endif + .endif # LUA_MODULE_MK |