I had an issue with the roof on my old 968 - basically a bolt had come loose and fallen into the bodywork somewhere. My local indy (Northway) had an exploded parts diagram of the roof mechanism, which meant I could order just the bolt, rather than the whole central hinge mechanism. Might be worthwhile calling up your indy and asking the question...
You can replace just the plastic cover for the hook , need to talk to OPC parts about that but that is used to tell the roof the closed position .
If the latch is running before the roof is close enough to the lock then something is stopping it .. either roof mechanism , calibration or the switch under the tuning fork shape on the latching mechanism is faulty .
Calibration or switch is what i would check first .
The cover for the hook is ok, its another black plastic part that broke off. Is there not a sensor that activates the hook once the roof touches the windscreen frame.
Its just trying to lock in place an inch or two early.
On the picture you posted then the " tuning fork " the U shaped bit above the latching hook is the bit that touches the roof frame , operates a micro switch and then the latching hook will work.
Its also goverened by the roof potentiometers so if it sees the end of travel on these then it will also operate the latching hook .
Need to check this switch is ok and also a calibration ..
If the roof latch cycles .. in other words it never locks but keeps locking / unlocking then i would lean towards this switch being faulty ..
From your description though i would start with the above if i was looking at it .
EDIT ..
Bit that broke off .. its not that U shape i just mentioned is it ? if so then thats your problem , its also part of the latching assembly as far as im aware so hopefully it can be glued .
I think it was partially broken when I bought the car, but i do have a bit of it that broke off recently. Will try any glue or i am going to have to just take a hit on the car price. Bummer
There are some very good adhesives these days , dont just use some cheap one .. the one we use at work is fast setting and goes off like concrete in 15 mins ..