Heat oven to 200C/fan 180C/gas 6. Place a shallow 23cm flan tin on a baking tray. Tip the spices, coconut and sugar into a pan with 150ml water and cook over a low heat for about 5 mins, stirring frequently to ensure the mixture doesn’t catch. Set aside to cool.
Meanwhile, roll out the pastry on a lightly floured surface and use to line the flan tin. Trim off the excess pastry, fill the pastry case with baking parchment and baking beans and cook for 15 mins. Remove the beans and cook for 5 mins more so the pastry on the base of the tin is just cooked, but not brown.
Beat the egg and melted butter into the cooled coconut mixture, then spoon into the pastry case and smooth the top. Bake for 25 mins until the pastry is golden and the coconut pale golden. Serve with cream or real vanilla ice cream and some Cape gooseberries, then follow with cups of black Rooibos tea.