Add the common repo and use it
Port the str dup printf and strtod functions

Use our own local function to parse a double
Use asprintf for the dup printf