public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Christoph Junghans" <ottxor@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/gasnet/
Date: Fri,  9 Sep 2016 22:34:43 +0000 (UTC)	[thread overview]
Message-ID: <1473460470.87f7cceb58a933f16ee3715d8f3eb0ce470e0376.ottxor@gentoo> (raw)

commit:     87f7cceb58a933f16ee3715d8f3eb0ce470e0376
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  9 22:32:57 2016 +0000
Commit:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
CommitDate: Fri Sep  9 22:34:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87f7cceb

sys-cluster/gasnet: build shared libs

Package-Manager: portage-2.2.28

 sys-cluster/gasnet/gasnet-1.26.4-r1.ebuild | 73 ++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/sys-cluster/gasnet/gasnet-1.26.4-r1.ebuild b/sys-cluster/gasnet/gasnet-1.26.4-r1.ebuild
new file mode 100644
index 00000000..140e346
--- /dev/null
+++ b/sys-cluster/gasnet/gasnet-1.26.4-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/${SOVER}"
+KEYWORDS="~amd64"
+IUSE="mpi static-libs 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}"
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
+			-dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+			-Wl,-all_load -Wl,${libstatic} \
+			"$@" -o ${libdir}/${soname} || die "${soname} failed"
+	else
+		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
+			-shared -Wl,-soname=${soname} \
+			-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 \
+		$(use_enable mpi) \
+		$(use_enable threads pthreads) \
+		CC="$(tc-getCC) ${CFLAGS} -fPIC" \
+		MPI_CC="mpicc ${CFLAGS} -fPIC" \
+		CXX="$(tc-getCXX) ${CFLAGS} -fPIC"
+}
+
+src_install() {
+	local l libs
+	default
+	for l in "${ED}/usr/$(get_libdir)"/*.a; do
+		libs=
+		[[ $l = *mpi* ]] && libs+=" -lmpi"
+		static_to_shared "${l}" ${libs}
+	done
+	use static-libs || rm -f "${ED}/usr/$(get_libdir)"/*.a || die
+}


             reply	other threads:[~2016-09-09 23:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 22:34 Christoph Junghans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-01 10:48 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/gasnet/ Ulrich Müller
2022-01-01 10:48 Ulrich Müller
2020-05-28 13:05 Christoph Junghans
2019-04-04 21:16 Aaron Bauman
2017-09-01 22:02 Christoph Junghans
2017-04-24 18:59 Christoph Junghans
2017-03-18 19:15 Christoph Junghans
2016-11-14  2:01 Christoph Junghans
2016-11-01 20:42 Christoph Junghans
2016-10-24 21:42 Christoph Junghans
2016-09-02 22:28 Christoph Junghans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473460470.87f7cceb58a933f16ee3715d8f3eb0ce470e0376.ottxor@gentoo \
    --to=ottxor@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox