summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Scardovi <marco@scardovi.com>2021-12-03 22:01:02 +0100
committerUlrich Müller <ulm@gentoo.org>2022-01-01 11:47:59 +0100
commit5577422b36f7cdab51f57738fc96ebac92815095 (patch)
treed009620b72b7800913804b6a5c5a06f7e86f15e1 /sys-cluster/gasnet
parentsys-cluster/gasnet: drop older versions (diff)
downloadgentoo-5577422b36f7cdab51f57738fc96ebac92815095.tar.gz
gentoo-5577422b36f7cdab51f57738fc96ebac92815095.tar.bz2
gentoo-5577422b36f7cdab51f57738fc96ebac92815095.zip
sys-cluster/gasnet: bump to EAPI 8 and revbump to 1.32.0
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Marco Scardovi <marco@scardovi.com> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'sys-cluster/gasnet')
-rw-r--r--sys-cluster/gasnet/Manifest2
-rw-r--r--sys-cluster/gasnet/gasnet-1.32.0.ebuild89
2 files changed, 90 insertions, 1 deletions
diff --git a/sys-cluster/gasnet/Manifest b/sys-cluster/gasnet/Manifest
index fcf0a252eebf..cc6096465bf1 100644
--- a/sys-cluster/gasnet/Manifest
+++ b/sys-cluster/gasnet/Manifest
@@ -1 +1 @@
-DIST GASNet-1.30.0.tar.gz 2686524 BLAKE2B c42bc87dd387a356be254dee5cf57d5c4ce086dc14e08ea137a6886656890e355a9f3305142688922966b46eb2b2338b1ba7e65c75ee9af4248ea5cab91c2ce0 SHA512 c95825906b2298be16087fa817baf14076c2d70b1e6420feef07da0c01d2e780415904dac5ec9b4debdffb0749b706f40ac50c4574425978783d7121506c99a6
+DIST GASNet-1.32.0.tar.gz 2661419 BLAKE2B 0cb2f76ff9d0c22a76c85b165770fc6b02487384f410dbe3d982e723ed04af336ddbeaffe26f85fd351f460cbd17cbdd2ddaf2b60777eec4b1ef918efc104753 SHA512 b6b370c679397149065d4af3938fb04ccab90dc28fa8016823cfdb74461e09874e9b2ee12ca91cf815def627f284c00d50b8a8d231a7c33a8a9d37a04d9d00cb
diff --git a/sys-cluster/gasnet/gasnet-1.32.0.ebuild b/sys-cluster/gasnet/gasnet-1.32.0.ebuild
new file mode 100644
index 000000000000..8f46f515c58b
--- /dev/null
+++ b/sys-cluster/gasnet/gasnet-1.32.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs multilib
+
+MY_P="${PN^^[gasn]}-${PV}"
+DESCRIPTION="Networking middleware for partitioned global address space (PGAS) language"
+HOMEPAGE="https://gasnet.lbl.gov/"
+SRC_URI="https://gasnet.lbl.gov/download/${MY_P}.tar.gz"
+
+SOVER="${PV%%.*}"
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm"
+IUSE="mpi test threads"
+RESTRICT="!test? ( test )"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+static_to_shared() {
+ local libstatic="${1}"; shift
+ local libname="${libstatic%.a}"
+ libname="${libname##*/}"
+ local soname="${libname}$(get_libname ${SOVER})"
+ local libdir="${libstatic%/*}"
+
+ einfo "Making ${soname} from ${libstatic} with libs ${@}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCXX)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCXX)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,-z,defs \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+src_prepare() {
+ find . \
+ \( -name Makefile.am -or -name "*.mak" \) \
+ -exec sed -i '/^docdir/s/^/#/' {} + || die
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-ibv \
+ $(use_enable mpi) \
+ $(use_enable threads pthreads) \
+ CC="$(tc-getCC) ${CFLAGS} -fPIC" \
+ MPI_CC="mpicc ${CFLAGS} -fPIC" \
+ CXX="$(tc-getCXX) ${CXXFLAGS} -fPIC"
+}
+
+src_compile() {
+ emake MANUAL_CFLAGS="${CFLAGS} -fPIC" MANUAL_MPICFLAGS="${CFLAGS} -fPIC" MANUAL_CXXFLAGS="${CXXFLAGS} -fPIC"
+}
+
+src_test() {
+ emake check MANUAL_CFLAGS="${CFLAGS} -fPIC" MANUAL_MPICFLAGS="${CFLAGS} -fPIC" MANUAL_CXXFLAGS="${CXXFLAGS} -fPIC"
+}
+
+src_install() {
+ local l libs
+ default
+ for l in "${ED}/usr/$(get_libdir)"/lib{gasnet_tools-seq,am*,*}.a; do
+ [[ -f ${l} ]] || continue
+ libs=
+ [[ ${l} = */libgasnet-*-par* ]] && libs+=" -lpthread"
+ [[ ${l} = */libamudp.a ]] && libs+=" -L${ED}/usr/$(get_libdir) -lgasnet_tools-seq"
+ [[ ${l} = */libammpi.a ]] && libs+=" -lmpi"
+ [[ ${l} = */libgasnet-udp-* ]] && libs+=" -L${ED}/usr/$(get_libdir) -lamudp"
+ [[ ${l} = */libgasnet-mpi-* ]] && libs+=" -L${ED}/usr/$(get_libdir) -lammpi"
+ [[ ${l} = */libgasnet-*-* ]] && libs+=" -lrt"
+ static_to_shared "${l}" ${libs}
+ rm ${l} || die
+ done
+}