2 # - fix CC detection in configure, so CC=gcc won't be needed
5 %bcond_with mpi # MPI wrapper module
7 Summary: An open-source memory debugger
8 Summary(pl.UTF-8): Otwarty odpluskwiacz pamięci
13 Group: Development/Tools
14 Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2
15 # Source0-md5: 38ea14f567efa09687a822b33b4d9d60
16 Patch0: %{name}-native-cpuid.patch
17 Patch1: %{name}-ld_linux_strlen.patch
18 Patch2: %{name}-datadir.patch
19 Patch3: mold-debuginfo.patch
20 URL: https://www.valgrind.org/
21 BuildRequires: autoconf >= 2.50
22 BuildRequires: automake >= 1:1.10
23 BuildRequires: gcc >= 5:3.0
25 BuildRequires: gcc-multilib-64 >= 5:3.0
27 # check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version])
28 BuildRequires: glibc-devel >= 6:2.2
29 BuildRequires: libgomp-devel
30 BuildRequires: libstdc++-devel
31 %{?with_mpi:BuildRequires: mpi-devel}
32 BuildRequires: rpmbuild(macros) >= 2.007
33 Obsoletes: valgrind-callgrind < 0.11
34 Obsoletes: valgrind-calltree < 0.10
35 ExclusiveArch: %{ix86} %{x8664} %{armv7} ppc ppc64 s390x x32 aarch64
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _noautostrip .*/vgpreload.*\\.so
39 %define filterout_c -fstack-protector-strong
43 %define specflags_arm -marm
46 Valgrind is a GPL'd system for debugging and profiling Linux programs.
47 With the tools that come with Valgrind, you can automatically detect
48 many memory management and threading bugs, avoiding hours of
49 frustrating bug-hunting, making your programs more stable. You can
50 also perform detailed profiling to help speed up your programs.
52 %description -l pl.UTF-8
53 Valgrind jest systemem służącym do odpluskwiania i profilowania
54 programów na Linuksie. Używając dostarczanych z nim narzędzi można
55 automatycznie wykrywać wiele błędów związanych z zarządzaniem pamięcią
56 i wątkowaniem, dzięki czemu unika się frustrującego polowania na
57 błędy, a także czyni się programy bardziej stabilnymi. Możliwe jest
58 również dokładne profilowanie, dzięki któremu programy zaczną szybciej
68 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
69 cachegrind/cg_annotate.in \
70 cachegrind/cg_merge.in \
73 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
74 callgrind/callgrind_annotate.in \
75 callgrind/callgrind_control.in
83 ac_cv_path_GDB=/usr/bin/gdb \
86 %{!?with_mpi:--with-mpicc=/bin/false} \
87 %if "%{_lib}" != "lib"
91 LDFLAGS="" # no strip!
96 rm -rf $RPM_BUILD_ROOT
99 DESTDIR=$RPM_BUILD_ROOT
101 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc
102 cp -p docs/index.pdf docs/valgrind_manual.pdf
103 cp -p docs/index.ps docs/valgrind_manual.ps
106 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL
111 %doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps
112 %attr(755,root,root) %{_bindir}/callgrind_annotate
113 %attr(755,root,root) %{_bindir}/callgrind_control
114 %attr(755,root,root) %{_bindir}/cg_annotate
115 %attr(755,root,root) %{_bindir}/cg_diff
116 %attr(755,root,root) %{_bindir}/cg_merge
117 %attr(755,root,root) %{_bindir}/ms_print
118 %attr(755,root,root) %{_bindir}/valgrind
119 %attr(755,root,root) %{_bindir}/valgrind-di-server
120 %attr(755,root,root) %{_bindir}/valgrind-listener
121 %attr(755,root,root) %{_bindir}/vgdb
122 %dir %{_libdir}/%{name}
123 %{_libdir}/%{name}/lib*-linux.a
126 %attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so
128 %if "%{_libexecdir}" != "%{_libdir}"
129 %dir %{_libexecdir}/%{name}
131 %attr(755,root,root) %{_libexecdir}/%{name}/*-linux
132 %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor.py
133 %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor-def.py
134 %attr(755,root,root) %{_libexecdir}/%{name}/vgpreload_*-linux.so
135 %{_libexecdir}/%{name}/*.xml
136 %{_libexecdir}/%{name}/default.supp
138 %{_includedir}/valgrind
139 %{_mandir}/man1/callgrind_annotate.1*
140 %{_mandir}/man1/callgrind_control.1*
141 %{_mandir}/man1/cg_annotate.1*
142 %{_mandir}/man1/cg_diff.1*
143 %{_mandir}/man1/cg_merge.1*
144 %{_mandir}/man1/ms_print.1*
145 %{_mandir}/man1/valgrind.1*
146 %{_mandir}/man1/valgrind-di-server.1*
147 %{_mandir}/man1/valgrind-listener.1*
148 %{_mandir}/man1/vgdb.1*
149 %{_pkgconfigdir}/valgrind.pc