Reigning champions Portugal left it late to overcome an organised Hungary outfit as Cristiano Ronaldo became the all-time leading goalscorer in European Championship history with his brace in a 3-0 win in Budapest.