The app bundle packaging process is not "officially supported", it just contains the minimal amount of features to work on my systems. I include my packaging scripts only as a convenience for others -some modifications are to be expected unless your system is similarly set up
.
The reason it looks in /usr/local/lib is because I put an custom version of a library there at one point, and it looks in /opt/local/lib for all the other libs because that's where all the other are on my system.
Note: I use the
no_x11 flag/variant for my Macports installation, so the X libraries are not (unnecessarily) included.