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