]>
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 |
acea5030 | 10 | Version: 3.22.0 |
9f237e98 | 11 | Release: 3 |
9ab8af97 | 12 | License: GPL v2+ |
c5631d09 | 13 | Group: Development/Tools |
644f5b95 | 14 | Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2 |
acea5030 | 15 | # Source0-md5: 38ea14f567efa09687a822b33b4d9d60 |
5beaf085 KK |
16 | Patch0: %{name}-native-cpuid.patch |
17 | Patch1: %{name}-ld_linux_strlen.patch | |
a3b52c72 | 18 | Patch2: %{name}-datadir.patch |
9f237e98 | 19 | Patch3: mold-debuginfo.patch |
09b8d42f | 20 | URL: https://www.valgrind.org/ |
9ab8af97 JB |
21 | BuildRequires: autoconf >= 2.50 |
22 | BuildRequires: automake >= 1:1.10 | |
54375cc9 | 23 | BuildRequires: gcc >= 5:3.0 |
a8c253df JB |
24 | %ifarch x32 |
25 | BuildRequires: gcc-multilib-64 >= 5:3.0 | |
26 | %endif | |
2ea65fbf | 27 | # check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version]) |
3a93a74d | 28 | BuildRequires: glibc-devel >= 6:2.2 |
1abb996b | 29 | BuildRequires: libgomp-devel |
54375cc9 | 30 | BuildRequires: libstdc++-devel |
9ab8af97 | 31 | %{?with_mpi:BuildRequires: mpi-devel} |
4c3298eb | 32 | BuildRequires: rpmbuild(macros) >= 2.007 |
09b8d42f JB |
33 | Obsoletes: valgrind-callgrind < 0.11 |
34 | Obsoletes: valgrind-calltree < 0.10 | |
4c3298eb | 35 | ExclusiveArch: %{ix86} %{x8664} %{armv7} ppc ppc64 s390x x32 aarch64 |
cccdc142 JK |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
bbc3151d | 38 | %define _noautostrip .*/vgpreload.*\\.so |
4dd60bb4 | 39 | %define filterout_c -fstack-protector-strong |
79e9a7b2 ER |
40 | # ld portion broken |
41 | %undefine with_ccache | |
a803692b | 42 | |
179d7896 JP |
43 | %define specflags_arm -marm |
44 | ||
cccdc142 | 45 | %description |
9fd66024 | 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 | |
6b924c54 JP |
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. | |
cccdc142 | 51 | |
f86a5f7e JR |
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 | |
6b924c54 JP |
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 | |
59 | pracować. | |
a3b1e5f5 | 60 | |
cccdc142 | 61 | %prep |
4ff172b5 | 62 | %setup -q |
5beaf085 | 63 | %patch0 -p1 |
1dc3004f | 64 | %patch1 -p1 |
a3b52c72 | 65 | %patch2 -p1 |
9f237e98 | 66 | %patch3 -p1 |
68bd9ee3 | 67 | |
e19325b6 JP |
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 \ | |
71 | cachegrind/cg_diff.in | |
72 | ||
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 | |
76 | ||
cccdc142 | 77 | %build |
c594fc71 | 78 | %{__aclocal} |
cccdc142 | 79 | %{__autoconf} |
9ab8af97 | 80 | %{__autoheader} |
cccdc142 | 81 | %{__automake} |
e7968d53 PS |
82 | |
83 | ac_cv_path_GDB=/usr/bin/gdb \ | |
9eb4ec2b | 84 | %configure \ |
1abb996b | 85 | --enable-tls \ |
6d4c7c59 | 86 | %{!?with_mpi:--with-mpicc=/bin/false} \ |
157676c9 | 87 | %if "%{_lib}" != "lib" |
68bd9ee3 | 88 | --enable-only64bit \ |
644f5b95 | 89 | %endif \ |
09b8d42f | 90 | --enable-lto \ |
9eb4ec2b | 91 | LDFLAGS="" # no strip! |
e7968d53 | 92 | |
cccdc142 JK |
93 | %{__make} |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
a273c144 JB |
98 | %{__make} install \ |
99 | DESTDIR=$RPM_BUILD_ROOT | |
cccdc142 | 100 | |
54375cc9 | 101 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc |
ef1230c9 AM |
102 | cp -p docs/index.pdf docs/valgrind_manual.pdf |
103 | cp -p docs/index.ps docs/valgrind_manual.ps | |
6b924c54 | 104 | |
cccdc142 JK |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
a15e5165 | 110 | %doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL |
6b924c54 | 111 | %doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps |
54375cc9 JB |
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 | |
ef1230c9 | 119 | %attr(755,root,root) %{_bindir}/valgrind-di-server |
54375cc9 JB |
120 | %attr(755,root,root) %{_bindir}/valgrind-listener |
121 | %attr(755,root,root) %{_bindir}/vgdb | |
f1c36ddf | 122 | %dir %{_libdir}/%{name} |
157676c9 | 123 | %{_libdir}/%{name}/lib*-linux.a |
9ab8af97 JB |
124 | %if %{with mpi} |
125 | # TODO: subpackage? | |
126 | %attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so | |
127 | %endif | |
09b8d42f | 128 | %if "%{_libexecdir}" != "%{_libdir}" |
157676c9 | 129 | %dir %{_libexecdir}/%{name} |
09b8d42f | 130 | %endif |
157676c9 | 131 | %attr(755,root,root) %{_libexecdir}/%{name}/*-linux |
e19325b6 JP |
132 | %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor.py |
133 | %attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor-def.py | |
157676c9 JP |
134 | %attr(755,root,root) %{_libexecdir}/%{name}/vgpreload_*-linux.so |
135 | %{_libexecdir}/%{name}/*.xml | |
136 | %{_libexecdir}/%{name}/default.supp | |
a3b52c72 | 137 | %{_datadir}/%{name} |
54375cc9 JB |
138 | %{_includedir}/valgrind |
139 | %{_mandir}/man1/callgrind_annotate.1* | |
140 | %{_mandir}/man1/callgrind_control.1* | |
141 | %{_mandir}/man1/cg_annotate.1* | |
ef1230c9 AM |
142 | %{_mandir}/man1/cg_diff.1* |
143 | %{_mandir}/man1/cg_merge.1* | |
54375cc9 JB |
144 | %{_mandir}/man1/ms_print.1* |
145 | %{_mandir}/man1/valgrind.1* | |
6d4c7c59 | 146 | %{_mandir}/man1/valgrind-di-server.1* |
ef1230c9 AM |
147 | %{_mandir}/man1/valgrind-listener.1* |
148 | %{_mandir}/man1/vgdb.1* | |
54375cc9 | 149 | %{_pkgconfigdir}/valgrind.pc |