1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit toolchain-funcs
7 # Upstream-package has no version in it's name.
8 # We therefore repackage it directly, together with the patches.
11 DESCRIPTION="trace and analyze memory leaks in C++ programs"
12 HOMEPAGE="http://www.andreasen.org/LeakTracer/"
13 SRC_URI="mirror://gentoo/${P}-gentoo_p${PATCH_LEVEL}.tbz2"
15 LICENSE="public-domain"
17 KEYWORDS="~amd64 ~ppc ~x86"
23 # leaktracer is being realized using LD_PRELOAD and segfaults
24 # when being run in the sandbox and the library is _not_ in
25 # /usr/$(get_libdir) which is not possible before installation
29 eapply -p1 "${WORKDIR}/patches/01_all_gcc-cflags.patch"
30 eapply -p0 "${WORKDIR}/patches/05_all_libdir.patch"
31 eapply -p1 "${WORKDIR}/patches/15_all_printf.patch"
34 -e "s|%LIBDIR%|$(get_libdir)|" \
35 LeakCheck || die "sed for setting lib path failed"
41 emake CXX=$(tc-getCXX)
45 dobin LeakCheck leak-analyze
46 dolib.so LeakTracer.so
53 elog "To use LeakTracer, run LeakCheck my_prog and then leak-analyze my_prog leak.out"
54 elog "Please refer to README file for more info."