Merge branch 'm4' into 'master'

Add uutils-procps to CI and fix m4 and groff compilation

See merge request redox-os/redox!2156
This commit is contained in:
Jeremy Soller 2026-05-20 06:29:54 -06:00
commit 2d0447671b
8 changed files with 91 additions and 6 deletions

View File

@ -102,6 +102,7 @@ smith = {}
terminfo = {}
userutils = {}
uutils = {}
uutils-procps = {}
vim = {}
xz = {}
zlib = {}

View File

@ -95,6 +95,7 @@ smith = {}
terminfo = {}
userutils = {}
uutils = {}
uutils-procps = {}
xz = {}
#vim = {} # conflicting types
zlib = {}

View File

@ -95,6 +95,7 @@ smith = {}
terminfo = {}
userutils = {}
uutils = {}
uutils-procps = {}
xz = {}
#vim = {} # error compiling ncurses
zlib = {}

View File

@ -7,14 +7,14 @@ dependencies = [
"gcc13",
"gcc13.cxx",
"gnu-grep",
# "groff", #TODO: fix compilation error
"groff",
"gawk",
"file",
"perl5",
"python312",
"ripgrep",
"lua54",
# "m4", #TODO: fix compilation error
"m4",
"nasm",
"patch",
"pkg-config",

View File

@ -1,5 +1,7 @@
#TODO compiler error: port freadahead?
#TODO compiled but not tested
[source]
tar = "https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz"
blake3 = "22f5754f80b347b525eb1ad89e8ef84312ec80432b79110c7f0161e2185bdc06"
patches = [ "redox.patch" ]
[build]
template = "configure"

View File

@ -0,0 +1,12 @@
diff --color -ruwN source/lib/freadahead.c source-new/lib/freadahead.c
--- source/lib/freadahead.c 2021-04-23 03:28:47.000000000 +0700
+++ source-new/lib/freadahead.c 2026-05-20 10:32:33.459143178 +0700
@@ -94,6 +94,8 @@
if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
return 0;
return fp->wp - fp->rp;
+#elif defined __redox__ /* Redox */
+ return 0;
#elif defined SLOW_BUT_NO_HACKS /* users can define this */
abort ();
return 0;

View File

@ -1,5 +1,24 @@
#TODO compilation error - port fseterr.c
[source]
tar = "https://ftp.gnu.org/gnu/groff/groff-1.23.0.tar.gz"
tar = "https://ftp.gnu.org/gnu/groff/groff-1.24.1.tar.gz"
blake3 = "dc2d3e0a91807ebb3a723d9ee01a45b1b40da10abff7127651861f54a0978466"
patches = [ "redox.patch" ]
script = """
autotools_recursive_regenerate
"""
[build]
template = "configure"
template = "custom"
dev-dependencies = [
"host:groff"
]
script = """
DYNAMIC_INIT
COOKBOOK_MAKE_FLAGS=()
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
# todo
COOKBOOK_MAKE_FLAGS+=( GROFFBIN="$COOKBOOK_TOOLCHAIN/bin/groff" GROFF_BIN_PATH="$COOKBOOK_TOOLCHAIN/bin" V=1 )
fi
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" all "${COOKBOOK_MAKE_FLAGS[@]}"
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
"""

View File

@ -0,0 +1,49 @@
diff -ruwN source/lib/fseterr.c source-new/lib/fseterr.c
--- source/lib/fseterr.c 2026-03-08 20:32:36.000000000 +0700
+++ source-new/lib/fseterr.c 2026-05-20 10:00:55.592770876 +0700
@@ -53,7 +53,7 @@
#elif defined EPLAN9 /* Plan9 */
if (fp->state != 0 /* CLOSED */)
fp->state = 5 /* ERR */;
-#elif 0 /* unknown */
+#elif defined __redox__ /* unknown */
/* Portable fallback, based on an idea by Rich Felker.
Wow! 6 system calls for something that is just a bit operation!
Not activated on any system, because there is no way to repair FP when
diff -ruwN source/Makefile.in source-new/Makefile.in
--- source/Makefile.in 2026-05-20 10:25:52.529450320 +0700
+++ source-new/Makefile.in 2026-05-20 10:23:19.309839883 +0700
@@ -5875,7 +5875,6 @@
#
# Use '-K utf8', not '-k', in case 'configure' didn't find uchardet.
MOMPDFMOM = \
- GROFF_COMMAND=test-groff \
GROFF_COMMAND_PREFIX= \
GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
$(PDFMOMBIN) $(FFLAG) $(MFLAG) -M$(mom_srcdir) -K utf8 -p -e -t \
@@ -6018,7 +6017,6 @@
@HAVE_URW_FONTS_TRUE@pdfmomoption = -P-W
@HAVE_URW_FONTS_TRUE@groffmanpagesoption = -P-e
DOC_PDFMOM = \
- GROFF_COMMAND=test-groff \
GROFF_COMMAND_PREFIX= \
GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
$(PDFMOMBIN) $(MFLAG) $(FFLAG) -ww -b $(pdfmomoption) --roff
@@ -6086,7 +6084,7 @@
PROCESSEDFILES_DEPS_PS = groff troff grops tmac/ps.tmac \
font/devps/stamp
-PROCESSEDFILES_DEPS_PDF = test-groff groff troff gropdf tmac/pdf.tmac \
+PROCESSEDFILES_DEPS_PDF = groff troff gropdf tmac/pdf.tmac \
font/devpdf/stamp
PROCESSEDFILES_DEPS_TXT = groff troff grotty tmac/tty.tmac \
@@ -19226,7 +19224,7 @@
&& LC_ALL=C $(MOMPDFMOM) $< >$@
$(MOMPROCESSEDEXAMPLEFILES): $(MOMNORMALFILES) \
- test-groff groff troff gropdf pdfmom penguin.ps penguin.pdf \
+ groff troff gropdf pdfmom penguin.ps penguin.pdf \
font/devpdf/stamp tmac/pdf.tmac
penguin.ps: