Hello Bernie
Going by what I paid for the machining and parts on my Riley 12/4 motor a couple of years ago I would say about $5000 will see it out. A couple of local Riley RM rebuilds in the last year have been a similar price.
I now sometimes wonder if everything does have to be new, as I have seen a few engines recently that operated surprisingly well given their condition. Last Nine magneto was $650, but unfortunately the rebuilder is no longer with us to do more. Check where the local aircraft have their magnetos rebuilt, as these have to be certified.
Matthew