* [gentoo-commits] proj/sci:ccp4 commit in: sys-cluster/charm/, sys-cluster/charm/files/
@ 2013-06-01 8:36 Justin Lecher
0 siblings, 0 replies; only message in thread
From: Justin Lecher @ 2013-06-01 8:36 UTC (permalink / raw
To: gentoo-commits
commit: c7e204955c7bf811c82103be6ea7fb6a44fda69c
Author: Nicolas Bock <nicolasbock <AT> gmail <DOT> com>
AuthorDate: Thu May 30 18:26:41 2013 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jun 1 08:35:19 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c7e20495
Version bump to sys-cluster/charm-6.5.0.
This ebuild fixes bugs 471740 and 432834.
Package-Manager: portage-2.2.0_alpha177
---
sys-cluster/charm/ChangeLog | 10 ++
sys-cluster/charm/charm-6.5.0.ebuild | 176 +++++++++++++++++++++
.../charm/files/charm-6.5.0-charmc-gentoo.patch | 25 +++
sys-cluster/charm/metadata.xml | 10 ++
4 files changed, 221 insertions(+)
diff --git a/sys-cluster/charm/ChangeLog b/sys-cluster/charm/ChangeLog
new file mode 100644
index 0000000..1c91048
--- /dev/null
+++ b/sys-cluster/charm/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-cluster/charm
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*charm-6.5.0 (30 May 2013)
+
+ 30 May 2013; Nicolas Bock <nicolasbock@gmail.com> +charm-6.5.0.ebuild,
+ +files/charm-6.5.0-charmc-gentoo.patch, +metadata.xml:
+ Version bump to sys-cluster/charm-6.5.0. This ebuild fixes bugs
+ 471740 and 432834.
diff --git a/sys-cluster/charm/charm-6.5.0.ebuild b/sys-cluster/charm/charm-6.5.0.ebuild
new file mode 100644
index 0000000..a43c91a
--- /dev/null
+++ b/sys-cluster/charm/charm-6.5.0.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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="cmkopt charmshared tcp smp doc"
+
+DEPEND="
+ doc? (
+ >=app-text/poppler-0.12.3-r3[utils]
+ dev-tex/latex2html
+ virtual/tex-base )"
+RDEPEND=""
+
+case ${ARCH} in
+ x86)
+ CHARM_ARCH="net-linux" ;;
+
+ amd64)
+ CHARM_ARCH="net-linux-amd64" ;;
+esac
+
+FORTRAN_STANDARD="90"
+
+src_prepare() {
+ #epatch "${FILESDIR}"/${P}-gcc-4.7.patch
+
+ # For production, disable debugging features.
+ CHARM_OPTS="--with-production"
+
+ # TCP instead of default UDP for socket comunication
+ # protocol
+ if use tcp; then
+ CHARM_OPTS="${CHARM_OPTS} tcp"
+ fi
+
+ # enable direct SMP support using shared memory
+ if use smp; then
+ CHARM_OPTS="${CHARM_OPTS} smp"
+ fi
+
+ # CMK optimization
+ if use cmkopt; then
+ append-flags -DCMK_OPTIMIZE=1
+ fi
+
+ sed \
+ -e "/CMK_CF90/s:f90:${FC}:g" \
+ -e "/CMK_CXX/s:g++:$(tc-getCXX):g" \
+ -e "/CMK_CC/s:gcc:$(tc-getCC):g" \
+ -e '/CMK_F90_MODINC/s:-p:-I:g' \
+ -e "/CMK_LD/s:\"$: ${LDFLAGS} \":g" \
+ -i src/arch/net-linux*/*sh
+
+ sed \
+ -e "s:\(-o conv-cpm\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmxi\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmrun-silent\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmrun-notify\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmrun\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmd_faceless\):${LDFLAGS} \1:g" \
+ -e "s:\(-o charmd\):${LDFLAGS} \1:g" \
+ -i \
+ src/scripts/Makefile \
+ src/arch/net/charmrun/Makefile
+
+ append-cflags -DALLOCA_H
+
+ echo "charm opts: ${CHARM_OPTS}"
+}
+
+src_compile() {
+ # build charmm++ first
+ ./build charm++ ${CHARM_ARCH} ${CHARM_OPTS} ${MAKEOPTS} ${CFLAGS} || \
+ die "Failed to build charm++"
+
+ # make charmc play well with gentoo before
+ # we move it into /usr/bin
+ epatch "${FILESDIR}/charm-6.5.0-charmc-gentoo.patch"
+
+ # make pdf/html docs
+ if use doc; then
+ cd "${S}"/doc
+ make doc || die "failed to create pdf/html docs"
+ fi
+}
+
+src_install() {
+ 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).
+
+ # Install binaries.
+ for i in bin/*; do
+ if [ -L $i ]; then
+ i=$( readlink -e $i )
+ else
+ i=$i
+ fi
+ dobin $i
+ done
+
+ # Install headers.
+ insinto /usr/include/${P}
+ for i in include/*; do
+ if [ -L $i ]; then
+ i=$( readlink -e $i )
+ else
+ i=$i
+ fi
+ doins $i
+ done
+
+ # Install static libs. Charm has a lot of .o "libs" that it requires at
+ # runtime.
+ for i in lib/*.{a,o}; do
+ if [ -L $i ]; then
+ i=$( readlink -e $i )
+ else
+ i=$i
+ fi
+ dolib $i
+ done
+
+ # Install shared libs.
+ if use charmshared; then
+ cd "${S}"/lib_so
+ dolib.so *.so*
+ fi
+
+ # Basic docs.
+ dodoc CHANGES README
+
+ # Install examples.
+ 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++/*
+
+ # 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() {
+ echo
+ 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'."
+ echo
+}
diff --git a/sys-cluster/charm/files/charm-6.5.0-charmc-gentoo.patch b/sys-cluster/charm/files/charm-6.5.0-charmc-gentoo.patch
new file mode 100644
index 0000000..34923e3
--- /dev/null
+++ b/sys-cluster/charm/files/charm-6.5.0-charmc-gentoo.patch
@@ -0,0 +1,25 @@
+--- src/scripts/charmc.old 2013-05-30 10:18:02.261819771 -0600
++++ src/scripts/charmc 2013-05-30 10:19:50.839661634 -0600
+@@ -361,19 +361,9 @@
+ PROG_EXT=".exe"
+ fi
+
+-CHARMLIB="$CHARMBIN/../lib"
+-CHARMINC="$CHARMBIN/../include"
+-CHARMLIBSO=
+-if test -d "$CHARMBIN/../lib_so"
+-then
+- CHARMLIBSO=`cd $CHARMBIN/../lib_so 2>/dev/null && pwd`
+- #getting absolute path is harder than thought because of symbolic links and ..
+- #ksh needs cd -P to resolve werid symbolic links, however -P is not portable
+- #csh is ok too if it exists
+- test -z "$CHARMLIBSO" && CHARMLIBSO=`cd -P $CHARMBIN/../lib_so 2>/dev/null && pwd`
+- test -z "$CHARMLIBSO" && CHARMLIBSO=`csh -c "cd $CHARMBIN/../lib_so >& /dev/null && pwd"`
+- test -z "$CHARMLIBSO" && echo "$CHARMBIN/../lib_so: not found" && exit 1
+-fi
++CHARMLIB="/usr/gentoo-libdir"
++CHARMINC="/usr/include/gentoo-include"
++CHARMLIBSO="/usr/gentoo-libdir"
+
+ ##############################################################################
+ #
diff --git a/sys-cluster/charm/metadata.xml b/sys-cluster/charm/metadata.xml
new file mode 100644
index 0000000..715027f
--- /dev/null
+++ b/sys-cluster/charm/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <use>
+ <flag name="cmkopt">Enable CMK optimisation</flag>
+ <flag name="tcp">Use TCP (instead of UPD) for socket communication</flag>
+ <flag name="charmshared">Build shared libraries</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-01 8:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 8:36 [gentoo-commits] proj/sci:ccp4 commit in: sys-cluster/charm/, sys-cluster/charm/files/ Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox