Preheat oven to 325F
Add the ham and both cans of crushed pineapple and juice to a large ziplock bag. Seal the bag carefully and let it sit in the refrigerator for about 2 hours.
After 2 hours, remove the ham from the bag and place it in a baking sheet pan. Strain all the liquid from the bag into a measuring cup, and discard the pulp.
Prepare the onion piquet by piercing the onion with all the cloves.
Add the onion piquet, the sprigs of thyme, the pineapple juice and the wine to the baking sheet pan along with the ham.
Bake 1 to 1.5 hours until internal temperature reaches 140F, basting with the pan drippings every 30 mins.
When the ham is cooked, remove it from the oven and move it to a cutting board to rest.
Strain all the pan drippings into a measuring cup and set aside.
Remove the onion piquet and transfer it into a sauce pan with 2 Tbsp of butter, the Brazilian Sofrito/garlic, and the bay leaf. Let it cook until the butter melts and the garlic is fragrant - approx 3 mins.
Remove the onion piquet, and the bay leaf, from the pan and discard. Then add the flour and a Tbsp of cold butter to the pan and whisk.
Slowly add the pan drippings to the pan and continue to whisk until the sauce reaches sauce consistency - when it coats the back of a spoon.
Carve the ham and serve with the sauce.