diff --git a/devel/google-perftools/Makefile b/devel/google-perftools/Makefile index 6a4984ca98d8..d6d33d4ad6b1 100644 --- a/devel/google-perftools/Makefile +++ b/devel/google-perftools/Makefile @@ -1,66 +1,78 @@ # Created by: Yuri Victorovich # $FreeBSD$ PORTNAME= google-perftools PORTVERSION= 2.1 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= vd/${PORTNAME} DISTNAME= gperftools-${PORTVERSION} MAINTAINER= yuri@tsoft.com COMMENT= Fast, multi-threaded malloc() and nifty performance analysis tools LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING PROJECTHOST= gperftools WRKSRC= ${WRKDIR}/gperftools-${PORTVERSION} DOCSDIR= ${PREFIX}/share/doc/gperftools BUILD_DEPENDS+= ${LOCALBASE}/include/execinfo.h:${PORTSDIR}/devel/libexecinfo LIB_DEPENDS+= libexecinfo.so:${PORTSDIR}/devel/libexecinfo GNU_CONFIGURE= yes -USE_GCC= any # clang causes 7 more test case failures in "make check" USE_LDCONFIG= yes +USES= compiler -CONFIGURE_ARGS+=CPPFLAGS=-I${LOCALBASE}/include LIBS=-lexecinfo LDFLAGS=-L${LOCALBASE}/lib +CPPFLAGS+= -I${LOCALBASE}/include +LIBS+= -lexecinfo +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ARGS+=LIBS="${LIBS}" -.include +.include + +.if ${COMPILER_TYPE} == "clang" && !defined(USE_GCC) +# clang cannot disable builtins individually +CXXFLAGS+= -fno-builtin +.endif + +.if ${ARCH} == "amd64" +CONFIGURE_ARGS+=--enable-frame-pointers +.endif +.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" +BROKEN= Does not build, assembly not supported, see PR-94: http://code.google.com/p/google-perftools/issues/detail?id=94&can=1 +.endif post-patch: +.if ${COMPILER_TYPE} == "clang" && !defined(USE_GCC) + ${REINPLACE_CMD} -Ee \ + 's|-fno-builtin-[a-z_]+||g' \ + ${WRKSRC}/Makefile.in +.endif .if empty(PORT_OPTIONS:MDOCS) ${REINPLACE_CMD} -e \ '/^install-data-am:/ s|install-dist_docDATA||' \ ${WRKSRC}/Makefile.in .endif post-build: @${ECHO} @${ECHO} "Please run 'make check'. Two testcases are known to fail." @${ECHO} "Report any testcase failures to http://code.google.com/p/google-perftools/issues/list" @${ECHO} post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/libdata ${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig ${STAGEDIR}${PREFIX}/libdata # four of the tests are known to fail on 7.0, uncomment this as soon as this is fixed #regression-test: check check: build cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check -.include - -.if ${ARCH} == "amd64" -CONFIGURE_ARGS+=--enable-frame-pointers -.endif -.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Does not build, assembly not supported, see PR-94: http://code.google.com/p/google-perftools/issues/detail?id=94&can=1 -.endif - .include