From 07fe3ced4652d133ae7bd27cdd6b36f3a086f1e5 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Fri, 27 May 2022 10:39:40 -0400 Subject: [PATCH] openmpi: update to 4.1.4, support cross-compilation --- srcpkgs/openmpi/template | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/srcpkgs/openmpi/template b/srcpkgs/openmpi/template index 08dc6cface8..69e7be8addf 100644 --- a/srcpkgs/openmpi/template +++ b/srcpkgs/openmpi/template @@ -1,12 +1,12 @@ # Template file for 'openmpi' pkgname=openmpi -version=4.1.3 +version=4.1.4 revision=1 build_style=gnu-configure configure_args="--enable-ipv6 --with-hwloc=${XBPS_CROSS_BASE}/usr --libdir=\${prefix}/lib${XBPS_TARGET_WORDSIZE}" -hostmakedepends="gcc-fortran libgomp-devel perl pkg-config automake libtool" -makedepends="libgfortran-devel libgomp-devel libhwloc-devel zlib-devel libevent-devel" +hostmakedepends="perl pkg-config automake libtool" +makedepends="libgomp-devel libhwloc-devel zlib-devel libevent-devel" conf_files=" /etc/openmpi-default-hostfile /etc/openmpi-mca-params.conf @@ -16,31 +16,30 @@ maintainer="Andrew J. Hesford " license="BSD-3-Clause" homepage="https://www.open-mpi.org/" distfiles="${homepage}/software/ompi/v${version%.*}/downloads/${pkgname}-${version}.tar.bz2" -checksum=3d81d04c54efb55d3871a465ffb098d8d72c1f48ff1cbaf2580eb058567c0a3b -nocross="configure attempts to run target binaries" +checksum=92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d lib32disabled=yes -post_extract() { +if [ "${CROSS_BUILD}" ]; then + # configure can't figure out cross-fortran + configure_args+=" --enable-mpi-fortran=none --enable-oshmem-fortran=none" +else + hostmakedepends+=" gcc-fortran" + makedepends+=" libgfortran-devel" +fi + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" + export LIBS="-latomic" +fi + +post_patch() { vsed -e 's,sys/unistd.h,unistd.h,g' -i opal/include/opal/sys/cma.h vsed -e '1i#include ' -i opal/mca/pmix/pmix3x/pmix/include/pmix_server.h } pre_configure() { - ./autogen.pl --force - - # used wrongly upstream? but nocross anyway - export CFLAGS="$CFLAGS $LDFLAGS" - export CXXFLAGS="$CXXFLAGS $LDFLAGS" - - export CC_FOR_BUILD="$CC" - export CFLAGS_FOR_BUILD="$CFLAGS" - export CPP_FOR_BUILD="$CPP" - export CXX_FOR_BUILD="$CXX" - export CXXFLAGS_FOR_BUILD="$CXXFLAGS" - export CPPFLAGS_FOR_BUILD="$CPPFLAGS" - export LDFLAGS_FOR_BUILD="$LDFLAGS" - export LIBS_FOR_BUILD="$LDFLAGS" - export LIBS="$LDFLAGS" + # OpenMPI only respects FCFLAGS now + export FCFLAGS="${FFLAGS}" } post_install() { @@ -57,7 +56,8 @@ libopenmpi_package() { } openmpi-devel_package() { - depends="libopenmpi-${version}_${revision}" + depends="libopenmpi-${version}_${revision} + libhwloc-devel libevent-devel zlib-devel" short_desc+=" - development files" pkg_install() { vmove usr/include