Ah. My mistake, sorry, I thought you were looking for bandwidthd dependencies.
As to your build failure -- a couple of points:
Your ports tree must be in sync with your 4.2 system -- it must be a 4.2 tree. If it isn't, you can get all sorts of problems. I can't tell if it is or not, gd has been at 2.0.35 for a long time. FAQ 15.4.1 describes this synchronicity requirement.
You are always better off installing a package, rather than building the port, if one exists. FAQ 15.4.6 describes the reasons, quite eloquently.
Note that 4.2 will no longer be supported as of November 1.