summaryrefslogtreecommitdiff
path: root/Ports/luarocks
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-05-16 19:21:52 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-05-19 20:17:10 +0430
commit9424b610ed747e28dd524e3ffdad22d9d4651e7c (patch)
tree4cfe22d0962f1c7dee3f49d908f79c055210a239 /Ports/luarocks
parent318cc0a188113265c97b29525d5eaec24a6779a1 (diff)
downloadserenity-9424b610ed747e28dd524e3ffdad22d9d4651e7c.zip
Ports: Update luarocks' patches to use git patches
Diffstat (limited to 'Ports/luarocks')
-rw-r--r--Ports/luarocks/patches/0001-Setup-the-serenity-platform.patch (renamed from Ports/luarocks/patches/luarocks.patch)32
-rw-r--r--Ports/luarocks/patches/0002-Detect-SerenityOS-using-the-uname-command.patch28
-rw-r--r--Ports/luarocks/patches/ReadMe.md16
3 files changed, 54 insertions, 22 deletions
diff --git a/Ports/luarocks/patches/luarocks.patch b/Ports/luarocks/patches/0001-Setup-the-serenity-platform.patch
index 35023ed49a..bea43802a5 100644
--- a/Ports/luarocks/patches/luarocks.patch
+++ b/Ports/luarocks/patches/0001-Setup-the-serenity-platform.patch
@@ -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
-index 926d4793..7c2914b3 100644
+index 926d479..7c2914b 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -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.
defaults.variables.LIB_EXTENSION = defaults.lib_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
---- 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
+
diff --git a/Ports/luarocks/patches/0002-Detect-SerenityOS-using-the-uname-command.patch b/Ports/luarocks/patches/0002-Detect-SerenityOS-using-the-uname-command.patch
new file mode 100644
index 0000000000..fe8bfb68ef
--- /dev/null
+++ b/Ports/luarocks/patches/0002-Detect-SerenityOS-using-the-uname-command.patch
@@ -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
+
diff --git a/Ports/luarocks/patches/ReadMe.md b/Ports/luarocks/patches/ReadMe.md
index e573efaab3..790e8cd861 100644
--- a/Ports/luarocks/patches/ReadMe.md
+++ b/Ports/luarocks/patches/ReadMe.md
@@ -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.