diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2004-02-04 12:13:23 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2004-02-04 12:13:23 +0000 |
commit | 1c52d085f0be33ea11f8aa0c12cb4e0b621533b4 (patch) | |
tree | 128341d14a323531758371211e5520d27c2918d3 | |
parent | a27e6afa7bb4704416c6f5ed9884d7626c702faf (diff) | |
download | ports-1c52d085f0be33ea11f8aa0c12cb4e0b621533b4.tar.gz ports-1c52d085f0be33ea11f8aa0c12cb4e0b621533b4.zip |
Notes
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/leaktracer/Makefile | 37 | ||||
-rw-r--r-- | devel/leaktracer/distinfo | 1 | ||||
-rw-r--r-- | devel/leaktracer/files/patch-LeakCheck | 11 | ||||
-rw-r--r-- | devel/leaktracer/files/patch-Makefile | 41 | ||||
-rw-r--r-- | devel/leaktracer/pkg-descr | 15 |
6 files changed, 106 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index dde99e35240e..3788ce1685ad 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -333,6 +333,7 @@ SUBDIR += kprof SUBDIR += kyra SUBDIR += lbpp + SUBDIR += leaktracer SUBDIR += lemon SUBDIR += leoarg SUBDIR += libIDL diff --git a/devel/leaktracer/Makefile b/devel/leaktracer/Makefile new file mode 100644 index 000000000000..62393c709961 --- /dev/null +++ b/devel/leaktracer/Makefile @@ -0,0 +1,37 @@ +# New ports collection makefile for: LeakTracer +# Date created: 04 Feb 2004 +# Whom: Alexey Dokuchaev <danfe@regency.nsu.ru> +# +# $FreeBSD$ +# + +PORTNAME= leaktracer +PORTVERSION= 2.4 +CATEGORIES= devel +MASTER_SITES= http://www.andreasen.org/LeakTracer/ \ + http://freebsd.nsu.ru/distfiles/ +DISTNAME= LeakTracer + +MAINTAINER= danfe@regency.nsu.ru +COMMENT= Trace and analyze memory leaks in C++ programs + +INSTALLS_SHLIB= yes +USE_GMAKE= yes +USE_PERL5_RUN= yes +MAKE_ENV= CXX="${CXX}" \ + PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" +PLIST_FILES= bin/LeakCheck bin/leak-analyze lib/LeakTracer.so +PORTDOCS= README README.html + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/LeakCheck ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/leak-analyze ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/LeakTracer.so ${PREFIX}/lib +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/devel/leaktracer/distinfo b/devel/leaktracer/distinfo new file mode 100644 index 000000000000..8ccd50c790d1 --- /dev/null +++ b/devel/leaktracer/distinfo @@ -0,0 +1 @@ +MD5 (LeakTracer.tar.gz) = e1cf9d03c12a45d39f253e558d231438 diff --git a/devel/leaktracer/files/patch-LeakCheck b/devel/leaktracer/files/patch-LeakCheck new file mode 100644 index 000000000000..d032b87d6e86 --- /dev/null +++ b/devel/leaktracer/files/patch-LeakCheck @@ -0,0 +1,11 @@ +--- LeakCheck.orig Wed Feb 4 16:49:49 2004 ++++ LeakCheck Wed Feb 4 16:50:09 2004 +@@ -7,7 +7,7 @@ + # this looks in the same directory, this + # LeakCheck script resides; modify to your + # needs: +-SHLIB=`dirname $0`/LeakTracer.so ++SHLIB=`dirname $0`/../lib/LeakTracer.so + if [ ! -x $SHLIB ] ; then + echo "$SHLIB not found" + exit 1 diff --git a/devel/leaktracer/files/patch-Makefile b/devel/leaktracer/files/patch-Makefile new file mode 100644 index 000000000000..cc9db5de969c --- /dev/null +++ b/devel/leaktracer/files/patch-Makefile @@ -0,0 +1,41 @@ +--- Makefile.orig Tue Nov 18 19:42:21 2003 ++++ Makefile Wed Feb 4 18:02:25 2004 +@@ -1,14 +1,14 @@ +-CC = g++ ++CXX ?= g++ + + # Source files + SRC := LeakTracer.cc + + # Comment out to disable thread safetly +-THREAD=-DTHREAD_SAVE -D_REENTRANT -D_THREAD_SAFE -pthread ++THREAD=-DTHREAD_SAVE + + # Common flags +-C_FLAGS = -g -pipe -Wall -W $(THREAD) +-O_FLAGS = $(C_FLAGS) ++C_FLAGS = $(CFLAGS) -Wall -W $(THREAD) $(PTHREAD_CFLAGS) ++O_FLAGS = $(C_FLAGS) $(PTHREAD_LIBS) + + # Object files + OBJ_DIR = . +@@ -32,16 +32,16 @@ + (cd .. && tar cvfz /u/erwin/drylock/LeakTracer/LeakTracer.tar.gz -X LeakTracer/.tarexcl LeakTracer/) + + $(OBJ_DIR)/%.o: %.cc +- $(CC) -fPIC -c $(C_FLAGS) $< -o $@ ++ $(CXX) -fPIC -c $(C_FLAGS) $< -o $@ + + $(OBJ_DIR)/%.so : $(OBJ_DIR)/%.o +- $(CC) $(O_FLAGS) -shared -o $@ $< ++ $(CXX) $(O_FLAGS) -shared -o $@ $< + + README.html: README + /u/erwin/ed/mcl/util/htmlize.pl README + + test: +- $(CC) $(C_FLAGS) test.cc -o test ++ $(CXX) $(C_FLAGS) test.cc -o test + ./test + ./LeakCheck ./test + ./leak-analyze ./test diff --git a/devel/leaktracer/pkg-descr b/devel/leaktracer/pkg-descr new file mode 100644 index 000000000000..ab0ca2f1401d --- /dev/null +++ b/devel/leaktracer/pkg-descr @@ -0,0 +1,15 @@ +LeakTracer is a small tool for checking a C++ program for memory leaks. + +To use LeakTracer, run your program using the provided LeakCheck script. It +uses the LD_PRELOAD feature to "overlay" some functions on top of your +functions (no recompile needed). + +LeakTracer uses gdb to print out the exact line where the memory was allocated +and not freed -- this of course means you have to free all dynamically +allocated data. LeakTracer also overrides the global operator new and operator +delete -- this will give problems if you override them as well. + +LeakTracer traces only new/new[] and delete calls -- it does not look at +malloc/free/realloc. + +WWW: http://www.andreasen.org/LeakTracer/ |