MFH: r356067

- Fix build on 10+ by respecting CC, CFLAGS
- Add staging support
- Convert to new options framework

Approved by:	portmgr (miwi)