diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2010-10-13 16:41:24 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2010-10-13 16:41:24 +0000 |
commit | a3c396937177907ee0c1c6180ac27f5e3b1c447f (patch) | |
tree | 50dba99db5805d04191036f23ca90326e4c8f75e /lang/libobjc2 | |
parent | ef559f3868d92829d45721f385480e0d088cb6f5 (diff) |
Replacement for the GNU Objective-C runtime supporting the features
of Objective-C 2 for use with GNUstep and other Objective-C programs.
This runtime is based on the Etoile Objective-C Runtime, an earlier
research prototype, and includes support for non-fragile instance
variables, type-dependent dispatch, and object planes. It is fully
compatible with the FSF's GCC Objective-C ABI and also implements
a new ABI that is supported by Clang and is required for some of
the newer features.
Submitted by: Pete French
Reviewed by: dinoex
Notes
Notes:
svn path=/head/; revision=262966
Diffstat (limited to 'lang/libobjc2')
-rw-r--r-- | lang/libobjc2/Makefile | 35 | ||||
-rw-r--r-- | lang/libobjc2/distinfo | 3 | ||||
-rw-r--r-- | lang/libobjc2/files/patch-Makefile | 89 | ||||
-rw-r--r-- | lang/libobjc2/pkg-descr | 8 | ||||
-rw-r--r-- | lang/libobjc2/pkg-plist | 15 |
5 files changed, 150 insertions, 0 deletions
diff --git a/lang/libobjc2/Makefile b/lang/libobjc2/Makefile new file mode 100644 index 000000000000..783e0985faee --- /dev/null +++ b/lang/libobjc2/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: libobjc2 +# Date created: 7 October 2010 +# Whom: Pete French <pete@twisted.org.uk> +# +# $FreeBSD$ +# + +PORTNAME= libobjc2 +PORTVERSION= 1.0 +CATEGORIES= lang devel gnustep +MASTER_SITES= http://download.gna.org/gnustep/ + +MAINTAINER= pete@twisted.org.uk +COMMENT= Replacement Objective-C runtime supporting Obj-C 2 features + +WRKSRC= ${WRKDIR}/${PORTNAME} +USE_BZIP2= yes +USE_LDCONFIG= yes + +OPTIONS= LIBDISPATCH "Build with libdispatch from ports" Off + +.include <bsd.port.options.mk> + +.if defined(WITH_LIBDISPATCH) +LIB_DEPENDS+= dispatch.0:${PORTSDIR}/devel/libdispatch +MAKE_ARGS+= -DWITHOUT_TOYDISPATCH +.endif + +.include <bsd.port.pre.mk> + +.if (${ARCH} == i386) || (${ARCH} == i486) +CFLAGS+= -march=i586 +.endif + +.include <bsd.port.post.mk> diff --git a/lang/libobjc2/distinfo b/lang/libobjc2/distinfo new file mode 100644 index 000000000000..3204f9a8a393 --- /dev/null +++ b/lang/libobjc2/distinfo @@ -0,0 +1,3 @@ +MD5 (libobjc2-1.0.tar.bz2) = 0d6c683f765c43721f3d6f83d7df4921 +SHA256 (libobjc2-1.0.tar.bz2) = 8903157a6fe6b82b4571a33855f98e0da0fe92a94f69a9a5edd1af94310f0566 +SIZE (libobjc2-1.0.tar.bz2) = 66560 diff --git a/lang/libobjc2/files/patch-Makefile b/lang/libobjc2/files/patch-Makefile new file mode 100644 index 000000000000..89dd4f0b0b98 --- /dev/null +++ b/lang/libobjc2/files/patch-Makefile @@ -0,0 +1,89 @@ +*** Makefile.orig 2010-10-06 14:03:45.281764937 +0100 +--- Makefile 2010-10-07 17:49:29.429419346 +0100 +*************** +*** 4,16 **** + + #CC=clang + +! CFLAGS += -std=c99 + CPPFLAGS += -DTYPE_DEPENDENT_DISPATCH + + #LIB_DIR=/usr/local/GNUstep/Local/Library/Libraries/ + #HEADER_DIR=/usr/local/GNUstep/Local/Library/Headers +! LIB_DIR=/tmp/usr/lib/ +! HEADER_DIR=/tmp/usr/include/ + + OBJECTS = \ + NSBlocks.o\ +--- 4,19 ---- + + #CC=clang + +! CFLAGS += -std=c99 -fPIC + CPPFLAGS += -DTYPE_DEPENDENT_DISPATCH ++ CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500 + + #LIB_DIR=/usr/local/GNUstep/Local/Library/Libraries/ + #HEADER_DIR=/usr/local/GNUstep/Local/Library/Headers +! +! PREFIX?= /tmp/usr +! LIB_DIR= ${PREFIX}/lib +! HEADER_DIR= ${PREFIX}/include + + OBJECTS = \ + NSBlocks.o\ +*************** +*** 38,48 **** + statics_loader.o\ + sync.o + +! all: libobjc.so.$(VERSION) + + libobjc.so.$(VERSION): $(OBJECTS) + @echo Linking shared library... +! ld -shared -o $@ $(OBJECTS) + + .c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ +--- 41,59 ---- + statics_loader.o\ + sync.o + +! .if !defined(WITHOUT_TOYDISPATCH) +! OBJECTS+= toydispatch.o +! .endif +! +! all: libobjc.so.$(VERSION) libobjc.a + + libobjc.so.$(VERSION): $(OBJECTS) + @echo Linking shared library... +! @ld -shared -o $@ $(OBJECTS) +! +! libobjc.a: $(OBJECTS) +! @echo Linking static library... +! @ld -r -s -o $@ $(OBJECTS) + + .c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ +*************** +*** 50,57 **** +--- 61,72 ---- + .m.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ + ++ toydispatch.o: toydispatch/toydispatch.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -I toydispatch -c $< -o $@ ++ + install: all + install -m 444 libobjc.so.$(VERSION) $(LIB_DIR) ++ install -m 444 libobjc.a $(LIB_DIR) + ln -sf $(LIB_DIR)/libobjc.so.$(VERSION) $(LIB_DIR)/libobjc.so + install -d $(HEADER_DIR)/objc + install -m 444 objc/*.h $(HEADER_DIR)/objc +*************** +*** 59,61 **** +--- 74,77 ---- + clean: + rm -f $(OBJECTS) + rm -f libobjc.so.$(VERSION) ++ rm -f libobjc.a diff --git a/lang/libobjc2/pkg-descr b/lang/libobjc2/pkg-descr new file mode 100644 index 000000000000..392dac504d21 --- /dev/null +++ b/lang/libobjc2/pkg-descr @@ -0,0 +1,8 @@ +Replacement for the GNU Objective-C runtime supporting the features +of Objective-C 2 for use with GNUstep and other Objective-C programs. +This runtime is based on the Etoile Objective-C Runtime, an earlier +research prototype, and includes support for non-fragile instance +variables, type-dependent dispatch, and object planes. It is fully +compatible with the FSF's GCC Objective-C ABI and also implements +a new ABI that is supported by Clang and is required for some of +the newer features. diff --git a/lang/libobjc2/pkg-plist b/lang/libobjc2/pkg-plist new file mode 100644 index 000000000000..c43bce4c2f49 --- /dev/null +++ b/lang/libobjc2/pkg-plist @@ -0,0 +1,15 @@ +include/objc/Availability.h +include/objc/Object.h +include/objc/Protocol.h +include/objc/blocks_runtime.h +include/objc/capabilities.h +include/objc/encoding.h +include/objc/hooks.h +include/objc/objc-api.h +include/objc/objc.h +include/objc/runtime.h +include/objc/slot.h +lib/libobjc.a +lib/libobjc.so +lib/libobjc.so.4 +@dirrm include/objc |