diff options
author | Christoph Junghans <junghans@gentoo.org> | 2017-09-01 16:01:39 -0600 |
---|---|---|
committer | Christoph Junghans <junghans@gentoo.org> | 2017-09-01 16:02:33 -0600 |
commit | 791b9cb14ca48d98f27a1285175091004a182dd7 (patch) | |
tree | c37b8174e8c9091ea56e76e9a21403345b0c9d77 /sys-cluster/gasnet/gasnet-1.30.0.ebuild | |
parent | sys-process/criu: bump up to 3.4 (diff) | |
download | gentoo-791b9cb14ca48d98f27a1285175091004a182dd7.tar.gz gentoo-791b9cb14ca48d98f27a1285175091004a182dd7.tar.bz2 gentoo-791b9cb14ca48d98f27a1285175091004a182dd7.zip |
sys-cluster/gasnet: version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'sys-cluster/gasnet/gasnet-1.30.0.ebuild')
-rw-r--r-- | sys-cluster/gasnet/gasnet-1.30.0.ebuild | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/sys-cluster/gasnet/gasnet-1.30.0.ebuild b/sys-cluster/gasnet/gasnet-1.30.0.ebuild new file mode 100644 index 000000000000..52282995fdde --- /dev/null +++ b/sys-cluster/gasnet/gasnet-1.30.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs multilib + +MY_P="${PN^^[gasn]}-${PV}" +DESCRIPTION="Networking middleware for partitioned global address space (PGAS) language" +HOMEPAGE="http://gasnet.lbl.gov/" +SRC_URI="http://gasnet.lbl.gov/${MY_P}.tar.gz" + +SOVER="${PV%%.*}" +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm" +IUSE="mpi test threads" + +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 +} |