Hi Baz,
XML_CATALOG_FILES=/opt/local/etc/xml/catalog /opt/local/bin/xsltproc --nonet --xinclude --stringparam gtkdoc.bookname cairo --stringparam gtkdoc.version 1.8 /opt/local/share/gtk-doc/data/gtk-doc.xsl ../cairo-docs.xml
... and I see the default setting (file:///etc/xml/catalog - no ${prefix}) is hardcoded into both libxml2 (catalog.c) and xsltproc (xsltproc.c), so I needed to set this variable to get those tools working on macports.
Ah, yes, I know all about this, and didn't think of it at the time. Sorry :-)
So possible solutions: - tell me to rtfm :) - I could roll a patch for libxml2, libxslt so that they use ${prefix} for the default catalog, for macports only - I could suggest that patch upstream. - other...?
I've discussed this with the maintainer of libxml2 and mailed him a patch for his consideration a few weeks ago, but unfortunately he hasn't gotten back to me about it yet. I've now put a ticket on Trac so that others can see it [1]; I've only recommended the substitutions in some of the places that "/etc" appears because the other instances appear in documentation that seems less system- specific. My impression from the libxslt code was that it inherited the default catalog location from whatever was compiled into the libxml2 code, but that there are hardcoded references in its documentation (including the printf in xsltproc.c) that ought to be changed. I think you're absolutely right, however, that this is an issue that ought to be reported upstream. If you could do that (possibly improving on my patches), that would be great. Kind regards, Maun Suang [1] http://trac.macports.org/projects/macports/ticket/12106 -- Boey Maun Suang (Boey is my surname) Email: boeyms at macports dot org