It's not particularly difficult to build a cleric who wields a greatsword- you just need a War Domain deity who uses one. That supplies Weapon Focus with a greatsword as well for free. Anyone can pick up power attack. So it basically comes down to a question of whether or not a Cleric can make up a modest difference in BaB, Str Bonus (though you can build a cleric with a high str if you want), and Weapon Spec, via buffs. At level 5, the fighter might come out ahead, barely, because Divine Power is not yet online. Once it is, and later once additional buffs such as Righteous Might are added, the Cleric wins. Also, in a purely endurance battle, a high-level cleric can get by with having a worse damage ratio than a fighter because they can periodically just drop Heal on themselves and start over.