1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:57:36 +00:00

Ports/mc: Add Midnight Commander port

This commit is contained in:
Kenneth Myhra 2022-01-13 14:09:51 +01:00 committed by Linus Groh
parent 965b772f70
commit 2255e8859c
6 changed files with 142 additions and 0 deletions

View file

@ -0,0 +1,29 @@
From 34a4ba3c619add44391b7d7a7422babab9993fbb Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Sat, 25 Dec 2021 19:01:58 +0100
Subject: [PATCH 1/3] config/config.sub: Add SerenityOS as portable system
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
config/config.sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/config.sub b/config/config.sub
index 1d8e98b..85b7fde 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1363,7 +1363,7 @@ case $os in
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
--
2.25.1

View file

@ -0,0 +1,30 @@
From 749c81e5006dea41daf16e99c8a60926236d2373 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Sat, 25 Dec 2021 19:15:35 +0100
Subject: [PATCH 2/3] filemanager/ext.c: Include strings.h if SerenityOS
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
src/filemanager/ext.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c
index 781a763..33baf8c 100644
--- a/src/filemanager/ext.c
+++ b/src/filemanager/ext.c
@@ -36,6 +36,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef __serenity__
+#include <strings.h>
+#endif
#include <unistd.h>
#include "lib/global.h"
--
2.25.1

View file

@ -0,0 +1,30 @@
From 0a5b0b9c2bf5befae8e2e831e75a95f2f0bb26a3 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Tue, 11 Jan 2022 19:56:13 +0100
Subject: [PATCH 3/3] filemanager/ext.c: Use str_ncasecmp instead of
strncasecmp if SerenityOS
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
---
src/filemanager/ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c
index 33baf8c..a48d6e1 100644
--- a/src/filemanager/ext.c
+++ b/src/filemanager/ext.c
@@ -950,7 +950,7 @@ regex_command_for (void *target, const vfs_path_t * filename_vpath, const char *
if (case_insense)
{
p += 2;
- cmp_func = strncasecmp;
+ cmp_func = str_ncasecmp;
}
if (*p == '.' && file_len >= (size_t) (q - p))
--
2.25.1

View file

@ -0,0 +1,31 @@
+# Patches for mc on SerenityOS
+
+## `0001-config-config.sub-Add-SerenityOS-as-portable-system.patch`
+
+config/config.sub: Add SerenityOS as portable system
+
+### Status
+- [ ] Local?
+- [X] Should be merged to upstream?
+- [ ] Resolves issue(s) with our side of things
+- [ ] Hack
+
+## 0002-filemanager-ext.c-Include-strings.h-if-SerenityOS.patch
+
+filemanager/ext.c: Include strings.h if SerenityOS
+
+### Status
+- [ ] Local?
+- [X] Should be merged to upstream?
+- [ ] Resolves issue(s) with our side of things
+- [ ] Hack
+
+## 0003-filemanager-ext.c-Use-str_ncasecmp-instead-of-strncasecmp-if-SerenityOS.patch
+
+filemanager/ext.c: Use str_ncasecmp instead of strncasecmp if SerenityOS
+
+### Status
+- [ ] Local?
+- [X] Should be merged to upstream?
+- [ ] Resolves issue(s) with our side of things
+- [ ] Hack