X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=valgrind.spec;h=f07f03480fe6aef566b1228dcb618b34dffca3a3;hb=98a1cdbe9c170e32ecc90528e049cca33e91e7e1;hp=0ad5eb99d3f1ac3374349d1dd5727915d9e2376b;hpb=6b924c543be603bf57cbb407d11410434d3381f8;p=packages%2Fvalgrind.git diff --git a/valgrind.spec b/valgrind.spec index 0ad5eb9..f07f034 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -1,31 +1,46 @@ +# TODO: +# - fix CC detection in configure, so CC=gcc won't be needed # -%define _rel test2 +# Conditional build: +%bcond_with mpi # MPI wrapper module # Summary: An open-source memory debugger Summary(pl.UTF-8): Otwarty odpluskwiacz pamięci Name: valgrind -Version: 3.6.0 -Release: 0.%{_rel}.1 -License: GPL +Version: 3.22.0 +Release: 2 +License: GPL v2+ Group: Development/Tools -Source0: http://valgrind.org/downloads/%{name}-%{version}-%{_rel}.tar.bz2 -# Source0-md5: 49b94fcba8d653da21601f0ad87c014e -Patch0: %{name}-debuginfo.patch -URL: http://valgrind.org/ -BuildRequires: autoconf -BuildRequires: automake -# Needs libc.a -BuildRequires: glibc-static +Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2 +# Source0-md5: 38ea14f567efa09687a822b33b4d9d60 +Patch0: %{name}-native-cpuid.patch +Patch1: %{name}-ld_linux_strlen.patch +Patch2: %{name}-datadir.patch +URL: https://www.valgrind.org/ +BuildRequires: autoconf >= 2.50 +BuildRequires: automake >= 1:1.10 +BuildRequires: gcc >= 5:3.0 +%ifarch x32 +BuildRequires: gcc-multilib-64 >= 5:3.0 +%endif +# check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version]) +BuildRequires: glibc-devel >= 6:2.2 BuildRequires: libgomp-devel -Obsoletes: valgrind-callgrind -Obsoletes: valgrind-calltree -ExclusiveArch: %{ix86} %{x8664} ppc ppc64 +BuildRequires: libstdc++-devel +%{?with_mpi:BuildRequires: mpi-devel} +BuildRequires: rpmbuild(macros) >= 2.007 +Obsoletes: valgrind-callgrind < 0.11 +Obsoletes: valgrind-calltree < 0.10 +ExclusiveArch: %{ix86} %{x8664} %{armv7} ppc ppc64 s390x x32 aarch64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _noautostrip .*/vgpreload.*\\.so +%define _noautostrip .*\\(/vgpreload.*\\.so\\|\\.[ch]$\\) +%define filterout_c -fstack-protector-strong # ld portion broken %undefine with_ccache +%define specflags_arm -marm + %description Valgrind is a GPL'd system for debugging and profiling Linux programs. With the tools that come with Valgrind, you can automatically detect @@ -43,22 +58,36 @@ również dokładne profilowanie, dzięki któremu programy zaczną szybciej pracować. %prep -%setup -q -n %{name}-%{version}-%{_rel} +%setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ + cachegrind/cg_annotate.in \ + cachegrind/cg_merge.in \ + cachegrind/cg_diff.in -sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in +%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \ + callgrind/callgrind_annotate.in \ + callgrind/callgrind_control.in %build %{__aclocal} -%{__autoheader} %{__autoconf} +%{__autoheader} %{__automake} + +ac_cv_path_GDB=/usr/bin/gdb \ %configure \ --enable-tls \ -%if %{_lib} != "lib" + %{!?with_mpi:--with-mpicc=/bin/false} \ +%if "%{_lib}" != "lib" --enable-only64bit \ -%endif +%endif \ + --enable-lto \ LDFLAGS="" # no strip! + %{__make} %install @@ -67,9 +96,9 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc -mv docs/index.pdf docs/valgrind_manual.pdf -mv docs/index.ps docs/valgrind_manual.ps +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc +cp -p docs/index.pdf docs/valgrind_manual.pdf +cp -p docs/index.ps docs/valgrind_manual.ps %clean rm -rf $RPM_BUILD_ROOT @@ -78,12 +107,41 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL %doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps -%attr(755,root,root) %{_bindir}/* -%{_includedir}/* +%attr(755,root,root) %{_bindir}/callgrind_annotate +%attr(755,root,root) %{_bindir}/callgrind_control +%attr(755,root,root) %{_bindir}/cg_annotate +%attr(755,root,root) %{_bindir}/cg_diff +%attr(755,root,root) %{_bindir}/cg_merge +%attr(755,root,root) %{_bindir}/ms_print +%attr(755,root,root) %{_bindir}/valgrind +%attr(755,root,root) %{_bindir}/valgrind-di-server +%attr(755,root,root) %{_bindir}/valgrind-listener +%attr(755,root,root) %{_bindir}/vgdb %dir %{_libdir}/%{name} -%attr(755,root,root) %{_libdir}/%{name}/*-linux -%{_libdir}/%{name}/*.a -%attr(755,root,root) %{_libdir}/%{name}/*.so -%{_libdir}/%{name}/*.supp -%{_mandir}/man1/*.1* -%{_pkgconfigdir}/*.pc +%{_libdir}/%{name}/lib*-linux.a +%if %{with mpi} +# TODO: subpackage? +%attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so +%endif +%if "%{_libexecdir}" != "%{_libdir}" +%dir %{_libexecdir}/%{name} +%endif +%attr(755,root,root) %{_libexecdir}/%{name}/*-linux +%attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor.py +%attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor-def.py +%attr(755,root,root) %{_libexecdir}/%{name}/vgpreload_*-linux.so +%{_libexecdir}/%{name}/*.xml +%{_libexecdir}/%{name}/default.supp +%{_datadir}/%{name} +%{_includedir}/valgrind +%{_mandir}/man1/callgrind_annotate.1* +%{_mandir}/man1/callgrind_control.1* +%{_mandir}/man1/cg_annotate.1* +%{_mandir}/man1/cg_diff.1* +%{_mandir}/man1/cg_merge.1* +%{_mandir}/man1/ms_print.1* +%{_mandir}/man1/valgrind.1* +%{_mandir}/man1/valgrind-di-server.1* +%{_mandir}/man1/valgrind-listener.1* +%{_mandir}/man1/vgdb.1* +%{_pkgconfigdir}/valgrind.pc