Ports are just the infrastructure to build the 3rd party apps from their source. This scaffolding may include OpenBSD specific patches. Looking at the -current tree for math/R, I see 8 patches:
http://www.openbsd.org/cgi-bin/cvswe...ath/R/patches/
Several of these affect library selections/lookups.