diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2010-11-13 22:06:23 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2010-11-13 22:06:23 +0000 |
commit | 0cfa8fd6a621a8a6d524fe4ba7173252cc4da084 (patch) | |
tree | 36dc9cd56b8b63b66673118e8454f836364485e8 /lang/libobjc2 | |
parent | 3572053511c894b71cc60eab62b5b169640692be (diff) | |
download | ports-0cfa8fd6a621a8a6d524fe4ba7173252cc4da084.tar.gz ports-0cfa8fd6a621a8a6d524fe4ba7173252cc4da084.zip |
Notes
Diffstat (limited to 'lang/libobjc2')
-rw-r--r-- | lang/libobjc2/Makefile | 8 | ||||
-rw-r--r-- | lang/libobjc2/files/patch-Makefile | 155 |
2 files changed, 73 insertions, 90 deletions
diff --git a/lang/libobjc2/Makefile b/lang/libobjc2/Makefile index 1db9ef85cec5..439a4f1fca68 100644 --- a/lang/libobjc2/Makefile +++ b/lang/libobjc2/Makefile @@ -7,6 +7,7 @@ PORTNAME= libobjc2 PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= lang devel gnustep MASTER_SITES= http://download.gna.org/gnustep/ @@ -17,7 +18,8 @@ WRKSRC= ${WRKDIR}/${PORTNAME} USE_BZIP2= yes USE_LDCONFIG= yes -OPTIONS= LIBDISPATCH "Build with libdispatch from ports" Off +OPTIONS= NSOBJECT_ROOT "Root class is NSObject not Object" On \ + LIBDISPATCH "Build with libdispatch from ports" Off .include <bsd.port.options.mk> @@ -26,6 +28,10 @@ LIB_DEPENDS+= dispatch.0:${PORTSDIR}/devel/libdispatch MAKE_ARGS+= -DWITHOUT_TOYDISPATCH .endif +.if !defined(WITHOUT_NSOBJECT_ROOT) +MAKE_ARGS+= -DWITH_NSOBJECT_ROOT +.endif + .include <bsd.port.pre.mk> .if ${OSVERSION} < 700000 diff --git a/lang/libobjc2/files/patch-Makefile b/lang/libobjc2/files/patch-Makefile index 89dd4f0b0b98..9f480661410b 100644 --- a/lang/libobjc2/files/patch-Makefile +++ b/lang/libobjc2/files/patch-Makefile @@ -1,89 +1,66 @@ -*** 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 +--- Makefile.orig 2010-09-14 17:02:29.000000000 +0100 ++++ Makefile 2010-11-12 14:03:01.589695176 +0000 +@@ -4,13 +4,20 @@ + + #CC=clang + +-CFLAGS += -std=c99 ++CFLAGS += -std=c99 -fPIC + CPPFLAGS += -DTYPE_DEPENDENT_DISPATCH ++CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_SOURCE=500 ++ ++.if defined(WITH_NSOBJECT_ROOT) ++CPPFLAGS += -DGNUSTEP ++.endif + + #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/ ++ ++PREFIX?= /tmp/usr ++LIB_DIR= ${PREFIX}/lib ++HEADER_DIR= ${PREFIX}/include + + OBJECTS = \ + NSBlocks.o\ +@@ -38,11 +45,19 @@ + statics_loader.o\ + sync.o + +-all: libobjc.so.$(VERSION) ++.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) ++ @ld -shared -o $@ $(OBJECTS) ++ ++libobjc.a: $(OBJECTS) ++ @echo Linking static library... ++ @ld -r -s -o $@ $(OBJECTS) + + .c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ +@@ -50,8 +65,12 @@ + .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,3 +78,4 @@ + clean: + rm -f $(OBJECTS) + rm -f libobjc.so.$(VERSION) ++ rm -f libobjc.a |