From 4dd3e2194240a9f37b40d2c48f34d678d35f3848 Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 16 Aug 2005 22:56:03 +0000 Subject: [PATCH] added ability to build with gstep-make git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1040 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sopex/GNUmakefile | 15 +++++ sopex/SOPEX/ChangeLog | 21 +++++++ sopex/SOPEX/GNUmakefile | 78 ++++++++++++++++++++++++ sopex/SOPEX/GNUmakefile.preamble | 27 ++++++++ sopex/SOPEX/NSBundle+Ext.m | 3 +- sopex/SOPEX/SOPEXAppController.m | 2 +- sopex/SOPEX/SOPEXConsole.h | 1 + sopex/SOPEX/SOPEXConsoleEventFormatter.m | 2 +- sopex/SOPEX/SOPEXContentValidator.m | 21 ++++--- sopex/SOPEX/SOPEXRangeUtilities.m | 3 +- sopex/SOPEX/SOPEXSheetRunner.h | 2 +- sopex/SOPEX/SOPEXSheetRunner.m | 5 +- sopex/SOPEX/SOPEXStatisticsController.m | 3 +- sopex/SOPEX/SOPEXWebConnection.h | 3 +- sopex/SOPEX/Version | 3 +- 15 files changed, 166 insertions(+), 23 deletions(-) create mode 100644 sopex/GNUmakefile create mode 100644 sopex/SOPEX/GNUmakefile create mode 100644 sopex/SOPEX/GNUmakefile.preamble diff --git a/sopex/GNUmakefile b/sopex/GNUmakefile new file mode 100644 index 00000000..cf69f41d --- /dev/null +++ b/sopex/GNUmakefile @@ -0,0 +1,15 @@ +# GNUstep makefile + +ifeq ($(FOUNDATION_LIB),apple) +ifeq ($(frameworks),yes) + +-include ../config.make +include $(GNUSTEP_MAKEFILES)/common.make + +SUBPROJECTS += \ + SOPEX + +include $(GNUSTEP_MAKEFILES)/aggregate.make + +endif +endif diff --git a/sopex/SOPEX/ChangeLog b/sopex/SOPEX/ChangeLog index 5ca833c0..40679768 100644 --- a/sopex/SOPEX/ChangeLog +++ b/sopex/SOPEX/ChangeLog @@ -1,3 +1,24 @@ +2005-08-16 Helge Hess + + * v2.0.3 + + * added framework GNUmakefile + + * SOPEXWebConnection.h: added missing NSMutableDictionary prototype + + * SOPEXSheetRunner.m: include required AppKit.h + + * SOPEXSheetRunner.h: added missing NSWindow prototype + + * SOPEXContentValidator.m: added missing prototypes, include NSError.h + for NSLocalizedDescriptionKey + + * SOPEXConsoleEventFormatter.m: fixed a gcc 4.0 warning + + * SOPEXAppController.m: include NGObjWeb.h for missing symbols + + * SOPEXConsole.h: added NGLogEvent class forward declaration + 2005-01-04 Marcus Mueller * SOPEXAppController.m: changed default handling in -prepareForLaunch diff --git a/sopex/SOPEX/GNUmakefile b/sopex/SOPEX/GNUmakefile new file mode 100644 index 00000000..ff6843e4 --- /dev/null +++ b/sopex/SOPEX/GNUmakefile @@ -0,0 +1,78 @@ +# GNUstep makefile + +-include ../../config.make +include $(GNUSTEP_MAKEFILES)/common.make +include ./Version + +FRAMEWORK_NAME = SOPEX + +SOPEX_HEADER_FILES += \ + SOPEX.h \ + SOPEXAppController.h \ + SOPEXAuthPanel.h \ + SOPEXBrowserController.h \ + SOPEXBrowserWindow.h \ + SOPEXConsole.h \ + SOPEXConstants.h \ + SOPEXContentValidator.h \ + SOPEXDocument.h \ + SOPEXMain.h \ + SOPEXRangeUtilities.h \ + SOPEXSheetRunner.h \ + SOPEXStatisticsController.h \ + SOPEXTextView.h \ + SOPEXToolbarController.h \ + SOPEXWODocument.h \ + SOPEXWOXDocument.h \ + SOPEXWebConnection.h \ + SOPEXWebMetaParser.h \ + +SOPEX_OBJC_FILES += \ + SOPEXAppController.m \ + SOPEXAuthPanel.m \ + SOPEXBrowserController.m \ + SOPEXBrowserWindow.m \ + SOPEXConsole.m \ + SOPEXConsoleAppender.m \ + SOPEXConsoleEventFormatter.m \ + SOPEXConstants.m \ + SOPEXContentValidator.m \ + SOPEXDocument.m \ + SOPEXMain.m \ + SOPEXRangeUtilities.m \ + SOPEXSheetRunner.m \ + SOPEXStatisticsController.m \ + SOPEXTextView.m \ + SOPEXToolbarController.m \ + SOPEXWODocument.m \ + SOPEXWOXDocument.m \ + SOPEXWebConnection.m \ + SOPEXWebMetaParser.m \ + \ + WebView+Ext.m \ + NSBundle+Ext.m \ + NSString+Ext.m \ + +SOPEX_LANGUAGES += \ + English + +SOPEX_LOCALIZED_RESOURCE_FILES += \ + InfoPlist.strings \ + Localizable.strings \ + SOPEXBrowserController.nib \ + SOPEXConsole.nib \ + SOPEXConsole.toolbar \ + SOPEXStatisticsNatLang.plist \ + SOPEXStats.nib \ + SOPEXWebUI.toolbar + +SOPEX_RESOURCE_FILES += \ + Clean.tiff \ + Info.plist \ + Lori.icns \ + Reload.tiff \ + version.plist + +-include GNUmakefile.preamble +include $(GNUSTEP_MAKEFILES)/framework.make +-include GNUmakefile.postamble diff --git a/sopex/SOPEX/GNUmakefile.preamble b/sopex/SOPEX/GNUmakefile.preamble new file mode 100644 index 00000000..874f80fe --- /dev/null +++ b/sopex/SOPEX/GNUmakefile.preamble @@ -0,0 +1,27 @@ +# compilation settings + +SOPE_ROOT=../.. + +SOPEX_LIBRARIES_DEPEND_UPON += \ + -framework WebKit \ + -framework AppKit \ + -framework NGObjWeb \ + -framework NGMime \ + -framework NGStreams -framework NGExtensions -framework EOControl \ + -framework XmlRpc -framework DOM -framework SaxObjC + + +# library/framework search pathes + +DEP_DIRS = \ + $(SOPE_ROOT)/sope-appserver/NGObjWeb \ + $(SOPE_ROOT)/sope-mime \ + $(SOPE_ROOT)/sope-core/NGStreams \ + $(SOPE_ROOT)/sope-core/NGExtensions \ + $(SOPE_ROOT)/sope-core/EOControl \ + $(SOPE_ROOT)/sope-xml/DOM \ + $(SOPE_ROOT)/sope-xml/XmlRpc \ + $(SOPE_ROOT)/sope-xml/SaxObjC + +ADDITIONAL_LIB_DIRS += \ + $(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir)) diff --git a/sopex/SOPEX/NSBundle+Ext.m b/sopex/SOPEX/NSBundle+Ext.m index 7bdb6bc3..aa414510 100644 --- a/sopex/SOPEX/NSBundle+Ext.m +++ b/sopex/SOPEX/NSBundle+Ext.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Marcus Mueller + Copyright (C) 2004-2005 Marcus Mueller This file is part of OGo @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: NSBundle+Ext.m,v 1.1 2004/05/02 16:27:46 znek Exp $ // Created by znek on Sun May 02 2004. diff --git a/sopex/SOPEX/SOPEXAppController.m b/sopex/SOPEX/SOPEXAppController.m index 7e4f24a5..9e4c4f9f 100644 --- a/sopex/SOPEX/SOPEXAppController.m +++ b/sopex/SOPEX/SOPEXAppController.m @@ -27,7 +27,7 @@ #import "SOPEXConstants.h" #import "SOPEXWebConnection.h" #import "SOPEXBrowserController.h" - +#import #define DNC [NSNotificationCenter defaultCenter] #define UD [NSUserDefaults standardUserDefaults] diff --git a/sopex/SOPEX/SOPEXConsole.h b/sopex/SOPEX/SOPEXConsole.h index 8cc188bb..371162ce 100644 --- a/sopex/SOPEX/SOPEXConsole.h +++ b/sopex/SOPEX/SOPEXConsole.h @@ -24,6 +24,7 @@ #import +@class NGLogEvent; @class SOPEXToolbarController; @interface SOPEXConsole : NSObject diff --git a/sopex/SOPEX/SOPEXConsoleEventFormatter.m b/sopex/SOPEX/SOPEXConsoleEventFormatter.m index 123c714c..2e4f5ca5 100644 --- a/sopex/SOPEX/SOPEXConsoleEventFormatter.m +++ b/sopex/SOPEX/SOPEXConsoleEventFormatter.m @@ -32,7 +32,7 @@ @implementation SOPEXConsoleEventFormatter -static __inline__ unsigned char * levelPrefixForEvent(NGLogEvent *_event) { +static __inline__ char * levelPrefixForEvent(NGLogEvent *_event) { switch ([_event level]) { case NGLogLevelWarn: return "[WARN ] "; case NGLogLevelError: return "[ERROR] "; diff --git a/sopex/SOPEX/SOPEXContentValidator.m b/sopex/SOPEX/SOPEXContentValidator.m index 21f9166e..a5c0a1cc 100644 --- a/sopex/SOPEX/SOPEXContentValidator.m +++ b/sopex/SOPEX/SOPEXContentValidator.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Marcus Mueller + Copyright (C) 2004-2005 Marcus Mueller This file is part of OGo @@ -24,6 +24,7 @@ #import "SOPEXContentValidator.h" #import +#import NSString *SOPEXDocumentValidationErrorDomain = @"SOPEXDocumentValidationErrorDomain"; @@ -37,6 +38,11 @@ NSString *SOPEXDocumentValidationErrorDomain = @"SOPEXDocumentValidationErrorDom @end +@interface NSObject(UsedNGObjWebPrivates) +- (id)initWithHandler:(id)_handler; +@end + + @implementation SOPEXContentValidator @@ -131,15 +137,12 @@ NSString *SOPEXDocumentValidationErrorDomain = @"SOPEXDocumentValidationErrorDom else data = content; - NS_DURING - - parser = [[parserClass alloc] initWithHandler:self]; - [parser performSelector:selector withObject:data]; - + NS_DURING { + *(&parser) = [[parserClass alloc] initWithHandler:self]; + [parser performSelector:selector withObject:data]; + } NS_HANDLER - - [self->errors addObject:[localException reason]]; - + [self->errors addObject:[localException reason]]; NS_ENDHANDLER; [parser release]; diff --git a/sopex/SOPEX/SOPEXRangeUtilities.m b/sopex/SOPEX/SOPEXRangeUtilities.m index 3f82d8ce..5a1138dc 100644 --- a/sopex/SOPEX/SOPEXRangeUtilities.m +++ b/sopex/SOPEX/SOPEXRangeUtilities.m @@ -93,11 +93,12 @@ NSRange SOPEX_findOpenTagForRangeInString(NSRange range, NSString *string) unichar charToLeft; charToLeft = [string characterAtIndex:--left]; - if(!SOPEX_isValidTagNameCharacter(charToLeft)) + if (!SOPEX_isValidTagNameCharacter(charToLeft)) { if(charToLeft == '<') found = YES; else break; + } } if(!found) return NSMakeRange(NSNotFound, 0); diff --git a/sopex/SOPEX/SOPEXSheetRunner.h b/sopex/SOPEX/SOPEXSheetRunner.h index 14ba2a69..800a9832 100644 --- a/sopex/SOPEX/SOPEXSheetRunner.h +++ b/sopex/SOPEX/SOPEXSheetRunner.h @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: SOPEXSheetRunner.h,v 1.1 2004/04/01 19:04:36 znek Exp $ // Created by znek on Mon Mar 29 2004. #ifndef __SOPEX_SOPEXSheetRunner_H_ @@ -26,6 +25,7 @@ #import +@class NSWindow; @interface SOPEXSheetRunner : NSObject { diff --git a/sopex/SOPEX/SOPEXSheetRunner.m b/sopex/SOPEX/SOPEXSheetRunner.m index b62389d5..e6e68e6e 100644 --- a/sopex/SOPEX/SOPEXSheetRunner.m +++ b/sopex/SOPEX/SOPEXSheetRunner.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Marcus Mueller + Copyright (C) 2004-2005 Marcus Mueller This file is part of OGo @@ -18,12 +18,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: SOPEXSheetRunner.m,v 1.2 2004/05/02 16:27:46 znek Exp $ // Created by znek on Mon Mar 29 2004. #import "SOPEXSheetRunner.h" - +#import @interface SOPEXSheetRunner (PrivateAPI) + (id)defaultRunner; diff --git a/sopex/SOPEX/SOPEXStatisticsController.m b/sopex/SOPEX/SOPEXStatisticsController.m index 31c5c56a..685bd83c 100644 --- a/sopex/SOPEX/SOPEXStatisticsController.m +++ b/sopex/SOPEX/SOPEXStatisticsController.m @@ -296,11 +296,12 @@ - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { - if([item isKindOfClass:[NSString class]]) + if([item isKindOfClass:[NSString class]]) { if([[tableColumn identifier] isEqualToString:@"name"]) return item; else return nil; + } return [item objectForKey:[tableColumn identifier]]; } diff --git a/sopex/SOPEX/SOPEXWebConnection.h b/sopex/SOPEX/SOPEXWebConnection.h index 0a3b58af..9d4a84fb 100644 --- a/sopex/SOPEX/SOPEXWebConnection.h +++ b/sopex/SOPEX/SOPEXWebConnection.h @@ -1,11 +1,10 @@ -// $Id: SOPEXWebConnection.h,v 1.3 2004/05/02 16:27:46 znek Exp $ #ifndef __SOPEX_SOPEXWebConnection_H__ #define __SOPEX_SOPEXWebConnection_H__ #import -@class NSURL, NSString, NSData, NSBundle; +@class NSURL, NSString, NSData, NSBundle, NSMutableDictionary; @class NSURLResponse; @interface SOPEXWebConnection : NSObject diff --git a/sopex/SOPEX/Version b/sopex/SOPEX/Version index 2aa782b8..4ebde321 100644 --- a/sopex/SOPEX/Version +++ b/sopex/SOPEX/Version @@ -1,4 +1,3 @@ -# $Id: Version,v 1.10 2004/06/05 21:49:26 znek Exp $ # # This file is included by library makefiles to set the version information # of the executable. @@ -8,7 +7,7 @@ MAJOR_VERSION=2 MINOR_VERSION=0 -SUBMINOR_VERSION=2 +SUBMINOR_VERSION=3 # v2.0.0 requires NGObjWeb v4.5.95 # v1.0.7 requires NGObjWeb v4.2.341 -- 2.39.5