@User @User I am open to change/implement any reasonable solution for these portability issues.
Environmental variables can be used in xschemrc ( $env(VARIABLE) ) so any definition can be used there, in some cases this is already done with the HOME env var:
...
append XSCHEM_LIBRARY_PATH :$env(HOME)/xschem-repo/trunk/xschem_library/logic
...