Chop the onions, finely chop the garlic and finely chop the rosemary.
Heat the olive oil in a large pan.
Add the onion and garlic and cook until soft.
Add the chopped tomatoes (including the juice), tomato purée, rosemary, oregano and basil leaves and stir.
Add the red wine and sugar (if using).
Bring to the boil and simmer without a lid for around 20 minutes.
If you would like a chunky sauce then the sauce will then be ready to use. Alternatively, blend using a hand blender If you would prefer a smooth sauce.