Unless I remove all CRLF line terminators in the source files, Sun
studio compiler fails to build nagios-base. Gcc obviously has no such
problems.

Do you consider pkg-src portability to include the possibility of
building packages with Sun studio instead of the pkgsrc gcc? If yes,
then maybe an additional step could be included to remove the CRLF line
terminators.

I could also contact the nagios developers, to see if they feel this is
worth changing. I counted 208 ascii files without CRLF versus 132 with
CRLF. :)