summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenz Steinert2020-09-16 12:18:30 +0200
committerLorenz Steinert2020-09-16 12:18:30 +0200
commitd1ea566dfc3e8f1056d24905ceedfffe5dba8430 (patch)
tree33bd970395b6b4629f4abcb683f788cf8eed8757
downloadaur-d1ea566dfc3e8f1056d24905ceedfffe5dba8430.tar.gz
initial commit v0.3.3
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD32
-rw-r--r--newer_hdf5_lib.patch117
3 files changed, 168 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..062dcf0d215a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = h5cpp
+ pkgdesc = h5cpp is a C++ wrapper for HDF5s C-API.
+ pkgver = 0.3.3
+ pkgrel = 1
+ url = h5cpp.org
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ license = GPL2
+ makedepends = cmake
+ makedepends = hdf5
+ source = https://github.com/ess-dmsc/h5cpp/archive/v0.3.3.tar.gz
+ source = newer_hdf5_lib.patch
+ sha256sums = 2ccae670109d605a2c26729abd2b1a98b0b5a7fe5dd98df5f03c5fe76463e1e7
+ sha256sums = b84f7016e5a3363e4653abb9e975659a99daf41f0814123106f83154182e516b
+
+pkgname = h5cpp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d76383d145cb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Lorenz Steinert <lorenz@steinerts.de>
+
+pkgname=h5cpp
+_pkgname=myMPD
+pkgver=0.3.3
+pkgrel=1
+pkgdesc="h5cpp is a C++ wrapper for HDF5s C-API."
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+url="h5cpp.org"
+license=('GPL2')
+optdepends=()
+makedepends=('cmake' 'hdf5')
+source=("https://github.com/ess-dmsc/$pkgname/archive/v$pkgver.tar.gz"
+ "newer_hdf5_lib.patch")
+sha256sums=('2ccae670109d605a2c26729abd2b1a98b0b5a7fe5dd98df5f03c5fe76463e1e7'
+ 'b84f7016e5a3363e4653abb9e975659a99daf41f0814123106f83154182e516b')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ patch -f -p0 -i $srcdir/newer_hdf5_lib.patch
+
+ mkdir -p build
+ cd build
+ cmake -DCONAN=DISABLE -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver/build
+ make DESTDIR="$pkgdir" install
+}
diff --git a/newer_hdf5_lib.patch b/newer_hdf5_lib.patch
new file mode 100644
index 000000000000..b832d2442c84
--- /dev/null
+++ b/newer_hdf5_lib.patch
@@ -0,0 +1,117 @@
+Nur in ./: .git.
+diff '--color=auto' -aur ./src/h5cpp/attribute/attribute_manager.cpp ./src/h5cpp/attribute/attribute_manager.cpp
+--- ./src/h5cpp/attribute/attribute_manager.cpp 2020-09-16 12:03:11.875317864 +0200
++++ ./src/h5cpp/attribute/attribute_manager.cpp 2020-09-16 11:36:36.420112801 +0200
+@@ -77,8 +77,12 @@
+
+ size_t AttributeManager::size() const
+ {
+- H5O_info_t obj_info;
++ H5O_info_t_ obj_info;
++#if H5_VERSION_LE(1,10,2)
+ if(H5Oget_info(static_cast<hid_t>(node_),&obj_info))
++#else
++ if(H5Oget_info1(static_cast<hid_t>(node_),&obj_info))
++#endif
+ {
+ error::Singleton::instance().throw_with_stack("Failure to determine the number of attributes!");
+ }
+Nur in ./src/h5cpp/attribute: attribute_manager.cpp.orig.
+Nur in ./src/h5cpp/attribute: attribute_manager.cpp.rej.
+diff '--color=auto' -aur ./src/h5cpp/core/object_handle.cpp ./src/h5cpp/core/object_handle.cpp
+--- ./src/h5cpp/core/object_handle.cpp 2020-09-16 12:03:11.875317864 +0200
++++ ./src/h5cpp/core/object_handle.cpp 2020-09-16 11:36:36.420112801 +0200
+@@ -265,8 +265,6 @@
+ return ObjectHandle::Type::DATASET;
+ case H5I_ATTR:
+ return ObjectHandle::Type::ATTRIBUTE;
+- case H5I_REFERENCE:
+- return ObjectHandle::Type::REFERENCE;
+ case H5I_VFL:
+ return ObjectHandle::Type::VIRTUAL_FILE_LAYER;
+ case H5I_GENPROP_CLS:
+@@ -374,9 +372,6 @@
+ case ObjectHandle::Type::PROPERTY_LIST:
+ stream << "PROPERTY_LIST";
+ break;
+- case ObjectHandle::Type::REFERENCE:
+- stream << "REFERENCE";
+- break;
+ case ObjectHandle::Type::VIRTUAL_FILE_LAYER:
+ stream << "VIRTUAL_FILE_LAYER";
+ break;
+diff '--color=auto' -aur ./src/h5cpp/core/object_handle.hpp ./src/h5cpp/core/object_handle.hpp
+--- ./src/h5cpp/core/object_handle.hpp 2020-09-16 12:03:11.875317864 +0200
++++ ./src/h5cpp/core/object_handle.hpp 2020-09-16 11:36:36.420112801 +0200
+@@ -77,7 +77,6 @@
+ DATASET,
+ ATTRIBUTE,
+ PROPERTY_LIST,
+- REFERENCE,
+ VIRTUAL_FILE_LAYER,
+ PROPERTY_LIST_CLASS,
+ ERROR_CLASS,
+diff '--color=auto' -aur ./src/h5cpp/core/object_id.cpp ./src/h5cpp/core/object_id.cpp
+--- ./src/h5cpp/core/object_id.cpp 2020-09-16 12:03:11.875317864 +0200
++++ ./src/h5cpp/core/object_id.cpp 2020-09-16 11:36:36.426779411 +0200
+@@ -49,10 +49,14 @@
+ return fname;
+ }
+
+-H5O_info_t ObjectId::get_info(const ObjectHandle &handle)
++H5O_info_t_ ObjectId::get_info(const ObjectHandle &handle)
+ {
+- H5O_info_t info;
++ H5O_info_t_ info;
++#if H5_VERSION_LE(1,10,2)
+ if (0 > H5Oget_info(static_cast<hid_t>(handle), &info))
++#else
++ if (0 > H5Oget_info1(static_cast<hid_t>(handle), &info))
++#endif
+ {
+ error::Singleton::instance().throw_with_stack("Could not get Object info.");
+ }
+diff '--color=auto' -aur ./src/h5cpp/core/object_id.hpp ./src/h5cpp/core/object_id.hpp
+--- ./src/h5cpp/core/object_id.hpp 2020-09-16 12:03:11.875317864 +0200
++++ ./src/h5cpp/core/object_id.hpp 2020-09-16 11:36:36.426779411 +0200
+@@ -130,11 +130,21 @@
+ //! Obtains the name of the file where the object is stored in.
+ static std::string get_file_name(const ObjectHandle &handle);
+
+- //!
++#if H5_VERSION_LE(1,10,5)
++#define H5O_info_t_ H5O_info_t
++#else
++#define H5O_info_t_ H5O_info1_t
++#endif
++
++
++ //!H5O_info_t
+ //! \brief get object info
+ //!
+ //! Gets object info.
+- static H5O_info_t get_info(const ObjectHandle &handle);
++ //!
++ //! For HDF5 version 1.12.0 and higher, this explicitly returns a
++ //! H5O_info1_t structure. For versions <= 1.10.5 it returns H5O_info_t.
++ static H5O_info_t_ get_info(const ObjectHandle &handle);
+
+
+ private:
+diff '--color=auto' -aur ./src/h5cpp/node/node.cpp ./src/h5cpp/node/node.cpp
+--- ./src/h5cpp/node/node.cpp 2020-09-16 12:03:11.878651270 +0200
++++ ./src/h5cpp/node/node.cpp 2020-09-16 11:36:36.426779411 +0200
+@@ -69,8 +69,12 @@
+
+ Type Node::type() const
+ {
+- H5O_info_t info;
++ H5O_info_t_ info;
++#if H5_VERSION_LE(1,10,2)
+ if(H5Oget_info(static_cast<hid_t>(*this),&info)<0)
++#else
++ if(H5Oget_info1(static_cast<hid_t>(*this),&info)<0)
++#endif
+ {
+ error::Singleton::instance().throw_with_stack("Error retrieving type information for this node!");
+ }