From 5ac27fa4777c0a33fd6e52b0e7fcb3b33da46b81 Mon Sep 17 00:00:00 2001 From: nicola Date: Sat, 17 Mar 2007 16:56:23 +0000 Subject: [PATCH] Install SSL.bundle into versioned library directory so that you can have multiple gnustep-base installed, each with its own SSL bundle git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24889 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ SSL/GNUmakefile | 5 +++++ Source/NSFileHandle.m | 7 +++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 334d3eacc..5415ecda3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-03-17 Nicola Pero + + * SSL/GNUmakefile: Install the SSL bundle in the versioned + gnustep-base resource directory. + * Source/NSFileHandle.m ([+sslClass]): Load the SSL bundle from + the versioned gnustep-base resource directory. + 2007-03-17 Nicola Pero * Source/Makefile.postamble (before-uninstall): Remove GSConfig.h. diff --git a/SSL/GNUmakefile b/SSL/GNUmakefile index b5ad8a4ae..9fd586799 100644 --- a/SSL/GNUmakefile +++ b/SSL/GNUmakefile @@ -52,6 +52,11 @@ ifeq ($(HAVE_OPENSSL), yes) # The bundles to be compiled BUNDLE_NAME=SSL +# Interface version changes with each minor release +include ../Version +libgnustep-base_INTERFACE_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) +SSL_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-base/Versions/$(libgnustep-base_INTERFACE_VERSION)/Resources/ + # Additional search directories for linking SSL_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR) diff --git a/Source/NSFileHandle.m b/Source/NSFileHandle.m index a685ab0a8..862581181 100644 --- a/Source/NSFileHandle.m +++ b/Source/NSFileHandle.m @@ -710,13 +710,12 @@ NSString * const NSFileHandleOperationException { if (NSFileHandle_ssl_class == 0) { + NSString *path; NSBundle *bundle; - NSString *path; - path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, - NSAllDomainsMask, NO) lastObject]; - path = [path stringByAppendingPathComponent: @"Bundles"]; + path = [[NSBundle bundleForClass: [NSObject class]] bundlePath]; path = [path stringByAppendingPathComponent: @"SSL.bundle"]; + bundle = [NSBundle bundleWithPath: path]; NSFileHandle_ssl_class = [bundle principalClass]; if (NSFileHandle_ssl_class == 0 && bundle != nil)