Is it basically possible to compile any source code files for libs
and/or programs to run on X11, as long as the dependencies are
resolved and the source code either was created for a Linux or BSD
port or what are the limitations to watch out for?
Yes it's possible and in many cases easy. OS X is BSD underneath and
can support X11 apps. Take a look at the following and write back if
you have specific questions: