diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-07-13 18:20:36 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-07-13 18:20:36 +0000 |
commit | c41d68c460828d0913b7619891a093d13fcfc214 (patch) | |
tree | 598c14a9233c4bc221149e4eda8c47c029b65bf2 /devel/mpatrol | |
parent | From the PR: (diff) |
Add mpatrol 1.4.8, a dynamic memory debugging and profiling library.
PR: 53317
Submitted by: Patrick MARIE <mycroft@virgaria.org>
Notes
Notes:
svn path=/head/; revision=84810
Diffstat (limited to 'devel/mpatrol')
-rw-r--r-- | devel/mpatrol/Makefile | 79 | ||||
-rw-r--r-- | devel/mpatrol/distinfo | 1 | ||||
-rw-r--r-- | devel/mpatrol/files/patch-..::..::src::symbol.c | 23 | ||||
-rw-r--r-- | devel/mpatrol/files/patch-..::..::tools::dbmalloc.c | 21 | ||||
-rw-r--r-- | devel/mpatrol/files/patch-Makefile | 88 | ||||
-rw-r--r-- | devel/mpatrol/pkg-descr | 7 | ||||
-rw-r--r-- | devel/mpatrol/pkg-plist | 67 |
7 files changed, 286 insertions, 0 deletions
diff --git a/devel/mpatrol/Makefile b/devel/mpatrol/Makefile new file mode 100644 index 000000000000..7801069131b0 --- /dev/null +++ b/devel/mpatrol/Makefile @@ -0,0 +1,79 @@ +# New ports collection makefile for: mpatrol +# Date created: 8 July 2003 +# Whom: Patrick MARIE <mycroft@virgaria.org> +# $FreeBSD$ +# + +PORTNAME= mpatrol +PORTVERSION= 1.4.8 +CATEGORIES= devel +MASTER_SITES= http://www.cbmamiga.demon.co.uk/mpatrol/files/ +DISTNAME= ${PORTNAME}_${PORTVERSION} + +MAINTAINER= mycroft@virgaria.org +COMMENT= A dynamic memory debugging and profiling library + +LIB_DEPENDS= elf.0:${PORTSDIR}/devel/libelf + +WRKSRC= ${WRKDIR}/${PORTNAME}/build/unix + +ONLY_FOR_ARCHS= i386 +INSTALLS_SHLIB= yes + +USE_GMAKE= yes +MAKE_ENV= LOCALBASE="${LOCALBASE}" CXX="${CXX}" \ + PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" + +MAN1= hexwords.1 mleak.1 mpatrol.1 mprof.1 \ + mpsym.1 mptrace.1 mpedit.1 +MAN3= libmpatrol.3 libmpalloc.3 + +DOCS= README mpatrol.dvi mpatrol.guide mpatrol.html mpatrol.info \ + mpatrol.pdf mpatrol.ps mpatrol.texi mpatrol.txt refcard.dvi \ + refcard.pdf refcard.ps refcard.tex source.tex \ + texinfo.tex +DOCSIMG= cc1.eps cc1.jpg cc1.pdf \ + collect2.eps collect2.jpg collect2.pdf \ + cpp.eps cpp.jpg cpp.pdf \ + gcc.eps gcc.jpg gcc.pdf \ + mpatrol.eps mpatrol.jpg mpatrol.pdf mpatrol.txt \ + test.eps test.jpg test.pdf \ + trace.eps trace.jpg trace.pdf + +do-install: +.for file in hexwords mpedit mpsym mupdate + ${INSTALL_SCRIPT} ${WRKSRC}/../../bin/${file} ${PREFIX}/bin +.endfor +.for file in mpatrol mleak mptrace mprof + ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin +.endfor +.for file in ${MAN1} + ${INSTALL_MAN} ${WRKSRC}/../../man/man1/${file} ${PREFIX}/man/man1 +.endfor +.for file in ${MAN3} + ${INSTALL_MAN} ${WRKSRC}/../../man/man3/${file} ${PREFIX}/man/man3 +.endfor +.for lib in mpalloc mpatrol mpatrolmt + ${INSTALL_DATA} ${WRKSRC}/lib${lib}.a ${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/lib${lib}.so.1 ${PREFIX}/lib + ${LN} -sf ${PREFIX}/lib/lib${lib}.so.1 ${PREFIX}/lib/lib${lib}.so +.endfor + ${INSTALL_DATA} ${WRKSRC}/libmptools.a ${PREFIX}/lib +.for file in mpatrol.h mpalloc.h mpdebug.h + ${INSTALL_DATA} ${WRKSRC}/../../src/${file} ${PREFIX}/include +.endfor + ${MKDIR} ${PREFIX}/include/mpatrol + ${INSTALL_DATA} ${WRKSRC}/../../tools/*.h ${PREFIX}/include/mpatrol +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for file in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/../../doc/${file} ${DOCSDIR} +.endfor + @${MKDIR} ${DOCSDIR}/images +.for file in ${DOCSIMG} + ${INSTALL_DATA} ${WRKSRC}/../../doc/images/${file} ${DOCSDIR}/images/ +.endfor +.endif + +.include <bsd.port.mk> diff --git a/devel/mpatrol/distinfo b/devel/mpatrol/distinfo new file mode 100644 index 000000000000..b87dfe945bef --- /dev/null +++ b/devel/mpatrol/distinfo @@ -0,0 +1 @@ +MD5 (mpatrol_1.4.8.tar.gz) = ada423c49bc5bfa7c3e7a80a711c2a1a diff --git a/devel/mpatrol/files/patch-..::..::src::symbol.c b/devel/mpatrol/files/patch-..::..::src::symbol.c new file mode 100644 index 000000000000..e36d9f2b171f --- /dev/null +++ b/devel/mpatrol/files/patch-..::..::src::symbol.c @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- ../../src/symbol.c 2003/07/12 11:33:10 1.1 ++++ ../../src/symbol.c 2003/07/12 11:33:29 +@@ -72,7 +72,7 @@ + #include <ldfcn.h> + #endif /* SYSTEM */ + #elif FORMAT == FORMAT_ELF32 || FORMAT == FORMAT_ELF64 +-#include <libelf.h> ++#include <libelf/libelf.h> + #elif FORMAT == FORMAT_BFD + #include <bfd.h> + #endif /* FORMAT */ +@@ -113,7 +113,7 @@ + * symbols from the object files and libraries. However, we still need the ELF + * definitions for reading the internal structures of the dynamic linker. + */ +-#include <elf.h> ++/*#include <elf.h>*/ + #elif DYNLINK == DYNLINK_WINDOWS + /* We use the imagehlp library on Windows platforms to obtain information about + * the symbols loaded from third-party and system DLLs. We can also use it to diff --git a/devel/mpatrol/files/patch-..::..::tools::dbmalloc.c b/devel/mpatrol/files/patch-..::..::tools::dbmalloc.c new file mode 100644 index 000000000000..06352ee6ab0a --- /dev/null +++ b/devel/mpatrol/files/patch-..::..::tools::dbmalloc.c @@ -0,0 +1,21 @@ + +$FreeBSD$ + +--- ../../tools/dbmalloc.c 2003/07/12 11:39:21 1.1 ++++ ../../tools/dbmalloc.c 2003/07/12 11:39:30 +@@ -27,7 +27,6 @@ + + + #include "config.h" +-#include "dbmalloc.h" + #include <stdio.h> + #if TARGET == TARGET_WINDOWS + #include <io.h> +@@ -35,6 +34,7 @@ + #include <unistd.h> + #endif /* TARGET */ + ++#include "dbmalloc.h" + + #if MP_IDENT_SUPPORT + #ident "$Id: dbmalloc.c,v 1.1 2003/07/12 11:39:21 root Exp root $" diff --git a/devel/mpatrol/files/patch-Makefile b/devel/mpatrol/files/patch-Makefile new file mode 100644 index 000000000000..d25ad3af18dd --- /dev/null +++ b/devel/mpatrol/files/patch-Makefile @@ -0,0 +1,88 @@ + +$FreeBSD$ + +--- Makefile.orig Tue Jan 8 22:41:01 2002 ++++ Makefile Sun Jul 13 21:17:49 2003 +@@ -27,7 +27,7 @@ + # Definitions + + SHELL = /bin/sh +-CC = g++ ++CC = $(CXX) + AR = ar + LD = $(CC) + LINT = lint +@@ -41,12 +41,12 @@ + ifeq ($(GUISUP),true) + CFLAGS = -I$(SOURCE) -I$(TOOLS) -I/usr/X11R6/include -I/usr/X11R5/include -I/usr/X11/include -I/usr/X/include -DMP_GUI_SUPPORT=1 + else +-CFLAGS = -I$(SOURCE) -I$(TOOLS) ++CFLAGS += -I$(SOURCE) -I$(TOOLS) -I$(LOCALBASE)/include + endif +-OFLAGS = -O3 -fno-inline-functions ++OFLAGS = -fno-inline-functions -fpermissive + SFLAGS = -fPIC +-TFLAGS = -DMP_THREADS_SUPPORT +-LDFLAGS = -shared ++TFLAGS = -DMP_THREADS_SUPPORT $(PTHREAD_CFLAGS) ++LDFLAGS = -shared -L$(LOCALBASE)/lib -lelf -lintl + + MPATROL = mpatrol + MPALLOC = mpalloc +@@ -123,10 +123,10 @@ + $(ARCHIVE_MPATROL): $(ARCHIVE_MPTOBJS) + $(AR) cr $@ $(ARCHIVE_MPTOBJS) + +-$(SHARED_MPATROL).$(VERSION).$(REVISION): $(SHARED_MPTOBJS) ++$(SHARED_MPATROL).$(VERSION): $(SHARED_MPTOBJS) + $(LD) $(LDFLAGS) -o $@ $(SHARED_MPTOBJS) + +-$(SHARED_MPATROL): $(SHARED_MPATROL).$(VERSION).$(REVISION) ++$(SHARED_MPATROL): $(SHARED_MPATROL).$(VERSION) + @ ln -f -s $< $@ + + $(OBJECT_MPATROL): $(SOURCE)/library.c +@@ -138,10 +138,10 @@ + $(ARCHTS_MPATROL): $(ARCHTS_MPTOBJS) + $(AR) cr $@ $(ARCHTS_MPTOBJS) + +-$(SHARTS_MPATROL).$(VERSION).$(REVISION): $(SHARTS_MPTOBJS) +- $(LD) $(LDFLAGS) -o $@ $(SHARTS_MPTOBJS) ++$(SHARTS_MPATROL).$(VERSION): $(SHARTS_MPTOBJS) ++ $(LD) $(LDFLAGS) $(PTHREAD_LIBS) -o $@ $(SHARTS_MPTOBJS) + +-$(SHARTS_MPATROL): $(SHARTS_MPATROL).$(VERSION).$(REVISION) ++$(SHARTS_MPATROL): $(SHARTS_MPATROL).$(VERSION) + @ ln -f -s $< $@ + + $(OBJTS_MPATROL): $(SOURCE)/library.c +@@ -153,10 +153,10 @@ + $(ARCHIVE_MPALLOC): $(ARCHIVE_MPAOBJS) + $(AR) cr $@ $(ARCHIVE_MPAOBJS) + +-$(SHARED_MPALLOC).$(VERSION).$(REVISION): $(SHARED_MPAOBJS) ++$(SHARED_MPALLOC).$(VERSION): $(SHARED_MPAOBJS) + $(LD) $(LDFLAGS) -o $@ $(SHARED_MPAOBJS) + +-$(SHARED_MPALLOC): $(SHARED_MPALLOC).$(VERSION).$(REVISION) ++$(SHARED_MPALLOC): $(SHARED_MPALLOC).$(VERSION) + @ ln -f -s $< $@ + + $(OBJECT_MPALLOC): $(SOURCE)/library2.c +@@ -224,13 +224,13 @@ + + clobber: clean + -@ rm -f $(ARCHIVE_MPATROL) $(ARCHTS_MPATROL) 2>&1 >/dev/null +- -@ rm -f $(SHARED_MPATROL).$(VERSION).$(REVISION) 2>&1 >/dev/null +- -@ rm -f $(SHARTS_MPATROL).$(VERSION).$(REVISION) 2>&1 >/dev/null ++ -@ rm -f $(SHARED_MPATROL).$(VERSION) 2>&1 >/dev/null ++ -@ rm -f $(SHARTS_MPATROL).$(VERSION) 2>&1 >/dev/null + -@ rm -f $(SHARED_MPATROL) $(SHARTS_MPATROL) 2>&1 >/dev/null + -@ rm -f $(OBJECT_MPATROL) $(OBJTS_MPATROL) 2>&1 >/dev/null + -@ rm -f $(LINT_MPATROL) $(LINTTS_MPATROL) 2>&1 >/dev/null + -@ rm -f $(ARCHIVE_MPALLOC) 2>&1 >/dev/null +- -@ rm -f $(SHARED_MPALLOC).$(VERSION).$(REVISION) 2>&1 >/dev/null ++ -@ rm -f $(SHARED_MPALLOC).$(VERSION) 2>&1 >/dev/null + -@ rm -f $(SHARED_MPALLOC) $(OBJECT_MPALLOC) 2>&1 >/dev/null + -@ rm -f $(LINT_MPALLOC) 2>&1 >/dev/null + -@ rm -f $(ARCHIVE_MPTOOLS) $(LINT_MPTOOLS) 2>&1 >/dev/null diff --git a/devel/mpatrol/pkg-descr b/devel/mpatrol/pkg-descr new file mode 100644 index 000000000000..9caa8cc3a808 --- /dev/null +++ b/devel/mpatrol/pkg-descr @@ -0,0 +1,7 @@ +The mpatrol library is a powerful debugging tool that attempts to diagnose +run-time errors that are caused by the wrong use of dynamically allocated +memory. It acts as a malloc() debugger for debugging dynamic memory +allocations, although it can also trace and profile calls to malloc() and +free() too. + +WWW: http://www.cbmamiga.demon.co.uk/mpatrol/ diff --git a/devel/mpatrol/pkg-plist b/devel/mpatrol/pkg-plist new file mode 100644 index 000000000000..7e7f6a493824 --- /dev/null +++ b/devel/mpatrol/pkg-plist @@ -0,0 +1,67 @@ +@comment $FreeBSD$ +bin/hexwords +bin/mleak +bin/mpatrol +bin/mpedit +bin/mprof +bin/mpsym +bin/mptrace +bin/mupdate +include/mpalloc.h +include/mpatrol.h +include/mpatrol/dbmalloc.h +include/mpatrol/dmalloc.h +include/mpatrol/heapdiff.h +include/mpatrol/mgauge.h +include/mpatrol/mtrace.h +include/mpdebug.h +lib/libmpalloc.a +lib/libmpalloc.so +lib/libmpalloc.so.1 +lib/libmpatrol.a +lib/libmpatrol.so +lib/libmpatrol.so.1 +lib/libmpatrolmt.a +lib/libmpatrolmt.so +lib/libmpatrolmt.so.1 +lib/libmptools.a +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/images/cc1.eps +%%PORTDOCS%%%%DOCSDIR%%/images/cc1.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/cc1.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/collect2.eps +%%PORTDOCS%%%%DOCSDIR%%/images/collect2.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/collect2.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/cpp.eps +%%PORTDOCS%%%%DOCSDIR%%/images/cpp.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/cpp.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/gcc.eps +%%PORTDOCS%%%%DOCSDIR%%/images/gcc.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/gcc.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.eps +%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.txt +%%PORTDOCS%%%%DOCSDIR%%/images/test.eps +%%PORTDOCS%%%%DOCSDIR%%/images/test.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/test.pdf +%%PORTDOCS%%%%DOCSDIR%%/images/trace.eps +%%PORTDOCS%%%%DOCSDIR%%/images/trace.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/trace.pdf +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.dvi +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.guide +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.html +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.info +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.pdf +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.ps +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.texi +%%PORTDOCS%%%%DOCSDIR%%/mpatrol.txt +%%PORTDOCS%%%%DOCSDIR%%/refcard.dvi +%%PORTDOCS%%%%DOCSDIR%%/refcard.pdf +%%PORTDOCS%%%%DOCSDIR%%/refcard.ps +%%PORTDOCS%%%%DOCSDIR%%/refcard.tex +%%PORTDOCS%%%%DOCSDIR%%/source.tex +%%PORTDOCS%%%%DOCSDIR%%/texinfo.tex +%%PORTDOCS%%@dirrm %%DOCSDIR%%/images +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm include/mpatrol |