summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ports/flex/patches/0001-Fix-config.h.in.patch33
-rw-r--r--Ports/flex/patches/0002-Don-t-use-libc-s-regex.patch (renamed from Ports/flex/patches/fix-configure.patch)22
-rw-r--r--Ports/flex/patches/0003-Replace-libc-s-regex-includes-with-pcre2.patch25
-rw-r--r--Ports/flex/patches/0004-Link-with-pcre2.patch25
-rw-r--r--Ports/flex/patches/0005-Hardcode-the-m4-include-path.patch34
-rw-r--r--Ports/flex/patches/0006-Include-arpa-inet.h.patch26
-rw-r--r--Ports/flex/patches/ReadMe.md34
-rw-r--r--Ports/flex/patches/fix-Makefile-in.patch11
-rw-r--r--Ports/flex/patches/fix-config-h-in.patch17
-rw-r--r--Ports/flex/patches/fix-flexdef.patch11
-rw-r--r--Ports/flex/patches/fix-src-Makefile-in.patch20
-rw-r--r--Ports/flex/patches/fix-tables.patch11
12 files changed, 195 insertions, 74 deletions
diff --git a/Ports/flex/patches/0001-Fix-config.h.in.patch b/Ports/flex/patches/0001-Fix-config.h.in.patch
new file mode 100644
index 0000000000..fe69d2754f
--- /dev/null
+++ b/Ports/flex/patches/0001-Fix-config.h.in.patch
@@ -0,0 +1,33 @@
+From 622a451c631ed96575c78f68b9df830fe6beedac Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 1/6] Fix config.h.in
+
+FIXME: This patch does not have any accompanying information.
+---
+ src/config.h.in | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/config.h.in b/src/config.h.in
+index 4756505..96fba7b 100644
+--- a/src/config.h.in
++++ b/src/config.h.in
+@@ -249,15 +249,9 @@
+ /* Define to empty if `const' does not conform to ANSI C. */
+ #undef const
+
+-/* Define to rpl_malloc if the replacement function should be used. */
+-#undef malloc
+-
+ /* Define to `int' if <sys/types.h> does not define. */
+ #undef pid_t
+
+-/* Define to rpl_realloc if the replacement function should be used. */
+-#undef realloc
+-
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
+ #undef size_t
+
+--
+2.36.1
+
diff --git a/Ports/flex/patches/fix-configure.patch b/Ports/flex/patches/0002-Don-t-use-libc-s-regex.patch
index fd595c3629..d25b746cd5 100644
--- a/Ports/flex/patches/fix-configure.patch
+++ b/Ports/flex/patches/0002-Don-t-use-libc-s-regex.patch
@@ -1,6 +1,17 @@
---- flex-2.6.4/configure.orig Thu Jan 23 22:41:22 2020
-+++ flex-2.6.4/configure Thu Jan 23 22:44:41 2020
-@@ -19854,7 +19854,7 @@
+From 1e80ecd820c3a16ffeb99ac0587d996b13784062 Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 2/6] Don't use libc's regex
+
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index d88c47c..90e013f 100755
+--- a/configure
++++ b/configure
+@@ -19854,7 +19854,7 @@ fi
# checks for headers
@@ -9,7 +20,7 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -20739,7 +20739,7 @@
+@@ -20739,7 +20739,7 @@ if test "$cross_compiling" = yes; then :
$as_echo "$as_me: WARNING: result $ac_cv_func_realloc_0_nonnull guessed because of cross compilation" >&2;}
fi
@@ -18,3 +29,6 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+--
+2.36.1
+
diff --git a/Ports/flex/patches/0003-Replace-libc-s-regex-includes-with-pcre2.patch b/Ports/flex/patches/0003-Replace-libc-s-regex-includes-with-pcre2.patch
new file mode 100644
index 0000000000..61d544dbb1
--- /dev/null
+++ b/Ports/flex/patches/0003-Replace-libc-s-regex-includes-with-pcre2.patch
@@ -0,0 +1,25 @@
+From 2aecd57dbc3eb793db2996807f4c17e0c5880d75 Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 3/6] Replace libc's regex includes with pcre2
+
+---
+ src/flexdef.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/flexdef.h b/src/flexdef.h
+index 9dac654..2bdf9fb 100644
+--- a/src/flexdef.h
++++ b/src/flexdef.h
+@@ -72,7 +72,7 @@
+ #include <stdbool.h>
+ #include <stdarg.h>
+ /* Required: regcomp(), regexec() and regerror() in <regex.h> */
+-#include <regex.h>
++#include <pcre2posix.h>
+ /* Required: strcasecmp() in <strings.h> */
+ #include <strings.h>
+ #include "flexint.h"
+--
+2.36.1
+
diff --git a/Ports/flex/patches/0004-Link-with-pcre2.patch b/Ports/flex/patches/0004-Link-with-pcre2.patch
new file mode 100644
index 0000000000..e907a19e47
--- /dev/null
+++ b/Ports/flex/patches/0004-Link-with-pcre2.patch
@@ -0,0 +1,25 @@
+From 0e26bc451d724c5666155c9b04f4a010475e66ac Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 4/6] Link with pcre2
+
+---
+ src/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index e570b87..1f8a305 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -342,7 +342,7 @@ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+ LIBOBJS = @LIBOBJS@
+ LIBPTHREAD = @LIBPTHREAD@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lpcre2-posix -lpcre2-8
+ LIBTOOL = @LIBTOOL@
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+--
+2.36.1
+
diff --git a/Ports/flex/patches/0005-Hardcode-the-m4-include-path.patch b/Ports/flex/patches/0005-Hardcode-the-m4-include-path.patch
new file mode 100644
index 0000000000..10c0e81c73
--- /dev/null
+++ b/Ports/flex/patches/0005-Hardcode-the-m4-include-path.patch
@@ -0,0 +1,34 @@
+From 07a476646c5585444df983b14bd3041d1dae61f1 Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 5/6] Hardcode the m4 include path
+
+---
+ src/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 1f8a305..a5dd2e2 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -350,7 +350,7 @@ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
+ LTLIBOBJS = @LTLIBOBJS@
+ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+-M4 = @M4@
++M4 = /usr/local/bin/m4
+ MAKEINFO = @MAKEINFO@
+ MANIFEST_TOOL = @MANIFEST_TOOL@
+ MKDIR_P = @MKDIR_P@
+@@ -444,7 +444,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AM_YFLAGS = -d
+ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
+-m4 = @M4@
++m4 = /usr/local/bin/m4
+ @ENABLE_LIBFL_TRUE@lib_LTLIBRARIES = libfl.la
+ libfl_la_SOURCES = \
+ libmain.c \
+--
+2.36.1
+
diff --git a/Ports/flex/patches/0006-Include-arpa-inet.h.patch b/Ports/flex/patches/0006-Include-arpa-inet.h.patch
new file mode 100644
index 0000000000..f684ba10ab
--- /dev/null
+++ b/Ports/flex/patches/0006-Include-arpa-inet.h.patch
@@ -0,0 +1,26 @@
+From f6d725687a0de5f489b37bf6607795e35be0fd65 Mon Sep 17 00:00:00 2001
+From: Brian Callahan <bcallah@openbsd.org>
+Date: Thu, 23 Jan 2020 23:43:31 -0500
+Subject: [PATCH 6/6] Include <arpa/inet.h>
+
+FIXME: This patch does not have any accompanying information.
+---
+ src/tables.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/tables.c b/src/tables.c
+index 980d2e9..0824a7f 100644
+--- a/src/tables.c
++++ b/src/tables.c
+@@ -33,6 +33,8 @@
+ */
+
+
++#include <arpa/inet.h>
++
+ #include "flexdef.h"
+ #include "tables.h"
+
+--
+2.36.1
+
diff --git a/Ports/flex/patches/ReadMe.md b/Ports/flex/patches/ReadMe.md
new file mode 100644
index 0000000000..1f7771164d
--- /dev/null
+++ b/Ports/flex/patches/ReadMe.md
@@ -0,0 +1,34 @@
+# Patches for flex on SerenityOS
+
+## `0001-Fix-config.h.in.patch`
+
+Fix config.h.in
+
+FIXME: This patch does not have any accompanying information.
+
+## `0002-Don-t-use-libc-s-regex.patch`
+
+Don't use libc's regex
+
+
+## `0003-Replace-libc-s-regex-includes-with-pcre2.patch`
+
+Replace libc's regex includes with pcre2
+
+
+## `0004-Link-with-pcre2.patch`
+
+Link with pcre2
+
+
+## `0005-Hardcode-the-m4-include-path.patch`
+
+Hardcode the m4 include path
+
+
+## `0006-Include-arpa-inet.h.patch`
+
+Include <arpa/inet.h>
+
+FIXME: This patch does not have any accompanying information.
+
diff --git a/Ports/flex/patches/fix-Makefile-in.patch b/Ports/flex/patches/fix-Makefile-in.patch
deleted file mode 100644
index 471075ebf1..0000000000
--- a/Ports/flex/patches/fix-Makefile-in.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- flex-2.6.4/src/Makefile.in.orig Thu Jan 23 22:45:32 2020
-+++ flex-2.6.4/src/Makefile.in Thu Jan 23 22:46:15 2020
-@@ -342,7 +342,7 @@
- LIBINTL = @LIBINTL@
- LIBOBJS = @LIBOBJS@
- LIBPTHREAD = @LIBPTHREAD@
--LIBS = @LIBS@
-+LIBS = @LIBS@ -lpcre2-posix -lpcre2-8
- LIBTOOL = @LIBTOOL@
- LIPO = @LIPO@
- LN_S = @LN_S@
diff --git a/Ports/flex/patches/fix-config-h-in.patch b/Ports/flex/patches/fix-config-h-in.patch
deleted file mode 100644
index c86c8ba4d3..0000000000
--- a/Ports/flex/patches/fix-config-h-in.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- flex-2.6.4/src/config.h.in.orig Thu Jan 23 22:25:56 2020
-+++ flex-2.6.4/src/config.h.in Thu Jan 23 22:26:30 2020
-@@ -249,14 +249,8 @@
- /* Define to empty if `const' does not conform to ANSI C. */
- #undef const
-
--/* Define to rpl_malloc if the replacement function should be used. */
--#undef malloc
--
- /* Define to `int' if <sys/types.h> does not define. */
- #undef pid_t
--
--/* Define to rpl_realloc if the replacement function should be used. */
--#undef realloc
-
- /* Define to `unsigned int' if <sys/types.h> does not define. */
- #undef size_t
diff --git a/Ports/flex/patches/fix-flexdef.patch b/Ports/flex/patches/fix-flexdef.patch
deleted file mode 100644
index 0296c91ba9..0000000000
--- a/Ports/flex/patches/fix-flexdef.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- flex-2.6.4/src/flexdef.h.orig Thu Jan 23 22:38:30 2020
-+++ flex-2.6.4/src/flexdef.h Thu Jan 23 22:38:45 2020
-@@ -72,7 +72,7 @@
- #include <stdbool.h>
- #include <stdarg.h>
- /* Required: regcomp(), regexec() and regerror() in <regex.h> */
--#include <regex.h>
-+#include <pcre2posix.h>
- /* Required: strcasecmp() in <strings.h> */
- #include <strings.h>
- #include "flexint.h"
diff --git a/Ports/flex/patches/fix-src-Makefile-in.patch b/Ports/flex/patches/fix-src-Makefile-in.patch
deleted file mode 100644
index e513ca7c27..0000000000
--- a/Ports/flex/patches/fix-src-Makefile-in.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- flex-2.6.4/src/Makefile.in.orig Thu Jan 23 23:27:22 2020
-+++ flex-2.6.4/src/Makefile.in Thu Jan 23 23:27:51 2020
-@@ -350,7 +350,7 @@
- LTLIBINTL = @LTLIBINTL@
- LTLIBOBJS = @LTLIBOBJS@
- LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
--M4 = @M4@
-+M4 = /usr/local/bin/m4
- MAKEINFO = @MAKEINFO@
- MANIFEST_TOOL = @MANIFEST_TOOL@
- MKDIR_P = @MKDIR_P@
-@@ -444,7 +444,7 @@
- top_srcdir = @top_srcdir@
- AM_YFLAGS = -d
- AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
--m4 = @M4@
-+m4 = /usr/local/bin/m4
- @ENABLE_LIBFL_TRUE@lib_LTLIBRARIES = libfl.la
- libfl_la_SOURCES = \
- libmain.c \
diff --git a/Ports/flex/patches/fix-tables.patch b/Ports/flex/patches/fix-tables.patch
deleted file mode 100644
index 63c243893b..0000000000
--- a/Ports/flex/patches/fix-tables.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- flex-2.6.4/src/tables.c.orig Thu Jan 23 22:22:14 2020
-+++ flex-2.6.4/src/tables.c Thu Jan 23 22:22:27 2020
-@@ -33,6 +33,8 @@
- */
-
-
-+#include <arpa/inet.h>
-+
- #include "flexdef.h"
- #include "tables.h"
-