1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00
freebsd-ports/devel/google-perftools/Makefile
Matthias Andree 002a4d26d7 Revert USE_GCC addition, and for clang, set -fno-builtin, and strip the
GCC-specific -fno-builtin-<FUNCTION> arguments.

Now has two failures on 10.0-RC5 and three on 9.2-RELEASE-p3 (both
amd64) with the respective default compiler.
2014-01-15 22:07:44 +00:00

79 lines
2.1 KiB
Makefile

# Created by: Yuri Victorovich <yuri@tsoft.com>
# $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_LDCONFIG= yes
USES= compiler
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -lexecinfo
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS+=LIBS="${LIBS}"
.include <bsd.port.pre.mk>
.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 <bsd.port.post.mk>