From: helge Date: Wed, 5 Jul 2006 00:26:58 +0000 (+0000) Subject: fixed resource/module lookup on 64bit systems X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6133390a9e31487ab13c80bcf73c3295d8a238b4;p=sope fixed resource/module lookup on 64bit systems git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1311 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index c8be22a4..4e9fb0b2 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,14 @@ +2006-07-05 Helge Hess + + * v4.5.240 + + * SoObjects/SoProductRegistry.m, SoObjects/SoProductLoader.m: + changed to find SoProducts on 64bit systems in lib64, added + FHS_INSTALL_ROOT to lookup path + + * Templates/WOApplication+Builders.m: changed to find WOxBuilders on + 64bit systems in lib64, added FHS_INSTALL_ROOT to lookup path + 2006-07-03 Helge Hess * use %p for pointer formats, fixed gcc 4.1 warnings, use diff --git a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble index 62ccfccc..00287799 100644 --- a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble +++ b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile.preamble @@ -3,3 +3,13 @@ ADDITIONAL_INCLUDE_DIRS += -I../WebDAV/ ADDITIONAL_CPPFLAGS += -DCOMPILING_NGOBJWEB=1 -DCOMPILE_FOR_GNUSTEP=1 + +# Parameters for SoProduct lookup + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductLoader.m b/sope-appserver/NGObjWeb/SoObjects/SoProductLoader.m index 4a42239e..c69f3994 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductLoader.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductLoader.m @@ -103,8 +103,22 @@ NSString *s; s = self->fhsDirectoryName; + +#if CONFIGURE_64BIT +#ifdef FHS_INSTALL_ROOT + [ma addObject:[[FHS_INSTALL_ROOT stringByAppendingString:@"/lib64/"] + stringByAppendingString:s]]; +#endif + [ma addObject:[@"/usr/local/lib64/" stringByAppendingString:s]]; + [ma addObject:[@"/usr/lib64/" stringByAppendingString:s]]; +#else +#ifdef FHS_INSTALL_ROOT + [ma addObject:[[FHS_INSTALL_ROOT stringByAppendingString:@"/lib/"] + stringByAppendingString:s]]; +#endif [ma addObject:[@"/usr/local/lib/" stringByAppendingString:s]]; [ma addObject:[@"/usr/lib/" stringByAppendingString:s]]; +#endif } - (NSArray *)productSearchPathes { diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m index e8eb1408..e1ca1504 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2002-2005 SKYRIX Software AG + Copyright (C) 2002-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -280,9 +281,17 @@ static int debugOn = 0; #endif /* look into FHS pathes */ - relPath = [NSString stringWithFormat:@"lib/sope-%i.%i/products/", + relPath = [NSString stringWithFormat: +#if CONFIGURE_64BIT + @"lib64/sope-%i.%i/products/", +#else + @"lib/sope-%i.%i/products/", +#endif SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; pathes = [NSArray arrayWithObjects: +#ifdef FHS_INSTALL_ROOT + [FHS_INSTALL_ROOT stringByAppendingString:relPath], +#endif [@"/usr/local/" stringByAppendingString:relPath], [@"/usr/" stringByAppendingString:relPath], nil]; diff --git a/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble b/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble new file mode 100644 index 00000000..63d08f54 --- /dev/null +++ b/sope-appserver/NGObjWeb/Templates/GNUmakefile.preamble @@ -0,0 +1,11 @@ +# compilation settings + +# Parameters for WOxBuilder lookups + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif diff --git a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m index e3883c91..8f9c8d78 100644 --- a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m +++ b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -123,9 +124,17 @@ /* look into FHS pathes */ - relPath = [NSString stringWithFormat:@"lib/sope-%i.%i/wox-builders/", + relPath = [NSString stringWithFormat: +#if CONFIGURE_64BIT + @"lib/sope-%i.%i/wox-builders/", +#else + @"lib64/sope-%i.%i/wox-builders/", +#endif SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; pathes = [NSArray arrayWithObjects: +#ifdef FHS_INSTALL_ROOT + [FHS_INSTALL_ROOT stringByAppendingString:relPath], +#endif [@"/usr/local/" stringByAppendingString:relPath], [@"/usr/" stringByAppendingString:relPath], nil]; diff --git a/sope-appserver/WEExtensions/ChangeLog b/sope-appserver/WEExtensions/ChangeLog index 1dafbeda..fd094e28 100644 --- a/sope-appserver/WEExtensions/ChangeLog +++ b/sope-appserver/WEExtensions/ChangeLog @@ -1,3 +1,7 @@ +2006-07-05 Helge Hess + + * WEResourceManager.m: added FHS_INSTALL_ROOT to lookup path (v4.5.87) + 2006-07-03 Helge Hess * use %p for pointer formats, fixed gcc 4.1 warnings, use -isNotEmpty diff --git a/sope-appserver/WEExtensions/GNUmakefile.preamble b/sope-appserver/WEExtensions/GNUmakefile.preamble index 719a66f4..6f1b0bdd 100644 --- a/sope-appserver/WEExtensions/GNUmakefile.preamble +++ b/sope-appserver/WEExtensions/GNUmakefile.preamble @@ -25,6 +25,17 @@ libWEExtensions_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) libWEExtensions_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION) +# Parameters for resource lookup + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif + + # dependencies libWEExtensions_LIBRARIES_DEPEND_UPON += \ diff --git a/sope-appserver/WEExtensions/Version b/sope-appserver/WEExtensions/Version index 11afdd37..7a6e3ea8 100644 --- a/sope-appserver/WEExtensions/Version +++ b/sope-appserver/WEExtensions/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=86 +SUBMINOR_VERSION:=87 # v4.5.76 requires libNGObjWeb v4.5.176 # v4.5.75 requires libNGObjWeb v4.5.174 diff --git a/sope-appserver/WEExtensions/WEResourceManager.m b/sope-appserver/WEExtensions/WEResourceManager.m index 32b61330..6bee9d14 100644 --- a/sope-appserver/WEExtensions/WEResourceManager.m +++ b/sope-appserver/WEExtensions/WEResourceManager.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2005 SKYRIX Software AG + Copyright (C) 2005-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -78,7 +79,11 @@ static NSString *themesDirName = @"Themes"; return [tmp componentsSeparatedByString:@":"]; } + (NSArray *)rootPathesInFHS { - return [NSArray arrayWithObjects:@"/usr/local/", @"/usr/", nil]; + return [NSArray arrayWithObjects: +#ifdef FHS_INSTALL_ROOT + FHS_INSTALL_ROOT, +#endif + @"/usr/local/", @"/usr/", nil]; } + (NSArray *)findResourceDirectoryPathesWithName:(NSString *)_name diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 1b0d826d..6e4a29e4 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,7 @@ +2006-07-05 Helge Hess + + * NGResourceLocator.m: added FHS_INSTALL_ROOT to lookup path (v4.5.187) + 2006-07-04 Helge Hess * NGBundleManager.m: added more debug logs which can be triggered using diff --git a/sope-core/NGExtensions/GNUmakefile.preamble b/sope-core/NGExtensions/GNUmakefile.preamble index 7bb62f87..998376cd 100644 --- a/sope-core/NGExtensions/GNUmakefile.preamble +++ b/sope-core/NGExtensions/GNUmakefile.preamble @@ -8,6 +8,17 @@ ADDITIONAL_CPP_FLAGS += -Wall -Wno-import -Wno-protocol -O2 libNGExtensions_INCLUDE_DIRS += -I.. +# Parameters for resource lookup + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif + + # dependencies libNGExtensions_LIBRARIES_DEPEND_UPON += \ diff --git a/sope-core/NGExtensions/NGResourceLocator.m b/sope-core/NGExtensions/NGResourceLocator.m index 3d01d3ad..ecfe976b 100644 --- a/sope-core/NGExtensions/NGResourceLocator.m +++ b/sope-core/NGExtensions/NGResourceLocator.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -76,8 +77,13 @@ - (NSArray *)fhsRootPathes { // TODO: we probably want to make this configurable?! At least with an envvar static NSArray *pathes = nil; - if (pathes == nil) - pathes = [[NSArray alloc] initWithObjects:@"/usr/local/", @"/usr/", nil]; + if (pathes == nil) { + pathes = [[NSArray alloc] initWithObjects: +#ifdef FHS_INSTALL_ROOT + FHS_INSTALL_ROOT, +#endif + @"/usr/local/", @"/usr/", nil]; + } return pathes; } diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 5619dc7c..9a321f81 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=186 +SUBMINOR_VERSION:=187 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 diff --git a/sope-gdl1/GDLAccess/ChangeLog b/sope-gdl1/GDLAccess/ChangeLog index 753d8d19..c123ec02 100644 --- a/sope-gdl1/GDLAccess/ChangeLog +++ b/sope-gdl1/GDLAccess/ChangeLog @@ -1,3 +1,8 @@ +2006-07-05 Helge Hess + + * EOAdaptor.m: changed to find SAX drivers on 64bit systems + in lib64, added FHS_INSTALL_ROOT to lookup path (v4.5.57) + 2006-07-04 Helge Hess * use %p for pointer formats, fixed gcc 4.1 warnings (v4.5.56) diff --git a/sope-gdl1/GDLAccess/EOAdaptor.m b/sope-gdl1/GDLAccess/EOAdaptor.m index ade6d985..20fa95a9 100644 --- a/sope-gdl1/GDLAccess/EOAdaptor.m +++ b/sope-gdl1/GDLAccess/EOAdaptor.m @@ -80,8 +80,18 @@ } } - tmp = [NSString stringWithFormat:@"/lib/sope-%i.%i/dbadaptors", + tmp = [NSString stringWithFormat: +#if CONFIGURE_64BIT + @"/lib64/sope-%i.%i/dbadaptors", +#else + @"/lib/sope-%i.%i/dbadaptors", +#endif SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; + +#ifdef FHS_INSTALL_ROOT + [ma addObject:[FHS_INSTALL_ROOT stringByAppendingPathComponent:tmp]]; +#endif + [ma addObject:[@"/usr/local" stringByAppendingString:tmp]]; [ma addObject:[@"/usr" stringByAppendingString:tmp]]; diff --git a/sope-gdl1/GDLAccess/GNUmakefile.preamble b/sope-gdl1/GDLAccess/GNUmakefile.preamble index 3c00014a..1aa9562f 100644 --- a/sope-gdl1/GDLAccess/GNUmakefile.preamble +++ b/sope-gdl1/GDLAccess/GNUmakefile.preamble @@ -21,6 +21,17 @@ ADDITIONAL_INCLUDE_DIRS += \ -I$(SOPE_ROOT)/sope-core/NGExtensions/ +# Parameters for EOAdaptor lookup + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif + + # dependencies libGDLAccess_LIBRARIES_DEPEND_UPON += -lEOControl diff --git a/sope-gdl1/GDLAccess/Version b/sope-gdl1/GDLAccess/Version index 0d71e766..4096e97f 100644 --- a/sope-gdl1/GDLAccess/Version +++ b/sope-gdl1/GDLAccess/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=56 +SUBMINOR_VERSION:=57 diff --git a/sope-xml/SaxObjC/ChangeLog b/sope-xml/SaxObjC/ChangeLog index 4d7afd7c..862429f9 100644 --- a/sope-xml/SaxObjC/ChangeLog +++ b/sope-xml/SaxObjC/ChangeLog @@ -1,5 +1,7 @@ 2006-07-05 Helge Hess + * SaxObjectModel.m: added FHS_INSTALL_ROOT to lookup path (v4.5.60) + * SaxXMLReaderFactory.m: changed to find SAX drivers on 64bit systems in lib64, added FHS_INSTALL_ROOT to lookup path (v4.5.59) diff --git a/sope-xml/SaxObjC/GNUmakefile.preamble b/sope-xml/SaxObjC/GNUmakefile.preamble index 4988e373..b470b7e7 100644 --- a/sope-xml/SaxObjC/GNUmakefile.preamble +++ b/sope-xml/SaxObjC/GNUmakefile.preamble @@ -40,8 +40,7 @@ xmln_TOOL_LIBS += -lSaxObjC # Parameters for SaxDriver lookup ifneq ($(FHS_INSTALL_ROOT),) -ADDITIONAL_CPPFLAGS += \ - -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +ADDITIONAL_CPPFLAGS += -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" endif ifeq ($(CONFIGURE_64BIT),yes) diff --git a/sope-xml/SaxObjC/SaxObjectModel.m b/sope-xml/SaxObjC/SaxObjectModel.m index e5c05978..2f1dc3be 100644 --- a/sope-xml/SaxObjC/SaxObjectModel.m +++ b/sope-xml/SaxObjC/SaxObjectModel.m @@ -108,6 +108,9 @@ static Class NSCFArrayClass = Nil; p = [NSString stringWithFormat:@"share/sope-%i.%i/saxmappings/", SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; +#ifdef FHS_INSTALL_ROOT + [ma addObject:[FHS_INSTALL_ROOT stringByAppendingPathComponent:p]]; +#endif [ma addObject:[@"/usr/local/" stringByAppendingString:p]]; [ma addObject:[@"/usr/" stringByAppendingString:p]]; } diff --git a/sope-xml/SaxObjC/Version b/sope-xml/SaxObjC/Version index de3d3ecd..7fbe8ee1 100644 --- a/sope-xml/SaxObjC/Version +++ b/sope-xml/SaxObjC/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=59 +SUBMINOR_VERSION:=60