Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1 | SUMMARY = "Message Passing Interface (MPI) implementation" |
| 2 | HOMEPAGE = "http://www.mpich.org/" |
| 3 | SECTION = "devel" |
| 4 | |
| 5 | LICENSE = "BSD-2-Clause" |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7a88f0d96d0d7396a7c66bf353235b62" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 7 | |
| 8 | SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 9 | SRC_URI[sha256sum] = "a64a66781b9e5312ad052d32689e23252f745b27ee8818ac2ac0c8209bc0b90e" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 10 | |
| 11 | RDEPENDS:${PN} += "bash perl libxml2" |
| 12 | |
| 13 | EXTRA_OECONF = "--enable-debuginfo \ |
| 14 | --enable-fast \ |
| 15 | --enable-shared \ |
| 16 | --with-pm=gforker \ |
| 17 | BASH_SHELL='${USRBINPATH}/env bash' \ |
| 18 | PERL='${USRBINPATH}/env perl' \ |
| 19 | --with-device=ch3:nemesis \ |
| 20 | " |
| 21 | |
| 22 | PACKAGECONFIG ??= "" |
| 23 | |
| 24 | PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx" |
| 25 | PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fortran,libgfortran" |
| 26 | |
| 27 | # libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang |
| 28 | LDFLAGS:append:x86-64 = " -lgcc" |
| 29 | LDFLAGS:append:x86 = " -lgcc" |
| 30 | |
| 31 | inherit autotools gettext pkgconfig qemu |
| 32 | |
| 33 | DEPENDS += "qemu-native" |
| 34 | |
| 35 | do_configure() { |
| 36 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then |
| 37 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" |
| 38 | cat > ${WORKDIR}/qemuwrapper << EOF |
| 39 | #!/bin/sh |
| 40 | $qemu_binary "\$@" |
| 41 | EOF |
| 42 | chmod +x ${WORKDIR}/qemuwrapper |
| 43 | |
| 44 | sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl |
| 45 | |
| 46 | cd ${WORKDIR} |
| 47 | perl ${S}/maint/gen_cross.pl |
| 48 | |
| 49 | sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt |
| 50 | fi |
| 51 | |
| 52 | cd ${S} |
| 53 | ./autogen.sh |
| 54 | |
| 55 | cd ${B} |
| 56 | oe_runconf |
| 57 | sed -i -e 's,${WORKDIR},,g' ${B}/src/include/mpichinfo.h |
| 58 | } |
| 59 | |
| 60 | do_install:append() { |
| 61 | sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la |
| 62 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicxx |
| 63 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicc |
| 64 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc |
| 65 | sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicc |
| 66 | sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicxx |
| 67 | } |