Just in case Richard Thornton is still listening, on OpenBSD 5.0 (i386) I managed to compile R properly using the aforementioned patch to the tre sources and passing '--with-cairo=no' as configure option.
If you don't drop Cairo, R will be built all the same, but the first time you try to plot something R will crash due to some mess with libgthread. Passing -pthread as a CFLAG or LDFLAG will break configure's detection of jpeg and tiff capabilities and on top of that make will fail altogether. As for the rest of the list, I'll try to find out who's behind the R port and openbsd-wip on githup and offer the information I was able to gather. I don't have the skills or the understanding of OpenBSD's libs and such to be able to properly fix this... If anyone has any pointers on the gthr / pthread stuff in general though, I'll be glad to help.

