2012-10-04 09:21:06 +02:00
|
|
|
# Created by: Pete French <pete@twisted.org.uk>
|
2011-10-19 20:56:47 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= libobjc2
|
2013-08-28 20:26:01 +02:00
|
|
|
PORTVERSION= 1.7
|
2011-10-19 20:56:47 +02:00
|
|
|
CATEGORIES= lang devel gnustep
|
|
|
|
MASTER_SITES= http://download.gna.org/gnustep/
|
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
MAINTAINER= theraven@FreeBSD.org
|
|
|
|
COMMENT= Replacement Objective-C runtime supporting modern Objective-C features
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-09-20 14:54:54 +02:00
|
|
|
SSP_UNSAFE= yes
|
|
|
|
|
2013-09-20 21:53:09 +02:00
|
|
|
NO_STAGE= yes
|
2013-08-28 20:26:01 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
USES= cmake
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
_CLANG!= if [ -f /usr/bin/clang ] ; then /usr/bin/clang --version | head -1 | \
|
|
|
|
${SED} -e 's/.*clang version \([0-9]\)\.\([0-9]\).*/\1\2/' ; else ${ECHO} 0 ; fi
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
.if ${_CLANG} < 33
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang33:${PORTSDIR}/lang/clang33
|
|
|
|
CLANG= ${LOCALBASE}/bin/clang33
|
|
|
|
CLANGXX= ${LOCALBASE}/bin/clang++33
|
2011-10-19 20:56:47 +02:00
|
|
|
.else
|
2013-08-28 20:26:01 +02:00
|
|
|
CLANG= /usr/bin/clang
|
|
|
|
CLANGXX= /usr/bin/clang++
|
2011-10-19 20:56:47 +02:00
|
|
|
.endif
|
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
SHLIB_MAJOR= 4
|
|
|
|
SHLIB_MINOR= 6
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
USE_BZIP2= yes
|
|
|
|
PLIST_SUB+= SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR}
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
.if ${OSVERSION} < 902000
|
|
|
|
CMAKE_ARGS+= -DFORCE_LIBOBJCXX=ON
|
|
|
|
PLIST_SUB+= WITH_SEPARATECXX=""
|
2011-12-13 19:05:25 +01:00
|
|
|
.else
|
2013-08-28 20:26:01 +02:00
|
|
|
PLIST_SUB+= WITH_SEPARATECXX="@comment "
|
2011-12-13 19:05:25 +01:00
|
|
|
.endif
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
CMAKE_ARGS+= -DLIB_INSTALL_PATH=lib -DCMAKE_ASM_COMPILER=${CLANG}
|
|
|
|
CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CLANG} -DCMAKE_CXX_COMPILER=${CLANGXX}
|
|
|
|
CMAKE_ARGS+= -DTESTS=OFF
|
|
|
|
# This shouldn't be needed, but our llvm port installs llvm-config with a silly
|
|
|
|
# name...
|
|
|
|
CMAKE_ARGS+= -DLLVM_OPTS=OFF
|
2011-10-19 20:56:47 +02:00
|
|
|
|
2012-05-27 08:56:59 +02:00
|
|
|
.if ${ARCH} == "powerpc"
|
|
|
|
BROKEN= Does not compile on powerpc: Unsupported relocation type 10
|
|
|
|
.endif
|
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
.if ${OSVERSION} < 902000
|
|
|
|
post-install:
|
|
|
|
${LN} -sf ${LOCALBASE}/lib/libobjc.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${LOCALBASE}/lib/libobjc.so.${SHLIB_MAJOR}
|
|
|
|
${LN} -sf ${LOCALBASE}/lib/libobjcxx.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${LOCALBASE}/lib/libobjcxx.so.${SHLIB_MAJOR}
|
|
|
|
.else
|
2011-10-19 20:56:47 +02:00
|
|
|
post-install:
|
2013-08-28 20:26:01 +02:00
|
|
|
${LN} -sf ${LOCALBASE}/lib/libobjc.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${LOCALBASE}/lib/libobjc.so.${SHLIB_MAJOR}
|
2011-10-19 20:56:47 +02:00
|
|
|
.endif
|
|
|
|
|
2013-08-28 20:26:01 +02:00
|
|
|
|
2011-10-19 20:56:47 +02:00
|
|
|
.include <bsd.port.post.mk>
|