]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
groff: build less in groff-native
authorRoss Burton <ross.burton@arm.com>
Tue, 19 May 2026 14:15:07 +0000 (15:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 May 2026 10:18:21 +0000 (11:18 +0100)
When building groff-native we only really need enough of groff to build
manpages, and don't need documentation or extra tools.

Patch the Makefile to stop building the doc and contrib directories,
which both take time and have incomplete build dependencies that cause
intermittent failures[1][2].

This makes groff-native faster to build:

  groff-native    do_compile   -30.6s   -33.7%     90.9s -> 60.3s

And some tools are removed, which I don't believe are needed by anything
we build:

  /usr/bin/chem was removed
  /usr/bin/eqn2graph was removed
  /usr/bin/gdiffmk was removed
  /usr/bin/gperl was removed
  /usr/bin/gpinyin was removed
  /usr/bin/mmroff was removed
  /usr/bin/pic2graph was removed
  /usr/share/groff/1.24.1/tmac/chem.pic was removed
  /usr/share/groff/1.24.1/tmac/hdmisc.tmac was removed
  /usr/share/groff/1.24.1/tmac/hdtbl.tmac was removed
  /usr/share/groff/1.24.1/tmac/mm was removed
  /usr/share/groff/1.24.1/tmac/mm/0.MT was removed
  /usr/share/groff/1.24.1/tmac/mm/4.MT was removed
  /usr/share/groff/1.24.1/tmac/mm/5.MT was removed
  /usr/share/groff/1.24.1/tmac/mm/ms.cov was removed
  /usr/share/groff/1.24.1/tmac/mm/se_ms.cov was removed
  /usr/share/groff/1.24.1/tmac/mmse.tmac was removed
  /usr/share/groff/1.24.1/tmac/mm.tmac was removed
  /usr/share/groff/1.24.1/tmac/mom.tmac was removed
  /usr/share/groff/1.24.1/tmac/mse.tmac was removed
  /usr/share/groff/1.24.1/tmac/m.tmac was removed
  /usr/share/groff/1.24.1/tmac/om.tmac was removed
  /usr/share/groff/1.24.1/tmac/refer-mm.tmac was removed
  /usr/share/groff/1.24.1/tmac/rfc1345.tmac was removed
  /usr/share/groff/1.24.1/tmac/sboxes.tmac was removed

[1] oe-core d1a02bdd242 ("groff: Fix occasional build race failure")
[2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=16279

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/groff/files/build-less.patch [new file with mode: 0644]
meta/recipes-extended/groff/groff_1.24.1.bb

diff --git a/meta/recipes-extended/groff/files/build-less.patch b/meta/recipes-extended/groff/files/build-less.patch
new file mode 100644 (file)
index 0000000..dc560fb
--- /dev/null
@@ -0,0 +1,24 @@
+Build less bits of groff to save time and reduce random build
+failures from missing dependencies in this logic.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+--- a/Makefile.am~     2026-05-15 13:23:08.000000000 +0100
++++ b/Makefile.am      2026-05-15 13:29:17.053867035 +0100
+@@ -556,15 +556,0 @@
+-include $(top_srcdir)/contrib/chem/chem.am
+-include $(top_srcdir)/contrib/eqn2graph/eqn2graph.am
+-include $(top_srcdir)/contrib/gdiffmk/gdiffmk.am
+-include $(top_srcdir)/contrib/glilypond/glilypond.am
+-include $(top_srcdir)/contrib/gperl/gperl.am
+-include $(top_srcdir)/contrib/gpinyin/gpinyin.am
+-include $(top_srcdir)/contrib/grap2graph/grap2graph.am
+-include $(top_srcdir)/contrib/hdtbl/hdtbl.am
+-include $(top_srcdir)/contrib/install-font/install-font.am
+-include $(top_srcdir)/contrib/mm/mm.am
+-include $(top_srcdir)/contrib/mom/mom.am
+-include $(top_srcdir)/contrib/pic2graph/pic2graph.am
+-include $(top_srcdir)/contrib/rfc1345/rfc1345.am
+-include $(top_srcdir)/contrib/sboxes/sboxes.am
+-include $(top_srcdir)/doc/doc.am
index 24b8146a7273aaa0e0e14a863f37341623dc2280..dd5ebee3df2665a860be9049c04360502200a0df 100644 (file)
@@ -15,6 +15,8 @@ SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
            file://builddep.patch \
            "
 
+SRC_URI:append:class-native = "file://build-less.patch"
+
 SRC_URI[sha256sum] = "74e2819795b6aff431aeac983d63a9c8968eeaba2a2eba7df8ba4c7b41e7cfd8"
 
 DEPENDS = "bison-native groff-native"
@@ -65,8 +67,10 @@ do_install:append() {
        rm -rf ${D}${bindir}/grap2graph
        rm -rf ${D}${mandir}/man1/grap2graph*
 
-        # strip hosttool path out of generated files
-        sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${docdir}/${BP}/examples/hdtbl/*.roff
+       # strip hosttool path out of generated files
+       if [ -d ${D}${docdir}/${BP}/examples/hdtbl/ ]; then
+               sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${docdir}/${BP}/examples/hdtbl/*.roff
+       fi
 }
 
 do_install:append:class-native() {