From d8a22c7770b72111c9779dd5df8cdebafd431fef Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Tue, 29 Nov 2011 22:39:53 +1030 Subject: Add platform specific overrides to rockspec Luarocks does not support a "solaris" platform - USE_INTERNAL_ISINF must stay commented. --- README | 4 ++++ lua-cjson-1.0.4-1.rockspec | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README b/README index 13e5a03..4907359 100644 --- a/README +++ b/README @@ -74,6 +74,10 @@ Extract the Lua CJSON source package into a directory and run: # cd lua-cjson-1.0.4; luarocks make +LuaRocks does not support platform specific configuration for Solaris. +On Solaris, you may need to manually uncomment "USE_INTERNAL_ISINF" in +the rockspec before building this module. + See the LuaRocks documentation for further details. diff --git a/lua-cjson-1.0.4-1.rockspec b/lua-cjson-1.0.4-1.rockspec index da19bd1..5eac501 100644 --- a/lua-cjson-1.0.4-1.rockspec +++ b/lua-cjson-1.0.4-1.rockspec @@ -30,8 +30,24 @@ build = { -- thread-safety isn't required. -- USE_INTERNAL_ISINF: Provide internal isinf() implementation. Required -- on some Solaris platforms. - defines = { "VERSION=\"1.0.4\"", "USE_POSIX_SETLOCALE" } + defines = { + "VERSION=\"1.0.4\"", "USE_POSIX_SETLOCALE", +-- LuaRocks does not support platform specific configuration for Solaris. +-- Uncomment the line below on Solaris platforms. +-- "USE_INTERNAL_ISINF" + } } }, + -- Override default build options (per platform) + platforms = { + linux = { modules = { cjson = { defines = { + [2] = "USE_POSIX_USELOCALE" + } } } }, + macosx = { modules = { cjson = { defines = { + [2] = "USE_POSIX_USELOCALE" + } } } } + }, copy_directories = { "tests" } } + +-- vi:ai et sw=4 ts=4: -- cgit v1.2.3-55-g6feb