Convert the pkg-config generator to perl

Perl is required for the build system, using it to generate the
pkg-config metafile can not fail.