From a55e1d6bd905c5b9c9e8ed322dc44ced58e4c8f9 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 4 Aug 2026 23:30:09 +0300 Subject: [PATCH] x11: add util-macros; xcb-util needs it to autoreconf xcb-util and xcb-util-image start configure.ac with XORG_MACROS_VERSION(), so autoreconf dies before configure runs: configure.ac:10: error: must install xorg-macros 1.16.0 or later before running autoconf/autogen libice failed identically earlier -- it was dropped as unnecessary, but xcb-util-image is genuinely required (plasma-desktop needs the XCB IMAGE component), so the macros had to be ported rather than routed around. util-macros ships only autoconf m4 text and a pkg-config file -- no compiled code, so no cross-compilation concern. Installed into the sysroot's share/aclocal, which is already the directory the cookbook passes to autoreconf (-I .../sysroot//share/aclocal), so consumers need no other change. Verified by cooking it standalone before wiring it in: builds successfully and stages usr/share/aclocal/xorg-macros.m4. The recipe asserts that file exists, since a silent no-op would resurface as the same "must install xorg-macros" error in a consumer, far from the cause. --- config/redbear-full.toml | 1 + recipes/x11/util-macros/recipe.toml | 46 ++++++++++++++++++++++++++ recipes/x11/xcb-util-image/recipe.toml | 2 ++ recipes/x11/xcb-util/recipe.toml | 2 ++ 4 files changed, 51 insertions(+) create mode 100644 recipes/x11/util-macros/recipe.toml diff --git a/config/redbear-full.toml b/config/redbear-full.toml index c61ea24058..127f773d7a 100644 --- a/config/redbear-full.toml +++ b/config/redbear-full.toml @@ -290,6 +290,7 @@ libxfixes = {} libxi = {} libxrender = {} libxft = {} +util-macros = {} xcb-util = {} xcb-util-image = {} # libice/libsm deliberately NOT included: they are X11 session-management diff --git a/recipes/x11/util-macros/recipe.toml b/recipes/x11/util-macros/recipe.toml new file mode 100644 index 0000000000..a5b576fdbf --- /dev/null +++ b/recipes/x11/util-macros/recipe.toml @@ -0,0 +1,46 @@ +[package] +name = "util-macros" +version = "1.20.2" +description = "X.Org autoconf macros (xorg-macros.m4)" + +# util-macros ships ONLY autoconf m4 macros -- no compiled code, no target +# libraries. It is a BUILD-TIME dependency of most X.Org autotools packages, +# whose configure.ac starts with XORG_MACROS_VERSION(...). Without it autoreconf +# fails before configure even runs: +# configure.ac:10: error: must install xorg-macros 1.16.0 or later before +# running autoconf/autogen +# (first hit: xcb-util, which plasma-desktop needs for the XCB IMAGE component; +# libice fails the same way.) +# +# The macros are installed into the SYSROOT's share/aclocal because that is the +# directory the cookbook already passes to autoreconf: +# autoreconf -fvi -I .../sysroot//share/aclocal +# so nothing else has to change for consumers to find them. +# +# Architecture-independent by construction: the tarball contains .m4 text and a +# pkg-config file, so there is no cross-compilation concern. + +[source] +tar = "https://www.x.org/releases/individual/util/util-macros-1.20.2.tar.xz" +blake3 = "ad272a006b269e3925bc700dd1e51c1b8d8fa3a825dfc0aecfeeef3db38a94f0" + +[build] +template = "custom" +dependencies = [] +script = """ +DYNAMIC_INIT + +# No compilation: configure + install just copies xorg-macros.m4 and the +# xorg-macros.pc describing it. --prefix=/usr with DESTDIR so the absolute +# datadir lands inside the stage rather than on the build host. +"${COOKBOOK_SOURCE}/configure" --prefix=/usr +make install DESTDIR="${COOKBOOK_STAGE}" + +# Assert the macro file actually landed. A silent no-op here would resurface as +# the same "must install xorg-macros" failure in a consumer, far from this +# recipe -- exactly the far-from-the-cause pattern the empty-package gate exists +# to catch. +test -f "${COOKBOOK_STAGE}/usr/share/aclocal/xorg-macros.m4" \ + || { echo "ERROR: xorg-macros.m4 not staged" >&2; \ + find "${COOKBOOK_STAGE}" -name '*.m4' >&2; exit 1; } +""" diff --git a/recipes/x11/xcb-util-image/recipe.toml b/recipes/x11/xcb-util-image/recipe.toml index 49ba89f757..93ce6b43ea 100644 --- a/recipes/x11/xcb-util-image/recipe.toml +++ b/recipes/x11/xcb-util-image/recipe.toml @@ -11,6 +11,8 @@ autotools_recursive_regenerate [build] dependencies = [ + # XORG_MACROS_VERSION() in configure.ac -- autoreconf fails without it. + "util-macros", "xcb-util", ] template = "custom" diff --git a/recipes/x11/xcb-util/recipe.toml b/recipes/x11/xcb-util/recipe.toml index d002d6a5e4..b8dd02a54f 100644 --- a/recipes/x11/xcb-util/recipe.toml +++ b/recipes/x11/xcb-util/recipe.toml @@ -11,6 +11,8 @@ autotools_recursive_regenerate [build] dependencies = [ + # XORG_MACROS_VERSION() in configure.ac -- autoreconf fails without it. + "util-macros", "libxcb", ] template = "custom"