diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-08-08 18:39:24 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-08-08 18:39:24 -0300 |
commit | 8a99d05dec5a700e14b1b033225173a425de5fce (patch) | |
tree | 50f981a3c15808e44cdad94011ea2dc95b291ad1 /src | |
parent | 64153c9560db6484727c6c76e7b5dbc44e879c36 (diff) | |
download | luarocks-8a99d05dec5a700e14b1b033225173a425de5fce.tar.gz luarocks-8a99d05dec5a700e14b1b033225173a425de5fce.tar.bz2 luarocks-8a99d05dec5a700e14b1b033225173a425de5fce.zip |
Add configuration for NetBSD, and refactor a bit the other configs.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cfg.lua | 23 |
1 files changed, 13 insertions, 10 deletions
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 | |||
69 | detected.unix = true | 69 | detected.unix = true |
70 | detected.openbsd = true | 70 | detected.openbsd = true |
71 | detected.bsd = true | 71 | detected.bsd = true |
72 | elseif system == "NetBSD" then | ||
73 | detected.unix = true | ||
74 | detected.netbsd = true | ||
75 | detected.bsd = true | ||
72 | elseif system == "Darwin" then | 76 | elseif system == "Darwin" then |
73 | detected.unix = true | 77 | detected.unix = true |
74 | detected.macosx = true | 78 | detected.macosx = true |
@@ -315,6 +319,8 @@ if detected.unix then | |||
315 | defaults.variables.CFLAGS = "-O2" | 319 | defaults.variables.CFLAGS = "-O2" |
316 | defaults.cmake_generator = "Unix Makefiles" | 320 | defaults.cmake_generator = "Unix Makefiles" |
317 | defaults.platforms = { "unix" } | 321 | defaults.platforms = { "unix" } |
322 | defaults.variables.CC = "gcc" | ||
323 | defaults.variables.LD = "gcc" | ||
318 | defaults.variables.LIBFLAG = "-shared" | 324 | defaults.variables.LIBFLAG = "-shared" |
319 | defaults.external_deps_patterns = { | 325 | defaults.external_deps_patterns = { |
320 | bin = { "?" }, | 326 | bin = { "?" }, |
@@ -345,7 +351,8 @@ if detected.cygwin then | |||
345 | end | 351 | end |
346 | 352 | ||
347 | if detected.bsd then | 353 | if detected.bsd then |
348 | defaults.variables.STATFLAG = "-f '%Op'" | 354 | defaults.variables.MAKE = "gmake" |
355 | defaults.variables.STATFLAG = "-f '%OLp'" | ||
349 | end | 356 | end |
350 | 357 | ||
351 | if detected.macosx then | 358 | if detected.macosx then |
@@ -361,18 +368,11 @@ end | |||
361 | if detected.linux then | 368 | if detected.linux then |
362 | defaults.arch = "linux-"..proc | 369 | defaults.arch = "linux-"..proc |
363 | defaults.platforms = {"unix", "linux"} | 370 | defaults.platforms = {"unix", "linux"} |
364 | defaults.variables.CC = "gcc" | ||
365 | defaults.variables.LD = "gcc" | ||
366 | defaults.variables.LIBFLAG = "-shared" | ||
367 | end | 371 | end |
368 | 372 | ||
369 | if detected.freebsd then | 373 | if detected.freebsd then |
370 | defaults.arch = "freebsd-"..proc | 374 | defaults.arch = "freebsd-"..proc |
371 | defaults.platforms = {"unix", "bsd", "freebsd"} | 375 | defaults.platforms = {"unix", "bsd", "freebsd"} |
372 | defaults.variables.MAKE = "gmake" | ||
373 | defaults.variables.CC = "gcc" | ||
374 | defaults.variables.LD = "gcc" | ||
375 | defaults.variables.LIBFLAG = "-shared" | ||
376 | end | 376 | end |
377 | 377 | ||
378 | if detected.openbsd then | 378 | if detected.openbsd then |
@@ -380,12 +380,15 @@ if detected.openbsd then | |||
380 | defaults.platforms = {"unix", "bsd", "openbsd"} | 380 | defaults.platforms = {"unix", "bsd", "openbsd"} |
381 | end | 381 | end |
382 | 382 | ||
383 | if detected.netbsd then | ||
384 | defaults.arch = "netbsd-"..proc | ||
385 | defaults.platforms = {"unix", "bsd", "netbsd"} | ||
386 | end | ||
387 | |||
383 | if detected.solaris then | 388 | if detected.solaris then |
384 | defaults.arch = "solaris-"..proc | 389 | defaults.arch = "solaris-"..proc |
385 | defaults.platforms = {"unix", "solaris"} | 390 | defaults.platforms = {"unix", "solaris"} |
386 | defaults.variables.MAKE = "gmake" | 391 | defaults.variables.MAKE = "gmake" |
387 | defaults.variables.CC = "gcc" | ||
388 | defaults.variables.LD = "gcc" | ||
389 | end | 392 | end |
390 | 393 | ||
391 | -- Expose some more values detected by LuaRocks for use by rockspec authors. | 394 | -- Expose some more values detected by LuaRocks for use by rockspec authors. |