$ pkg version -v -n readline readline-8.2.10 > succeeds index (index has 8.2.:[.1]}) I have no idea how it happens. Misconfiguration in my setup?
Versions that are no longer supported (e.g. 12.4-STABLE) have older versions of make. That older version of make does not yet support numerical sort modifiers. So, the next part of the process fails. PATCHLEVEL= ${PATCHES:On:[-1]} So I will update from 12.4-STABLE to 14 or newer this time :)
As Tatsuki pointed out, I believe it happened with an outdated FreeBSD version. I could not reproduce this on FreeBSD 13 or 14 box.