I didn't give up yet and tried to use egslengine with Free Pascal under Linux. Finally I was successful, but several errors occurred and I have to edit egslengine source code.
1. I had to remove everything related to Haiku from the source code, because compiler was trying to load all the stuff for Haiku
2. I had to fix two IF/THEN blocks
Background() and rectangle() commands still don't work, but I can use, for example, openwindow(), clearscreen(), dot(), box(), line(), wait(), sync(). I'm pretty sure I'm doing something wrong (the compiler has hundreds options), so hopefully someone will help me to make it work properly.