2004-05-23 17:40:32 +00:00
|
|
|
# Ports collection makefile for: valgrind
|
|
|
|
# Date created: April 19 2004
|
|
|
|
# Whom: Simon Barner <barner@gmx.de>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= valgrind
|
2004-07-25 17:17:46 +00:00
|
|
|
PORTVERSION= 352
|
2005-10-20 10:41:03 +00:00
|
|
|
PORTREVISION= 5
|
2004-05-23 17:40:32 +00:00
|
|
|
CATEGORIES= devel
|
|
|
|
MASTER_SITES= http://www.rabson.org/
|
|
|
|
PKGNAMESUFFIX= -snapshot
|
|
|
|
DISTNAME= ${PORTNAME}-current-${PORTVERSION}
|
|
|
|
|
2005-02-28 13:05:25 +00:00
|
|
|
MAINTAINER= barner@FreeBSD.org
|
2004-05-23 17:40:32 +00:00
|
|
|
COMMENT= A (memory) debugging and profiling tool
|
|
|
|
|
2004-08-06 12:36:34 +00:00
|
|
|
CONFLICTS= valgrind-[0-9]*
|
2004-05-23 17:40:32 +00:00
|
|
|
LATEST_LINK= valgrind-snapshot
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
|
|
|
USE_GMAKE= yes
|
2004-12-08 19:36:55 +00:00
|
|
|
USE_GNOME= pkgconfig
|
2004-05-23 17:40:32 +00:00
|
|
|
USE_PERL5_BUILD=yes
|
|
|
|
USE_REINPLACE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2005-09-20 00:40:08 +00:00
|
|
|
USE_AUTOTOOLS+= autoconf:259 aclocal:19 automake:19
|
2005-04-12 03:26:56 +00:00
|
|
|
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2004-05-23 17:40:32 +00:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-09-20 00:40:08 +00:00
|
|
|
.if ${OSVERSION} >= 700000
|
|
|
|
PLIST_SUB+= RELENG_4="@comment "
|
|
|
|
PLIST_SUB+= RELENG_5="@comment "
|
|
|
|
PLIST_SUB+= RELENG_6="@comment "
|
|
|
|
PLIST_SUB+= RELENG_7=""
|
|
|
|
.else
|
|
|
|
.if ${OSVERSION} >= 600000
|
|
|
|
PLIST_SUB+= RELENG_4="@comment "
|
|
|
|
PLIST_SUB+= RELENG_5="@comment "
|
|
|
|
PLIST_SUB+= RELENG_6=""
|
|
|
|
PLIST_SUB+= RELENG_7="@comment "
|
|
|
|
.else
|
|
|
|
.if ${OSVERSION} >= 500000
|
2004-12-27 11:41:40 +00:00
|
|
|
PLIST_SUB+= RELENG_4="@comment "
|
|
|
|
PLIST_SUB+= RELENG_5=""
|
2005-09-20 00:40:08 +00:00
|
|
|
PLIST_SUB+= RELENG_6="@comment "
|
|
|
|
PLIST_SUB+= RELENG_7="@comment "
|
2004-12-27 11:41:40 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= RELENG_4=""
|
|
|
|
PLIST_SUB+= RELENG_5="@comment "
|
2005-09-20 00:40:08 +00:00
|
|
|
PLIST_SUB+= RELENG_6="@comment "
|
|
|
|
PLIST_SUB+= RELENG_7="@comment "
|
|
|
|
.endif
|
|
|
|
.endif
|
2004-12-27 11:41:40 +00:00
|
|
|
.endif
|
|
|
|
|
2004-07-25 17:28:14 +00:00
|
|
|
.if ${PERL_LEVEL} < 500601
|
2005-09-20 00:40:08 +00:00
|
|
|
IGNORE= can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl
|
2004-07-25 17:28:14 +00:00
|
|
|
.endif
|
|
|
|
|
2004-05-23 17:40:32 +00:00
|
|
|
PROCFS!= /sbin/mount | ${GREP} '^procfs' | ${AWK} '{print $1}'
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
|
|
|
|
.if ${PROCFS}
|
|
|
|
@${ECHO_CMD} ""
|
|
|
|
@${ECHO_CMD} "Check if procfs is running: YES"
|
|
|
|
.else
|
2005-08-11 13:26:20 +00:00
|
|
|
#
|
|
|
|
# /proc is not mounted on the machine in the package building cluster that
|
|
|
|
# that builds the list of IGNOREd ports (but it is on the build machines),
|
|
|
|
# so we need to make an exception here.
|
|
|
|
#
|
|
|
|
.ifndef (PACKAGE_BUILDING)
|
|
|
|
ECHO_MSG=/usr/bin/printf
|
2005-09-20 00:40:08 +00:00
|
|
|
IGNORE= needs a running procfs, which is not\n\
|
2005-08-11 13:26:20 +00:00
|
|
|
\ \ \ \ \ activated on your system. Please read the procfs\(5\)\n\
|
|
|
|
\ \ \ \ \ man page and add the following line to /etc/fstab:\n\
|
|
|
|
\n\
|
|
|
|
\ \ \ \ \ proc /proc procfs rw 0 0\n\
|
|
|
|
\n
|
|
|
|
.endif
|
2004-08-01 00:45:56 +00:00
|
|
|
.endif
|
2004-05-23 17:40:32 +00:00
|
|
|
|
|
|
|
pre-patch:
|
|
|
|
.ifdef(NOPORTDOCS)
|
|
|
|
${FIND} ${WRKSRC} -name "Makefile.in" -exec \
|
|
|
|
${REINPLACE_CMD} -e "s/docs//g" {} \;
|
|
|
|
.endif
|
|
|
|
|
2004-09-01 16:27:21 +00:00
|
|
|
post-install:
|
2004-12-27 11:41:40 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
|
2004-09-01 16:27:21 +00:00
|
|
|
${PREFIX}/include/valgrind
|
|
|
|
|
2004-12-27 11:41:40 +00:00
|
|
|
# Check if kernel is built with USER_LDT option (FreeBSD 4 only)
|
|
|
|
.if ${OSVERSION} < 500000
|
|
|
|
@${PREFIX}/bin/valgrind --tool=memcheck true 2> ${WRKDIR}/ldt.test
|
|
|
|
@${GREP} i386_set_ldt ${WRKDIR}/ldt.test >/dev/null &&\
|
|
|
|
${ECHO_CMD} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! && \
|
|
|
|
${ECHO_CMD} Please rebuild your kernel with ``options USER_LDT''! && \
|
|
|
|
${ECHO_CMD} Otherwise, valgrind will not be able to perform pointer analysis! && \
|
|
|
|
${ECHO_CMD} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! || true
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Generate suppression files
|
2005-08-11 13:26:20 +00:00
|
|
|
.ifndef (PACKAGE_BUILDING)
|
2005-05-19 16:56:20 +00:00
|
|
|
@yes | ${PREFIX}/bin/valgrind --tool=memcheck --gen-suppressions=yes true 2>&1 \
|
2004-12-27 11:41:40 +00:00
|
|
|
| ${SED} -e 's,.*{$$,{,' \
|
|
|
|
| ${GREP} -v '^=' \
|
|
|
|
> ${WRKDIR}/freebsd-default.supp || \
|
|
|
|
${RM} ${WRKDIR}/freebsd-default.supp
|
2005-08-11 13:26:20 +00:00
|
|
|
.endif
|
2004-12-27 11:41:40 +00:00
|
|
|
|
|
|
|
.if exists(${WRKDIR}/freebsd-default.supp)
|
|
|
|
@${INSTALL_DATA} ${WRKDIR}/freebsd-default.supp \
|
|
|
|
${PREFIX}/lib/valgrind
|
|
|
|
PLIST_SUB+= VALGRIND_SUPPFILE=""
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} ""
|
|
|
|
@${CAT} ${PKGMESSAGE} | ${SED} -e 's,%%PREFIX%%,${PREFIX},g'
|
|
|
|
@${ECHO} ""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= VALGRIND_SUPPFILE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-05-23 17:40:32 +00:00
|
|
|
.include <bsd.port.post.mk>
|