Donald Trump announced a trade deal with the European Union, avoiding a transatlantic tariff war, after meeting Ursula von der Leyen, the president of the European Commission, at his Turnberry golf resort in Scotland.