From 651dac07206201c8916db09ea5417eef46fedf1f Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 5 Jul 2006 00:02:23 +0000 Subject: [PATCH] fixed driver lookup for lib64 git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1310 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-xml/SaxObjC/ChangeLog | 5 +++++ sope-xml/SaxObjC/GNUmakefile.preamble | 10 ++++++++++ sope-xml/SaxObjC/SaxXMLReaderFactory.m | 21 ++++++++++++++++++--- sope-xml/SaxObjC/Version | 2 +- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/sope-xml/SaxObjC/ChangeLog b/sope-xml/SaxObjC/ChangeLog index 7a8a5d4c..4d7afd7c 100644 --- a/sope-xml/SaxObjC/ChangeLog +++ b/sope-xml/SaxObjC/ChangeLog @@ -1,3 +1,8 @@ +2006-07-05 Helge Hess + + * SaxXMLReaderFactory.m: changed to find SAX drivers on 64bit systems + in lib64, added FHS_INSTALL_ROOT to lookup path (v4.5.59) + 2006-07-03 Helge Hess * v4.5.58 diff --git a/sope-xml/SaxObjC/GNUmakefile.preamble b/sope-xml/SaxObjC/GNUmakefile.preamble index 38cb639d..4988e373 100644 --- a/sope-xml/SaxObjC/GNUmakefile.preamble +++ b/sope-xml/SaxObjC/GNUmakefile.preamble @@ -37,6 +37,16 @@ xmln_INCLUDE_DIRS += -I.. xmln_LIB_DIRS += -L./$(GNUSTEP_OBJ_DIR) xmln_TOOL_LIBS += -lSaxObjC +# Parameters for SaxDriver lookup + +ifneq ($(FHS_INSTALL_ROOT),) +ADDITIONAL_CPPFLAGS += \ + -DFHS_INSTALL_ROOT=\@\"$(FHS_INSTALL_ROOT)\" +endif + +ifeq ($(CONFIGURE_64BIT),yes) +ADDITIONAL_CPPFLAGS += -DCONFIGURE_64BIT=1 +endif # Apple diff --git a/sope-xml/SaxObjC/SaxXMLReaderFactory.m b/sope-xml/SaxObjC/SaxXMLReaderFactory.m index e85f1d8b..8ceb1e7c 100644 --- a/sope-xml/SaxObjC/SaxXMLReaderFactory.m +++ b/sope-xml/SaxObjC/SaxXMLReaderFactory.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. @@ -179,10 +180,24 @@ static id factory = nil; #endif /* FHS fallback */ - tmp = [NSString stringWithFormat:@"lib/sope-%i.%i/saxdrivers/", - SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; + + tmp = [[NSString alloc] initWithFormat: +#if CONFIGURE_64BIT + @"lib64/sope-%i.%i/saxdrivers/", +#else + @"lib/sope-%i.%i/saxdrivers/", +#endif + SOPE_MAJOR_VERSION, SOPE_MINOR_VERSION]; + +#ifdef FHS_INSTALL_ROOT + [ma addObject:[FHS_INSTALL_ROOT stringByAppendingPathComponent:tmp]]; +#endif + + // TODO: should we always add those? or maybe derive from PATH or + // LD_LIBRARY_PATH? [ma addObject:[@"/usr/local/" stringByAppendingString:tmp]]; [ma addObject:[@"/usr/" stringByAppendingString:tmp]]; + [tmp release]; tmp = nil; searchPathes = [ma copy]; if ([searchPathes count] == 0) diff --git a/sope-xml/SaxObjC/Version b/sope-xml/SaxObjC/Version index 31494853..de3d3ecd 100644 --- a/sope-xml/SaxObjC/Version +++ b/sope-xml/SaxObjC/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=58 +SUBMINOR_VERSION:=59 -- 2.39.5