I just had the exact same problem about 3 months ago.
I never slam the trunk but most of my friends do all the time even though I tell them to treat my car like a lady. I used to pop my trunk no problem with the key, seat popper, door buttons, and remote then one day I noticed it didn't pop as high and it was like that for awhile. Thought nothing of it. Then one time I went to pop it and grabbed it with my hands to open it fully and it was still latched. So I popped it again - no go. Then I yanked it another time firmly with my hands and the same thing happened. The latch was still catched but I pulled the trunk right off it! After I got it uncatched I noticed the 2 bolts were still attached to the latch and it had some of the flaky trunk metal and brackets still attached.
Actually the brackets that the 2 bolts go through are actually part of the trunk piece as a whole. Make sure you save those if they're still good for attaching the bolts to. If not you'll have to use nuts that you can secure from behind with your hand or a very small wrench as the empty space in the trunk lid is tight - wing nuts are perfect if you can fit your hand in there. You can't use one straight piece of material across to fix it or it will block your key cylinder. What I did was went down to the Home Depot and grabbed 2 pieces of 2" square sheet metal. I drilled a hole through each the diameter of the latch bolt (3/8" or 1/4" can't remember). Then I filed all the flaky metal pieces off the brackets. With the trunk lid in the fully-open position there are access holes on either side of the trunk lid that you can fit the sheet metal through behind the broken sections and then position the brackets behind them. I did one side at a time. Then you line up one side of the latch with one hand - the other hand in the hole holding the sheet metal/bracket from behind - and screw the bolt through the latch, the hole in the sheet metal, and into the bracket. It's sorta like pinching the latch to the lid using the brackets. Don't tighten it all the way just yet, then do the other side. Slowly lower the trunk lid so you can see where the latch is going to catch, and adjust it so the trunk lid will line up correctly when catched so there are no gaps (most importantly so water/condensation doesn't get in), and tighten the balls out of the bolts.
I would also get a new lid eventually but this is an easy fix for now and my trunk works better than when I got the car. When you look at it from the inside the latch covers up the rotted out holes so it doesn't even look like it was ever broke. A lid install usually requires 2 people and is a pain to align.