when did portugal acquire its independence?