you can build a pirate one thousand kind of way...depend really what you are looking for.
My favorite archetype is Buccaneer (Human archetype only) But remember that Half-orcs and Half-Elves count as humans as well, so you can get take the buccaneer archetype and have a lot of fun.
For filthy, stinky, drunk and rude pirate, most likely a half-orc Buccaneer (Gunslinger Archetype). You get extra grit points for drinking alcohol, use charisma instead of wis, and you get an exotic pet familiar (yeah you can get a parrot on your shoulder). You get also sea legs as a bonus feat and various bonuses to be on a ship.
buccaneer is sword and gun, so yeah its frankly a great match for pirates. Not only it is flavorful, it is also mechanical fitting very well, you'll bonus feats like sword and pistol even if you don't qualify, bonus feats to use siege engines, can cast some sla Old Salt and Black Mark pirate curses, swinging on ropes, babbling like a pirate to confuse your opponent etc...
filthy, stinky, drunk, rude Pirate!
That is all role play and nothing more...you don't need feats, skills, archetypes, or spells to be Drunk, rude, stinky and a filthy Pirate.
Play what you want and give him a pirate additude.
I really like the Magus as a pirate. Swashbuckler is a nice one. Brawler would work well on a ship. Heck a bard could do wonderful things as a pirate.
I would try to get some skills so I would avoid fighter and things with low skills and little options.
Every class could be flavored as a pirate (even a ninja...)
Some might need a stretch or dip in another class to make the most flavorful though.
Even if there's an alignment restriction, you could still do it -- you could even be a LG Paladin and a privateer (you'd need a letter of marque from an accepted authority).