mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
Ports: Update luarocks' patches to use git patches
This commit is contained in:
parent
318cc0a188
commit
9424b610ed
|
@ -1,5 +1,16 @@
|
||||||
|
From 372c6d3d0119e1c0b38f9eed0d7e9b4e45c355a3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Lemos <xspager@gmail.com>
|
||||||
|
Date: Tue, 15 Mar 2022 13:48:34 -0300
|
||||||
|
Subject: [PATCH 1/2] Setup the serenity platform
|
||||||
|
|
||||||
|
Setup serenity as a platform and configure `defaults.variables.UNZIP` to
|
||||||
|
work around our `unzip` command not supporting the flag `-n`
|
||||||
|
---
|
||||||
|
src/luarocks/core/cfg.lua | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
|
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
|
||||||
index 926d4793..7c2914b3 100644
|
index 926d479..7c2914b 100644
|
||||||
--- a/src/luarocks/core/cfg.lua
|
--- a/src/luarocks/core/cfg.lua
|
||||||
+++ b/src/luarocks/core/cfg.lua
|
+++ b/src/luarocks/core/cfg.lua
|
||||||
@@ -42,6 +42,7 @@ local platform_order = {
|
@@ -42,6 +42,7 @@ local platform_order = {
|
||||||
|
@ -31,19 +42,6 @@ index 926d4793..7c2914b3 100644
|
||||||
-- Expose some more values detected by LuaRocks for use by rockspec authors.
|
-- Expose some more values detected by LuaRocks for use by rockspec authors.
|
||||||
defaults.variables.LIB_EXTENSION = defaults.lib_extension
|
defaults.variables.LIB_EXTENSION = defaults.lib_extension
|
||||||
defaults.variables.OBJ_EXTENSION = defaults.obj_extension
|
defaults.variables.OBJ_EXTENSION = defaults.obj_extension
|
||||||
diff --git a/src/luarocks/core/sysdetect.lua b/src/luarocks/core/sysdetect.lua
|
--
|
||||||
index 02b8a492..b05f170b 100644
|
2.36.1
|
||||||
--- a/src/luarocks/core/sysdetect.lua
|
|
||||||
+++ b/src/luarocks/core/sysdetect.lua
|
|
||||||
@@ -189,6 +189,11 @@ local function detect_elf_system(fd, hdr, sections)
|
|
||||||
return "linux"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+
|
|
||||||
+ local uname_s = io.popen("uname -s"):read("*l")
|
|
||||||
+ if uname_s == "SerenityOS" then
|
|
||||||
+ return "serenity"
|
|
||||||
+ end
|
|
||||||
end
|
|
||||||
|
|
||||||
return system
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From 0b568422cbd06468dad849f836b8de06c3e145e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Lemos <xspager@gmail.com>
|
||||||
|
Date: Tue, 15 Mar 2022 13:48:34 -0300
|
||||||
|
Subject: [PATCH 2/2] Detect SerenityOS using the `uname` command
|
||||||
|
|
||||||
|
---
|
||||||
|
src/luarocks/core/sysdetect.lua | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/luarocks/core/sysdetect.lua b/src/luarocks/core/sysdetect.lua
|
||||||
|
index 02b8a49..b05f170 100644
|
||||||
|
--- a/src/luarocks/core/sysdetect.lua
|
||||||
|
+++ b/src/luarocks/core/sysdetect.lua
|
||||||
|
@@ -189,6 +189,11 @@ local function detect_elf_system(fd, hdr, sections)
|
||||||
|
return "linux"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
+
|
||||||
|
+ local uname_s = io.popen("uname -s"):read("*l")
|
||||||
|
+ if uname_s == "SerenityOS" then
|
||||||
|
+ return "serenity"
|
||||||
|
+ end
|
||||||
|
end
|
||||||
|
|
||||||
|
return system
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
# Patches for LuaRocks on SerenityOS
|
# Patches for luarocks on SerenityOS
|
||||||
|
|
||||||
## `luarocks.patch`
|
## `0001-Setup-the-serenity-platform.patch`
|
||||||
|
|
||||||
|
Setup the serenity platform
|
||||||
|
|
||||||
|
Setup serenity as a platform and configure `defaults.variables.UNZIP` to
|
||||||
|
work around our `unzip` command not supporting the flag `-n`
|
||||||
|
|
||||||
|
## `0002-Detect-SerenityOS-using-the-uname-command.patch`
|
||||||
|
|
||||||
|
Detect SerenityOS using the `uname` command
|
||||||
|
|
||||||
src/luarocks/core/cfg.lua: Setup serenity as a platform and config `defaults.variables.UNZIP` to work around our `unzip` command not supporting the flag `-n`
|
|
||||||
src/luarocks/core/sysdetect.lua: Detect SerenityOS using the `uname` command
|
|
||||||
|
|
||||||
This should should be upstreamed so next versions of LuaRocks will support Serenity out of the box.
|
|
||||||
|
|
Loading…
Reference in a new issue