aboutsummaryrefslogtreecommitdiff
path: root/lang/gnustep-base
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2010-12-05 14:42:27 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2010-12-05 14:42:27 +0000
commit7997686c646208cf5bdb3523199b3cd8834ff9d6 (patch)
tree7f1d960d21e40b74d07c8346fbcb3894c1194a61 /lang/gnustep-base
parentd24fe9f5da337c5ac857bd46f8d5deeb64950cdc (diff)
downloadports-7997686c646208cf5bdb3523199b3cd8834ff9d6.tar.gz
ports-7997686c646208cf5bdb3523199b3cd8834ff9d6.zip
Notes
Diffstat (limited to 'lang/gnustep-base')
-rw-r--r--lang/gnustep-base/Makefile9
-rw-r--r--lang/gnustep-base/files/config.objc.m.patch47
-rw-r--r--lang/gnustep-base/files/objc-common.g.patch11
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