Peel and finely chop the garlic.
If using fresh tomatoes, peel the tomatoes - place them in a bowl of boiling water for a few minutes then remove, prick with a knife then peel. Chop the tomatoes relatively finely, removing the tough core. If using canned tomatoes or passata, this step isn't needed.
Warm around 2 tablespoon of olive oil in a skillet or wide pot/pan over a medium heat. Add the garlic and cook just a minute until it becomes aromatic but is not browning. Before it browns, add the tomatoes and cook for a few minutes to simmer, soften and for the flavors to mingle. Stir now and then and break up the tomatoes, as needed.
As the sauce is cooking, boil water to cook the pasta and cook a couple minutes less that the packet, test, and if needed cook slightly longer to cook to "al dente" (only just cooked).
Tear up the basil leaves and add to the tomato sauce. Roughly chop the eggplant and mix in, then let it cook a minute or two more.
Drain the pasta then add it to the tomato eggplant sauce. Mix well and cook a minute before serving.
Serve the pasta with ricotta salata grated over the top.