From 8a99d05dec5a700e14b1b033225173a425de5fce Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 8 Aug 2012 18:39:24 -0300 Subject: Add configuration for NetBSD, and refactor a bit the other configs. --- src/luarocks/cfg.lua | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 63285229..efe5de36 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua @@ -69,6 +69,10 @@ elseif system == "OpenBSD" then detected.unix = true detected.openbsd = true detected.bsd = true +elseif system == "NetBSD" then + detected.unix = true + detected.netbsd = true + detected.bsd = true elseif system == "Darwin" then detected.unix = true detected.macosx = true @@ -315,6 +319,8 @@ if detected.unix then defaults.variables.CFLAGS = "-O2" defaults.cmake_generator = "Unix Makefiles" defaults.platforms = { "unix" } + defaults.variables.CC = "gcc" + defaults.variables.LD = "gcc" defaults.variables.LIBFLAG = "-shared" defaults.external_deps_patterns = { bin = { "?" }, @@ -345,7 +351,8 @@ if detected.cygwin then end if detected.bsd then - defaults.variables.STATFLAG = "-f '%Op'" + defaults.variables.MAKE = "gmake" + defaults.variables.STATFLAG = "-f '%OLp'" end if detected.macosx then @@ -361,18 +368,11 @@ end if detected.linux then defaults.arch = "linux-"..proc defaults.platforms = {"unix", "linux"} - defaults.variables.CC = "gcc" - defaults.variables.LD = "gcc" - defaults.variables.LIBFLAG = "-shared" end if detected.freebsd then defaults.arch = "freebsd-"..proc defaults.platforms = {"unix", "bsd", "freebsd"} - defaults.variables.MAKE = "gmake" - defaults.variables.CC = "gcc" - defaults.variables.LD = "gcc" - defaults.variables.LIBFLAG = "-shared" end if detected.openbsd then @@ -380,12 +380,15 @@ if detected.openbsd then defaults.platforms = {"unix", "bsd", "openbsd"} end +if detected.netbsd then + defaults.arch = "netbsd-"..proc + defaults.platforms = {"unix", "bsd", "netbsd"} +end + if detected.solaris then defaults.arch = "solaris-"..proc defaults.platforms = {"unix", "solaris"} defaults.variables.MAKE = "gmake" - defaults.variables.CC = "gcc" - defaults.variables.LD = "gcc" end -- Expose some more values detected by LuaRocks for use by rockspec authors. -- cgit v1.2.3-55-g6feb