diff options
author | Snow <i@xkun.me> | 2022-05-15 11:41:03 +0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-15 12:14:02 +0200 |
commit | a1f19b7a98bc833319e3c4443d62c0778981d12f (patch) | |
tree | a119d88e8ab36b9c6776d2cc80aa49e161149fa1 /Ports | |
parent | f8984146bd7e98cefa28ea48f10275096a9ff663 (diff) | |
download | serenity-a1f19b7a98bc833319e3c4443d62c0778981d12f.zip |
Ports: Add joe's own editor
Diffstat (limited to 'Ports')
-rw-r--r-- | Ports/AvailablePorts.md | 1 | ||||
-rwxr-xr-x | Ports/joe/package.sh | 10 | ||||
-rw-r--r-- | Ports/joe/patches/ReadMe.md | 14 | ||||
-rw-r--r-- | Ports/joe/patches/joe.patch | 46 |
4 files changed, 71 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 1f98d96678..f46086d2f1 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -82,6 +82,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`indent`](indent/) | GNU indent | 2.2.11 | https://www.gnu.org/software/indent/ | | [`isl`](isl/) | Integer Set Library | 0.24 | https://libisl.sourceforge.io/ | | [`ja2`](ja2/) | Jagged Alliance 2 Stracciatella | 0.15.x | https://github.com/safarp/ja2-stracciatella/tree/0.15.x | +| [`joe`](joe/) | joe's own editor | 4.6 | https://joe-editor.sourceforge.io/ | | [`jot`](jot/) | jot (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy | | [`jq`](jq/) | jq | 1.6 | https://stedolan.github.io/jq/ | | [`klong`](klong/) | Klong | 20220315 | https://t3x.org/klong/ | diff --git a/Ports/joe/package.sh b/Ports/joe/package.sh new file mode 100755 index 0000000000..8d4326e221 --- /dev/null +++ b/Ports/joe/package.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=joe +version=4.6 +files="https://sourceforge.net/projects/joe-editor/files/JOE%20sources/joe-${version}/joe-${version}.tar.gz/download joe-${version}.tar.gz 495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de" +useconfigure="true" +auth_type=sha256 +configopts=( + "--disable-curses" + "--disable-termcap" +) diff --git a/Ports/joe/patches/ReadMe.md b/Ports/joe/patches/ReadMe.md new file mode 100644 index 0000000000..1d2ec3688d --- /dev/null +++ b/Ports/joe/patches/ReadMe.md @@ -0,0 +1,14 @@ +# Patches for joe's own editor + +## `joe.patch` + +Build a curseless joe's own editor, its only dependency is LibC. + +- Add serenity to `config.sub`. +- Some hacks in joe source code to make it work. + - Undefine the macro `TERMINFO` in `termcap.c`, or it will lead crash. + - Define `__USE_MISC` manually in `checkwidths.c` for `ECHOCTL` and `ECHOKE`, + see `Kernel/API/POSIX/termios.h`. + - Remove the prefix `sys/`, because serenity does not have the header `fcntl.h` + in `/usr/include/sys`. + diff --git a/Ports/joe/patches/joe.patch b/Ports/joe/patches/joe.patch new file mode 100644 index 0000000000..ef8c3d0b20 --- /dev/null +++ b/Ports/joe/patches/joe.patch @@ -0,0 +1,46 @@ +diff -u -r joe-4.6/config.sub joe-4.6-patched/config.sub +--- joe-4.6/config.sub 2018-01-11 00:29:29.000000000 +0800 ++++ joe-4.6-patched/config.sub 2022-05-15 11:01:52.017408784 +0800 +@@ -1374,7 +1374,7 @@ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -serenity*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +diff -u -r joe-4.6/joe/termcap.c joe-4.6-patched/joe/termcap.c +--- joe-4.6/joe/termcap.c 2018-01-11 00:28:34.000000000 +0800 ++++ joe-4.6-patched/joe/termcap.c 2022-05-15 11:02:58.185406191 +0800 +@@ -7,6 +7,8 @@ + */ + #include "types.h" + ++#undef TERMINFO // undefine this manually, or it will lead crash ++ + #ifdef TERMINFO + + #ifdef __CYGWIN__ +diff -u -r joe-4.6/joe/util/checkwidths.c joe-4.6-patched/joe/util/checkwidths.c +--- joe-4.6/joe/util/checkwidths.c 2018-01-11 00:28:34.000000000 +0800 ++++ joe-4.6-patched/joe/util/checkwidths.c 2022-05-15 11:04:04.225403604 +0800 +@@ -5,6 +5,8 @@ + + */ + ++#define __USE_MISC // for ECHOCTL and ECHOKE ++ + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +@@ -12,7 +14,7 @@ + #include <arpa/inet.h> + #include <stddef.h> + #include <poll.h> +-#include <sys/fcntl.h> ++#include <fcntl.h> // the prefix "sys/" is not needed on serenity + #include <termios.h> + + #define TO_CHAR_OK(c) ((char)(c)) + |