```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
68 lines
2 KiB
Bash
68 lines
2 KiB
Bash
# Template file for 'openmpi'
|
|
pkgname=openmpi
|
|
version=4.1.1
|
|
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"
|
|
conf_files="
|
|
/etc/openmpi-default-hostfile
|
|
/etc/openmpi-mca-params.conf
|
|
/etc/openmpi-totalview.tcl"
|
|
short_desc="High Performance Message Passing Library"
|
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://www.open-mpi.org/"
|
|
distfiles="${homepage}/software/ompi/v${version%.*}/downloads/${pkgname}-${version}.tar.bz2"
|
|
checksum=e24f7a778bd11a71ad0c14587a7f5b00e68a71aa5623e2157bafee3d44c07cda
|
|
nocross="configure attempts to run target binaries"
|
|
lib32disabled=yes
|
|
|
|
post_extract() {
|
|
vsed -e 's,sys/unistd.h,unistd.h,g' -i opal/include/opal/sys/cma.h
|
|
vsed -e '1i#include <unistd.h>' -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"
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
# https://github.com/void-linux/void-packages/pull/28996#issuecomment-784255185
|
|
mv "${DESTDIR}/usr/lib/ompi_monitoring_prof.so" "${DESTDIR}/usr/lib/openmpi"
|
|
}
|
|
|
|
libopenmpi_package() {
|
|
short_desc+=" - runtime libraries"
|
|
pkg_install() {
|
|
vmove usr/lib/*.so.*
|
|
}
|
|
}
|
|
|
|
openmpi-devel_package() {
|
|
depends="libopenmpi-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/man/man3
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|