Touchscreen with the arduino due - Help needed

Hello I am trying to switch from the mega 2560 to the due. The touchscreen uses the mcufriend_kbv and TouchScreen libaries. Can anyone help figure out what needs doing?

Here are typical errors which are all very similar:

variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]

 #define digitalPinToPort(P)        ( g_APinDescription[P].pPort )
arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

 #define portOutputRegister(port)   ( &(port->PIO_ODSR) )