From 7997686c646208cf5bdb3523199b3cd8834ff9d6 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Sun, 5 Dec 2010 14:42:27 +0000 Subject: - add experimental option GNUSTEP_WITH_LIBOBJC2 --- lang/gnustep-base/Makefile | 9 ++++++ lang/gnustep-base/files/config.objc.m.patch | 47 +++++++++++++++++++++++++++++ lang/gnustep-base/files/objc-common.g.patch | 11 +++++++ 3 files changed, 67 insertions(+) create mode 100644 lang/gnustep-base/files/config.objc.m.patch create mode 100644 lang/gnustep-base/files/objc-common.g.patch (limited to 'lang/gnustep-base') 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 ++ ++#include ++#include ++ ++#include ++ ++#if !defined(NeXT_RUNTIME) && !defined(__GNUSTEP_RUNTIME__) + @implementation NXConstantString ++- (const char*) cString ++{ ++ return 0; ++} ++- (unsigned int) length ++{ ++ return 0; ++} + @end + #endif + +-#include ++/* 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 + +-#ifndef NeXT_RUNTIME ++#if !defined(NeXT_RUNTIME) && !defined(__GNUSTEP_RUNTIME__) + #include + @implementation NXConstantString + - (const char*) cString -- cgit v1.2.3