Thanks @Begasus for trying to explain. Maybe one of the C++ developers can chime in here:
I guess I’ll need to use find_directory() from FindDirectory.h, but the question is which directory_which constant to use for the directories corresponding to the $dataDir and $settingsDir variables in a haikuporter recipe. Like I said above my guess would be B_USER_SETTINGS_DIRECTORY for $settingsDir and B_USER_DATA_DIRECTORY for $dataDir. Is that correct?