Converting Arduino Compatible library to work with ESP32

Sorry but I don't really understand. What exactly should I be doing in the library to make it work for my board. From the looks of it I understand that the library that I am using is utilizing a niche way to define the hardware component. If possible can you guide what changes should I do because the main code is really long and switching to a new library with all new function definitions would be hectic.