From dd4f317a58e2630e2f18363c2b598706293748d2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 11:55:02 +0200 Subject: [PATCH 1/2] new(x.org/font-util): X.Org font-util (autotools, prereq for xserver) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides the `fontutil.pc` pkg-config + `fontutil.m4` autotools macros + bdftruncate/ucs2any BDF-conversion scripts. Tiny upstream (autotools, ~200 lines). Same role as arch's `xorg-font-util`, debian's `xfonts-utils`, nixpkgs' `xorg.fontutil`. Extracted from #13103 (x.org/xserver) — xserver's meson.build requires `dependency('fontutil')` for FontPath computation. Both recipes were originally in one PR but pantry's CI resolver can't satisfy a same-PR sibling dep (404 on dist.pkgx.dev/x.org/font-util/), so font-util needs to merge + bottle first. CI on the combined PR has already confirmed this recipe builds green on both linux/x86-64 and linux/aarch64. Co-Authored-By: Claude Opus 4.7 --- projects/x.org/font-util/package.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 projects/x.org/font-util/package.yml diff --git a/projects/x.org/font-util/package.yml b/projects/x.org/font-util/package.yml new file mode 100644 index 0000000000..fc3e3f878f --- /dev/null +++ b/projects/x.org/font-util/package.yml @@ -0,0 +1,51 @@ +# X.Org font-util — small helper for X11 font packages. +# +# Provides: +# - bdftruncate, ucs2any (BDF font format converter shell scripts) +# - fontutil.pc (pkg-config exporting `fontrootdir` etc., consumed +# by `xserver`'s meson.build to compute the default FontPath) +# - util/fontutil.m4 (autotools macros used by sibling x.org/font-* +# packages — none in pantry yet, but expected) +# +# NOT the source of `mkfontscale`/`mkfontdir` — those live in the +# separate upstream `mkfontscale` package (not yet in pantry). +# +# Same role as arch's `xorg-font-util`, debian's `xfonts-utils`, +# nixpkgs `xorg.fontutil`. Tiny — autotools-based, two shell scripts +# + pkgconfig + m4 macros. + +distributable: + url: https://www.x.org/releases/individual/font/font-util-{{version}}.tar.xz + strip-components: 1 + +versions: + url: https://www.x.org/releases/individual/font/ + match: /font-util-\d+\.\d+\.\d+\.tar\.xz/ + strip: + - /^font-util-/ + - /\.tar\.xz$/ + +display-name: X.Org font-util + +build: + dependencies: + gnu.org/make: '*' + freedesktop.org/pkg-config: '*' + x.org/util-macros: '*' + script: + - ./configure --prefix={{prefix}} + - make --jobs {{ hw.concurrency }} + - make install + +provides: + - bin/bdftruncate + - bin/ucs2any + +test: + # Accept either $libdir/pkgconfig (autotools default) or + # $datarootdir/pkgconfig (some distros relocate); font-util's own + # `make install` writes to lib/pkgconfig on most builds. + - test -f "{{prefix}}/lib/pkgconfig/fontutil.pc" -o -f "{{prefix}}/share/pkgconfig/fontutil.pc" + - test -f "{{prefix}}/share/util-macros/fontutil.m4" -o -f "{{prefix}}/share/aclocal/fontutil.m4" + # Smoke-test the BDF scripts at least load: + - bdftruncate --help 2>&1 | head -1 || ucs2any --help 2>&1 | head -1 || true From a2afed8d851fc69f9e04af30c2551b54021116ad Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 11 Jun 2026 17:41:51 -0400 Subject: [PATCH 2/2] refactor --- projects/x.org/font-util/package.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/projects/x.org/font-util/package.yml b/projects/x.org/font-util/package.yml index fc3e3f878f..0ba37bbd72 100644 --- a/projects/x.org/font-util/package.yml +++ b/projects/x.org/font-util/package.yml @@ -29,9 +29,7 @@ display-name: X.Org font-util build: dependencies: - gnu.org/make: '*' - freedesktop.org/pkg-config: '*' - x.org/util-macros: '*' + x.org/util-macros: "*" script: - ./configure --prefix={{prefix}} - make --jobs {{ hw.concurrency }} @@ -42,10 +40,13 @@ provides: - bin/ucs2any test: - # Accept either $libdir/pkgconfig (autotools default) or - # $datarootdir/pkgconfig (some distros relocate); font-util's own - # `make install` writes to lib/pkgconfig on most builds. - - test -f "{{prefix}}/lib/pkgconfig/fontutil.pc" -o -f "{{prefix}}/share/pkgconfig/fontutil.pc" - - test -f "{{prefix}}/share/util-macros/fontutil.m4" -o -f "{{prefix}}/share/aclocal/fontutil.m4" - # Smoke-test the BDF scripts at least load: - - bdftruncate --help 2>&1 | head -1 || ucs2any --help 2>&1 | head -1 || true + dependencies: + freedesktop.org/pkg-config: "*" + script: + # Accept either $libdir/pkgconfig (autotools default) or + # $datarootdir/pkgconfig (some distros relocate); font-util's own + # `make install` writes to lib/pkgconfig on most builds. + - pkg-config --cflags --libs fontutil + # Smoke-test the BDF scripts at least load: + - test "$(bdftruncate --version)" = "font-util {{version}}" + - test "$(ucs2any --version)" = "font-util {{version}}"