Add gen_macports_patches.sh script

From trac: https://trac.macports.org/ticket/21640