It is very easy to use epoxy to build up a flat base for the port. Just tape the area and trim the tape using the port as a template. Use epoxy with lots of filler to stiff consistency and build up trying to keep all off of tape. The filler is white and therefore, may match your boat. If you review the West System epoxy manual it shows you how to build up for applications like this. You can even use a popsicle stick to fillet the joint at the deck. There should be no filler at centerline of port and will get to be about 1/8" or more depending on the port size at each side. You can then use a simple file or sanding board to make the top level. Depending how careful you were with placing the filler, you may need a second coat to make level for the width of the port flange. Use sealent before placing and mounting port.
The problem with using epoxy is that it is not very UV resistant and will turn yellow.
The easiest way to install ports is to cut the hole, seal the foam, and install the port with a healthy amount of silicone seal. Use the contoured ports and on the sides where they don't sit flush, run a bead of silicone around it, smooth with a wet finger and you're done. No bolts required.
I've been doing them this way for over 35 years and have never had a problem.