I was under the impression that CarPlay is built around iOS Operating System, I do not believe anyone has attemped porting !
Nope! CarPlay is an API set that allows iOS apps that provide a CarPlay UI to be accessed on the CarPlay screen. Neither the hardware or software are from Apple, they're what the venders of CarPlay equipment, both OEM & aftermarket, choose to use. The apps accessed via CarPlay are running on the iOS device, just in the background on the device & presenting a UI on CarPlay. All of that applies to Android Auto as well. On equipment that supports both (which is most because vendors don't want to shut out potential customers), it's all on the same hardware with facets of the software addressing each API set.
Running CarPlay on Raspberry Pi is simply a matter of writing Pi code that fulfills the CarPlay API. The biggest block to running CarPlay on Raspberry Pi is having the API documentation.