When I replace /home/pi/RetroPie-Setup/scriptmodules/ports/kodi.sh with what is listed on the Wiki I receive an error:

Could not install package(s): libcec3. (Did not find needed package(s): libcec3. I am trying to install them now.; E: Unable to locate package libcec3)

It looks like the directory structure changed on http://archive.mene.za.net/raspbian ?

After this error I also see that it is not creating a Kodi rom directory or anything in EmulationStation.