This adds:
+LDFLAGS+= -lm -lX11 # explicitly list for ld v2.22
The package just includes gtk2/buildlink3.mk.
I think that gtk2 can be built against different backends and libX11 is just
one of them (think OS X).
I have doubts that this change is correct (perhaps other similar ones as well).
Why does Dragonfly ld 2.22 need this?
Thomas

Indirect / recursive linking is no longer the default for ld starting
with 2.22.
Ld will stop with an error if it encounters a symbol not present in any
of the
listed libraries when previously it would have recursively searched
libraries
those libraries were linked to. The error is clear, and it says which
library
the symbol located. Something is using a libm function and libX11
function in
this particular case.

I'm not tested yet on DragonFly, but on NetBSD, -lm and -lX11 are included in
`pkg-config --libs gtk+-2.0' and this package is using it as a part of LDFLAGS.
I don't know why not for your environment.
--
OBATA Akio / obache%NetBSD.org@localhost