Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jun 2003 15:51:52 +0200 (CEST)
From:      Patrick MARIE <mycroft@virgaria.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/53317: New port Mpatrol, memory debugger / Update of PR ports/53082
Message-ID:  <200306141351.h5EDpqE6092058@saturnine.virgaria.org>
Resent-Message-ID: <200306141400.h5EE0RL9069167@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         53317
>Category:       ports
>Synopsis:       New port Mpatrol, memory debugger / Update of PR ports/53082
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 14 07:00:27 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Patrick MARIE
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
epplug.org
>Environment:
System: FreeBSD saturnine.virgaria.org 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Jun 11 14:23:27 CEST 2003 mycroft@saturnine.virgaria.org:/usr/obj/usr/src/sys/saturnine i386

>Description:
	Update of ports/53082 (which is now obsolete);
	Adding a libmptools;
	Fixed compilations flags.
	
>How-To-Repeat:
>Fix:
--- mpatrol.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mpatrol
#	mpatrol/distinfo
#	mpatrol/files
#	mpatrol/files/src-Makefile
#	mpatrol/files/tools-Makefile
#	mpatrol/files/patch-src::symbol.c
#	mpatrol/files/patch-tools::dbmalloc.c
#	mpatrol/files/root-Makefile
#	mpatrol/Makefile
#	mpatrol/pkg-descr
#	mpatrol/pkg-plist
#
echo c - mpatrol
mkdir -p mpatrol > /dev/null 2>&1
echo x - mpatrol/distinfo
sed 's/^X//' >mpatrol/distinfo << 'END-of-mpatrol/distinfo'
XMD5 (mpatrol_1.4.8.tar.gz) = ada423c49bc5bfa7c3e7a80a711c2a1a
END-of-mpatrol/distinfo
echo c - mpatrol/files
mkdir -p mpatrol/files > /dev/null 2>&1
echo x - mpatrol/files/src-Makefile
sed 's/^X//' >mpatrol/files/src-Makefile << 'END-of-mpatrol/files/src-Makefile'
X# Makefile by Patrick MARIE <mycroft@virgaria.org>
X
XLIBMPATROL_SRC=	list.c tree.c slots.c utils.c memory.c heap.c alloc.c \
X		info.c stack.c addr.c strtab.c symbol.c signals.c \
X		diag.c option.c leaktab.c profile.c trace.c inter.c \
X		malloc.c cplus.c version.c mutex.c
XLIBMPATROL_OBJ=	$(LIBMPATROL_SRC:.c=.o) machine.o
X
X# theses files are in ../tools/
XLIBMPTOOLS_SRC=		../tools/dbmalloc.c \
X			../tools/dmalloc.c \
X			../tools/heapdiff.c \
X			../tools/mgauge.c \
X			../tools/mtrace.c
XLIBMPTOOLS_OBJ=		$(LIBMPTOOLS_SRC:.c=.o)
X
XLIBMPALLOC_SRC=	mpalloc.c mpfailure.c mpsetfail.c mpmalloc.c \
X		mpcalloc.c mpstrdup.c mprealloc.c
XLIBMPALLOC_OBJ=	$(LIBMPALLOC_SRC:.c=.o)
X
XMPATROL_SRC=	mpatrol.c getopt.c version.c
XMPATROL_OBJ=	$(MPATROL_SRC:.c=.o)
XMPROF_SRC=	mprof.c graph.c getopt.c list.c tree.c version.c
XMPROF_OBJ=	$(MPROF_SRC:.c=.o)
XMPTRACE_SRC=	mptrace.c getopt.c tree.c slots.c utils.c version.c
XMPTRACE_OBJ=	$(MPTRACE_SRC:.c=.o)
XMLEAK_SRC=	mleak.c getopt.c tree.c version.c
XMLEAK_OBJ=	$(MLEAK_SRC:.c=.o)
X
XINST_HEADERS=	mpatrol.h mpalloc.h mpdebug.h
X
XPREFIX?=	/usr/local
XCFLAGS+=	-O3 -g -fno-inline-functions
XCFLAGS+=	-DMP_THREADS_SUPPORT -DMP_USE_ATEXIT
XCFLAGS+=	-I$(PREFIX)/include -I$(PREFIX)/include/libelf -I. -I../src 
XLFLAGS+=	-L. -lmpatrol -L$(PREFIX)/lib -lelf -lintl
XAFLAGS+=	-fPIC
X
XRM?=		rm -f
XCP?=		cp -f
X
Xall: libmptools.so libmpatrol.so libmpalloc.so mpatrol mprof mleak mptrace
X
X$(LIBMPTOOLS_OBJ):
X	@(cd ../tools; make -DPREFIX="$(PREFIX)" CFLAGS="$(CFLAGS)")
X
Xlibmpatrol.so: $(LIBMPATROL_OBJ) machine.o
X	ld -shared -o libmpatrol.so $(LIBMPATROL_OBJ)
X	ar r libmpatrol.a $(LIBMPATROL_OBJ)
X
Xlibmpalloc.so: $(LIBMPALLOC_OBJ)
X	ld -shared -o libmpalloc.so $(LIBMPALLOC_OBJ)
X	ar r libmpalloc.a $(LIBMPALLOC_OBJ) 
X
Xlibmptools.so: $(LIBMPTOOLS_OBJ)
X	ld -shared -o libmptools.so $(LIBMPTOOLS_OBJ)
X	ar r libmptools.a $(LIBMPTOOLS_OBJ) 
X
Xmleak: $(MLEAK_OBJ)
X	$(CC) $(LFLAGS) $(CFLAGS) $(MLEAK_OBJ) -o mleak
X
Xmptrace: $(MPTRACE_OBJ) 
X	$(CC) $(LFLAGS) $(CFLAGS) $(MPTRACE_OBJ) -o mptrace
X
Xmprof: $(MPROF_OBJ)
X	$(CC) $(LFLAGS) $(CFLAGS) $(MPROF_OBJ) -o mprof
X
Xmpatrol: $(MPATROL_OBJ)
X	$(CC) $(LFLAGS) $(CFLAGS) $(MPATROL_OBJ) -o mpatrol 
X
X# machine.s specific:
Xmachine.o: machine.c
X	$(CC) $(CFLAGS) -E -P machine.c >machine.s
X	$(CC) $(CFLAGS) $(AFLAGS) -c machine.s -o machine.o
X
Xclean:
X	$(RM) machine.s machine.o \
X	libmpatrol.so libmpalloc.so libmpalloc.a libmpatrol.so \
X	mprof mpatrol \
X	.extdone \
X	machine.s machine.o \
X	$(LIBMPATROL_OBJ) $(LIBMPALLOC_OBJ) \
X	$(MPATROL_OBJ) $(MLEAK_OBJ) $(MPTRACE_OBJ) $(MPROF_OBJ) \
X	$(LIBMPTOOLS_OBJ)
END-of-mpatrol/files/src-Makefile
echo x - mpatrol/files/tools-Makefile
sed 's/^X//' >mpatrol/files/tools-Makefile << 'END-of-mpatrol/files/tools-Makefile'
X# Makefile by Patrick MARIE <mycroft@virgaria.org>
X
XLIBMPATROL_EXT_SRC=	dbmalloc.c dmalloc.c heapdiff.c mgauge.c mtrace.c
XLIBMPATROL_EXT_OBJ=	$(LIBMPATROL_EXT_SRC:.c=.o)
X
Xall: $(LIBMPATROL_EXT_OBJ)
END-of-mpatrol/files/tools-Makefile
echo x - mpatrol/files/patch-src::symbol.c
sed 's/^X//' >mpatrol/files/patch-src::symbol.c << 'END-of-mpatrol/files/patch-src::symbol.c'
X--- src/symbol.c.orig	Tue Jan  8 21:13:59 2002
X+++ src/symbol.c	Sun Jun  8 17:09:52 2003
X@@ -113,7 +113,7 @@
X  * symbols from the object files and libraries.  However, we still need the ELF
X  * definitions for reading the internal structures of the dynamic linker.
X  */
X-#include <elf.h>
X+/* #include <elf.h> */
X #elif DYNLINK == DYNLINK_WINDOWS
X /* We use the imagehlp library on Windows platforms to obtain information about
X  * the symbols loaded from third-party and system DLLs.  We can also use it to
END-of-mpatrol/files/patch-src::symbol.c
echo x - mpatrol/files/patch-tools::dbmalloc.c
sed 's/^X//' >mpatrol/files/patch-tools::dbmalloc.c << 'END-of-mpatrol/files/patch-tools::dbmalloc.c'
X--- tools/dbmalloc.c.orig	Tue Jan  8 21:05:10 2002
X+++ tools/dbmalloc.c	Sun Jun  8 19:24:48 2003
X@@ -27,13 +27,14 @@
X 
X 
X #include "config.h"
X-#include "dbmalloc.h"
X #include <stdio.h>
X #if TARGET == TARGET_WINDOWS
X #include <io.h>
X #else /* TARGET */
X #include <unistd.h>
X #endif /* TARGET */
X+
X+#include "dbmalloc.h"
X 
X 
X #if MP_IDENT_SUPPORT
END-of-mpatrol/files/patch-tools::dbmalloc.c
echo x - mpatrol/files/root-Makefile
sed 's/^X//' >mpatrol/files/root-Makefile << 'END-of-mpatrol/files/root-Makefile'
X
Xall:
X	@(cd src; ${MAKE})
X
Xinstall:
X	@(cd src; ${MAKE} install)
END-of-mpatrol/files/root-Makefile
echo x - mpatrol/Makefile
sed 's/^X//' >mpatrol/Makefile << 'END-of-mpatrol/Makefile'
X# New ports collection makefile for:	mpatrol
X# Date created:		8 jui 2003
X# Whom:			Patrick MARIE <mycroft@virgaria.org>
X# $FreeBSD$
X#
X
XPORTNAME=	mpatrol
XPORTVERSION=	1.4.8
XCATEGORIES=	devel
XMASTER_SITES=	http://www.cbmamiga.demon.co.uk/mpatrol/files/
XDISTNAME=	${PORTNAME}_${PORTVERSION}
X
XMAINTAINER=	mycroft@virgaria.org
XCOMMENT=	Mpatrol, memory debugger
X
XLIB_DEPENDS=	elf.0:${PORTSDIR}/devel/libelf
X
XONLY_FOR_ARCHS=	i386
XINSTALLS_SHLIB=	yes
X
X#WRKDIR?=	${WRKDIRPREFIX}${.CURDIR}/work
XWRKSRC=		${WRKDIR}/${PORTNAME}
X
XMAN1=		hexwords.1 mleak.1 mpatrol.1 mprof.1 \
X		mpsym.1 mptrace.1 mpedit.1
XMAN3=		libmpatrol.3 libmpalloc.3
X
Xpost-patch:
X	${CP} ${FILESDIR}/root-Makefile ${WRKSRC}/Makefile
X	${CP} ${FILESDIR}/src-Makefile ${WRKSRC}/src/Makefile
X	${CP} ${FILESDIR}/tools-Makefile ${WRKSRC}/tools/Makefile
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/bin/hexwords ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/bin/mpedit ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/bin/mpsym ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/bin/mupdate ${PREFIX}/bin
X	${INSTALL_PROGRAM} ${WRKSRC}/src/mpatrol ${PREFIX}/bin
X	${INSTALL_PROGRAM} ${WRKSRC}/src/mleak ${PREFIX}/bin
X	${INSTALL_PROGRAM} ${WRKSRC}/src/mptrace ${PREFIX}/bin
X	${INSTALL_PROGRAM} ${WRKSRC}/src/mprof ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/man/man1/hexwords.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mleak.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mpatrol.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mpedit.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mprof.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mpsym.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man1/mptrace.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/man/man3/libmpatrol.3 ${PREFIX}/man/man3
X	${INSTALL_MAN} ${WRKSRC}/man/man3/libmpalloc.3 ${PREFIX}/man/man3
X	${INSTALL_DATA} ${WRKSRC}/src/libmpalloc.a ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/libmpalloc.so ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/libmpatrol.a ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/libmpatrol.so ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/libmptools.a ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/libmptools.so ${PREFIX}/lib
X	${INSTALL_DATA} ${WRKSRC}/src/mpatrol.h ${PREFIX}/include
X	${INSTALL_DATA} ${WRKSRC}/src/mpalloc.h ${PREFIX}/include
X	${INSTALL_DATA} ${WRKSRC}/src/mpdebug.h ${PREFIX}/include
X
XDOCS=	README mpatrol.dvi mpatrol.guide mpatrol.html mpatrol.info \
X	mpatrol.pdf mpatrol.ps mpatrol.texi mpatrol.txt refcard.dvi \
X	refcard.pdf refcard.ps refcard.tex source.tex \
X	texinfo.tex
XDOCSIMG=	cc1.eps cc1.jpg cc1.pdf \
X		collect2.eps collect2.jpg collect2.pdf \
X		cpp.eps cpp.jpg cpp.pdf \
X		gcc.eps gcc.jpg gcc.pdf \
X		mpatrol.eps mpatrol.jpg mpatrol.pdf mpatrol.txt \
X		test.eps test.jpg test.pdf \
X		trace.eps trace.jpg trace.pdf
X
X.if !defined(NOPORTDOCS)
Xpost-install:
X	@${MKDIR} ${DOCSDIR}
X.for file in ${DOCS}
X	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR}
X.endfor
X	@${MKDIR} ${DOCSDIR}/images
X.for file in ${DOCSIMG}
X	${INSTALL_DATA} ${WRKSRC}/doc/images/${file} ${DOCSDIR}/images/
X.endfor
X.endif
X
X.include <bsd.port.mk>
END-of-mpatrol/Makefile
echo x - mpatrol/pkg-descr
sed 's/^X//' >mpatrol/pkg-descr << 'END-of-mpatrol/pkg-descr'
XThe mpatrol library is a powerful debugging tool that attempts to diagnose
Xrun-time errors that are caused by the wrong use of dynamically allocated
Xmemory. It acts as a malloc() debugger for debugging dynamic memory
Xallocations, although it can also trace and profile calls to malloc() and
Xfree() too.
X
XWWW: http://www.cbmamiga.demon.co.uk/mpatrol/
END-of-mpatrol/pkg-descr
echo x - mpatrol/pkg-plist
sed 's/^X//' >mpatrol/pkg-plist << 'END-of-mpatrol/pkg-plist'
X@comment $FreeBSD$
Xinclude/mpatrol.h
Xinclude/mpalloc.h
Xinclude/mpdebug.h
Xbin/hexwords
Xbin/mpedit
Xbin/mupdate
Xbin/mpatrol
Xbin/mleak
Xbin/mptrace
Xbin/mprof
Xlib/libmpalloc.a
Xlib/libmpalloc.so
Xlib/libmpatrol.a
Xlib/libmpatrol.so
Xlib/libmptools.a
Xlib/libmptools.so
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.dvi
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.guide
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.html
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.info
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.pdf
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.ps
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.texi
X%%PORTDOCS%%%%DOCSDIR%%/mpatrol.txt
X%%PORTDOCS%%%%DOCSDIR%%/refcard.dvi
X%%PORTDOCS%%%%DOCSDIR%%/refcard.pdf
X%%PORTDOCS%%%%DOCSDIR%%/refcard.ps
X%%PORTDOCS%%%%DOCSDIR%%/refcard.tex
X%%PORTDOCS%%%%DOCSDIR%%/source.tex
X%%PORTDOCS%%%%DOCSDIR%%/texinfo.tex
X%%PORTDOCS%%%%DOCSDIR%%/images/cc1.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/cc1.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/cc1.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/collect2.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/collect2.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/collect2.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/cpp.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/cpp.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/cpp.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/gcc.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/gcc.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/gcc.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/mpatrol.txt
X%%PORTDOCS%%%%DOCSDIR%%/images/test.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/test.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/test.pdf
X%%PORTDOCS%%%%DOCSDIR%%/images/trace.eps
X%%PORTDOCS%%%%DOCSDIR%%/images/trace.jpg
X%%PORTDOCS%%%%DOCSDIR%%/images/trace.pdf
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/images
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-mpatrol/pkg-plist
exit
--- mpatrol.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306141351.h5EDpqE6092058>