From db058bdc720b8a7820b95afa065d31950eb0f4f3322227315d08cce30f9d7415 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 26 Sep 2012 07:54:36 +0000 Subject: [PATCH] Accepting request 135876 from devel:libraries:c_c++ Fix the ugliness of that make install line and make RPM_OPT_FLAGS replacement more robust. (forwarded request 135874 from jengelh) OBS-URL: https://build.opensuse.org/request/show/135876 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hdf5?expand=0&rev=7 --- hdf5.changes | 7 +++++++ hdf5.spec | 38 +++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/hdf5.changes b/hdf5.changes index 1877123..c33982b 100644 --- a/hdf5.changes +++ b/hdf5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Sep 24 12:29:04 UTC 2012 - sweet_f_a@gmx.de + +- don't use deprecated macro makeinstall +- enable test suite for parallel builds +- always build out of tree instead of copying sources + ------------------------------------------------------------------- Fri Sep 7 17:24:21 UTC 2012 - scorot@free.fr diff --git a/hdf5.spec b/hdf5.spec index 5acf91f..b35dfad 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -275,21 +275,21 @@ This package provides the static libraries. %patch4 -p0 -b .tests-arm %endif -set -- * -for mpi in %_mpi -do - mkdir $mpi - cp -ap "$@" $mpi +for build_dir in build %_mpi; do + mkdir $build_dir + ln -s ../configure $build_dir done %build export CC=gcc export CXX=g++ export F9X=gfortran -export CFLAGS="${RPM_OPT_FLAGS/O2/O0}" +export CFLAGS="${RPM_OPT_FLAGS/-O2/-O0}" # export CFLAGS="%%{optflags} -fno-strict-aliasing" +pushd build %configure \ + --docdir=%{_docdir}/%{name} \ --disable-dependency-tracking \ %if 0%{?suse_version} > 1140 --enable-fortran \ @@ -300,6 +300,7 @@ export CFLAGS="${RPM_OPT_FLAGS/O2/O0}" --with-pthread make %{?_smp_mflags} +popd for mpi in %_mpi; do @@ -307,8 +308,9 @@ cd $mpi export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc" export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90" export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77" -export LD_LIBRARY_PATH=%{_libdir}/mpi/gcc/$mpi/%_lib +export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib" %configure \ + --docdir=%{_docdir}/%{name} \ --prefix=%{_libdir}/mpi/gcc/$mpi \ --bindir=%{_libdir}/mpi/gcc/$mpi/bin \ --libdir=%{_libdir}/mpi/gcc/$mpi/%_lib \ @@ -328,9 +330,11 @@ cd .. done %install -%makeinstall docdir=%{buildroot}%{_docdir} -rm -rf %{buildroot}/%{_libdir}/*.la +for build_dir in build %_mpi; do + make install DESTDIR="%buildroot" -C "$build_dir" +done +find "%buildroot/%_libdir" -type f -name "*.la" -delete find %{buildroot}%{_datadir}/hdf5_examples -type f \ | grep -v ".sh$" | xargs chmod 644 %if 0%{?suse_version} >= 1110 @@ -350,17 +354,13 @@ cat > %{buildroot}%{_sysconfdir}/rpm/macros.hdf5 <