diff options
author | dinoex <dinoex@FreeBSD.org> | 2010-12-05 22:42:27 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2010-12-05 22:42:27 +0800 |
commit | 7089ab06b00b9a31da78a9248ce5c218b89d8e25 (patch) | |
tree | ba5a229b21438697ed9f1edc4f2fc43cc0a5dd80 /lang | |
parent | 00f4eb2f5f426cdaf38aab776924e77b4824b7f8 (diff) | |
download | freebsd-ports-gnome-7089ab06b00b9a31da78a9248ce5c218b89d8e25.tar.gz freebsd-ports-gnome-7089ab06b00b9a31da78a9248ce5c218b89d8e25.tar.zst freebsd-ports-gnome-7089ab06b00b9a31da78a9248ce5c218b89d8e25.zip |
- add experimental option GNUSTEP_WITH_LIBOBJC2
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gnustep-base/Makefile | 9 | ||||
-rw-r--r-- | lang/gnustep-base/files/config.objc.m.patch | 47 | ||||
-rw-r--r-- | lang/gnustep-base/files/objc-common.g.patch | 11 |
3 files changed, 67 insertions, 0 deletions
diff --git a/lang/gnustep-base/Makefile b/lang/gnustep-base/Makefile index ed9077642e7f..b5f43e8fceef 100644 --- a/lang/gnustep-base/Makefile +++ b/lang/gnustep-base/Makefile @@ -45,6 +45,10 @@ USE_ICONV= yes MAKE_FLAGS= OPTFLAG="${CFLAGS}" MAKE_ENV+= GNUSTEP_INSTALLATION_DOMAIN=SYSTEM CFLAGS+= -I${LOCALBASE}/include/libxml2/libxml -DHAVE_DLADDR=1 +.if defined(GNUSTEP_WITH_LIBOBJC2) +CFLAGS+= -I${GNUSTEP_SYSTEM_ROOT}/Library/Headers -DOBJC2RUNTIME=1 +.endif + BREAKS_IF_PEDANTIC= yes PLIST_SUB+= LOCALBASE=${LOCALBASE} ETCDIR= ${LOCALBASE}/etc @@ -52,6 +56,11 @@ ETCDIR= ${LOCALBASE}/etc .if !defined(WITHOUT_GNUSTEP_FAKEMAIN) CONFIGURE_ARGS+= --enable-fake-main .endif +.if defined(WITH_GNUSTEP_DEVEL) +EXTRA_PATCHES+= ${FILESDIR}/objc-common.g.patch +.else +EXTRA_PATCHES+= ${FILESDIR}/config.objc.m.patch +.endif PLIST_SUB+= BASEVERSION=${PORTVERSION:C/[.][0-9]*$//1} EXTRA_PATCHES+= ${FILESDIR}/NSFileManager.m.patch diff --git a/lang/gnustep-base/files/config.objc.m.patch b/lang/gnustep-base/files/config.objc.m.patch new file mode 100644 index 000000000000..c64cf195efc1 --- /dev/null +++ b/lang/gnustep-base/files/config.objc.m.patch @@ -0,0 +1,47 @@ +--- config/config.objc.m.orig 2006-02-11 19:22:57.000000000 +0100 ++++ config/config.objc.m 2010-11-12 15:10:59.000000000 +0100 +@@ -6,13 +6,41 @@ + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + */ +-#ifndef NeXT_RUNTIME +-#include <objc/NXConstStr.h> ++ ++#include <objc/objc.h> ++#include <objc/objc-api.h> ++ ++#include <objc/Object.h> ++ ++#if !defined(NeXT_RUNTIME) && !defined(__GNUSTEP_RUNTIME__) + @implementation NXConstantString ++- (const char*) cString ++{ ++ return 0; ++} ++- (unsigned int) length ++{ ++ return 0; ++} + @end + #endif + +-#include <objc/Object.h> ++/* Provide dummy implementations for NSObject and NSConstantString ++ * for runtime implementations which won't link without them. ++ */ ++ ++@interface NSObject ++{ ++ id isa; ++} ++@end ++@implementation NSObject ++@end ++ ++@interface NSConstantString : NSObject ++@end ++@implementation NSConstantString ++@end + + @interface Test : Object + +(int) testResult; diff --git a/lang/gnustep-base/files/objc-common.g.patch b/lang/gnustep-base/files/objc-common.g.patch new file mode 100644 index 000000000000..33dff88e86e2 --- /dev/null +++ b/lang/gnustep-base/files/objc-common.g.patch @@ -0,0 +1,11 @@ +--- config/objc-common.g.orig 2010-02-15 10:35:20.000000000 +0100 ++++ config/objc-common.g 2010-11-12 15:19:46.000000000 +0100 +@@ -5,7 +5,7 @@ + + #include <objc/Object.h> + +-#ifndef NeXT_RUNTIME ++#if !defined(NeXT_RUNTIME) && !defined(__GNUSTEP_RUNTIME__) + #include <objc/NXConstStr.h> + @implementation NXConstantString + - (const char*) cString |