aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gmail.com>2013-07-01 21:32:33 -0600
committerNicolas Bock <nicolasbock@gmail.com>2013-07-01 21:32:33 -0600
commitad69795e376835bb60569f8d6207c5776edefdcb (patch)
tree4c696e97dfe11d84db839865a401cc679976fbe7 /sys-cluster/charm
parentbumped to EAPI=5 (diff)
downloadsci-ad69795e376835bb60569f8d6207c5776edefdcb.tar.gz
sci-ad69795e376835bb60569f8d6207c5776edefdcb.tar.bz2
sci-ad69795e376835bb60569f8d6207c5776edefdcb.zip
Version bump to sys-cluster/charm-6.5.1
Package-Manager: portage-2.2.0_alpha186
Diffstat (limited to 'sys-cluster/charm')
-rw-r--r--sys-cluster/charm/ChangeLog9
-rw-r--r--sys-cluster/charm/Manifest1
-rw-r--r--sys-cluster/charm/charm-6.5.1.ebuild178
-rw-r--r--sys-cluster/charm/metadata.xml15
4 files changed, 203 insertions, 0 deletions
diff --git a/sys-cluster/charm/ChangeLog b/sys-cluster/charm/ChangeLog
new file mode 100644
index 000000000..3563efbe7
--- /dev/null
+++ b/sys-cluster/charm/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for sys-cluster/charm
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*charm-6.5.1 (02 Jul 2013)
+
+ 02 Jul 2013; Nicolas Bock <nicolasbock@gmail.com> +charm-6.5.1.ebuild,
+ +metadata.xml:
+ Version bump to sys-cluster/charm-6.5.1
diff --git a/sys-cluster/charm/Manifest b/sys-cluster/charm/Manifest
new file mode 100644
index 000000000..0a0377625
--- /dev/null
+++ b/sys-cluster/charm/Manifest
@@ -0,0 +1 @@
+DIST charm-6.5.1.tar.gz 19265741 SHA256 68aa43e2a6e476e116a7e80e385c25c6ac6497807348025505ba8bfa256ed34a SHA512 1a25c76f3699e30d0614e85f39ea0f594896cbc299b0e670c52fcea176171e8834ea7f9ba3ba0c1957598b0f1cbfa6a4ed9279ae0c030fa32faa6acca879b694 WHIRLPOOL 0def514af09c137b951842250fe112c68e573e8eff7d5911a71ccbe55cc38b319f1d9c4587e706777f748b0c1ef69b63c4161bbf663b05984a566ff325fa49c3
diff --git a/sys-cluster/charm/charm-6.5.1.ebuild b/sys-cluster/charm/charm-6.5.1.ebuild
new file mode 100644
index 000000000..25982f85a
--- /dev/null
+++ b/sys-cluster/charm/charm-6.5.1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/charm/charm-6.5.0.ebuild,v 1.1 2013/06/26 23:58:38 ottxor Exp $
+
+EAPI=5
+
+inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="Message-passing parallel language and runtime system"
+HOMEPAGE="http://charm.cs.uiuc.edu/"
+SRC_URI="http://charm.cs.uiuc.edu/distrib/${P}.tar.gz"
+
+LICENSE="charm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="charmdebug charmtracing charmproduction cmkopt doc examples mpi smp static-libs tcp"
+
+RDEPEND="mpi? ( virtual/mpi )"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base
+ )"
+
+REQUIRED_USE="
+ cmkopt? ( !charmdebug !charmtracing )
+ charmproduction? ( !charmdebug !charmtracing )"
+
+FORTRAN_STANDARD="90"
+
+src_prepare() {
+ # Build shared libraries by default.
+ CHARM_OPTS="--build-shared"
+ if use charmproduction; then
+ CHARM_OPTS+=" --with-production"
+ else
+ if use charmdebug; then
+ CHARM_OPTS+=" --with-charmdebug"
+ fi
+
+ if use charmtracing; then
+ CHARM_OPTS+=" --with-tracing --with-tracing-commthread"
+ fi
+ fi
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ CHARM_OPTS+="$(usex tcp ' tcp' '')"
+
+ # enable direct SMP support using shared memory
+ CHARM_OPTS+="$(usex smp ' smp' '')"
+
+ # CMK optimization
+ use cmkopt && append-cppflags -DCMK_OPTIMIZE=1
+
+ sed \
+ -e "/CMK_CF90/s:f90:$(usex mpi "mpif90" "$(tc-getFC)"):g" \
+ -e "/CMK_CXX/s:g++:$(usex mpi "mpic++" "$(tc-getCXX)"):g" \
+ -e "/CMK_CC/s:gcc:$(usex mpi "mpicc" "$(tc-getCC)"):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/$(usex mpi "mpi" "net")-linux*/*sh || die
+
+ sed \
+ -e "s:-o conv-cpm:${LDFLAGS} &:g" \
+ -e "s:-o charmxi:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-silent:${LDFLAGS} &:g" \
+ -e "s:-o charmrun-notify:${LDFLAGS} &:g" \
+ -e "s:-o charmrun:${LDFLAGS} &:g" \
+ -e "s:-o charmd_faceless:${LDFLAGS} &:g" \
+ -e "s:-o charmd:${LDFLAGS} &:g" \
+ -i \
+ src/scripts/Makefile \
+ src/arch/net/charmrun/Makefile || die
+
+ einfo "charm opts: ${CHARM_OPTS}"
+}
+
+src_compile() {
+ # Build charmm++ first.
+ ./build charm++ $(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') \
+ ${CHARM_OPTS} ${MAKEOPTS} ${CFLAGS} || die "Failed to build charm++"
+
+ # make pdf/html docs
+ if use doc; then
+ cd "${S}"/doc
+ make doc || die "failed to create pdf/html docs"
+ fi
+}
+
+src_test() {
+ make -C tests/charm++ test TESTOPTS="++local" || die
+}
+
+src_install() {
+ # Make charmc play well with gentoo before we move it into /usr/bin.
+ epatch "${FILESDIR}/charm-6.5.0-charmc-gentoo.patch"
+
+ sed -e "s|gentoo-include|${P}|" \
+ -e "s|gentoo-libdir|$(get_libdir)|g" \
+ -e "s|VERSION|${P}/VERSION|" \
+ -i ./src/scripts/charmc || die "failed patching charmc script"
+
+ # In the following, some of the files are symlinks to ../tmp which we need
+ # to dereference first (see bug 432834).
+
+ local i
+
+ # Install binaries.
+ for i in bin/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dobin "${i}"
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ doins "${i}"
+ done
+
+ # Install static libs. Charm has a lot of .o "libs" that it requires at
+ # runtime.
+ if use static-libs; then
+ for i in lib/*.{a,o}; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib "${i}"
+ done
+ fi
+
+ # Install shared libs.
+ for i in lib_so/*; do
+ if [[ -L ${i} ]]; then
+ i=$(readlink -e "${i}") || die
+ fi
+ dolib.so "${i}"
+ done
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ if use examples; then
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:(../)+bin/charmc:/usr/bin/charmc:" -i || \
+ die "Failed to fix examples"
+ find examples/ -name 'Makefile' | xargs sed \
+ -r "s:./charmrun:./charmrun ++local:" -i || \
+ die "Failed to fix examples"
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/charm++/*
+ fi
+
+ # Install pdf/html docs
+ if use doc; then
+ cd "${S}"/doc
+ # Install pdfs.
+ insinto /usr/share/doc/${PF}/pdf
+ doins doc/pdf/*
+ # Install html.
+ docinto html
+ dohtml -r doc/html/*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please test your charm installation by copying the"
+ einfo "content of /usr/share/doc/${PF}/examples to a"
+ einfo "temporary location and run 'make test'."
+}
diff --git a/sys-cluster/charm/metadata.xml b/sys-cluster/charm/metadata.xml
new file mode 100644
index 000000000..ea5896e21
--- /dev/null
+++ b/sys-cluster/charm/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>nicolasbock@gmail.com</email>
+ </maintainer>
+ <use>
+ <flag name="charmdebug">Enable the charm debugger</flag>
+ <flag name="charmproduction">Optimize performance of Charm++ runtime</flag>
+ <flag name="charmtracing">Enable tracing support in Charm++</flag>
+ <flag name="cmkopt">Enable CMK optimisation</flag>
+ <flag name="tcp">Use TCP (instead of UPD) for socket communication</flag>
+ </use>
+</pkgmetadata>