lucenepp: fix darwin build (#376776)
[NixPkgs.git] / pkgs / build-support / setup-hooks / find-xml-catalogs.sh
blobf446a6f27fd9cd3f4157313689559c904ff99942
1 addXMLCatalogs () {
2 local d i
3 # ‘xml/dtd’ and ‘xml/xsl’ are deprecated. Catalogs should be
4 # installed underneath ‘share/xml’.
5 for d in $1/share/xml $1/xml/dtd $1/xml/xsl; do
6 if [ -d $d ]; then
7 for i in $(find $d -name catalog.xml); do
8 XML_CATALOG_FILES+=" $i"
9 done
11 done
14 if [ -z "${libxmlHookDone-}" ]; then
15 libxmlHookDone=1
17 # Set up XML_CATALOG_FILES. An empty initial value prevents
18 # xmllint and xsltproc from looking in /etc/xml/catalog.
19 export XML_CATALOG_FILES=''
20 if [ -z "$XML_CATALOG_FILES" ]; then XML_CATALOG_FILES=" "; fi
21 addEnvHooks "$hostOffset" addXMLCatalogs