Prefixing the port command with 'export HOME=~' makes it work