Even if you can fix MacPorts itself to install in a path with spaces, likely many ports will fail to build in such a configuration. Years ago I reported this problem to the developers of autoconf, a configuration system used by many many ports, and the developers of autoconf said they had no plans to fix this issue and that it was a user error to attempt to use a path containing spaces. Therefore it seems unwise for us to attempt to support such a configuration either.
Consequently, because we've been under the impression that we'll never run in a path with spaces, many many portfiles make that assumption as well. It would be a great deal of effort to fix this problem in all portfiles, for no discernible gain, since it's trivial for the user to choose to install MacPorts a different path that doesn't contain spaces.
I would suggest closing this ticket as "wontfix".