1220dafdbSAndrew GeisslerSUMMARY = "Management suite for extremely large and complex data collections"
2220dafdbSAndrew GeisslerDESCRIPTION = "Unique technology suite that makes possible the management of \
3220dafdbSAndrew Geisslerextremely large and complex data collections"
4220dafdbSAndrew GeisslerHOMEPAGE = "https://www.hdfgroup.org/"
5220dafdbSAndrew GeisslerSECTION = "libs"
6220dafdbSAndrew Geissler
7220dafdbSAndrew GeisslerLICENSE = "HDF5"
8220dafdbSAndrew GeisslerLIC_FILES_CHKSUM = "file://COPYING;md5=9ba0f3d878ab6c2403c86e9b0362d998"
9220dafdbSAndrew Geissler
10*ac13d5f3SPatrick Williamsinherit cmake siteinfo qemu multilib_header multilib_script
11220dafdbSAndrew Geissler
12220dafdbSAndrew GeisslerDEPENDS += "qemu-native zlib"
13220dafdbSAndrew Geissler
14220dafdbSAndrew GeisslerSRC_URI = " \
15220dafdbSAndrew Geissler    https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-${PV}/src/${BPN}-${PV}.tar.bz2 \
16220dafdbSAndrew Geissler    file://0002-Remove-suffix-shared-from-shared-library-name.patch \
17220dafdbSAndrew Geissler    file://0001-cmake-remove-build-flags.patch \
18220dafdbSAndrew Geissler"
19220dafdbSAndrew GeisslerSRC_URI[sha256sum] = "ea3c5e257ef322af5e77fc1e52ead3ad6bf3bb4ac06480dd17ee3900d7a24cfb"
20220dafdbSAndrew Geissler
21220dafdbSAndrew GeisslerFILES:${PN} += "${libdir}/libhdf5.settings ${datadir}/*"
22220dafdbSAndrew Geissler
23220dafdbSAndrew GeisslerEXTRA_OECMAKE = " \
24220dafdbSAndrew Geissler    -DHDF5_INSTALL_CMAKE_DIR=${libdir}/cmake \
25220dafdbSAndrew Geissler    -DCMAKE_INSTALL_PREFIX='${prefix}' \
26220dafdbSAndrew Geissler    -DHDF5_INSTALL_LIB_DIR='${baselib}' \
27220dafdbSAndrew Geissler"
28220dafdbSAndrew GeisslerEXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper "
29220dafdbSAndrew Geissler
30220dafdbSAndrew Geisslergen_emu() {
31220dafdbSAndrew Geissler        # Write out a qemu wrapper that will be used by cmake
32220dafdbSAndrew Geissler        # so that it can run target helper binaries through that.
33220dafdbSAndrew Geissler        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
34220dafdbSAndrew Geissler        cat > ${WORKDIR}/qemuwrapper << EOF
35220dafdbSAndrew Geissler#!/bin/sh
36220dafdbSAndrew Geissler$qemu_binary "\$@"
37220dafdbSAndrew GeisslerEOF
38220dafdbSAndrew Geissler        chmod +x ${WORKDIR}/qemuwrapper
39220dafdbSAndrew Geissler}
40220dafdbSAndrew Geissler
41220dafdbSAndrew Geisslerdo_unpack[postfuncs] += "gen_emu"
42220dafdbSAndrew Geissler
43*ac13d5f3SPatrick WilliamsMULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc \
44*ac13d5f3SPatrick Williams                     ${PN}:${bindir}/h5hlcc \
45*ac13d5f3SPatrick Williams"
46*ac13d5f3SPatrick Williams
47220dafdbSAndrew Geisslerdo_install:append() {
48220dafdbSAndrew Geissler    # Used for generating config files on target
49220dafdbSAndrew Geissler    install -m 755 ${B}/bin/H5detect ${D}${bindir}
50220dafdbSAndrew Geissler    install -m 755 ${B}/bin/H5make_libsettings ${D}${bindir}
51220dafdbSAndrew Geissler    oe_multilib_header H5pubconf.h
52220dafdbSAndrew Geissler    # remove the buildpath
53220dafdbSAndrew Geissler    sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/pkgconfig/hdf5.pc
54220dafdbSAndrew Geissler    sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/hdf5-targets.cmake
55220dafdbSAndrew Geissler    sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5hlcc
56220dafdbSAndrew Geissler    sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
57220dafdbSAndrew Geissler}
58220dafdbSAndrew Geissler
59220dafdbSAndrew GeisslerBBCLASSEXTEND = "native"
60220dafdbSAndrew Geissler
61220dafdbSAndrew Geissler# h5fuse.sh script needs bash
62220dafdbSAndrew GeisslerRDEPENDS:${PN} += "bash"
63