diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-05-17 21:09:44 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-05-19 20:17:10 +0430 |
commit | f5a4d529c210af30ed3d24e4e140a38afba7d976 (patch) | |
tree | abeff49c886b369986e449bef3f9b1d29e012e5e /Ports/ed | |
parent | 25dc066af6fcaddd075061afb45f7460c113a3e2 (diff) | |
download | serenity-f5a4d529c210af30ed3d24e4e140a38afba7d976.zip |
Ports: Update ed's patches to use git patches
Diffstat (limited to 'Ports/ed')
-rw-r--r-- | Ports/ed/patches/0001-Make-CC-and-friends-overridable-from-the-env.patch | 32 | ||||
-rw-r--r-- | Ports/ed/patches/0002-Use-stdbool-instead-of-rolling-a-manual-Bool.patch | 26 | ||||
-rw-r--r-- | Ports/ed/patches/0003-Manually-link-with-pcre2.patch | 26 | ||||
-rw-r--r-- | Ports/ed/patches/0004-Use-pcre2-for-regex-instead-of-libc-s-regex.h.patch | 25 | ||||
-rw-r--r-- | Ports/ed/patches/ReadMe.md | 24 | ||||
-rw-r--r-- | Ports/ed/patches/fix-Makefile-in.patch | 11 | ||||
-rw-r--r-- | Ports/ed/patches/fix-configure.patch | 17 | ||||
-rw-r--r-- | Ports/ed/patches/fix-ed.patch | 12 | ||||
-rw-r--r-- | Ports/ed/patches/fix-regex.patch | 11 |
9 files changed, 133 insertions, 51 deletions
diff --git a/Ports/ed/patches/0001-Make-CC-and-friends-overridable-from-the-env.patch b/Ports/ed/patches/0001-Make-CC-and-friends-overridable-from-the-env.patch new file mode 100644 index 0000000000..5212b5ae4e --- /dev/null +++ b/Ports/ed/patches/0001-Make-CC-and-friends-overridable-from-the-env.patch @@ -0,0 +1,32 @@ +From d29259d2ea80767820f69b9b58f9377166440938 Mon Sep 17 00:00:00 2001 +From: EWouters <6179932+EWouters@users.noreply.github.com> +Date: Fri, 1 Apr 2022 02:54:00 +0200 +Subject: [PATCH 1/4] Make CC and friends overridable from the env + +Co-Authored-By: roytam1 <roytam@gmail.com> +--- + configure | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 3531bcd..a225c14 100755 +--- a/configure ++++ b/configure +@@ -21,10 +21,10 @@ datarootdir='$(prefix)/share' + infodir='$(datarootdir)/info' + mandir='$(datarootdir)/man' + program_prefix= +-CC=gcc +-CPPFLAGS= +-CFLAGS='-Wall -W -O2' +-LDFLAGS= ++CC?=gcc ++CPPFLAGS?= ++CFLAGS?='-Wall -W -O2' ++LDFLAGS?= + + # checking whether we are using GNU C. + /bin/sh -c "${CC} --version" > /dev/null 2>&1 || { CC=cc ; CFLAGS=-O2 ; } +-- +2.36.1 + diff --git a/Ports/ed/patches/0002-Use-stdbool-instead-of-rolling-a-manual-Bool.patch b/Ports/ed/patches/0002-Use-stdbool-instead-of-rolling-a-manual-Bool.patch new file mode 100644 index 0000000000..7011cb14df --- /dev/null +++ b/Ports/ed/patches/0002-Use-stdbool-instead-of-rolling-a-manual-Bool.patch @@ -0,0 +1,26 @@ +From a61996a48d800229a267d9fef1548b08450997ab Mon Sep 17 00:00:00 2001 +From: Brian Callahan <ibara@users.noreply.github.com> +Date: Sat, 1 Feb 2020 14:54:04 -0500 +Subject: [PATCH 2/4] Use stdbool instead of rolling a manual Bool + +--- + ed.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/ed.h b/ed.h +index db0b4a6..ef0c134 100644 +--- a/ed.h ++++ b/ed.h +@@ -18,8 +18,7 @@ + */ + + #ifndef __cplusplus +-enum Bool { false = 0, true = 1 }; +-typedef enum Bool bool; ++#include <stdbool.h> + #endif + + enum Pflags /* print suffixes */ +-- +2.36.1 + diff --git a/Ports/ed/patches/0003-Manually-link-with-pcre2.patch b/Ports/ed/patches/0003-Manually-link-with-pcre2.patch new file mode 100644 index 0000000000..bf6f0ceb5f --- /dev/null +++ b/Ports/ed/patches/0003-Manually-link-with-pcre2.patch @@ -0,0 +1,26 @@ +From 492088ee0565b8d947d129125ab3518a4da6a7c9 Mon Sep 17 00:00:00 2001 +From: Brian Callahan <ibara@users.noreply.github.com> +Date: Fri, 1 Apr 2022 02:54:00 +0200 +Subject: [PATCH 3/4] Manually link with pcre2 + +Co-Authored-By: EWouters <6179932+EWouters@users.noreply.github.com> +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index f716df4..c1a7880 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -20,7 +20,7 @@ objs = buffer.o carg_parser.o global.o io.o main.o main_loop.o regex.o signal.o + all : $(progname) r$(progname) + + $(progname) : $(objs) +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) -lpcre2-posix -lpcre2-8 + + r$(progname) : r$(progname).in + cat $(VPATH)/r$(progname).in > $@ +-- +2.36.1 + diff --git a/Ports/ed/patches/0004-Use-pcre2-for-regex-instead-of-libc-s-regex.h.patch b/Ports/ed/patches/0004-Use-pcre2-for-regex-instead-of-libc-s-regex.h.patch new file mode 100644 index 0000000000..7f58601305 --- /dev/null +++ b/Ports/ed/patches/0004-Use-pcre2-for-regex-instead-of-libc-s-regex.h.patch @@ -0,0 +1,25 @@ +From 5d79ba1193bb0f9813c9650ee36ec416af525a1e Mon Sep 17 00:00:00 2001 +From: Brian Callahan <ibara@users.noreply.github.com> +Date: Sat, 1 Feb 2020 14:54:04 -0500 +Subject: [PATCH 4/4] Use pcre2 for regex instead of libc's regex.h + +--- + regex.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/regex.c b/regex.c +index 9b38120..325b2f6 100644 +--- a/regex.c ++++ b/regex.c +@@ -19,7 +19,7 @@ + + #include <stddef.h> + #include <errno.h> +-#include <regex.h> ++#include <pcre2posix.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-- +2.36.1 + diff --git a/Ports/ed/patches/ReadMe.md b/Ports/ed/patches/ReadMe.md new file mode 100644 index 0000000000..55ec6afd47 --- /dev/null +++ b/Ports/ed/patches/ReadMe.md @@ -0,0 +1,24 @@ +# Patches for ed on SerenityOS + +## `0001-Make-CC-and-friends-overridable-from-the-env.patch` + +Make CC and friends overridable from the env + + + +## `0002-Use-stdbool-instead-of-rolling-a-manual-Bool.patch` + +Use stdbool instead of rolling a manual Bool + + +## `0003-Manually-link-with-pcre2.patch` + +Manually link with pcre2 + + + +## `0004-Use-pcre2-for-regex-instead-of-libc-s-regex.h.patch` + +Use pcre2 for regex instead of libc's regex.h + + diff --git a/Ports/ed/patches/fix-Makefile-in.patch b/Ports/ed/patches/fix-Makefile-in.patch deleted file mode 100644 index 4405b62389..0000000000 --- a/Ports/ed/patches/fix-Makefile-in.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ed-1.18/Makefile.in.og 2022-03-31 22:53:17.000000000 +0200 -+++ ed-1.18/Makefile.in 2022-03-31 22:54:31.000000000 +0200 -@@ -20,7 +20,7 @@ - all : $(progname) r$(progname) - - $(progname) : $(objs) -- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) -lpcre2-posix -lpcre2-8 - - r$(progname) : r$(progname).in - cat $(VPATH)/r$(progname).in > $@ diff --git a/Ports/ed/patches/fix-configure.patch b/Ports/ed/patches/fix-configure.patch deleted file mode 100644 index f3c556db15..0000000000 --- a/Ports/ed/patches/fix-configure.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- ed-1.18/configure.og 2022-03-31 22:58:11.000000000 +0200 -+++ ed-1.18/configure 2022-03-31 23:01:31.000000000 +0200 -@@ -21,10 +21,10 @@ - infodir='$(datarootdir)/info' - mandir='$(datarootdir)/man' - program_prefix= --CC=gcc --CPPFLAGS= --CFLAGS='-Wall -W -O2' --LDFLAGS= -+CC?=gcc -+CPPFLAGS?= -+CFLAGS?='-Wall -W -O2' -+LDFLAGS?= - - # checking whether we are using GNU C. - /bin/sh -c "${CC} --version" > /dev/null 2>&1 || { CC=cc ; CFLAGS=-O2 ; } diff --git a/Ports/ed/patches/fix-ed.patch b/Ports/ed/patches/fix-ed.patch deleted file mode 100644 index f19c5a2b2d..0000000000 --- a/Ports/ed/patches/fix-ed.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- ed-1.15/ed.h.orig Sat Feb 1 14:19:01 2020 -+++ ed-1.15/ed.h Sat Feb 1 14:19:17 2020 -@@ -18,8 +18,7 @@ - */ - - #ifndef __cplusplus --enum Bool { false = 0, true = 1 }; --typedef enum Bool bool; -+#include <stdbool.h> - #endif - - enum Pflags /* print suffixes */ diff --git a/Ports/ed/patches/fix-regex.patch b/Ports/ed/patches/fix-regex.patch deleted file mode 100644 index c88deaf90a..0000000000 --- a/Ports/ed/patches/fix-regex.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ed-1.15/regex.c.orig Sat Feb 1 14:17:22 2020 -+++ ed-1.15/regex.c Sat Feb 1 14:17:34 2020 -@@ -19,7 +19,7 @@ - - #include <stddef.h> - #include <errno.h> --#include <regex.h> -+#include <pcre2posix.h> - #include <stdio.h> - #include <stdlib.h> - #include <string.h> |