LISBON/BRUSSELS (Reuters) - The European Commission and Portugal have agreed in principle on the recapitalization, on market terms, of ailing state-owned bank CGD, envisaging an injection of up to 2.7 billion euros ($3 billion) in state funds and nearly as much in debt and equity.