To compile the nginx package, you need to remove the patch-aa patch from distfiles. You also need to create hacks.mk and add the following to it:
.if (${PKGSRC_COMPILER} == sunpro)
.if (${MACHINE_ARCH} == i386)
CONFIGURE_ENV+= NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
.endif
.endif
Problem report and fix here.