From: helge Date: Tue, 16 Aug 2005 18:41:30 +0000 (+0000) Subject: improved OSX framework support X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a70f575ca7fd4730f24a2537c104959e2672a865;p=sope improved OSX framework support git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1036 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-xml/ChangeLogSaxDriver/ChangeLog b/sope-xml/ChangeLogSaxDriver/ChangeLog index f1e08afc..157bf3ef 100644 --- a/sope-xml/ChangeLogSaxDriver/ChangeLog +++ b/sope-xml/ChangeLogSaxDriver/ChangeLog @@ -1,3 +1,11 @@ +2005-08-16 Helge Hess + + * 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 * ChangeLogSaxDriver.xcode: minor fixes diff --git a/sope-xml/ChangeLogSaxDriver/ChangeLogSaxDriver.m b/sope-xml/ChangeLogSaxDriver/ChangeLogSaxDriver.m index ca40d278..f919e803 100644 --- a/sope-xml/ChangeLogSaxDriver/ChangeLogSaxDriver.m +++ b/sope-xml/ChangeLogSaxDriver/ChangeLogSaxDriver.m @@ -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; diff --git a/sope-xml/ChangeLogSaxDriver/GNUmakefile.preamble b/sope-xml/ChangeLogSaxDriver/GNUmakefile.preamble index 85034d54..40030fe8 100644 --- a/sope-xml/ChangeLogSaxDriver/GNUmakefile.preamble +++ b/sope-xml/ChangeLogSaxDriver/GNUmakefile.preamble @@ -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 diff --git a/sope-xml/ChangeLogSaxDriver/Version b/sope-xml/ChangeLogSaxDriver/Version index b97a76b1..4010e5dd 100644 --- a/sope-xml/ChangeLogSaxDriver/Version +++ b/sope-xml/ChangeLogSaxDriver/Version @@ -1,3 +1,3 @@ # Version file -SUBMINOR_VERSION:=0 +SUBMINOR_VERSION:=1 diff --git a/sope-xml/STXSaxDriver/ChangeLog b/sope-xml/STXSaxDriver/ChangeLog index cca02cd9..9098db4b 100644 --- a/sope-xml/STXSaxDriver/ChangeLog +++ b/sope-xml/STXSaxDriver/ChangeLog @@ -1,3 +1,12 @@ +2005-08-16 Helge Hess + + * 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 * Model/StructuredTextBodyElement.m: fixed a gcc 4.0 warning (v1.0.11) diff --git a/sope-xml/STXSaxDriver/GNUmakefile.preamble b/sope-xml/STXSaxDriver/GNUmakefile.preamble index 152af3af..c32aa313 100644 --- a/sope-xml/STXSaxDriver/GNUmakefile.preamble +++ b/sope-xml/STXSaxDriver/GNUmakefile.preamble @@ -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 diff --git a/sope-xml/STXSaxDriver/Version b/sope-xml/STXSaxDriver/Version index cf8d2d7a..42dcfc3c 100644 --- a/sope-xml/STXSaxDriver/Version +++ b/sope-xml/STXSaxDriver/Version @@ -1,5 +1,5 @@ # Version file -MAJOR_VERSION=1 -MINOR_VERSION=0 -SUBMINOR_VERSION:=11 +MAJOR_VERSION=4 +MINOR_VERSION=5 +SUBMINOR_VERSION:=12 diff --git a/sope-xml/SaxObjC/ChangeLog b/sope-xml/SaxObjC/ChangeLog index e69a4300..2ae3f6c7 100644 --- a/sope-xml/SaxObjC/ChangeLog +++ b/sope-xml/SaxObjC/ChangeLog @@ -1,3 +1,14 @@ +2005-08-16 Helge Hess + + * 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 * XMLNamespaces.h: added namespace declaration for XML vCards (v4.5.51) diff --git a/sope-xml/SaxObjC/GNUmakefile.preamble b/sope-xml/SaxObjC/GNUmakefile.preamble index c118ea31..eebe434b 100644 --- a/sope-xml/SaxObjC/GNUmakefile.preamble +++ b/sope-xml/SaxObjC/GNUmakefile.preamble @@ -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 diff --git a/sope-xml/SaxObjC/SaxXMLReaderFactory.m b/sope-xml/SaxObjC/SaxXMLReaderFactory.m index 20f8eca6..e85f1d8b 100644 --- a/sope-xml/SaxObjC/SaxXMLReaderFactory.m +++ b/sope-xml/SaxObjC/SaxXMLReaderFactory.m @@ -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__); diff --git a/sope-xml/SaxObjC/Version b/sope-xml/SaxObjC/Version index b8f0fed5..063faafb 100644 --- a/sope-xml/SaxObjC/Version +++ b/sope-xml/SaxObjC/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=51 +SUBMINOR_VERSION:=52 diff --git a/sope-xml/libxmlSAXDriver/ChangeLog b/sope-xml/libxmlSAXDriver/ChangeLog index 50b4d769..05ee7eed 100644 --- a/sope-xml/libxmlSAXDriver/ChangeLog +++ b/sope-xml/libxmlSAXDriver/ChangeLog @@ -1,3 +1,8 @@ +2005-08-16 Helge Hess + + * install into SaxObjC framework Resources when being used with OSX + (v4.5.21) + 2005-07-20 Helge Hess * TableCallbacks.m: fixed a compilation issues with either gcc 4.0.1 diff --git a/sope-xml/libxmlSAXDriver/GNUmakefile.postamble b/sope-xml/libxmlSAXDriver/GNUmakefile.postamble index b7bd25ba..930ecd3c 100644 --- a/sope-xml/libxmlSAXDriver/GNUmakefile.postamble +++ b/sope-xml/libxmlSAXDriver/GNUmakefile.postamble @@ -1,5 +1,8 @@ # postprocessing + +# add bundle-info.plist file + ifneq ($(GNUSTEP_BUILD_DIR),) after-all :: @(cp bundle-info.plist \ diff --git a/sope-xml/libxmlSAXDriver/GNUmakefile.preamble b/sope-xml/libxmlSAXDriver/GNUmakefile.preamble index 4b5d5e56..36c77707 100644 --- a/sope-xml/libxmlSAXDriver/GNUmakefile.preamble +++ b/sope-xml/libxmlSAXDriver/GNUmakefile.preamble @@ -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 += \ diff --git a/sope-xml/libxmlSAXDriver/Version b/sope-xml/libxmlSAXDriver/Version index bf6a3729..8f54e04e 100644 --- a/sope-xml/libxmlSAXDriver/Version +++ b/sope-xml/libxmlSAXDriver/Version @@ -1,3 +1,3 @@ # version -SUBMINOR_VERSION:=20 +SUBMINOR_VERSION:=21 diff --git a/sope-xml/pyxSAXDriver/GNUmakefile.preamble b/sope-xml/pyxSAXDriver/GNUmakefile.preamble index 5afdc3ff..1c93ba1d 100644 --- a/sope-xml/pyxSAXDriver/GNUmakefile.preamble +++ b/sope-xml/pyxSAXDriver/GNUmakefile.preamble @@ -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)