diff options
Diffstat (limited to 'Ports/mandoc')
16 files changed, 274 insertions, 95 deletions
diff --git a/Ports/mandoc/patches/add-compat_glob.patch b/Ports/mandoc/patches/0001-Add-an-implementation-of-globs.patch index b9f5bb18cb..0a3d4ca0bb 100644 --- a/Ports/mandoc/patches/add-compat_glob.patch +++ b/Ports/mandoc/patches/0001-Add-an-implementation-of-globs.patch @@ -1,5 +1,18 @@ ---- mandoc-1.14.5/compat_glob.c.orig Sat Jan 25 20:23:13 2020 -+++ mandoc-1.14.5/compat_glob.c Sat Jan 25 20:22:56 2020 +From e922f5ca936776e9c4b7182c73008cf475f8a6ea Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 1/9] Add an implementation of globs + +--- + compat_glob.c | 1174 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 1174 insertions(+) + create mode 100644 compat_glob.c + +diff --git a/compat_glob.c b/compat_glob.c +new file mode 100644 +index 0000000..d155c84 +--- /dev/null ++++ b/compat_glob.c @@ -0,0 +1,1174 @@ +/* $NetBSD: glob.c,v 1.39 2019/05/29 01:21:33 christos Exp $ */ + @@ -1175,3 +1188,6 @@ + (void)printf("\n"); +} +#endif +-- +2.36.1 + diff --git a/Ports/mandoc/patches/add-glob.patch b/Ports/mandoc/patches/0002-Add-a-header-describing-the-glob-implementation.patch index d970049d80..b2b015a4e1 100644 --- a/Ports/mandoc/patches/add-glob.patch +++ b/Ports/mandoc/patches/0002-Add-a-header-describing-the-glob-implementation.patch @@ -1,5 +1,18 @@ ---- mandoc-1.14.5/glob.h.orig Sat Jan 25 20:20:24 2020 -+++ mandoc-1.14.5/glob.h Sat Jan 25 20:20:44 2020 +From 05cf3e8e7e355ec1ae1890cff0ed3a86d7bd5d57 Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 2/9] Add a header describing the glob implementation + +--- + glob.h | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 115 insertions(+) + create mode 100644 glob.h + +diff --git a/glob.h b/glob.h +new file mode 100644 +index 0000000..c304b69 +--- /dev/null ++++ b/glob.h @@ -0,0 +1,115 @@ +/* $NetBSD: glob.h,v 1.27 2019/05/29 01:21:33 christos Exp $ */ + @@ -116,3 +129,6 @@ +__END_DECLS + +#endif /* !_GLOB_H_ */ +-- +2.36.1 + diff --git a/Ports/mandoc/patches/fix-configure.patch b/Ports/mandoc/patches/0003-Make-configure-build-for-serenity.patch index 329aaf9ee8..30e93ebb3c 100644 --- a/Ports/mandoc/patches/fix-configure.patch +++ b/Ports/mandoc/patches/0003-Make-configure-build-for-serenity.patch @@ -1,6 +1,17 @@ ---- mandoc-1.14.5/configure.orig Sat Jan 25 20:56:19 2020 -+++ mandoc-1.14.5/configure Sat Jan 25 20:56:55 2020 -@@ -35,14 +35,13 @@ +From 75619e06ffe6d4e392bf61ea3cee05706fa6df9a Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 3/9] Make configure build for serenity + +--- + configure | 39 ++++++++++++--------------------------- + 1 file changed, 12 insertions(+), 27 deletions(-) + +diff --git a/configure b/configure +index 5507de7..16a074b 100755 +--- a/configure ++++ b/configure +@@ -35,14 +35,13 @@ echo "file config.log: writing..." SOURCEDIR=`dirname "$0"` @@ -20,7 +31,7 @@ LDADD= LDFLAGS= LD_NANOSLEEP= -@@ -62,17 +61,17 @@ +@@ -62,17 +61,17 @@ HAVE_ENDIAN= HAVE_ERR= HAVE_FTS= HAVE_FTS_COMPARE_CONST= @@ -42,7 +53,7 @@ HAVE_PROGNAME= HAVE_REALLOCARRAY= HAVE_RECALLOCARRAY= -@@ -84,7 +83,7 @@ +@@ -84,7 +83,7 @@ HAVE_STRCASESTR= HAVE_STRINGLIST= HAVE_STRLCAT= HAVE_STRLCPY= @@ -51,7 +62,7 @@ HAVE_STRPTIME= HAVE_STRSEP= HAVE_STRTONUM= -@@ -361,20 +360,6 @@ +@@ -361,20 +360,6 @@ else echo 1>&3 fi @@ -72,7 +83,7 @@ if [ ${BUILD_CATMAN} -gt 0 ]; then # --- recvmsg --- if [ -n "${LD_RECVMSG}" ]; then -@@ -420,7 +405,7 @@ +@@ -420,7 +405,7 @@ if [ "${HAVE_OHASH}" -eq 0 ]; then fi # --- LDADD --- @@ -81,7 +92,7 @@ echo "selected LDADD=\"${LDADD}\"" 1>&2 echo "selected LDADD=\"${LDADD}\"" 1>&3 echo 1>&3 -@@ -572,7 +557,7 @@ +@@ -572,7 +557,7 @@ exec > Makefile.local [ -z "${BIN_FROM_SBIN}" ] && BIN_FROM_SBIN="../bin" [ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include/mandoc" [ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib/mandoc" @@ -90,3 +101,6 @@ [ -z "${HTDOCDIR}" ] && HTDOCDIR="${WWWPREFIX}/htdocs" [ -z "${CGIBINDIR}" ] && CGIBINDIR="${WWWPREFIX}/cgi-bin" +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0004-Use-pcre2-for-regex.patch b/Ports/mandoc/patches/0004-Use-pcre2-for-regex.patch new file mode 100644 index 0000000000..9844c4a8da --- /dev/null +++ b/Ports/mandoc/patches/0004-Use-pcre2-for-regex.patch @@ -0,0 +1,25 @@ +From 173fe2329bb943dba5e0c85c16403e0a4ee61b2f Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 4/9] Use pcre2 for regex + +--- + dba_read.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dba_read.c b/dba_read.c +index e976057..6183dcb 100644 +--- a/dba_read.c ++++ b/dba_read.c +@@ -19,7 +19,7 @@ + * The interface is defined in "dba.h". + * This file is seperate from dba.c because this also uses "dbm.h". + */ +-#include <regex.h> ++#include <pcre2posix.h> + #include <stdint.h> + #include <stdlib.h> + #include <stdio.h> +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0005-Use-pcre2-for-regex.patch b/Ports/mandoc/patches/0005-Use-pcre2-for-regex.patch new file mode 100644 index 0000000000..c619d5a4d5 --- /dev/null +++ b/Ports/mandoc/patches/0005-Use-pcre2-for-regex.patch @@ -0,0 +1,25 @@ +From 7c8e432900e1aafc14d7012cb1456b55c5db860a Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 5/9] Use pcre2 for regex + +--- + dbm_map.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbm_map.c b/dbm_map.c +index 87c085d..d5c620e 100644 +--- a/dbm_map.c ++++ b/dbm_map.c +@@ -36,7 +36,7 @@ + #endif + #include <errno.h> + #include <fcntl.h> +-#include <regex.h> ++#include <pcre2posix.h> + #include <stdint.h> + #include <stdlib.h> + #include <string.h> +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0006-Use-pcre2-for-regex.patch b/Ports/mandoc/patches/0006-Use-pcre2-for-regex.patch new file mode 100644 index 0000000000..6bdb5774d0 --- /dev/null +++ b/Ports/mandoc/patches/0006-Use-pcre2-for-regex.patch @@ -0,0 +1,25 @@ +From e4b3fb04945980f8546c7437cb345fc0cb67f58d Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 6/9] Use pcre2 for regex + +--- + dbm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbm.c b/dbm.c +index f6b1259..3dc034a 100644 +--- a/dbm.c ++++ b/dbm.c +@@ -31,7 +31,7 @@ + #include <err.h> + #endif + #include <errno.h> +-#include <regex.h> ++#include <pcre2posix.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0007-Use-the-patched-in-version-of-glob.h.patch b/Ports/mandoc/patches/0007-Use-the-patched-in-version-of-glob.h.patch new file mode 100644 index 0000000000..a8a3c0e867 --- /dev/null +++ b/Ports/mandoc/patches/0007-Use-the-patched-in-version-of-glob.h.patch @@ -0,0 +1,33 @@ +From e100280860217da8822cb5568db71a8cb1456121 Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Thu, 23 Dec 2021 11:13:14 +0100 +Subject: [PATCH 7/9] Use the patched-in version of glob.h + +Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev> +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index b91c158..cb785cd 100644 +--- a/main.c ++++ b/main.c +@@ -30,7 +30,6 @@ + #endif + #include <errno.h> + #include <fcntl.h> +-#include <glob.h> + #if HAVE_SANDBOX_INIT + #include <sandbox.h> + #endif +@@ -54,6 +53,7 @@ + #include "main.h" + #include "manconf.h" + #include "mansearch.h" ++#include "glob.h" + + enum outmode { + OUTMODE_DEF = 0, +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0008-Build-the-patched-in-glob-implementation.patch b/Ports/mandoc/patches/0008-Build-the-patched-in-glob-implementation.patch new file mode 100644 index 0000000000..1db8e86a71 --- /dev/null +++ b/Ports/mandoc/patches/0008-Build-the-patched-in-glob-implementation.patch @@ -0,0 +1,32 @@ +From 517695e5b4412d2e1b1f95c0f3cd7c5202968efd Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 8/9] Build the patched-in glob implementation + +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index f4e2954..51a9816 100644 +--- a/Makefile ++++ b/Makefile +@@ -63,6 +63,7 @@ SRCS = arch.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ ++ compat_glob.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_ohash.c \ +@@ -251,6 +252,7 @@ COMPAT_OBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ ++ compat_glob.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_ohash.o \ +-- +2.36.1 + diff --git a/Ports/mandoc/patches/0009-Fix-mansearch.c.patch b/Ports/mandoc/patches/0009-Fix-mansearch.c.patch new file mode 100644 index 0000000000..d9c68d7a3f --- /dev/null +++ b/Ports/mandoc/patches/0009-Fix-mansearch.c.patch @@ -0,0 +1,28 @@ +From f71b62d6e3cc1d31ee46721dd7709f68aaa9b44a Mon Sep 17 00:00:00 2001 +From: Brian Callahan <bcallah@openbsd.org> +Date: Sat, 25 Jan 2020 21:20:39 -0500 +Subject: [PATCH 9/9] Fix mansearch.c + +--- + mansearch.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mansearch.c b/mansearch.c +index 0c457f9..b036f39 100644 +--- a/mansearch.c ++++ b/mansearch.c +@@ -26,9 +26,9 @@ + #endif + #include <errno.h> + #include <fcntl.h> +-#include <glob.h> ++#include "glob.h" + #include <limits.h> +-#include <regex.h> ++#include <pcre2posix.h> + #include <stdio.h> + #include <stdint.h> + #include <stddef.h> +-- +2.36.1 + diff --git a/Ports/mandoc/patches/ReadMe.md b/Ports/mandoc/patches/ReadMe.md new file mode 100644 index 0000000000..d2f9fb0410 --- /dev/null +++ b/Ports/mandoc/patches/ReadMe.md @@ -0,0 +1,48 @@ +# Patches for mandoc on SerenityOS + +## `0001-Add-an-implementation-of-globs.patch` + +Add an implementation of globs + + +## `0002-Add-a-header-describing-the-glob-implementation.patch` + +Add a header describing the glob implementation + + +## `0003-Make-configure-build-for-serenity.patch` + +Make configure build for serenity + + +## `0004-Use-pcre2-for-regex.patch` + +Use pcre2 for regex + + +## `0005-Use-pcre2-for-regex.patch` + +Use pcre2 for regex + + +## `0006-Use-pcre2-for-regex.patch` + +Use pcre2 for regex + + +## `0007-Use-the-patched-in-version-of-glob.h.patch` + +Use the patched-in version of glob.h + + + +## `0008-Build-the-patched-in-glob-implementation.patch` + +Build the patched-in glob implementation + + +## `0009-Fix-mansearch.c.patch` + +Fix mansearch.c + + diff --git a/Ports/mandoc/patches/fix-Makefile.patch b/Ports/mandoc/patches/fix-Makefile.patch deleted file mode 100644 index de8d5c82e0..0000000000 --- a/Ports/mandoc/patches/fix-Makefile.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- mandoc-1.14.5/Makefile.orig Sat Jan 25 20:14:41 2020 -+++ mandoc-1.14.5/Makefile Sat Jan 25 20:15:10 2020 -@@ -63,6 +63,7 @@ - compat_fts.c \ - compat_getline.c \ - compat_getsubopt.c \ -+ compat_glob.c \ - compat_isblank.c \ - compat_mkdtemp.c \ - compat_ohash.c \ -@@ -251,6 +252,7 @@ - compat_fts.o \ - compat_getline.o \ - compat_getsubopt.o \ -+ compat_glob.o \ - compat_isblank.o \ - compat_mkdtemp.o \ - compat_ohash.o \ diff --git a/Ports/mandoc/patches/fix-dba-read.patch b/Ports/mandoc/patches/fix-dba-read.patch deleted file mode 100644 index fa28b28546..0000000000 --- a/Ports/mandoc/patches/fix-dba-read.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mandoc-1.14.5/dba_read.c.orig Sat Jan 25 20:11:14 2020 -+++ mandoc-1.14.5/dba_read.c Sat Jan 25 20:11:22 2020 -@@ -19,7 +19,7 @@ - * The interface is defined in "dba.h". - * This file is seperate from dba.c because this also uses "dbm.h". - */ --#include <regex.h> -+#include <pcre2posix.h> - #include <stdint.h> - #include <stdlib.h> - #include <stdio.h> diff --git a/Ports/mandoc/patches/fix-dbm-map.patch b/Ports/mandoc/patches/fix-dbm-map.patch deleted file mode 100644 index 612fc8b581..0000000000 --- a/Ports/mandoc/patches/fix-dbm-map.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mandoc-1.14.5/dbm_map.c.orig Sat Jan 25 20:09:42 2020 -+++ mandoc-1.14.5/dbm_map.c Sat Jan 25 20:09:49 2020 -@@ -36,7 +36,7 @@ - #endif - #include <errno.h> - #include <fcntl.h> --#include <regex.h> -+#include <pcre2posix.h> - #include <stdint.h> - #include <stdlib.h> - #include <string.h> diff --git a/Ports/mandoc/patches/fix-dbm.patch b/Ports/mandoc/patches/fix-dbm.patch deleted file mode 100644 index 7bfe662767..0000000000 --- a/Ports/mandoc/patches/fix-dbm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mandoc-1.14.5/dbm.c.orig Sat Jan 25 20:09:04 2020 -+++ mandoc-1.14.5/dbm.c Sat Jan 25 20:09:16 2020 -@@ -31,7 +31,7 @@ - #include <err.h> - #endif - #include <errno.h> --#include <regex.h> -+#include <pcre2posix.h> - #include <stdint.h> - #include <stdio.h> - #include <stdlib.h> diff --git a/Ports/mandoc/patches/fix-main.patch b/Ports/mandoc/patches/fix-main.patch deleted file mode 100644 index 2f1d11dfca..0000000000 --- a/Ports/mandoc/patches/fix-main.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- mandoc-1.14.5/main.c.orig Sat Jan 25 20:29:18 2020 -+++ mandoc-1.14.5/main.c Sat Jan 25 20:30:06 2020 -@@ -30,7 +30,6 @@ - #endif - #include <errno.h> - #include <fcntl.h> --#include <glob.h> - #if HAVE_SANDBOX_INIT - #include <sandbox.h> - #endif -@@ -54,6 +54,7 @@ - #include "main.h" - #include "manconf.h" - #include "mansearch.h" -+#include "glob.h" - - enum outmode { - OUTMODE_DEF = 0, diff --git a/Ports/mandoc/patches/fix-mansearch.patch b/Ports/mandoc/patches/fix-mansearch.patch deleted file mode 100644 index 8798178978..0000000000 --- a/Ports/mandoc/patches/fix-mansearch.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- mandoc-1.14.5/mansearch.c.orig Sat Jan 25 20:17:03 2020 -+++ mandoc-1.14.5/mansearch.c Sat Jan 25 20:17:11 2020 -@@ -26,9 +26,9 @@ - #endif - #include <errno.h> - #include <fcntl.h> --#include <glob.h> -+#include "glob.h" - #include <limits.h> --#include <regex.h> -+#include <pcre2posix.h> - #include <stdio.h> - #include <stdint.h> - #include <stddef.h> |