# Created by: Koop Mast # $FreeBSD$ PORTNAME?= libc++ DISTNAME= libc++-${PORTVERSION} PORTVERSION= ${SVN_REV} CATEGORIES= devel MASTER_SITES= http://files.etoilebsd.net/libc++/ \ LOCAL/bapt MAINTAINER= bapt@FreeBSD.org COMMENT?= Llvm's C++ standard library with c++11 support USES= tar:xz .ifndef MASTERDIR LICENSE_GROUP= MIT UIUC LICENSE_NAME_UIUC= University of Illinois/NCSA Open Source License LICENSE_PERMS_UIUC= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LIB_DEPENDS= libcxxrt.so:${PORTSDIR}/devel/libcxxrt USES+= cmake:outsource compiler:c++11-lang USE_LDCONFIG= yes LDFLAGS+= -L${LOCALBASE}/lib .include .if exists(/usr/lib/libcxxrt.so) CXXRT_INCS= /usr/include/c++/v1/ CXXRT_LIB= /usr/lib/libcxxrt.so .else CXXRT_INCS= ${LOCALBASE}/include/cxxrt/ CXXRT_LIB= ${LOCALBASE}/lib/libcxxrt.so .endif .if ${OPSYS} == FreeBSD && ${OSVERSION} < 900000 LIB_DEPENDS+= libmissing.so:${PORTSDIR}/math/libmissing \ libxlocale.so:${PORTSDIR}/devel/xlocale EXTRA_PATCHES= ${FILESDIR}/extra-libmissing CXXFLAGS+= -I${LOCALBASE}/include -D__LONG_LONG_SUPPORTED LDFLAGS+= -lmissing EXTRALIB= ${LOCALBASE}/lib/libmissing.so.2 ${LOCALBASE}/lib/libxlocale.so.0 .endif CMAKE_ARGS= -DLIBCXX_CXX_ABI=libcxxrt -DLIBCXX_LIBCXXRT_INCLUDE_PATHS=${CXXRT_INCS} .if !defined(SVN_REV) .if defined(BOOTSTRAP) SVN_REV!= LC_ALL=C svn info http://llvm.org/svn/llvm-project/ | ${GREP} Revision | cut -d' ' -f2 .else .include "Makefile.svn_rev" .endif .endif .if defined(BOOTSTRAP) || defined(SVN_FETCH) FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion do-fetch: ${MKDIR} ${WRKDIR} svn export -r ${SVN_REV} \ http://llvm.org/svn/llvm-project/libcxx/trunk \ ${WRKSRC} cd ${WRKDIR}; tar cfJ ${DISTDIR}/${DISTNAME}.tar.xz ${DISTNAME} echo "SVN_REV= ${SVN_REV}" > ${MASTERDIR}/Makefile.svn_rev .endif post-install: ${LN} -sf c++/v1 ${STAGEDIR}${PREFIX}/include/c++/v1/tr1 ${RM} ${STAGEDIR}${PREFIX}/lib/libc++.so @${MKDIR} ${STAGEDIR}${PREFIX}/lib/c++/ ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB} ${EXTRALIB})' > ${STAGEDIR}${PREFIX}/lib/libc++.so ${ECHO} 'GROUP ( ${PREFIX}/lib/libc++.so.1 ${CXXRT_LIB} ${EXTRALIB})' > ${STAGEDIR}${PREFIX}/lib/c++/libstdc++.so regression-test: build cd ${WRKSRC}/test && ${SH} ./testit .endif .include