Washington Times calls for arming ship crews
A thought: it might take no more than a pistol. assuming the target ship unbolts its ladders, they have to come up via grappling hook. As soon as the first guy's head appears, the crewman shoots him. The pirate crew now must call for volunteers to be the next up. If, repeatedly, the point man get shot between the eyes, this will eventually lower morale.
That might explain why the pirates veered off when the cruise ship's crew just fired some shots in the area. They had AKs, but so long as the guys with pistols could duck out of sight and wait for them to expose themselves, they could wipe them out.
Hat tip to Don Hamrick....