[gtk-osx] Set XML_CATALOG_FILES correctly if gtk-osx-docbook is installed outside of $JHBUILD_PREFIX.



commit 21ba240e5dfa58af5b749778a768d86b20087752
Author: John Ralls <jralls ceridwen us>
Date:   Fri May 3 11:00:37 2013 -0700

    Set XML_CATALOG_FILES correctly if gtk-osx-docbook is installed outside of $JHBUILD_PREFIX.

 jhbuildrc-gtk-osx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index 32dfea1..0d7a2c3 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -629,7 +629,14 @@ prependpath('PERL5LIB', prefix + '/lib/perl5/site_perl')
 
 # Point gtk-doc and other xsltproc users to our XML catalog.
 #
-os.environ['XML_CATALOG_FILES'] = prefix + '/etc/xml/catalog'
+_pfx_cat_file = os.path.join(prefix, 'etc', 'xml', 'catalog')
+if not os.path.exists(_pfx_cat_file):
+    os.makedirs(os.path.dirname(_pfx_cat_file))
+    open(_pfx_cat_file, "w").close()
+if 'XML_CATALOG_FILES' in os.environ:
+    os.environ['XML_CATALOG_FILES'] += ':' + _pfx_cat_file
+else:
+    os.environ['XML_CATALOG_FILES'] = _pfx_cat_files
 
 #Freetype has -ansi added by its configure, but uses c99 code
 #


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]