merge the non-extension-packaged legacy version back into the
mainline by way of a couple of sed scripts.