Wang Mingyu cf4a2fa949 hdf5: Fix install conflict when enable multilib.
Error: Transaction test error:
  file /usr/bin/h5cc conflicts between attempted installs of lib32-hdf5-1.14.2-r0.armv7ahf_neon and hdf5-1.14.2-r0.cortexa57
  file /usr/bin/h5hlcc conflicts between attempted installs of lib32-hdf5-1.14.2-r0.armv7ahf_neon and hdf5-1.14.2-r0.cortexa57

The differences of h5cc are as follows:
@@ -44,7 +44,7 @@
       exit $status
       ;;
     *)
-      /usr/bin/arm-pokymllib32-linux-gnueabi/arm-pokymllib32-linux-gnueabi-clang $@ `pkg-config --define-variable=prefix=$dir --cflags --libs hdf5`
+      /usr/bin/aarch64-poky-linux/aarch64-poky-linux-clang $@ `pkg-config --define-variable=prefix=$dir --cflags --libs hdf5`
       status=$?
       exit $status
       ;;

The differences of h5hlcc are as follows:
@@ -44,7 +44,7 @@
       exit $status
       ;;
     *)
-      /usr/bin/arm-pokymllib32-linux-gnueabi/arm-pokymllib32-linux-gnueabi-clang $@ `pkg-config --define-variable=prefix=$dir --cflags --libs hdf5_hl`
+      /usr/bin/aarch64-poky-linux/aarch64-poky-linux-clang $@ `pkg-config --define-variable=prefix=$dir --cflags --libs hdf5_hl`
       status=$?
       exit $status
       ;;

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit fc7666e5bc01ddcdc16d9d3b838be5c35d84fda2)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-05 07:52:16 -05:00

65 lines
2.2 KiB
BlitzBasic

SUMMARY = "Management suite for extremely large and complex data collections"
DESCRIPTION = "Unique technology suite that makes possible the management of \
extremely large and complex data collections"
HOMEPAGE = "https://www.hdfgroup.org/"
SECTION = "libs"
LICENSE = "HDF5"
LIC_FILES_CHKSUM = "file://COPYING;md5=9ba0f3d878ab6c2403c86e9b0362d998"
inherit cmake siteinfo qemu multilib_header multilib_script
DEPENDS += "qemu-native zlib"
SRC_URI = " \
https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-${PV}/src/${BPN}-${PV}.tar.bz2 \
file://0002-Remove-suffix-shared-from-shared-library-name.patch \
file://0001-cmake-remove-build-flags.patch \
"
SRC_URI[sha256sum] = "ea3c5e257ef322af5e77fc1e52ead3ad6bf3bb4ac06480dd17ee3900d7a24cfb"
FILES:${PN} += "${libdir}/libhdf5.settings ${datadir}/*"
EXTRA_OECMAKE = " \
-DHDF5_INSTALL_CMAKE_DIR=${libdir}/cmake \
-DCMAKE_INSTALL_PREFIX='${prefix}' \
-DHDF5_INSTALL_LIB_DIR='${baselib}' \
"
EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper "
gen_emu() {
# Write out a qemu wrapper that will be used by cmake
# so that it can run target helper binaries through that.
qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
cat > ${WORKDIR}/qemuwrapper << EOF
#!/bin/sh
$qemu_binary "\$@"
EOF
chmod +x ${WORKDIR}/qemuwrapper
}
do_unpack[postfuncs] += "gen_emu"
MULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc \
${PN}:${bindir}/h5hlcc \
"
do_install:append() {
# Used for generating config files on target
install -m 755 ${B}/bin/H5detect ${D}${bindir}
install -m 755 ${B}/bin/H5make_libsettings ${D}${bindir}
oe_multilib_header H5pubconf.h
# remove the buildpath
sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/pkgconfig/hdf5.pc
sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/hdf5-targets.cmake
sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5hlcc
sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
}
BBCLASSEXTEND = "native"
SRC_DISTRIBUTE_LICENSES += "HDF5"
# h5fuse.sh script needs bash
RDEPENDS:${PN} += "bash"