I have a macports tree compiled with the +universal +system_x11 variants. I use this for building universal builds of Inkscape. A few weeks ago some of the ports could no longer be upgraded, specifically mesa and pango. Both these builds would fail with the error about libGL.dylib or libX11.dylib being not found, e.g.
ld: library not found for -lX11
After a fair amount of searching, I couldn’t find a solution but stumbled on this thread talking about the system_x11 variants being removed from Macports.
Basically, the problem was that it is expected that all ports now use the X11 library available in Macports. Of course, this will cause problems if you already have all these X11 ports installed with +system_x11 — effectively just empty ports.
The solution was to run the following commands to find, deactivate and then reinstall all ports that were installed with +system_x11 variants:
$ xports=`port installed | grep system_x11 | \
cut -f3 -d' ' | xargs`
$ sudo port -v deactivate $xports
$ sudo port -v clean $xports
$ sudo port -v install $xports
You can then remove the deactivated system_x11 versions via:
$ sudo port -v uninstall `port installed | \
grep system_x11 | cut -f3-4 -d' ' | xargs`