Heat the oil in a frying pan and gently fry the onion and garlic until translucent.
Meanwhile blanch the pumpkin in boiling water for about five minutes until it's slightly soft. Plunge into iced water to cool, then drain.
Add the cubed pumpkin to the softened onion together with the spice and stir well.
Once the pumpkin has heated through, add the sugar, vinegar and salt and freshly ground black pepper and bring to the boil.
Simmer for at least 40 minutes, until the pumpkin is really soft and the sugar and vinegar are thickened.
Adjust the seasoning if necessary, stir in the sage and serve when cool.