blob: b8a81bb0b7f55e6cac8c75bfd0f9b6011c399855 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001SUMMARY = "Management suite for extremely large and complex data collections"
2DESCRIPTION = "Unique technology suite that makes possible the management of \
3extremely large and complex data collections"
4HOMEPAGE = "https://www.hdfgroup.org/"
5SECTION = "libs"
6
7LICENSE = "HDF5"
Andrew Geissler220dafd2023-10-04 10:18:08 -05008LIC_FILES_CHKSUM = "file://COPYING;md5=9ba0f3d878ab6c2403c86e9b0362d998"
Andrew Geissler87f5cff2022-09-30 13:13:31 -05009
Patrick Williamsac13d5f2023-11-24 18:59:46 -060010inherit cmake siteinfo qemu multilib_header multilib_script
Andrew Geissler87f5cff2022-09-30 13:13:31 -050011
Andrew Geissler220dafd2023-10-04 10:18:08 -050012DEPENDS += "qemu-native zlib"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050013
14SRC_URI = " \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050015 https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-${PV}/src/${BPN}-${PV}.tar.bz2 \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050016 file://0002-Remove-suffix-shared-from-shared-library-name.patch \
17 file://0001-cmake-remove-build-flags.patch \
18"
Andrew Geissler220dafd2023-10-04 10:18:08 -050019SRC_URI[sha256sum] = "ea3c5e257ef322af5e77fc1e52ead3ad6bf3bb4ac06480dd17ee3900d7a24cfb"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050020
21FILES:${PN} += "${libdir}/libhdf5.settings ${datadir}/*"
22
23EXTRA_OECMAKE = " \
24 -DHDF5_INSTALL_CMAKE_DIR=${libdir}/cmake \
25 -DCMAKE_INSTALL_PREFIX='${prefix}' \
26 -DHDF5_INSTALL_LIB_DIR='${baselib}' \
27"
28EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper "
29
30gen_emu() {
31 # Write out a qemu wrapper that will be used by cmake
32 # so that it can run target helper binaries through that.
33 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
34 cat > ${WORKDIR}/qemuwrapper << EOF
35#!/bin/sh
36$qemu_binary "\$@"
37EOF
38 chmod +x ${WORKDIR}/qemuwrapper
39}
40
41do_unpack[postfuncs] += "gen_emu"
42
Patrick Williamsac13d5f2023-11-24 18:59:46 -060043MULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc \
44 ${PN}:${bindir}/h5hlcc \
45"
46
Andrew Geissler87f5cff2022-09-30 13:13:31 -050047do_install:append() {
48 # Used for generating config files on target
49 install -m 755 ${B}/bin/H5detect ${D}${bindir}
50 install -m 755 ${B}/bin/H5make_libsettings ${D}${bindir}
Patrick Williams8e7b46e2023-05-01 14:19:06 -050051 oe_multilib_header H5pubconf.h
Andrew Geissler220dafd2023-10-04 10:18:08 -050052 # remove the buildpath
53 sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/pkgconfig/hdf5.pc
54 sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/hdf5-targets.cmake
55 sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5hlcc
56 sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
Andrew Geissler87f5cff2022-09-30 13:13:31 -050057}
58
59BBCLASSEXTEND = "native"
60
Andrew Geissler87f5cff2022-09-30 13:13:31 -050061# h5fuse.sh script needs bash
62RDEPENDS:${PN} += "bash"