This post was inspired by an email I received today from someone who wanted to know why the f sound in Māori is written wh, as in Whangarei.
According to a number of sites I found, Māori was first written down by missionaries who had little or no training in phonetics or phonology, and there was considerable variation in the spelling systems they came up with. The sound represented by wh was originally a voiceless bilabial fricative /ɸ/ (p\), though in some dialects, particularly in the North Shore area, it was a voiceless labial-velar fricative /ʍ/ (W). It was written w by some, and wh, f or v by others.
These days, many people pronounce wh as /f/, or sometimes /h/, /w/ or /ʍ/ (W).