]> git.pld-linux.org Git - packages/valgrind.git/blob - valgrind.spec
upstream fix for assertion failure on loading debuginfo produced by mold; rel 3
[packages/valgrind.git] / valgrind.spec
1 # TODO:
2 # - fix CC detection in configure, so CC=gcc won't be needed
3 #
4 # Conditional build:
5 %bcond_with     mpi     # MPI wrapper module
6 #
7 Summary:        An open-source memory debugger
8 Summary(pl.UTF-8):      Otwarty odpluskwiacz pamięci
9 Name:           valgrind
10 Version:        3.22.0
11 Release:        3
12 License:        GPL v2+
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
24 %ifarch x32
25 BuildRequires:  gcc-multilib-64 >= 5:3.0
26 %endif
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)
37
38 %define         _noautostrip    .*/vgpreload.*\\.so
39 %define         filterout_c     -fstack-protector-strong
40 # ld portion broken
41 %undefine       with_ccache
42
43 %define         specflags_arm   -marm
44
45 %description
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.
51
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
59 pracować.
60
61 %prep
62 %setup -q
63 %patch0 -p1
64 %patch1 -p1
65 %patch2 -p1
66 %patch3 -p1
67
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
77 %build
78 %{__aclocal}
79 %{__autoconf}
80 %{__autoheader}
81 %{__automake}
82
83 ac_cv_path_GDB=/usr/bin/gdb \
84 %configure \
85         --enable-tls \
86         %{!?with_mpi:--with-mpicc=/bin/false} \
87 %if "%{_lib}" != "lib"
88         --enable-only64bit \
89 %endif \
90         --enable-lto \
91         LDFLAGS="" # no strip!
92
93 %{__make}
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %{__make} install \
99         DESTDIR=$RPM_BUILD_ROOT
100
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
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
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
124 %if %{with mpi}
125 # TODO: subpackage?
126 %attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so
127 %endif
128 %if "%{_libexecdir}" != "%{_libdir}"
129 %dir %{_libexecdir}/%{name}
130 %endif
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
137 %{_datadir}/%{name}
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
This page took 0.153227 seconds and 4 git commands to generate.