You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.4 KiB
56 lines
1.4 KiB
8 years ago
|
# Copyright 1999-2016 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
8 years ago
|
EAPI=6
|
||
|
inherit toolchain-funcs
|
||
13 years ago
|
|
||
|
# Upstream-package has no version in it's name.
|
||
|
# We therefore repackage it directly, together with the patches.
|
||
|
PATCH_LEVEL="2"
|
||
|
|
||
|
DESCRIPTION="trace and analyze memory leaks in C++ programs"
|
||
|
HOMEPAGE="http://www.andreasen.org/LeakTracer/"
|
||
|
SRC_URI="mirror://gentoo/${P}-gentoo_p${PATCH_LEVEL}.tbz2"
|
||
|
|
||
|
LICENSE="public-domain"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~ppc ~x86"
|
||
|
|
||
8 years ago
|
DEPEND="dev-lang/perl
|
||
13 years ago
|
sys-devel/gdb"
|
||
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
# leaktracer is being realized using LD_PRELOAD and segfaults
|
||
|
# when being run in the sandbox and the library is _not_ in
|
||
|
# /usr/$(get_libdir) which is not possible before installation
|
||
|
RESTRICT="test"
|
||
|
|
||
8 years ago
|
src_prepare() {
|
||
|
eapply -p1 "${WORKDIR}/patches/01_all_gcc-cflags.patch"
|
||
|
eapply -p0 "${WORKDIR}/patches/05_all_libdir.patch"
|
||
|
eapply -p1 "${WORKDIR}/patches/15_all_printf.patch"
|
||
13 years ago
|
|
||
|
sed -i \
|
||
|
-e "s|%LIBDIR%|$(get_libdir)|" \
|
||
|
LeakCheck || die "sed for setting lib path failed"
|
||
8 years ago
|
|
||
|
eapply_user
|
||
13 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
8 years ago
|
emake CXX=$(tc-getCXX)
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
8 years ago
|
dobin LeakCheck leak-analyze
|
||
|
dolib.so LeakTracer.so
|
||
13 years ago
|
dodoc README test.cc
|
||
8 years ago
|
docinto html
|
||
|
dodoc README.html
|
||
13 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "To use LeakTracer, run LeakCheck my_prog and then leak-analyze my_prog leak.out"
|
||
8 years ago
|
elog "Please refer to README file for more info."
|
||
13 years ago
|
}
|