aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-05-24 01:00:03 +0800
committerkrion <krion@FreeBSD.org>2004-05-24 01:00:03 +0800
commit82840f1eadef06b77a769027e7f239f06b1912bc (patch)
treed49530adb007f42139e07f6907a47ab2f1005137 /devel
parent508ce903e52446ad55a7088747fda9dc15c84804 (diff)
downloadfreebsd-ports-gnome-82840f1eadef06b77a769027e7f239f06b1912bc.tar.gz
freebsd-ports-gnome-82840f1eadef06b77a769027e7f239f06b1912bc.tar.zst
freebsd-ports-gnome-82840f1eadef06b77a769027e7f239f06b1912bc.zip
Valgrind is a system for debugging and profiling un*x programs.
With the tools that come with Valgrind, you can automatically detect many memory management and threading bugs, avoiding hours of frustrating bug-hunting, making your programs more stable. You can also perform detailed profiling, to speed up and reduce memory use of your programs. The Valgrind distribution includes five tools: two memory error detectors, a thread error detector, a cache profiler and a heap profiler. Several other tools have been built with Valgrind. Valgrind was ported to FreeBSD by Doug Rabson (http://www.rabson.org/). Submitted by: Doug Rabson <dfr@FreeBSD.org> and Simon Barner <barner@in.tum.de>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/valgrind/Makefile70
-rw-r--r--devel/valgrind/distinfo2
-rw-r--r--devel/valgrind/files/patch-rev32816
-rw-r--r--devel/valgrind/files/patch-rev32916
-rw-r--r--devel/valgrind/pkg-descr13
-rw-r--r--devel/valgrind/pkg-message7
-rw-r--r--devel/valgrind/pkg-plist52
8 files changed, 177 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 3f4def16b08c..ac605c60085e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1245,6 +1245,7 @@
SUBDIR += upnp
SUBDIR += ups-debug
SUBDIR += ustl
+ SUBDIR += valgrind
SUBDIR += varconf
SUBDIR += vb2c
SUBDIR += viewcvs
diff --git a/devel/valgrind/Makefile b/devel/valgrind/Makefile
new file mode 100644
index 000000000000..0d4e2ba188f5
--- /dev/null
+++ b/devel/valgrind/Makefile
@@ -0,0 +1,70 @@
+# Ports collection makefile for: valgrind
+# Date created: April 15 2004
+# Whom: Simon Barner <barner@gmx.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= valgrind
+PORTVERSION= 327
+CATEGORIES= devel
+MASTER_SITES= http://www.rabson.org/
+DISTNAME= ${PORTNAME}-stable-${PORTVERSION}
+
+MAINTAINER= barner@gmx.de
+COMMENT= A (memory) debugging and profiling tool
+
+ONLY_FOR_ARCHS= i386
+CONFLICTS= valgrind-snapshot-*
+WRKSRC= ${WRKDIR}/${DISTNAME}
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS+=--enable-maintainer-mode
+USE_REINPLACE= yes
+USE_PERL5_BUILD=yes
+
+.include <bsd.port.pre.mk>
+
+PROCFS!= /sbin/mount | ${GREP} '^procfs' | ${AWK} '{print $1}'
+
+pre-everything::
+
+.if ${PROCFS}
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "Check if procfs is running: YES"
+.else
+ @${ECHO_CMD} "-----------------------------------------------------------"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "Valgrind needs a running procfs, which is not"
+ @${ECHO_CMD} "activated on your system. Please read the procfs\(5\)"
+ @${ECHO_CMD} "manpage and add the following line to /etc/fstab:"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "proc /proc procfs rw 0 0"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "-----------------------------------------------------------"
+ @${FALSE}
+.endif
+
+.if ${PERL_LEVEL} < 500601
+ @${ECHO_CMD} "Your Perl version is too old. You will need at least Perl 5.6.1"
+ @${ECHO_CMD} "in order to build valgrind."
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "Please use the lang/perl5 or the lang/perl5.8 to upgrade your"
+ @${ECHO_CMD} "Perl installation to version 5.6.1 or 5.8.2 respectively."
+.endif
+
+pre-patch:
+.ifdef(NOPORTDOCS)
+ ${FIND} ${WRKSRC} -name "Makefile.in" -exec \
+ ${REINPLACE_CMD} -e "s/docs//g" {} \;
+.endif
+
+post-install:
+ @${ECHO} ""
+ @${ECHO} ""
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO} ""
+ @${ECHO} ""
+
+.include <bsd.port.post.mk>
diff --git a/devel/valgrind/distinfo b/devel/valgrind/distinfo
new file mode 100644
index 000000000000..b891471a33eb
--- /dev/null
+++ b/devel/valgrind/distinfo
@@ -0,0 +1,2 @@
+MD5 (valgrind-stable-327.tar.gz) = 56aabe03a41c4ebbb0cf2fbda3f4656a
+SIZE (valgrind-stable-327.tar.gz) = 1161744
diff --git a/devel/valgrind/files/patch-rev328 b/devel/valgrind/files/patch-rev328
new file mode 100644
index 000000000000..1659d7af90cd
--- /dev/null
+++ b/devel/valgrind/files/patch-rev328
@@ -0,0 +1,16 @@
+--- coregrind/vg_main.c 2004-04-10 08:32:49 UTC (rev 327)
++++ coregrind/vg_main.c 2004-04-19 09:10:49 UTC (rev 328)
+@@ -1135,9 +1135,10 @@
+
+ /* Move logfile_fd into the safe range, so it doesn't conflict with any app fds */
+ eventually_logfile_fd = VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_DUPFD, VG_(max_fd)+1);
+- if (eventually_logfile_fd < 0)
++ if (eventually_logfile_fd < 0) {
++ VG_(clo_logfile_fd) = 2;
+ VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd into safe range");
+- else {
++ } else {
+ VG_(clo_logfile_fd) = eventually_logfile_fd;
+ VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
+ }
+
diff --git a/devel/valgrind/files/patch-rev329 b/devel/valgrind/files/patch-rev329
new file mode 100644
index 000000000000..954488effebd
--- /dev/null
+++ b/devel/valgrind/files/patch-rev329
@@ -0,0 +1,16 @@
+--- coregrind/vg_scheduler.c 2004-04-19 09:10:49 UTC (rev 328)
++++ coregrind/vg_scheduler.c 2004-04-22 08:53:06 UTC (rev 329)
+@@ -1146,7 +1146,12 @@
+ ) {
+
+ /* If __NR_exit, remember the supplied argument. */
++#ifdef __linux__
+ VG_(exitcode) = VG_(threads)[tid].m_ebx; /* syscall arg1 */
++#endif
++#ifdef __FreeBSD__
++ VG_(exitcode) = ((UInt*)VG_(threads)[tid].m_esp)[1]; /* syscall arg1 */
++#endif
+
+ /* Only run __libc_freeres if the skin says it's ok and
+ it hasn't been overridden with --run-libc-freeres=no
+
diff --git a/devel/valgrind/pkg-descr b/devel/valgrind/pkg-descr
new file mode 100644
index 000000000000..dc6b4069c111
--- /dev/null
+++ b/devel/valgrind/pkg-descr
@@ -0,0 +1,13 @@
+Valgrind is a system for debugging and profiling un*x programs. With the tools
+that come with Valgrind, you can automatically detect many memory management
+and threading bugs, avoiding hours of frustrating bug-hunting, making your
+programs more stable. You can also perform detailed profiling, to speed up and
+reduce memory use of your programs.
+
+The Valgrind distribution includes five tools: two memory error detectors, a
+thread error detector, a cache profiler and a heap profiler. Several other
+tools have been built with Valgrind.
+
+Valgrind was ported to FreeBSD by Doug Rabson (http://www.rabson.org/).
+
+WWW: http://valgrind.kde.org/
diff --git a/devel/valgrind/pkg-message b/devel/valgrind/pkg-message
new file mode 100644
index 000000000000..6aa0bd1b7000
--- /dev/null
+++ b/devel/valgrind/pkg-message
@@ -0,0 +1,7 @@
+Note: This version of valgrind does not support some older AMD processors.
+ If valgrind crashes immediately after it was started with the error
+ message "Illegal hardware instruction", your processor is affected by
+ this problem.
+
+ As a workaround you can use the devel/valgrind-snapshot port, which is
+ based on a more recent snapshot
diff --git a/devel/valgrind/pkg-plist b/devel/valgrind/pkg-plist
new file mode 100644
index 000000000000..7cb5ad588df9
--- /dev/null
+++ b/devel/valgrind/pkg-plist
@@ -0,0 +1,52 @@
+bin/cg_annotate
+bin/valgrind
+bin/valgrind-listener
+include/valgrind/helgrind.h
+include/valgrind/memcheck.h
+include/valgrind/valgrind.h
+include/valgrind/vg_constants_skin.h
+include/valgrind/vg_kerneliface.h
+include/valgrind/vg_skin.h
+lib/valgrind/default.supp
+lib/valgrind/glibc-2.1.supp
+lib/valgrind/glibc-2.2.supp
+lib/valgrind/glibc-2.3.supp
+lib/valgrind/libc_r.so.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
+lib/valgrind/stage2
+lib/valgrind/valgrind
+lib/valgrind/vg_inject.so
+lib/valgrind/vg_symtabd
+lib/valgrind/vgpreload_addrcheck.so
+lib/valgrind/vgpreload_helgrind.so
+lib/valgrind/vgpreload_memcheck.so
+lib/valgrind/vgskin_addrcheck.so
+lib/valgrind/vgskin_cachegrind.so
+lib/valgrind/vgskin_corecheck.so
+lib/valgrind/vgskin_helgrind.so
+lib/valgrind/vgskin_lackey.so
+lib/valgrind/vgskin_memcheck.so
+lib/valgrind/vgskin_none.so
+lib/valgrind/xfree-3.supp
+lib/valgrind/xfree-4.supp
+libdata/pkgconfig/valgrind.pc
+%%PORTDOCS%%%%DOCSDIR%%/ac_main.html
+%%PORTDOCS%%%%DOCSDIR%%/cc_main.html
+%%PORTDOCS%%%%DOCSDIR%%/cg_main.html
+%%PORTDOCS%%%%DOCSDIR%%/cg_techdocs.html
+%%PORTDOCS%%%%DOCSDIR%%/coregrind_core.html
+%%PORTDOCS%%%%DOCSDIR%%/coregrind_intro.html
+%%PORTDOCS%%%%DOCSDIR%%/coregrind_tools.html
+%%PORTDOCS%%%%DOCSDIR%%/hg_main.html
+%%PORTDOCS%%%%DOCSDIR%%/lk_main.html
+%%PORTDOCS%%%%DOCSDIR%%/manual.html
+%%PORTDOCS%%%%DOCSDIR%%/mc_main.html
+%%PORTDOCS%%%%DOCSDIR%%/mc_techdocs.html
+%%PORTDOCS%%%%DOCSDIR%%/nl_main.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm lib/valgrind
+@dirrm include/valgrind