I've been assuming that GIR files are portable and using them to generate (equally) portable binding code. I've found that they're not in one detail: the filename in the shared-library attribute looks to assume GNU ld. For example:
<namespace name="GObject"
version="2.0"
shared-library="libgobject-2.0.so.0"
On Mac OS X, I think we would have libgobject-2.0.0.dylib instead.
Can it be assumed (sometimes|mostly|always) that
1. On GNU/Linux this name is the 'SO name' with form:
<name>.so.<so-version>
2. On Mac OS X this name has the form:
<name>.<so-version>.dylib
?
If that is always the case, could GIR files be made portable, e.g.
<namespace ...>
<shared-library name="gobject-2.0" so-version="0"/>
...
</namespace>
Also, is there any other way in which GIR files are not fully portable?