Powder sugar along with the clove and add to the pineapple and butter into a saucepan. Cook on low flame till the mixture gets sticky and is dry. Cool completely.
Meanwhile, combine all ingredients under "custard" and cook till thick. Cool completely.
Whip the cream along with sugar till stiff. Fold in the cream cheese. Reserve in the fridge till use.
Once the custard is cooled, beat into the cream and cheese mixture.
In a large serving pan, spread the cake or cookies, if using. I used pineapple cake slices - storebought. Spread half the pudding mixture.
Spread the stewed pineapple, reserving some quantity for topping, and then top with the remaining pudding mixture.
Cool in the fridge for two hours or till set. Garnish with the reserved pineapple and serve.