In a first, the European Union will purchase weapons for a country under attack, European Commission President Ursula von der Leyen has said.