Bye Bye NO_SYSTRACE for the x11/gnustep MODULE based ports.

patching gnustep-base to add usage of an environment variable
to allow set a pointer where the lockfiles of plmerge should go while building the port.

OK, ajacoutot@, jasper@, landry@
This commit is contained in:
sebastia 2010-10-15 10:37:51 +00:00
parent 47b2f05e84
commit 19d61fdb6e
3 changed files with 30 additions and 5 deletions

View File

@ -1,7 +1,8 @@
# $OpenBSD: Makefile,v 1.29 2010/08/01 12:52:41 sebastia Exp $
# $OpenBSD: Makefile,v 1.30 2010/10/15 10:37:51 sebastia Exp $
COMMENT= GNUstep base library
REVISION= 0
DISTNAME= gnustep-base-1.20.1
SHARED_LIBS= gnustep-base 3.1 # .1.20

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-Source_NSUserDefaults_m,v 1.1 2010/10/15 10:37:51 sebastia Exp $
Introduce the GS_DEFAULTS_LOCKDIR to allow the gnustep ports to
build with systrace. Otherwise plmerge would try to create a lock
file in the users home directory.
--- Source/NSUserDefaults.m.orig Sat Oct 9 10:04:53 2010
+++ Source/NSUserDefaults.m Sat Oct 9 10:09:24 2010
@@ -843,9 +843,14 @@ static BOOL setSharedDefaults = NO; /* Flag to pre
- (id) initWithUser: (NSString*)userName
{
NSString *path;
-
- path = [GSDefaultsRootForUser(userName)
- stringByAppendingPathComponent: defaultsFile];
+ if ([[[NSProcessInfo processInfo] environment] objectForKey:@"GS_DEFAULTS_LOCKDIR"])
+ {
+ path = [[[[NSProcessInfo processInfo] environment] objectForKey:@"GS_DEFAULTS_LOCKDIR"] stringByAppendingPathComponent: defaultsFile];
+ } else
+ {
+ path = [GSDefaultsRootForUser(userName)
+ stringByAppendingPathComponent: defaultsFile];
+ }
return [self initWithContentsOfFile: path];
}

View File

@ -1,11 +1,8 @@
# $OpenBSD: gnustep.port.mk,v 1.7 2008/11/14 10:34:15 ajacoutot Exp $
# $OpenBSD: gnustep.port.mk,v 1.8 2010/10/15 10:37:51 sebastia Exp $
# until tested on others
ONLY_FOR_ARCHS= i386 amd64
# plmerge needs to create a lock directory under the user's homedir
NO_SYSTRACE= Yes
SHARED_ONLY= Yes
CATEGORIES+= x11/gnustep
@ -21,6 +18,7 @@ MAKE_FLAGS+= CC="${CC}" CPP="${CC} -E" OPTFLAG="${CFLAGS}"
MAKE_ENV+= GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES`
MAKE_ENV+= INSTALL_AS_USER=${BINOWN}
MAKE_ENV+= INSTALL_AS_GROUP=${BINGRP}
MAKE_ENV+= GS_DEFAULTS_LOCKDIR=${WRKDIR}
MAKE_ENV+= messages=yes