- Add some suppression files & fix packaging[1]

(bump PORTREV)
- Warn if USER_LDT is not present in 4.x-kernel [2]

PR:		ports/71832 [1]; ports/75436 [2]
Submitted by:	Frerich Raabe;   maintainer
This commit is contained in:
Volker Stolz 2004-12-27 11:41:40 +00:00
parent 9ab18be7ab
commit 006ecc902e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125267
5 changed files with 83 additions and 9 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= valgrind
PORTVERSION= 352
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= http://www.rabson.org/
PKGNAMESUFFIX= -snapshot
@ -32,6 +32,14 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 500000
PLIST_SUB+= RELENG_4="@comment "
PLIST_SUB+= RELENG_5=""
.else
PLIST_SUB+= RELENG_4=""
PLIST_SUB+= RELENG_5="@comment "
.endif
.if ${PERL_LEVEL} < 500601
IGNORE= "can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl"
.endif
@ -62,7 +70,36 @@ pre-patch:
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
@${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
${PREFIX}/include/valgrind
# 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
@yes | ${PREFIX}/bin/valgrind --tool=memcheck --gen-suppressions=yes true \
| ${SED} -e 's,.*{$$,{,' \
| ${GREP} -v '^=' \
> ${WRKDIR}/freebsd-default.supp || \
${RM} ${WRKDIR}/freebsd-default.supp
.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
.include <bsd.port.post.mk>

View File

@ -13,12 +13,13 @@ lib/valgrind/glibc-2.1.supp
lib/valgrind/glibc-2.2.supp
lib/valgrind/glibc-2.3.supp
lib/valgrind/hp2ps
lib/valgrind/libc_r.so.5
lib/valgrind/libkse.so.1
%%RELENG_4%%lib/valgrind/libc_r.so.4
%%RELENG_5%%lib/valgrind/libc_r.so.5
%%RELENG_5%%lib/valgrind/libkse.so.1
lib/valgrind/libpthread.so
lib/valgrind/libpthread.so.0
lib/valgrind/libpthread.so.1
lib/valgrind/libthr.so.1
%%RELENG_5%%lib/valgrind/libpthread.so.1
%%RELENG_5%%lib/valgrind/libthr.so.1
lib/valgrind/stage2
lib/valgrind/valgrind
lib/valgrind/vg_inject.so
@ -37,6 +38,7 @@ lib/valgrind/vgskin_memcheck.so
lib/valgrind/vgskin_none.so
lib/valgrind/xfree-3.supp
lib/valgrind/xfree-4.supp
%%VALGRIND_SUPPFILE%%lib/valgrind/freebsd-default.supp
libdata/pkgconfig/valgrind.pc
%%PORTDOCS%%%%DOCSDIR%%/ac_main.html
%%PORTDOCS%%%%DOCSDIR%%/cc_main.html

View File

@ -7,7 +7,7 @@
PORTNAME= valgrind
PORTVERSION= 352
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= http://www.rabson.org/
DISTNAME= ${PORTNAME}-stable-${PORTVERSION}
@ -66,12 +66,36 @@ pre-patch:
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
@${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
${PREFIX}/include/valgrind
# 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
@yes | ${PREFIX}/bin/valgrind --tool=memcheck --gen-suppressions=yes true \
| ${SED} -e 's,.*{$$,{,' \
| ${GREP} -v '^=' \
> ${WRKDIR}/freebsd-default.supp || \
${RM} ${WRKDIR}/freebsd-default.supp
@${ECHO} ""
@${ECHO} ""
@${CAT} ${PKGMESSAGE}
@${CAT} ${PKGMESSAGE} | ${SED} -e 's,%%PREFIX%%,${PREFIX},g'
@${ECHO} ""
.if exists(${WRKDIR}/freebsd-default.supp)
@${INSTALL_DATA} ${WRKDIR}/freebsd-default.supp \
${PREFIX}/lib/valgrind
PLIST_SUB+= VALGRIND_SUPPFILE=""
.else
PLIST_SUB+= VALGRIND_SUPPFILE="@comment "
.endif
.include <bsd.port.post.mk>

View File

@ -7,3 +7,13 @@ Note: This version of valgrind does not support some older processors,
As a workaround you can use the devel/valgrind-snapshot port, which is
based on a more recent snapshot.
Note 2: A sample suppression file might have been installed to \
%%PREFIX%%/etc/freebsd-default.supp. It makes Valgrind hide warnings
caused by flawed code sequences - if any - in your system libraries,
so that you can concentrate on the warnings issued for your own code.
To use these suppressions, either pass
--suppressions=%%PREFIX%%/etc/freebsd-default.supp
to Valgrind on the commandline, or add that line to your
~/.valgrindrc file, which is the recommended way.

View File

@ -36,6 +36,7 @@ lib/valgrind/vgskin_none.so
lib/valgrind/xfree-3.supp
lib/valgrind/xfree-4.supp
libdata/pkgconfig/valgrind.pc
%%VALGRIND_SUPPFILE%%etc/freebsd-default.supp
%%PORTDOCS%%%%DOCSDIR%%/ac_main.html
%%PORTDOCS%%%%DOCSDIR%%/cc_main.html
%%PORTDOCS%%%%DOCSDIR%%/cg_main.html