Combine the cranberries, sugar and water in a saucepan and cook for 5 minutes. Drain the liquid from the cranberries and set the berries aside. Boil the liquid for 2 minutes. Add the port and cook for another 2 minutes.
Place the ham in a roasting pan. Insert the cloves in the ham. Brush the syrup on the ham. Garnish with rosemary and generously season with pepper. Roast in the oven for 2 hours. Baste regularly.
Serve with the reserved cranberries, along with rice and a seasonal vegetable.