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.
This commit is contained in:
2026-08-04 23:30:09 +03:00
parent 68b3916eb1
commit a55e1d6bd9
4 changed files with 51 additions and 0 deletions
+1
View File
@@ -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
+46
View File
@@ -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; }
"""
+2
View File
@@ -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"
+2
View File
@@ -11,6 +11,8 @@ autotools_recursive_regenerate
[build]
dependencies = [
# XORG_MACROS_VERSION() in configure.ac -- autoreconf fails without it.
"util-macros",
"libxcb",
]
template = "custom"