]> err.no Git - sope/commitdiff
improved OSX framework support
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 16 Aug 2005 18:41:30 +0000 (18:41 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 16 Aug 2005 18:41:30 +0000 (18:41 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1036 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

16 files changed:
sope-xml/ChangeLogSaxDriver/ChangeLog
sope-xml/ChangeLogSaxDriver/ChangeLogSaxDriver.m
sope-xml/ChangeLogSaxDriver/GNUmakefile.preamble
sope-xml/ChangeLogSaxDriver/Version
sope-xml/STXSaxDriver/ChangeLog
sope-xml/STXSaxDriver/GNUmakefile.preamble
sope-xml/STXSaxDriver/Version
sope-xml/SaxObjC/ChangeLog
sope-xml/SaxObjC/GNUmakefile.preamble
sope-xml/SaxObjC/SaxXMLReaderFactory.m
sope-xml/SaxObjC/Version
sope-xml/libxmlSAXDriver/ChangeLog
sope-xml/libxmlSAXDriver/GNUmakefile.postamble
sope-xml/libxmlSAXDriver/GNUmakefile.preamble
sope-xml/libxmlSAXDriver/Version
sope-xml/pyxSAXDriver/GNUmakefile.preamble

index f1e08afcd1818b92d0d64513d1a9a48c20b798b4..157bf3ef0045ac62749e3466a132b4cfa48f7e69 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v4.5.1
+
+       * install into SaxObjC framework Resources when being used with OSX
+       
+       * ChangeLogSaxDriver.m: fixed a gcc 4.0 warning
+
 2004-12-14  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * ChangeLogSaxDriver.xcode: minor fixes
index ca40d278c2773e52241fc1e36cbf7e0383d3efbe..f919e8030a2c5efee68a84177842d676b5585abc 100644 (file)
@@ -26,7 +26,7 @@
 
 @interface ChangeLogSaxDriver(PrivateAPI)
 - (NSString *)_namespace;
-- (void)_writeString:(id)_s;
+- (void)_writeString:(NSString *)_s;
 - (void)_processLine:(NSString *)_line;
 - (void)_parseFromString:(NSString *)_str systemId:(NSString *)_sysId;
 
index 85034d54e955f02d2e971f1132fcc7854cf2694b..40030fe886393f60c4a8628f2f4ea3cf9a31de89 100644 (file)
@@ -1,5 +1,12 @@
 # compilation settings
 
+ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
+BUNDLE_INSTALL_DIR := /Library/Frameworks/SaxObjC.framework/Resources/SaxDrivers/
+endif
+endif
+
+
 SOPE_ROOT=../..
 SOPE_OBJ_ROOT=$(GNUSTEP_BUILD_DIR)/$(SOPE_ROOT)
 
@@ -7,11 +14,30 @@ ADDITIONAL_INCLUDE_DIRS +=                   \
        -I$(SOPE_ROOT)/sope-xml                 \
        -I$(SOPE_ROOT)/sope-core/NGExtensions
 
-BUNDLE_LIBS += \
-       -lSaxObjC -lNGExtensions
+
+# dependencies
+
+ifneq ($(frameworks),yes)
+BUNDLE_LIBS += -lSaxObjC $(libxml_LIBS)
+else
+BUNDLE_LIBS += -framework SaxObjC $(libxml_LIBS)
+endif
+
 
 ADDITIONAL_BUNDLE_LIBS += $(BUNDLE_LIBS)
 
-ADDITIONAL_LIB_DIRS += \
-       -L$(SOPE_OBJ_ROOT)/sope-xml/SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)       \
-       -L$(SOPE_OBJ_ROOT)/sope-core/NGExtensions/$(GNUSTEP_OBJ_DIR_NAME)
+
+# library/framework search pathes
+
+DEP_DIRS = ../SaxObjC ../../sope-core/NGExtensions
+
+ifneq ($(frameworks),yes)
+ADDITIONAL_LIB_DIRS += \
+       $(foreach dir,$(DEP_DIRS),\
+         -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
+else
+ADDITIONAL_LIB_DIRS += \
+       $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
+endif
+
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
index b97a76b1289c6e411f04ea59f3d172b9cf78b962..4010e5dd4508f14e0784ae5a7757e1e1d16272ab 100644 (file)
@@ -1,3 +1,3 @@
 # Version file
 
-SUBMINOR_VERSION:=0
+SUBMINOR_VERSION:=1
index cca02cd9a574404ebcc2f65c8394f12bfe160a24..9098db4b1c9c2e3c2baa2352ceef5656b363e290 100644 (file)
@@ -1,3 +1,12 @@
+2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v4.5.12
+
+       * install into SaxObjC framework Resources when being used with OSX
+
+       * bumped version to 4.5 to be consistent with the remaining SOPE
+         versioning
+
 2005-05-03  Helge Hess  <helge.hess@opengroupware.org>
 
        * Model/StructuredTextBodyElement.m: fixed a gcc 4.0 warning (v1.0.11)
index 152af3afb96660335b90895927b276839e6baa56..c32aa313423cb62a90adcf3cd7b88fd34ee14bc9 100644 (file)
@@ -1,16 +1,39 @@
 # compilation settings
 
-ifneq ($(GNUSTEP_BUILD_DIR),)
-ADDITIONAL_LIB_DIRS += \
-       -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
-else
-ADDITIONAL_LIB_DIRS += -L../SaxObjC/$(GNUSTEP_OBJ_DIR)
+ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
+BUNDLE_INSTALL_DIR := /Library/Frameworks/SaxObjC.framework/Resources/SaxDrivers/
+endif
 endif
 
+
 STXSaxDriver_INCLUDE_DIRS += \
        -I.             \
        -I./Model/      \
        -I./ExtraSTX/   \
        -I..
 
+
+# dependencies
+
+ifneq ($(frameworks),yes)
 STXSaxDriver_BUNDLE_LIBS += -lSaxObjC
+else
+STXSaxDriver_BUNDLE_LIBS += -framework SaxObjC
+endif
+
+
+# library/framework search pathes
+
+DEP_DIRS = ../SaxObjC
+
+ifneq ($(frameworks),yes)
+ADDITIONAL_LIB_DIRS += \
+       $(foreach dir,$(DEP_DIRS),\
+         -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
+else
+ADDITIONAL_LIB_DIRS += \
+       $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
+endif
+
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
index cf8d2d7ac2666ff2df9fdddfbff8214c58b5a7d3..42dcfc3cc52f5a83ecbc52009b42c56fcfacd50f 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-MAJOR_VERSION=1
-MINOR_VERSION=0
-SUBMINOR_VERSION:=11
+MAJOR_VERSION=4
+MINOR_VERSION=5
+SUBMINOR_VERSION:=12
index e69a4300eeda501190517a7a42ad324181a4bee0..2ae3f6c7703753b153a5864a87fcea06eab34ff1 100644 (file)
@@ -1,3 +1,14 @@
+2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v4.5.52
+
+       * SaxXMLReaderFactory.m: improved bundle-info.plist lookup (first look
+         in bundle directory, then try to lookup as a NSBundle resource),
+         log searched pathes if no XML reader could be found
+
+       * GNUmakefile.preamble: set framework/cocoa defines when compiling
+         with frameworks support
+
 2005-05-08  Helge Hess  <helge.hess@opengroupware.org>
 
        * XMLNamespaces.h: added namespace declaration for XML vCards (v4.5.51)
index c118ea3172198dd7a43ebe353727b4822c4c2b15..eebe434b15c8d017fa2c2a11e2e70dd0aee94906 100644 (file)
@@ -1,8 +1,10 @@
 # compilation settings
 
 ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
 SaxObjC_INSTALL_DIR = /Library/Frameworks/
 endif
+endif
 
 ADDITIONAL_CPPFLAGS += \
         -Wall -DCOMPILE_FOR_GSTEP_MAKE=1        \
@@ -12,6 +14,13 @@ ADDITIONAL_CPPFLAGS += \
 
 ADDITIONAL_CPPFLAGS += -Wno-protocol
 
+ifeq ($(frameworks),yes)
+ADDITIONAL_CPPFLAGS += -DCOMPILE_AS_FRAMEWORK=1
+ifeq ($(FOUNDATION_LIB),apple)
+ADDITIONAL_CPPFLAGS += -DCOCOA_Foundation_LIBRARY=1
+endif
+endif
+
 saxxml_INCLUDE_DIRS += -I..
 saxxml_LIB_DIRS     += -L./$(GNUSTEP_OBJ_DIR)
 saxxml_TOOL_LIBS    += -lSaxObjC
index 20f8eca65a1b14213012081bbbbc0a7d6a3fd64c..e85f1d8b3d36035b43bcbea839b47f561053f551 100644 (file)
@@ -84,8 +84,8 @@ static id      factory       = nil;
   id tmp;
   
   tmp = NSSearchPathForDirectoriesInDomains(NSAllLibrariesDirectory,
-                                              NSAllDomainsMask,
-                                              YES);
+                                           NSAllDomainsMask,
+                                           YES);
   if ([tmp count] > 0) {
     NSEnumerator *e;
     NSString *subdir;
@@ -267,7 +267,7 @@ static id      factory       = nil;
   NSString      *p;
   
   e = [[fm directoryContentsAtPath:_libraryPath] objectEnumerator];
-  while ((p = [e nextObject])) {
+  while ((p = [e nextObject]) != nil) {
     NSDictionary *info;
     NSString     *infoPath;
     BOOL         isDir;
@@ -281,20 +281,21 @@ static id      factory       = nil;
       NSLog(@"%s: .sax is not a dir: '%@' ???", __PRETTY_FUNCTION__, p);
       continue;
     }
-    
-#if COCOA_Foundation_LIBRARY
-    {
+
+    infoPath = [p stringByAppendingPathComponent:@"bundle-info.plist"];
+    if (![fm fileExistsAtPath:infoPath]) {
       NSBundle *b;
       
       b = [NSBundle bundleWithPath:p];
       infoPath = [b pathForResource:@"bundle-info" ofType:@"plist"];
+      if (![fm fileExistsAtPath:infoPath]) {
+       NSLog(@"%s: did not find bundle-info dictionary in driver: '%@'",
+             __PRETTY_FUNCTION__, infoPath);
+       continue;
+      }
     }
-#else
-    infoPath = [p stringByAppendingPathComponent:@"bundle-info.plist"];
-#endif
     
-    info = [NSDictionary dictionaryWithContentsOfFile:infoPath];
-    if (info == nil) {
+    if ((info = [NSDictionary dictionaryWithContentsOfFile:infoPath]) == nil) {
       NSLog(@"%s: could not parse bundle-info dictionary: '%@'",
             __PRETTY_FUNCTION__, infoPath);
       continue;
@@ -316,7 +317,7 @@ static id      factory       = nil;
   NSAssert(self->nameToBundle   == nil, @"already set up !");
   NSAssert(self->mimeTypeToName == nil, @"partially set up !");
 #else
-  if (self->nameToBundle) return;
+  if (self->nameToBundle != nil) return;
 #endif
   
   pool = [[NSAutoreleasePool alloc] init];
@@ -338,7 +339,8 @@ static id      factory       = nil;
 
 #if DEBUG
     if ([self->nameToBundle count] == 0) {
-      NSLog(@"%s: no XML parser could be found ...", __PRETTY_FUNCTION__);
+      NSLog(@"%s: no XML parser could be found in pathes: %@", 
+           __PRETTY_FUNCTION__, [self saxReaderSearchPathes]);
     }
     else if ([self->mimeTypeToName count] == 0) {
       NSLog(@"%s: no XML parser declared a MIME type ...",__PRETTY_FUNCTION__);
index b8f0fed54a42bb84fdba691a114d6b0872b2f977..063faafb4c27540a9ba0e6b8df743c7cf2c48e11 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=51
+SUBMINOR_VERSION:=52
index 50b4d76932b808a22a1dfd6a9b289e78f2ff09f9..05ee7eed1e0f46ef19504bca459f82c1e9be7c75 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-16  Helge Hess  <helge.hess@opengroupware.org>
+
+       * install into SaxObjC framework Resources when being used with OSX
+         (v4.5.21)
+
 2005-07-20  Helge Hess  <helge.hess@skyrix.com>
 
        * TableCallbacks.m: fixed a compilation issues with either gcc 4.0.1
index b7bd25ba29c5d060896cda99ddda68919674de39..930ecd3c4c7cb819d31d7c963dac22b95b2faf4b 100644 (file)
@@ -1,5 +1,8 @@
 # postprocessing
 
+
+# add bundle-info.plist file
+
 ifneq ($(GNUSTEP_BUILD_DIR),)
 after-all ::
        @(cp bundle-info.plist \
index 4b5d5e5615e12ea5e04a93753ba4a5215b2608cd..36c777071e9c4cdb438f5d58ad607c40d65623f1 100644 (file)
@@ -1,20 +1,45 @@
 # compilation settings
 
+ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
+BUNDLE_INSTALL_DIR := /Library/Frameworks/SaxObjC.framework/Resources/SaxDrivers/
+endif
+endif
+
+
 ADDITIONAL_CPPFLAGS += -funsigned-char
 
 ADDITIONAL_INCLUDE_DIRS += -I../.. -I..
 ADDITIONAL_INCLUDE_DIRS += $(shell xml2-config --cflags)
 
-ifneq ($(GNUSTEP_BUILD_DIR),)
+
+libxml_LIBS := $(shell xml2-config --libs)
+
+
+ifneq ($(frameworks),yes)
+libxmlSAXDriver_BUNDLE_LIBS += -lSaxObjC $(libxml_LIBS)
+else
+libxmlSAXDriver_BUNDLE_LIBS += -framework SaxObjC $(libxml_LIBS)
+endif
+
+
+# library/framework search pathes
+
+DEP_DIRS = ../SaxObjC
+
+ifneq ($(frameworks),yes)
 ADDITIONAL_LIB_DIRS += \
-       -L$(GNUSTEP_BUILD_DIR)/../SaxObjC/$(GNUSTEP_OBJ_DIR_NAME)
+       $(foreach dir,$(DEP_DIRS),\
+         -L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
 else
-ADDITIONAL_LIB_DIRS += -L../SaxObjC/$(GNUSTEP_OBJ_DIR)
+ADDITIONAL_LIB_DIRS += \
+       $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
 endif
 
-libxml_LIBS := $(shell xml2-config --libs)
+SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
 
-libxmlSAXDriver_BUNDLE_LIBS += -lSaxObjC $(libxml_LIBS)
+
+# platform specific options
 
 ifeq ($(GNUSTEP_TARGET_OS),cygwin32)
 libxmlSAXDriver_BUNDLE_LIBS += \
index bf6a3729a3c8da3cc3357087e55f72ec7d23c531..8f54e04e9a08c380a1ee4b1f5fb54b20b1352f37 100644 (file)
@@ -1,3 +1,3 @@
 # version
 
-SUBMINOR_VERSION:=20
+SUBMINOR_VERSION:=21
index 5afdc3ff458213d31268217a77c3ec0417b50d05..1c93ba1db5864f0b441f29e41d2a398abc0bdccc 100644 (file)
@@ -1,5 +1,15 @@
 # compilation settings
 
+ifeq ($(FOUNDATION_LIB),apple)
+ifeq ($(frameworks),yes)
+BUNDLE_INSTALL_DIR := /Library/Frameworks/SaxObjC.framework/Resources/SaxDrivers/
+endif
+endif
+
+pyxSAXDriver_RESOURCE_FILES = bundle-info.plist
+pyxSAXDriver_LOCALIZED_RESOURCE_FILES =
+
+
 pyxSAXDriver_BUNDLE_LIBS += -lSaxObjC
 
 ifeq ($(GNUSTEP_TARGET_OS),cygwin32)
@@ -7,8 +17,6 @@ pyxSAXDriver_BUNDLE_LIBS += \
        -lFoundation -lobjc
 endif
 
-pyxSAXDriver_RESOURCE_FILES = bundle-info.plist
-pyxSAXDriver_LOCALIZED_RESOURCE_FILES =
 
 ADDITIONAL_INCLUDE_DIRS += -I.. -I../..
 ADDITIONAL_LIB_DIRS     += -L../SaxObjC/$(GNUSTEP_OBJ_DIR)