]> git.pld-linux.org Git - packages/LeakTracer.git/blame - LeakTracer.spec
- release 2
[packages/LeakTracer.git] / LeakTracer.spec
CommitLineData
96e48a11 1Summary: A tool for trace and analyze memory leaks in C++ programs
391d23e9 2Summary(pl.UTF-8): Narzędzie do śledzenia i analizowania wycieków pamięci w programach w C++
96e48a11 3Name: LeakTracer
ac77a824 4Version: 2.4
df30cf2e 5Release: 2
96e48a11
PS
6License: Public Domain
7Group: Applications
e23bdcbe 8Source0: http://www.andreasen.org/LeakTracer/LeakTracer.tar.gz
96e48a11
PS
9# Source0-md5: e1cf9d03c12a45d39f253e558d231438
10Patch0: %{name}-Makefile.patch
c8cfd0aa
PS
11Patch1: %{name}-64bit.patch
12Patch2: %{name}-caller_addr.patch
96e48a11 13URL: http://www.andreasen.org/LeakTracer/
7e8a68f9 14BuildRequires: gcc-c++
96e48a11
PS
15BuildRequires: sed >= 4.0
16Requires: gdb
a5286e57 17ExcludeArch: alpha arm mips
96e48a11
PS
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21LeakTracer is a small tool for checking a C++ program for memory
22leaks. To use LeakTracer, run your program using the provided
23LeakCheck script. It uses the LD_PRELOAD feature to "overlay" some
495dd2b4 24functions on top of your functions (no recompile needed). leak-analyze
96e48a11
PS
25uses gdb to print out the exact line where the memory was allocated
26and not freed - this of course means you have to free all dynamically
27allocated data. LeakTracer also overrides the global operator new and
28operator delete - this will give problems if you override them as
29well. LeakTracer traces only new/new[] and delete calls - it does not
30look at malloc/free/realloc.
31
aa2f9310
JR
32%description -l pl.UTF-8
33LeakTracer to małe narzędzie do sprawdzania programów w C++ pod kątem
34wycieków pamięci. Aby go użyć na jakimś programie, trzeba uruchomić
35ten program przy użyciu załączonego skryptu LeakCheck. Używa on
36LD_PRELOAD do przykrycia niektórych funkcji (rekompilacja nie jest
37potrzebna). leak-analyze używa gdb do pokazania w których dokładnie
38liniach pamięć została przydzielona i nie zwolniona - co oznacza, że
39trzeba zwolnić wszystkie dynamicznie przydzielone dane. LeakTracer
40przykrywa także globalne operatory new i delete - może to spowodować
41problemy, jeśli my także chcemy je przykryć. LeakTracer śledzi tylko
42wywołania new/new[] i delete - nie patrzy na malloc/free/realloc.
7e8a68f9 43
96e48a11
PS
44%prep
45%setup -q -n %{name}
46%patch0 -p1
c8cfd0aa
PS
47%patch1 -p0
48%patch2 -p0
96e48a11
PS
49
50%build
51sed -i "s:SHLIB=.*:SHLIB=%{_libdir}/LeakTracer.so:" LeakCheck
52
53%{__make} \
54 CXX="%{__cxx}" \
a7b31836 55 CXXFLAGS="%{rpmcxxflags} -nodefaultlibs -O1 -fno-omit-frame-pointer"
96e48a11
PS
56
57%install
58rm -rf $RPM_BUILD_ROOT
59install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
60
61install leak-analyze $RPM_BUILD_ROOT%{_bindir}
62install LeakCheck $RPM_BUILD_ROOT%{_bindir}
63install LeakTracer.so $RPM_BUILD_ROOT%{_libdir}
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%post -p /sbin/ldconfig
69%postun -p /sbin/ldconfig
70
71%files
72%defattr(644,root,root,755)
73%doc README
74%attr(755,root,root) %{_bindir}/*
75%attr(755,root,root) %{_libdir}/*.so
This page took 0.073963 seconds and 4 git commands to generate.