]> git.pld-linux.org Git - packages/valgrind.git/blob - valgrind.spec
- fix build with linux 4.x
[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.10.1
11 Release:        2
12 License:        GPL v2+
13 Group:          Development/Tools
14 Source0:        http://valgrind.org/downloads/%{name}-%{version}.tar.bz2
15 # Source0-md5:  60ddae962bc79e7c95cfc4667245707f
16 Patch0:         %{name}-native-cpuid.patch
17 Patch1:         %{name}-ld_linux_strlen.patch
18 Patch2:         %{name}-glibc.patch
19 Patch3:         kernel-4.x.patch
20 URL:            http://valgrind.org/
21 BuildRequires:  autoconf >= 2.50
22 BuildRequires:  automake >= 1:1.10
23 BuildRequires:  gcc >= 5:3.0
24 # check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version])
25 BuildRequires:  glibc-devel >= 6:2.2
26 BuildRequires:  glibc-devel < 6:2.22
27 BuildRequires:  libgomp-devel
28 BuildRequires:  libstdc++-devel
29 %{?with_mpi:BuildRequires:      mpi-devel}
30 Obsoletes:      valgrind-callgrind
31 Obsoletes:      valgrind-calltree
32 ExclusiveArch:  %{ix86} %{x8664} arm ppc ppc64 s390x x32
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _noautostrip    .*/vgpreload.*\\.so
36 # ld portion broken
37 %undefine       with_ccache
38
39 %description
40 Valgrind is a GPL'd system for debugging and profiling Linux programs.
41 With the tools that come with Valgrind, you can automatically detect
42 many memory management and threading bugs, avoiding hours of
43 frustrating bug-hunting, making your programs more stable. You can
44 also perform detailed profiling to help speed up your programs.
45
46 %description -l pl.UTF-8
47 Valgrind jest systemem służącym do odpluskwiania i profilowania
48 programów na Linuksie. Używając dostarczanych z nim narzędzi można
49 automatycznie wykrywać wiele błędów związanych z zarządzaniem pamięcią
50 i wątkowaniem, dzięki czemu unika się frustrującego polowania na
51 błędy, a także czyni się programy bardziej stabilnymi. Możliwe jest
52 również dokładne profilowanie, dzięki któremu programy zaczną szybciej
53 pracować.
54
55 %prep
56 %setup -q
57 %patch0 -p1
58 %patch1 -p1
59 %patch2 -p1
60 %patch3 -p1
61
62 sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.ac
63
64 %build
65 %{__aclocal}
66 %{__autoconf}
67 %{__autoheader}
68 %{__automake}
69
70 ac_cv_path_GDB=/usr/bin/gdb \
71 %configure \
72         CC=gcc \
73         --enable-tls \
74 %if %{_lib} != "lib"
75         --enable-only64bit \
76 %endif
77         LDFLAGS="" # no strip!
78
79 %{__make}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %{__make} install \
85         DESTDIR=$RPM_BUILD_ROOT
86
87 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc
88 cp -p docs/index.pdf docs/valgrind_manual.pdf
89 cp -p docs/index.ps docs/valgrind_manual.ps
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %files
95 %defattr(644,root,root,755)
96 %doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL
97 %doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps
98 %attr(755,root,root) %{_bindir}/callgrind_annotate
99 %attr(755,root,root) %{_bindir}/callgrind_control
100 %attr(755,root,root) %{_bindir}/cg_annotate
101 %attr(755,root,root) %{_bindir}/cg_diff
102 %attr(755,root,root) %{_bindir}/cg_merge
103 %attr(755,root,root) %{_bindir}/ms_print
104 %attr(755,root,root) %{_bindir}/valgrind
105 %attr(755,root,root) %{_bindir}/valgrind-di-server
106 %attr(755,root,root) %{_bindir}/valgrind-listener
107 %attr(755,root,root) %{_bindir}/vgdb
108 %dir %{_libdir}/%{name}
109 %attr(755,root,root) %{_libdir}/%{name}/*-linux
110 %attr(755,root,root) %{_libdir}/%{name}/vgpreload_*-linux.so
111 %if %{with mpi}
112 # TODO: subpackage?
113 %attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so
114 %endif
115 %{_libdir}/%{name}/*.xml
116 %{_libdir}/%{name}/default.supp
117 %{_libdir}/%{name}/lib*-linux.a
118 %{_includedir}/valgrind
119 %{_mandir}/man1/callgrind_annotate.1*
120 %{_mandir}/man1/callgrind_control.1*
121 %{_mandir}/man1/cg_annotate.1*
122 %{_mandir}/man1/cg_diff.1*
123 %{_mandir}/man1/cg_merge.1*
124 %{_mandir}/man1/ms_print.1*
125 %{_mandir}/man1/valgrind.1*
126 %{_mandir}/man1/valgrind-listener.1*
127 %{_mandir}/man1/vgdb.1*
128 %{_pkgconfigdir}/valgrind.pc
This page took 0.113577 seconds and 4 git commands to generate.