]>
Commit | Line | Data |
---|---|---|
23a3ecde AM |
1 | # TODO: |
2 | # - fix CC detection in configure, so CC=gcc won't be needed | |
9ab8af97 JB |
3 | # |
4 | # Conditional build: | |
5 | %bcond_with mpi # MPI wrapper module | |
6 | # | |
9fd66024 | 7 | Summary: An open-source memory debugger |
81257f7b | 8 | Summary(pl.UTF-8): Otwarty odpluskwiacz pamięci |
cccdc142 | 9 | Name: valgrind |
e19325b6 | 10 | Version: 3.21.0 |
13ff9b64 | 11 | Release: 1 |
9ab8af97 | 12 | License: GPL v2+ |
c5631d09 | 13 | Group: Development/Tools |
644f5b95 | 14 | Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2 |
e19325b6 | 15 | # Source0-md5: b8b89b327732c12191306c3d31cfd4b1 |
5beaf085 KK |
16 | Patch0: %{name}-native-cpuid.patch |
17 | Patch1: %{name}-ld_linux_strlen.patch | |
a3b52c72 | 18 | Patch2: %{name}-datadir.patch |
09b8d42f | 19 | URL: https://www.valgrind.org/ |
9ab8af97 JB |
20 | BuildRequires: autoconf >= 2.50 |
21 | BuildRequires: automake >= 1:1.10 | |
54375cc9 | 22 | BuildRequires: gcc >= 5:3.0 |
a8c253df JB |
23 | %ifarch x32 |
24 | BuildRequires: gcc-multilib-64 >= 5:3.0 | |
25 | %endif | |
2ea65fbf | 26 | # check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version]) |
3a93a74d | 27 | BuildRequires: glibc-devel >= 6:2.2 |
1abb996b | 28 | BuildRequires: libgomp-devel |
54375cc9 | 29 | BuildRequires: libstdc++-devel |
9ab8af97 | 30 | %{?with_mpi:BuildRequires: mpi-devel} |
4c3298eb | 31 | BuildRequires: rpmbuild(macros) >= 2.007 |
09b8d42f JB |
32 | Obsoletes: valgrind-callgrind < 0.11 |
33 | Obsoletes: valgrind-calltree < 0.10 | |
4c3298eb | 34 | ExclusiveArch: %{ix86} %{x8664} %{armv7} ppc ppc64 s390x x32 aarch64 |
cccdc142 JK |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
9fd66024 | 37 | %define _noautostrip .*/vgpreload.*\\.so |
4dd60bb4 | 38 | %define filterout_c -fstack-protector-strong |
79e9a7b2 ER |
39 | # ld portion broken |
40 | %undefine with_ccache | |
a803692b | 41 | |
179d7896 JP |
42 | %define specflags_arm -marm |
43 | ||
cccdc142 | 44 | %description |
9fd66024 | 45 | Valgrind is a GPL'd system for debugging and profiling Linux programs. |
46 | With the tools that come with Valgrind, you can automatically detect | |
6b924c54 JP |
47 | many memory management and threading bugs, avoiding hours of |
48 | frustrating bug-hunting, making your programs more stable. You can | |
49 | also perform detailed profiling to help speed up your programs. | |
cccdc142 | 50 | |
f86a5f7e JR |
51 | %description -l pl.UTF-8 |
52 | Valgrind jest systemem służącym do odpluskwiania i profilowania | |
53 | programów na Linuksie. Używając dostarczanych z nim narzędzi można | |
6b924c54 JP |
54 | automatycznie wykrywać wiele błędów związanych z zarządzaniem pamięcią |
55 | i wątkowaniem, dzięki czemu unika się frustrującego polowania na | |
56 | błędy, a także czyni się programy bardziej stabilnymi. Możliwe jest | |
57 | również dokładne profilowanie, dzięki któremu programy zaczną szybciej | |
58 | pracować. | |
a3b1e5f5 | 59 | |
cccdc142 | 60 | %prep |
4ff172b5 | 61 | %setup -q |
5beaf085 | 62 | %patch0 -p1 |
1dc3004f | 63 | %patch1 -p1 |
a3b52c72 | 64 | %patch2 -p1 |
68bd9ee3 | 65 | |
e19325b6 JP |
66 | %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ |
67 | cachegrind/cg_annotate.in \ | |
68 | cachegrind/cg_merge.in \ | |
69 | cachegrind/cg_diff.in | |
70 | ||
71 | %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \ | |
72 | callgrind/callgrind_annotate.in \ | |
73 | callgrind/callgrind_control.in | |
74 | ||
cccdc142 | 75 | %build |
c594fc71 | 76 | %{__aclocal} |
cccdc142 | 77 | %{__autoconf} |
9ab8af97 | 78 | %{__autoheader} |
cccdc142 | 79 | %{__automake} |
e7968d53 PS |
80 | |
81 | ac_cv_path_GDB=/usr/bin/gdb \ | |
9eb4ec2b | 82 | %configure \ |
1abb996b | 83 | --enable-tls \ |
6d4c7c59 | 84 | %{!?with_mpi:--with-mpicc=/bin/false} \ |
157676c9 | 85 | %if "%{_lib}" != "lib" |
68bd9ee3 | 86 | --enable-only64bit \ |
644f5b95 | 87 | %endif \ |
09b8d42f | 88 | --enable-lto \ |
9eb4ec2b | 89 | LDFLAGS="" # no strip! |
e7968d53 | 90 | |
cccdc142 JK |
91 | %{__make} |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
a273c144 JB |
96 | %{__make} install \ |
97 | DESTDIR=$RPM_BUILD_ROOT | |
cccdc142 | 98 | |
54375cc9 | 99 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc |
ef1230c9 AM |
100 | cp -p docs/index.pdf docs/valgrind_manual.pdf |
101 | cp -p docs/index.ps docs/valgrind_manual.ps | |
6b924c54 | 102 | |
cccdc142 JK |
103 | %clean |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
a15e5165 | 108 | %doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL |
6b924c54 | 109 | %doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps |
54375cc9 JB |
110 | %attr(755,root,root) %{_bindir}/callgrind_annotate |
111 | %attr(755,root,root) %{_bindir}/callgrind_control | |
112 | %attr(755,root,root) %{_bindir}/cg_annotate | |
113 | %attr(755,root,root) %{_bindir}/cg_diff | |
114 | %attr(755,root,root) %{_bindir}/cg_merge | |
115 | %attr(755,root,root) %{_bindir}/ms_print | |
116 | %attr(755,root,root) %{_bindir}/valgrind | |
ef1230c9 | 117 | %attr(755,root,root) %{_bindir}/valgrind-di-server |
54375cc9 JB |
118 | %attr(755,root,root) %{_bindir}/valgrind-listener |
119 | %attr(755,root,root) %{_bindir}/vgdb | |
f1c36ddf | 120 | %dir %{_libdir}/%{name} |
157676c9 | 121 | %{_libdir}/%{name}/lib*-linux.a |
9ab8af97 JB |
122 | %if %{with mpi} |
123 | # TODO: subpackage? | |
124 | %attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so | |
125 | %endif | |
09b8d42f | 126 | %if "%{_libexecdir}" != "%{_libdir}" |
157676c9 | 127 | %dir %{_libexecdir}/%{name} |
09b8d42f | 128 | %endif |
157676c9 | 129 | %attr(755,root,root) %{_libexecdir}/%{name}/*-linux |
e19325b6 JP |
130 | %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor.py |
131 | %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor-def.py | |
157676c9 JP |
132 | %attr(755,root,root) %{_libexecdir}/%{name}/vgpreload_*-linux.so |
133 | %{_libexecdir}/%{name}/*.xml | |
134 | %{_libexecdir}/%{name}/default.supp | |
a3b52c72 | 135 | %{_datadir}/%{name} |
54375cc9 JB |
136 | %{_includedir}/valgrind |
137 | %{_mandir}/man1/callgrind_annotate.1* | |
138 | %{_mandir}/man1/callgrind_control.1* | |
139 | %{_mandir}/man1/cg_annotate.1* | |
ef1230c9 AM |
140 | %{_mandir}/man1/cg_diff.1* |
141 | %{_mandir}/man1/cg_merge.1* | |
54375cc9 JB |
142 | %{_mandir}/man1/ms_print.1* |
143 | %{_mandir}/man1/valgrind.1* | |
6d4c7c59 | 144 | %{_mandir}/man1/valgrind-di-server.1* |
ef1230c9 AM |
145 | %{_mandir}/man1/valgrind-listener.1* |
146 | %{_mandir}/man1/vgdb.1* | |
54375cc9 | 147 | %{_pkgconfigdir}/valgrind.pc |