I have previously successfully used the pkg_comp utility for NetBSD to build packages from a list. It still works for building simple applications such as "pico zip unzip", but if you add larger applications, you get a "tag error". To reproduce the problem you need to add for example "firefox xfce4 xfce4-extras" to the AUTO_PACKAGES line.
https://disk.yandex.ru/d/1HElNNk6DwgGPA
What is the best way to solve this problem?