Author: rfm
Date: Mon Nov  2 00:09:40 2015
New Revision: 39113

URL: http://svn.gna.org/viewcvs/gnustep?rev=39113&view=rev
Log:
Allow GUI to build when base has been configured without libxml2

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Source/GNUmakefile.preamble
    libs/gui/trunk/Source/GSXibLoader.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=39113&r1=39112&r2=39113&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Mon Nov  2 00:09:40 2015
@@ -1,3 +1,10 @@
+2015-11-01  Richard Frith-Macdonald <[email protected]>
+
+       * Source/GNUmakefile.preamble:
+       * Source/GSXibLoader.m:
+       Check to see if base was built with libxml2 before trying to use
+       classes which depend on it.
+
 2015-11-01  Richard Frith-Macdonald <[email protected]>
 
        * Source/NSImage.m: Alter loading of image by name so that before we

Modified: libs/gui/trunk/Source/GNUmakefile.preamble
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GNUmakefile.preamble?rev=39113&r1=39112&r2=39113&view=diff
==============================================================================
--- libs/gui/trunk/Source/GNUmakefile.preamble  (original)
+++ libs/gui/trunk/Source/GNUmakefile.preamble  Mon Nov  2 00:09:40 2015
@@ -41,7 +41,8 @@
        -DGNUSTEP_TARGET_DIR=\"$(GNUSTEP_TARGET_DIR)\" \
        -DGNUSTEP_TARGET_CPU=\"$(GNUSTEP_TARGET_CPU)\" \
        -DGNUSTEP_TARGET_OS=\"$(GNUSTEP_TARGET_OS)\" \
-       -DLIBRARY_COMBO=\"$(LIBRARY_COMBO)\"
+       -DLIBRARY_COMBO=\"$(LIBRARY_COMBO)\" \
+       -DGNUSTEP_BASE_HAVE_LIBXML=$(GNUSTEP_BASE_HAVE_LIBXML) \
 
 ifneq ($(BACKEND_BUNDLE),)
 ADDITIONAL_CPPFLAGS += -DBACKEND_BUNDLE=1

Modified: libs/gui/trunk/Source/GSXibLoader.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GSXibLoader.m?rev=39113&r1=39112&r2=39113&view=diff
==============================================================================
--- libs/gui/trunk/Source/GSXibLoader.m (original)
+++ libs/gui/trunk/Source/GSXibLoader.m Mon Nov  2 00:09:40 2015
@@ -1077,10 +1077,13 @@
 
 - (NSData *) _preProcessXib: (NSData *)data
 {
-  NSData *result = data;
+  NSData *result = nil;
+
+#if     GNUSTEP_BASE_HAVE_LIBXML
   NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data
                                                        options:0
                                                          error:NULL];
+  result = data;
   if (document == nil)
     {
       NSLog(@"%s:DOCUMENT IS NIL: %@\n", __PRETTY_FUNCTION__, document);
@@ -1236,12 +1239,13 @@
          RELEASE(document);
        }
     }
-
+#endif
   return result;
 }
 
 - (id) initForReadingWithData: (NSData*)data
 {
+#if     GNUSTEP_BASE_HAVE_LIBXML
   NSXMLParser *theParser;
   NSData *theData = data;
 
@@ -1277,7 +1281,7 @@
   NS_ENDHANDLER
 
   DESTROY(theParser);
-    
+#endif    
   return self;
 }
 


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to