summaryrefslogtreecommitdiff
path: root/lang/libobjc2
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2011-10-19 18:56:47 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2011-10-19 18:56:47 +0000
commitc6b74337adc372106f2ca802167543a6b91eec87 (patch)
tree5a8da3b7cad6c4fcfba787200bfac564ef49520d /lang/libobjc2
parent- fix build for FreeBSD-8-STABLE and FreeBSD-9 (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.
Notes
Notes: svn path=/head/; revision=283935
Diffstat (limited to 'lang/libobjc2')
-rw-r--r--lang/libobjc2/Makefile61
-rw-r--r--lang/libobjc2/distinfo2
-rw-r--r--lang/libobjc2/files/patch-Makefile58
-rw-r--r--lang/libobjc2/pkg-descr8
-rw-r--r--lang/libobjc2/pkg-plist22
5 files changed, 151 insertions, 0 deletions
diff --git a/lang/libobjc2/Makefile b/lang/libobjc2/Makefile
new file mode 100644
index 000000000000..64980871feda
--- /dev/null
+++ b/lang/libobjc2/Makefile
@@ -0,0 +1,61 @@
+# New ports collection makefile for: libobjc2
+# Date created: 7 October 2010
+# Whom: Pete French <pete@twisted.org.uk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libobjc2
+PORTVERSION= 1.5.1
+CATEGORIES= lang devel gnustep
+MASTER_SITES= http://download.gna.org/gnustep/
+
+MAINTAINER= dinoex@FreeBSD.org
+COMMENT= Replacement Objective-C runtime supporting Obj-C 2 features
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
+
+USE_BZIP2= yes
+USE_LDCONFIG= yes
+MAKE_ENV+= LD=${LOCALBASE}/bin/ld
+MAKE_ENV+= SHLIB_VERSION="${SHLIB_VERSION}"
+PLIST_SUB= SHLIB=${SHLIB_VERSION}
+
+OPTIONS= NSOBJECT_ROOT "Root class is NSObject not Object" On \
+ LIBDISPATCH "Build with libdispatch from ports" Off
+
+SHLIB_VERSION?= 15
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_LIBDISPATCH)
+LIB_DEPENDS+= dispatch.0:${PORTSDIR}/devel/libdispatch
+MAKE_ARGS+= -DWITHOUT_TOYDISPATCH
+PLIST_SUB+= WITH_TOYDISPATCH="@comment "
+.else
+PLIST_SUB+= WITH_TOYDISPATCH=""
+.endif
+
+.if !defined(WITHOUT_NSOBJECT_ROOT)
+CPPFLAGS+= -DGNUSTEP
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 900000
+BROKEN= does not compile on 9.X
+.endif
+
+.if (${ARCH} == i386) || (${ARCH} == i486)
+CFLAGS+= -march=i586
+.endif
+
+post-patch:
+ ${RM} ${WRKSRC}/GNUmakefile
+
+post-install:
+.if defined(WITH_LIBDISPATCH)
+ ${RM} ${PREFIX}/include/objc/toydispatch.h
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/lang/libobjc2/distinfo b/lang/libobjc2/distinfo
new file mode 100644
index 000000000000..39a0ae102dd8
--- /dev/null
+++ b/lang/libobjc2/distinfo
@@ -0,0 +1,2 @@
+SHA256 (libobjc2-1.5.1.tar.bz2) = ca4b7c55f33cf7ffb015b24134b77470c050411399abe179aa46c41b6d17f61e
+SIZE (libobjc2-1.5.1.tar.bz2) = 101262
diff --git a/lang/libobjc2/files/patch-Makefile b/lang/libobjc2/files/patch-Makefile
new file mode 100644
index 000000000000..d561210b7846
--- /dev/null
+++ b/lang/libobjc2/files/patch-Makefile
@@ -0,0 +1,58 @@
+--- Makefile.orig 2011-07-10 19:20:10.000000000 +0200
++++ Makefile 2011-10-19 19:41:37.000000000 +0200
+@@ -5,7 +5,7 @@
+ MAJOR_VERSION = 1
+ MINOR_VERSION = 5
+ SUBMINOR_VERSION = 0
+-VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBMINOR_VERSION)
++VERSION = $(SHLIB_VERSION)
+
+ CFLAGS += -std=gnu99 -fPIC
+ CXXFLAGS += -fPIC
+@@ -50,25 +50,29 @@
+ selector_table.o\
+ sendmsg2.o\
+ statics_loader.o\
+- toydispatch.o
++
++
++.if !defined(WITHOUT_TOYDISPATCH)
++OBJECTS+= toydispatch.o
++.endif
+
+ all: libobjc.a libobjcxx.so.$(VERSION)
+
+ libobjcxx.so.$(VERSION): libobjc.so.$(VERSION) $(OBJCXX_OBJECTS)
+ @echo Linking shared Objective-C++ runtime library...
+- @$(CXX) -Wl,-shared -o $@ $(OBJCXX_OBJECTS) -lobjc
++ $(LD) -shared -o $@ $(OBJCXX_OBJECTS) -lobjc
+
+ libobjc.so.$(VERSION): $(OBJECTS)
+ @echo Linking shared Objective-C runtime library...
+- @ld -shared -o $@ $(OBJECTS)
++ $(LD) -shared -o $@ $(OBJECTS)
+
+ libobjc.a: $(OBJECTS)
+ @echo Linking static Objective-C runtime library...
+- @ld -r -s -o $@ $(OBJECTS)
++ $(LD) -r -s -o $@ $(OBJECTS)
+
+ .cc.o:
+ @echo Compiling `basename $<`...
+- @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+
+ .c.o:
+ @echo Compiling `basename $<`...
+@@ -86,11 +90,7 @@
+ @install -m 444 libobjc.a $(LIB_DIR)
+ @echo Creating symbolic links...
+ @ln -sf $(LIB_DIR)/libobjc.so.$(VERSION) $(LIB_DIR)/libobjc.so
+- @ln -sf $(LIB_DIR)/libobjc.so.$(VERSION) $(LIB_DIR)/libobjc.so.$(MAJOR_VERSION)
+- @ln -sf $(LIB_DIR)/libobjc.so.$(VERSION) $(LIB_DIR)/libobjc.so.$(MAJOR_VERSION).$(MINOR_VERSION)
+ @ln -sf $(LIB_DIR)/libobjcxx.so.$(VERSION) $(LIB_DIR)/libobjcxx.so
+- @ln -sf $(LIB_DIR)/libobjcxx.so.$(VERSION) $(LIB_DIR)/libobjcxx.so.$(MAJOR_VERSION)
+- @ln -sf $(LIB_DIR)/libobjcxx.so.$(VERSION) $(LIB_DIR)/libobjcxx.so.$(MAJOR_VERSION).$(MINOR_VERSION)
+ @echo Installing headers...
+ @install -d $(HEADER_DIR)/objc
+ @install -m 444 objc/*.h $(HEADER_DIR)/objc
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..2f0599bbf949
--- /dev/null
+++ b/lang/libobjc2/pkg-plist
@@ -0,0 +1,22 @@
+include/objc/Availability.h
+include/objc/Object.h
+include/objc/Protocol.h
+include/objc/blocks_runtime.h
+include/objc/capabilities.h
+include/objc/developer.h
+include/objc/encoding.h
+include/objc/hooks.h
+include/objc/objc-api.h
+include/objc/objc-arc.h
+include/objc/objc-auto.h
+include/objc/objc.h
+include/objc/runtime.h
+include/objc/runtime-deprecated.h
+include/objc/slot.h
+%%WITH_TOYDISPATCH%%include/objc/toydispatch.h
+lib/libobjc.a
+lib/libobjc.so
+lib/libobjc.so.%%SHLIB%%
+lib/libobjcxx.so
+lib/libobjcxx.so.%%SHLIB%%
+@dirrm include/objc