From bbed69ec6c9c3e85255a6b0f690fb4a0410388e47d2bac378d2bee0803ef9f43 Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 29 Jan 2016 10:06:01 +0000 Subject: [PATCH] Accepting request 356581 from home:rudi_m:branches:science - update to 1.8.16, changes documented here: https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16-RELEASE.txt - rebase hdf5-ldouble-ppc64le.patch - remove hdf5-cpp-compilation-errors.patch - prepare independent so versions and add TODO !!! see TODO in spec file !!! I'm not the right persion to split packages and care for deps and baselibs etc. Don't forward to Factory before this TODO is fixed! OBS-URL: https://build.opensuse.org/request/show/356581 OBS-URL: https://build.opensuse.org/package/show/science/hdf5?expand=0&rev=17 --- baselibs.conf | 24 +++--- baselibs.conf.in | 18 +++++ hdf5-1.8.15.tar.bz2 | 3 - hdf5-1.8.16.tar.bz2 | 3 + hdf5-cpp-compilation-errors.patch | 18 ----- hdf5-ldouble-ppc64le.patch | 129 +++++++++++++++--------------- hdf5.changes | 9 +++ hdf5.spec | 18 +++-- update_so_version.sh | 80 ++++++++++++++++++ 9 files changed, 201 insertions(+), 101 deletions(-) create mode 100644 baselibs.conf.in delete mode 100644 hdf5-1.8.15.tar.bz2 create mode 100644 hdf5-1.8.16.tar.bz2 delete mode 100644 hdf5-cpp-compilation-errors.patch create mode 100644 update_so_version.sh diff --git a/baselibs.conf b/baselibs.conf index 1853d5b..26fe34f 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,18 +1,18 @@ -libhdf5-10 +libhdf5-11 hdf5-devel requires - - requires "libhdf5-10- = " - requires "libhdf5_hl10- = " -libhdf5-10-openmpi + requires "libhdf5-11- = " + requires "libhdf5_hl11- = " +libhdf5-11-openmpi hdf5-openmpi-devel requires -openmpi- - requires "libhdf5-10-openmpi- = " - requires "libhdf5_hl10-openmpi- = " -libhdf5-10-mvapich2 -libhdf5_hl10 -libhdf5_hl10-mvapich2 -libhdf5_hl10-openmpi + requires "libhdf5-11-openmpi- = " + requires "libhdf5_hl11-openmpi- = " +libhdf5-11-mvapich2 +libhdf5_hl11 +libhdf5_hl11-mvapich2 +libhdf5_hl11-openmpi hdf5-mvapich2-devel requires -openmpi- - requires "libhdf5-10-mvapich2- = " - requires "libhdf5_hl10-mvapich2- = " + requires "libhdf5-11-mvapich2- = " + requires "libhdf5_hl11-mvapich2- = " diff --git a/baselibs.conf.in b/baselibs.conf.in new file mode 100644 index 0000000..fa458eb --- /dev/null +++ b/baselibs.conf.in @@ -0,0 +1,18 @@ +libhdf5-@sonum@ +hdf5-devel + requires - + requires "libhdf5-@sonum@- = " + requires "libhdf5_hl@sonum@- = " +libhdf5-@sonum@-openmpi +hdf5-openmpi-devel + requires -openmpi- + requires "libhdf5-@sonum@-openmpi- = " + requires "libhdf5_hl@sonum@-openmpi- = " +libhdf5-@sonum@-mvapich2 +libhdf5_hl@sonum@ +libhdf5_hl@sonum@-mvapich2 +libhdf5_hl@sonum@-openmpi +hdf5-mvapich2-devel + requires -openmpi- + requires "libhdf5-@sonum@-mvapich2- = " + requires "libhdf5_hl@sonum@-mvapich2- = " diff --git a/hdf5-1.8.15.tar.bz2 b/hdf5-1.8.15.tar.bz2 deleted file mode 100644 index b79d4dc..0000000 --- a/hdf5-1.8.15.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0003ac76314b9c3dd819f595eb33890f02f6bf000414013a89f9907ac09e3920 -size 10002545 diff --git a/hdf5-1.8.16.tar.bz2 b/hdf5-1.8.16.tar.bz2 new file mode 100644 index 0000000..e0cbbb0 --- /dev/null +++ b/hdf5-1.8.16.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13aaae5ba10b70749ee1718816a4b4bfead897c2fcb72c24176e759aec4598c6 +size 10047405 diff --git a/hdf5-cpp-compilation-errors.patch b/hdf5-cpp-compilation-errors.patch deleted file mode 100644 index 2811f00..0000000 --- a/hdf5-cpp-compilation-errors.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: src/H5api_adpt.h -=================================================================== ---- src/H5api_adpt.h (revision 26991) -+++ src/H5api_adpt.h (revision 27474) -@@ -21,13 +21,6 @@ - #ifndef H5API_ADPT_H - #define H5API_ADPT_H - --#ifdef __cplusplus --#define __attribute__(X) /*void*/ --#endif /* __cplusplus */ --#ifndef H5_HAVE_ATTRIBUTE --#define __attribute__(X) /*void*/ --#endif /* H5_HAVE_ATTRIBUTE */ -- - /* This will only be defined if HDF5 was built with CMake */ - #ifdef H5_BUILT_AS_DYNAMIC_LIB - diff --git a/hdf5-ldouble-ppc64le.patch b/hdf5-ldouble-ppc64le.patch index de38995..f89060e 100644 --- a/hdf5-ldouble-ppc64le.patch +++ b/hdf5-ldouble-ppc64le.patch @@ -1,72 +1,75 @@ -Index: hdf5-1.8.14/configure -=================================================================== ---- hdf5-1.8.14.orig/configure -+++ hdf5-1.8.14/configure -@@ -30438,6 +30438,13 @@ else - unsigned char s2[8]; - int ret = 1; +diff -rupN hdf5-1.8.16.orig/configure hdf5-1.8.16/configure +--- hdf5-1.8.16.orig/configure 2015-11-10 15:01:10.000000000 +0100 ++++ hdf5-1.8.16/configure 2016-01-28 13:44:58.136709651 +0100 +@@ -27347,6 +27347,14 @@ main () + unsigned char s2[8]; + int ret = 1; +#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ that what hdf5 calls 'special algorithm' simply is -+ IBM ldouble 128 (i.e. two seperately scaled doubles). -+ The check below assumes big endian. */ -+ ret = 0; ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; +#endif - if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and - * 11 bits of exponent. If it is, -@@ -30542,6 +30549,13 @@ else - unsigned char s[16]; - int flag=0, ret=1; ++ + if(sizeof(long double) == 16 && sizeof(long) == 8) { + /*make sure the long double type has 16 bytes in size and + * 11 bits of exponent. If it is, +@@ -27464,6 +27472,14 @@ main () + unsigned char s[16]; + int flag=0, ret=1; +#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ that what hdf5 calls 'special algorithm' simply is -+ IBM ldouble 128 (i.e. two seperately scaled doubles). -+ The check below assumes big endian. */ -+ ret = 0; ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; ++#endif ++ + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) { +diff -rupN hdf5-1.8.16.orig/configure.ac hdf5-1.8.16/configure.ac +--- hdf5-1.8.16.orig/configure.ac 2015-11-04 23:29:55.000000000 +0100 ++++ hdf5-1.8.16/configure.ac 2016-01-28 13:44:58.144709750 +0100 +@@ -2277,7 +2277,15 @@ else + unsigned char s[16]; + unsigned char s2[8]; + int ret = 1; +- ++ ++#if defined __powerpc64__ && defined _LITTLE_ENDIAN ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; ++#endif ++ + if(sizeof(long double) == 16 && sizeof(long) == 8) { + /*make sure the long double type has 16 bytes in size and + * 11 bits of exponent. If it is, +@@ -2354,6 +2362,14 @@ else + unsigned long ull; + unsigned char s[16]; + int flag=0, ret=1; ++ ++#if defined __powerpc64__ && defined _LITTLE_ENDIAN ++ /* Don't bother checking on ppc64le, we know it'll work, and ++ that what hdf5 calls 'special algorithm' simply is ++ IBM ldouble 128 (i.e. two seperately scaled doubles). ++ The check below assumes big endian. */ ++ ret = 0; +#endif - /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { -Index: hdf5-1.8.14/configure.ac -=================================================================== ---- hdf5-1.8.14.orig/configure.ac -+++ hdf5-1.8.14/configure.ac -@@ -3723,6 +3723,13 @@ else - unsigned char s2[8]; - int ret = 1; -+#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ that what hdf5 calls 'special algorithm' simply is -+ IBM ldouble 128 (i.e. two seperately scaled doubles). -+ The check below assumes big endian. */ -+ ret = 0; -+#endif - if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and - * 11 bits of exponent. If it is, -@@ -3801,6 +3808,13 @@ else - unsigned char s[16]; - int flag=0, ret=1; - -+#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ that what hdf5 calls 'special algorithm' simply is -+ IBM ldouble 128 (i.e. two seperately scaled doubles). -+ The check below assumes big endian. */ -+ ret = 0; -+#endif - /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { -Index: hdf5-1.8.14/test/dt_arith.c -=================================================================== ---- hdf5-1.8.14.orig/test/dt_arith.c -+++ hdf5-1.8.14/test/dt_arith.c -@@ -3088,7 +3088,18 @@ test_conv_flt_1 (const char *name, int r + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ +diff -rupN hdf5-1.8.16.orig/test/dt_arith.c hdf5-1.8.16/test/dt_arith.c +--- hdf5-1.8.16.orig/test/dt_arith.c 2015-10-24 07:13:43.000000000 +0200 ++++ hdf5-1.8.16/test/dt_arith.c 2016-01-28 13:44:58.153709861 +0100 +@@ -3010,7 +3010,18 @@ test_conv_flt_1 (const char *name, int r buf, saved, nelmts); #if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0 } else if(src_type == FLT_LDOUBLE) { @@ -86,7 +89,7 @@ Index: hdf5-1.8.14/test/dt_arith.c buf, saved, nelmts); #endif } else -@@ -3824,7 +3835,18 @@ test_conv_int_fp(const char *name, int r +@@ -3663,7 +3674,18 @@ test_conv_int_fp(const char *name, int r INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, sendian, dst_size, buf, saved, nelmts); } else { diff --git a/hdf5.changes b/hdf5.changes index 287d9f9..d033a78 100644 --- a/hdf5.changes +++ b/hdf5.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jan 28 00:08:01 UTC 2016 - sweet_f_a@gmx.de + +- update to 1.8.16, changes documented here: + https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16-RELEASE.txt +- rebase hdf5-ldouble-ppc64le.patch +- remove hdf5-cpp-compilation-errors.patch +- prepare independent so versions and add TODO + ------------------------------------------------------------------- Fri Aug 21 09:45:05 UTC 2015 - toddrme2178@gmail.com diff --git a/hdf5.spec b/hdf5.spec index 55fdee8..15f91b8 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -25,11 +25,22 @@ %define _mpi %{?_openmpi:openmpi} %{?_mvapich2:mvapich2} +# TODO: since 1.8.16 we have independent so versions, see config/lt_vers.am. +# We already have added a script "update_so_version.sh" to update all the +# defines below and baselibs.conf. But we still need to split certain +# subpackages to be able to use these versions. +%define sonum 11 +%define sonum_CXX 11 +%define sonum_F 10 +%define sonum_HL 10 +%define sonum_HL_CXX 11 +%define sonum_HL_F 10 +%define sonum_TOOLS 10 + Name: hdf5 %define libname libhdf5 -Version: 1.8.15 +Version: 1.8.16 Release: 0 -%define sonum 10 Summary: Command-line programs for the HDF5 scientific data format License: BSD-3-Clause Group: Productivity/Scientific/Other @@ -44,8 +55,6 @@ Patch2: hdf5-1.8.11-abort_unknown_host_config.patch Patch4: hdf5-1.8.10-tests-arm.patch %endif Patch5: hdf5-ldouble-ppc64le.patch -# PATCH-FIX-UPSTREAM hdf5-cpp-compilation-errors.patch badshah400@gmail.com -- Reverted a change to the H5api_adpt.h that caused compilation errors for the C++ HDF5 applications; patch taken from upstream svn -Patch6: hdf5-cpp-compilation-errors.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ %if 0%{?suse_version} > 1140 @@ -532,7 +541,6 @@ test "%{sonum}" = "${LT_VERS_INTERFACE}" || exit 1 %patch4 -p0 -b .tests-arm %endif %patch5 -p1 -%patch6 -p0 echo "prepare parallel builds: %_mpi" for build_dir in build %_mpi; do diff --git a/update_so_version.sh b/update_so_version.sh new file mode 100644 index 0000000..e50077e --- /dev/null +++ b/update_so_version.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +exit_error() +{ + echo "$0: $@" >&2 + exit 1 +} + +dbg() +{ + echo "dbg: $@" >&2 +} + +cleanup() +{ + rm -f lt_vers.sh sonum_spec.sed sonum_baselibs.sed + rm -f hdf5.spec.tmp baselibs.conf.tmp +} + +## We are going to parse these variables from tarball: +# LT_VERS_INTERFACE +# LT_CXX_VERS_INTERFACE +# LT_F_VERS_INTERFACE +# LT_HL_VERS_INTERFACE +# LT_HL_CXX_VERS_INTERFACE +# LT_HL_F_VERS_INTERFACE +# LT_TOOLS_VERS_INTERFACE + +cleanup + +VER="$(grep -m1 "^Version:" hdf5.spec)" || exit_error "can't grep version" +read x VER <<<$VER + +SRC="$(grep -m1 "^Source0:" hdf5.spec)" || exit_error "can't grep source" +read x SRC <<<$SRC +SRC=$(basename "$SRC" | sed "s/%{version}/$VER/") + +test -f "$SRC" || exit_error "tarball '$SRC' does not exist" +dbg "inspecting $SRC" + +tar --wildcards -x -O -f "$SRC" "*/config/lt_vers.am" \ + | tr -d ' \t' \ + | grep "^LT_.*INTERFACE=" \ + > lt_vers.sh \ + || exit_error "can't grep interface versions" + +# we expect exactly 7 variables +. lt_vers.sh || exit_error "can't source lt_vers.sh" +test $(wc -l < lt_vers.sh) -le "7" \ + || exit_error "more than 7 vars found, update this script!" + +for infix in "" _CXX _F _HL _HL_CXX _HL_F _TOOLS; do + var="LT${infix}_VERS_INTERFACE" + test "${!var}" -gt 0 || exit_error "$var='${!var}' bad or undefined" + dbg "update $var=${!var}" + def_sonum="sonum${infix}" + # create sed scripts for spec file and baselibs + echo "s/^%define $def_sonum .*/%define $def_sonum ${!var}/" >> sonum_spec.sed + echo "s/@${def_sonum}@/${!var}/g" >> sonum_baselibs.sed +done + +# update spec file if needed +sed -f sonum_spec.sed hdf5.spec > hdf5.spec.tmp +if diff -q hdf5.spec.tmp hdf5.spec &>/dev/null; then + dbg "hdf5.spec was up-to-date" +else + mv hdf5.spec.tmp hdf5.spec + echo "hdf5.spec updated" >&2 +fi + +# update baselibs if needed +sed -f sonum_baselibs.sed baselibs.conf.in > baselibs.conf.tmp +if diff -q baselibs.conf.tmp baselibs.conf &>/dev/null; then + dbg "baselibs.conf was up-to-date" +else + mv baselibs.conf.tmp baselibs.conf + echo "baselibs.conf updated" >&2 +fi + +cleanup