From Atsushi Toyokura in pkgsrc-wip The package provides commands for detecting pTeX and its derivatives (e-pTeX, upTeX, e-upTeX, and ApTeX). Both LaTeX and plain TeX are supported.