Remember that an ISO is a . If the original PKG file contains encrypted data (like a game or system software), simply converting the container to an ISO may not make the contents "runnable" in an emulator or virtual machine without additional decryption keys or specific formatting.
Save as pkg2iso.sh :