diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-11 17:02:06 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-11 17:21:14 -0300 |
commit | 36f6fd122162c49fd1737344c1a9de7cc7bf3758 (patch) | |
tree | e5fdd9dac76e4b10bbbf1c01c22b4af9e3d67b58 /src | |
parent | 4e9deef331d9d533fe2239739343e00005f95282 (diff) | |
download | luarocks-36f6fd122162c49fd1737344c1a9de7cc7bf3758.tar.gz luarocks-36f6fd122162c49fd1737344c1a9de7cc7bf3758.tar.bz2 luarocks-36f6fd122162c49fd1737344c1a9de7cc7bf3758.zip |
add DragonFly BSD support
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/core/cfg.lua | 28 | ||||
-rw-r--r-- | src/luarocks/core/sysdetect.lua | 3 |
2 files changed, 13 insertions, 18 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index 6a2518c0..9122c877 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -37,6 +37,7 @@ local platform_order = { | |||
37 | "netbsd", | 37 | "netbsd", |
38 | "openbsd", | 38 | "openbsd", |
39 | "freebsd", | 39 | "freebsd", |
40 | "dragonfly", | ||
40 | "linux", | 41 | "linux", |
41 | "macosx", | 42 | "macosx", |
42 | "cygwin", | 43 | "cygwin", |
@@ -151,6 +152,7 @@ end | |||
151 | local platform_sets = { | 152 | local platform_sets = { |
152 | freebsd = { unix = true, bsd = true, freebsd = true }, | 153 | freebsd = { unix = true, bsd = true, freebsd = true }, |
153 | openbsd = { unix = true, bsd = true, openbsd = true }, | 154 | openbsd = { unix = true, bsd = true, openbsd = true }, |
155 | dragonfly = { unix = true, bsd = true, dragonfly = true }, | ||
154 | solaris = { unix = true, solaris = true }, | 156 | solaris = { unix = true, solaris = true }, |
155 | windows = { windows = true, win32 = true }, | 157 | windows = { windows = true, win32 = true }, |
156 | cygwin = { unix = true, cygwin = true }, | 158 | cygwin = { unix = true, cygwin = true }, |
@@ -451,6 +453,9 @@ local function make_defaults(lua_version, target_cpu, platforms, home) | |||
451 | 453 | ||
452 | if platforms.bsd then | 454 | if platforms.bsd then |
453 | defaults.variables.MAKE = "gmake" | 455 | defaults.variables.MAKE = "gmake" |
456 | defaults.gcc_rpath = false | ||
457 | defaults.variables.CC = "cc" | ||
458 | defaults.variables.LD = defaults.variables.CC | ||
454 | end | 459 | end |
455 | 460 | ||
456 | if platforms.macosx then | 461 | if platforms.macosx then |
@@ -492,27 +497,14 @@ local function make_defaults(lua_version, target_cpu, platforms, home) | |||
492 | 497 | ||
493 | if platforms.freebsd then | 498 | if platforms.freebsd then |
494 | defaults.arch = "freebsd-"..target_cpu | 499 | defaults.arch = "freebsd-"..target_cpu |
495 | defaults.gcc_rpath = false | 500 | elseif platforms.dragonfly then |
496 | defaults.variables.CC = "cc" | 501 | defaults.arch = "dragonfly-"..target_cpu |
497 | defaults.variables.LD = defaults.variables.CC | 502 | elseif platforms.openbsd then |
498 | defaults.variables.LIBFLAG = "-shared" | ||
499 | end | ||
500 | |||
501 | if platforms.openbsd then | ||
502 | defaults.arch = "openbsd-"..target_cpu | 503 | defaults.arch = "openbsd-"..target_cpu |
503 | defaults.gcc_rpath = false | 504 | elseif platforms.netbsd then |
504 | defaults.variables.CC = "cc" | ||
505 | defaults.variables.LD = defaults.variables.CC | ||
506 | defaults.variables.LIBFLAG = "-shared" | ||
507 | end | ||
508 | |||
509 | if platforms.netbsd then | ||
510 | defaults.arch = "netbsd-"..target_cpu | 505 | defaults.arch = "netbsd-"..target_cpu |
511 | end | 506 | elseif platforms.solaris then |
512 | |||
513 | if platforms.solaris then | ||
514 | defaults.arch = "solaris-"..target_cpu | 507 | defaults.arch = "solaris-"..target_cpu |
515 | --defaults.platforms = {"unix", "solaris"} | ||
516 | defaults.variables.MAKE = "gmake" | 508 | defaults.variables.MAKE = "gmake" |
517 | end | 509 | end |
518 | 510 | ||
diff --git a/src/luarocks/core/sysdetect.lua b/src/luarocks/core/sysdetect.lua index 02b8a492..d999203a 100644 --- a/src/luarocks/core/sysdetect.lua +++ b/src/luarocks/core/sysdetect.lua | |||
@@ -153,6 +153,9 @@ local function detect_elf_system(fd, hdr, sections) | |||
153 | return "netbsd" | 153 | return "netbsd" |
154 | elseif sections[".note.openbsd.ident"] then | 154 | elseif sections[".note.openbsd.ident"] then |
155 | return "openbsd" | 155 | return "openbsd" |
156 | elseif sections[".note.tag"] and | ||
157 | sections[".note.tag"].namedata == "DragonFly" then | ||
158 | return "dragonfly" | ||
156 | end | 159 | end |
157 | 160 | ||
158 | local gnu_version_r = sections[".gnu.version_r"] | 161 | local gnu_version_r = sections[".gnu.version_r"] |