freebsd-ports/lang/libobjc2/Makefile

70 lines
1.5 KiB
Makefile
Raw Normal View History

2012-10-04 09:21:06 +02:00
# Created by: Pete French <pete@twisted.org.uk>
# $FreeBSD$
PORTNAME= libobjc2
2011-12-13 19:05:25 +01:00
PORTVERSION= 1.6
CATEGORIES= lang devel gnustep
MASTER_SITES= http://download.gna.org/gnustep/
2012-06-26 07:44:19 +02:00
MAINTAINER= ports@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}
2012-10-04 09:21:06 +02:00
OPTIONS_DEFINE= NSOBJECT_ROOT LIBDISPATCH
OPTIONS_DEFAULT= NSOBJECT_ROOT
NSOBJECT_ROOT_DESC= Root class is NSObject not Object
LIBDISPATCH_DESC= Build with libdispatch from ports
2011-12-13 19:05:25 +01:00
SHLIB_VERSION?= 16
.include <bsd.port.options.mk>
2012-10-04 09:21:06 +02:00
.if ${PORT_OPTIONS:MLIBDISPATCH}
LIB_DEPENDS+= dispatch.0:${PORTSDIR}/devel/libdispatch
MAKE_ARGS+= -DWITHOUT_TOYDISPATCH
PLIST_SUB+= WITH_TOYDISPATCH="@comment "
.else
PLIST_SUB+= WITH_TOYDISPATCH=""
.endif
2012-10-04 09:21:06 +02:00
.if ${PORT_OPTIONS:MNSOBJECT_ROOT}
CPPFLAGS+= -DGNUSTEP
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 900000
2012-01-13 18:02:24 +01:00
.if defined(CC) && ${CC:T:Mclang}
2011-12-13 19:05:25 +01:00
# all done
.else
2012-02-19 11:28:29 +01:00
# force clang
2012-01-12 07:22:36 +01:00
CC= ${LOCALBASE}/bin/clang
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang:${PORTSDIR}/lang/clang
.endif
2011-12-13 19:05:25 +01:00
.endif
.if (${ARCH} == i386) || (${ARCH} == i486)
CFLAGS+= -march=i586
.endif
.if ${ARCH} == "powerpc"
BROKEN= Does not compile on powerpc: Unsupported relocation type 10
.endif
post-patch:
${RM} ${WRKSRC}/GNUmakefile
post-install:
2012-10-04 09:21:06 +02:00
.if ${PORT_OPTIONS:MLIBDISPATCH}
${RM} ${PREFIX}/include/objc/toydispatch.h
.endif
.include <bsd.port.post.mk>