blob: deb459ce5781f93c877aecaf5efeb1aac80dc169 [file] [log] [blame]
Patrick Williams520786c2023-06-25 16:20:36 -05001SUMMARY = "Message Passing Interface (MPI) implementation"
2HOMEPAGE = "http://www.mpich.org/"
3SECTION = "devel"
4
5LICENSE = "BSD-2-Clause"
Patrick Williams39653562024-03-01 08:54:02 -06006LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7a88f0d96d0d7396a7c66bf353235b62"
Patrick Williams520786c2023-06-25 16:20:36 -05007
8SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
Patrick Williams39653562024-03-01 08:54:02 -06009SRC_URI[sha256sum] = "a64a66781b9e5312ad052d32689e23252f745b27ee8818ac2ac0c8209bc0b90e"
Patrick Williams520786c2023-06-25 16:20:36 -050010
11RDEPENDS:${PN} += "bash perl libxml2"
12
13EXTRA_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
22PACKAGECONFIG ??= ""
23
24PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
25PACKAGECONFIG[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
28LDFLAGS:append:x86-64 = " -lgcc"
29LDFLAGS:append:x86 = " -lgcc"
30
31inherit autotools gettext pkgconfig qemu
32
33DEPENDS += "qemu-native"
34
35do_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 "\$@"
41EOF
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
60do_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}