freebsd/pkg — pull request #545 by yerenkow (2013-07-11 18:13:11+00:00)
Title: Cross root installing

In some cases when neither chroot nor jail not an option, would be good to have ability to install packages into some specified dir.

This can be used when you for example preparing install media, or you have host amd64 and want to install packages for i386/arm/etc - there not much reason to deny this, as package handling is pretty straighforward "unpack and tell to DB about this". With specifying PKG_CONFIG_ABI, PKG_CONFIG_OVERRIDDEN_ROOT, PKG_CONFIG_DBDIR, PKG_CONFIG_CACHEDIR and with PKG_ADD_NOSCRIPT that could be done.