forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package-Manager: Portage-2.3.0, Repoman-2.3.1
- Loading branch information
Showing
2 changed files
with
212 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST charm-6.5.1.tar.gz 19265741 SHA256 68aa43e2a6e476e116a7e80e385c25c6ac6497807348025505ba8bfa256ed34a SHA512 1a25c76f3699e30d0614e85f39ea0f594896cbc299b0e670c52fcea176171e8834ea7f9ba3ba0c1957598b0f1cbfa6a4ed9279ae0c030fa32faa6acca879b694 WHIRLPOOL 0def514af09c137b951842250fe112c68e573e8eff7d5911a71ccbe55cc38b319f1d9c4587e706777f748b0c1ef69b63c4161bbf663b05984a566ff325fa49c3 | ||
DIST charm-6.6.0.tar.gz 18779545 SHA256 c916010f2d4cc2c6bd30ea19764839d0298fb56d1696d8ff08d9fa9a61dfb1c9 SHA512 fd6cc2fa8919198fdceb8187101882a61fe974fed3ddd65b102c95b850877429fe0675a55d54075e4a2accad134f615ff717a7dd39fbd9af5fa65a5c87d34e0b WHIRLPOOL 97cfbb45c9456e79d3b6f868c6acfbf8c8701f87743139a17cdb25fbb3a90fdf9a137e8da04df0ab25569ca1b9307c910fe02dc61a84b247bf81d112e0547317 | ||
DIST charm-6.6.1.tar.gz 125697465 SHA256 2aa16fd3015dce0a0932ab5253578a72ddbcb889bc0d23584c42b28446915467 SHA512 139409fff76ac9811b2efe6605579a877738f873b112d4e4da25f079598f6c238cf76e677ed3cf3f92aa59f29710feea3e96e59e6010e186e4191dfa4c3ef92e WHIRLPOOL d56dd8a2cf11152bcc8dd5d1bd166d28bebca02e81bb6fdc3de6c5bf4a6bdcd72f7b854cf42576d32d23fe994a207451ebca44ac9cf6a5d8b982d2e4141d422b | ||
DIST charm-6.7.1.tar.gz 18843211 SHA256 744a093874fbac03b6ae8be3ce434eff46b2ee778561e860802ed578e0810fdf SHA512 08581ad58ea737bb118ad1d382feeae2cec2ec0fd8ea1a227e2cb8080c40ba0d043de6c867de0dfa470b2291638b1b6bf6d52c89b4e4b6c9f1fdd824ac601436 WHIRLPOOL efb8de98cbef4f2842877725160aa4371f444a0901f7064cc07a184790516dda1882341cf59500506e41263eaaed2eb585f80b4f29744b680794b62f103d9c1d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=5 | ||
|
||
FORTRAN_STANDARD="90" | ||
PYTHON_COMPAT=( python2_7 ) | ||
|
||
inherit eutils flag-o-matic fortran-2 multilib multiprocessing python-any-r1 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 mlogft mpi ampi numa smp static-libs syncft tcp" | ||
|
||
RDEPEND="mpi? ( virtual/mpi )" | ||
DEPEND=" | ||
${RDEPEND} | ||
doc? ( | ||
>=app-text/poppler-0.12.3-r3[utils] | ||
dev-tex/latex2html | ||
virtual/tex-base | ||
$(python_gen_any_dep ' | ||
>=dev-python/beautifulsoup-4[${PYTHON_USEDEP}] | ||
dev-python/lxml[${PYTHON_USEDEP}] | ||
') | ||
media-libs/netpbm | ||
${PYTHON_DEPS} | ||
)" | ||
|
||
REQUIRED_USE=" | ||
cmkopt? ( !charmdebug !charmtracing ) | ||
charmproduction? ( !charmdebug !charmtracing )" | ||
|
||
pkg_setup() { | ||
use doc && python-any-r1_pkg_setup | ||
} | ||
|
||
get_opts() { | ||
local CHARM_OPTS | ||
|
||
# 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' '')" | ||
|
||
CHARM_OPTS+="$(usex mlogft ' mlogft' '')" | ||
CHARM_OPTS+="$(usex syncft ' syncft' '')" | ||
|
||
# Build shared libraries by default. | ||
CHARM_OPTS+=" --build-shared" | ||
|
||
if use charmproduction; then | ||
CHARM_OPTS+=" --with-production" | ||
else | ||
if use charmdebug; then | ||
CHARM_OPTS+=" --enable-charmdebug" | ||
fi | ||
|
||
if use charmtracing; then | ||
CHARM_OPTS+=" --enable-tracing --enable-tracing-commthread" | ||
fi | ||
fi | ||
|
||
CHARM_OPTS+="$(usex numa ' --with-numa' '')" | ||
echo $CHARM_OPTS | ||
} | ||
|
||
src_prepare() { | ||
sed \ | ||
-e "/CMK_CF77/s:[fg]77:$(usex mpi "mpif90" "$(tc-getF77)"):g" \ | ||
-e "/CMK_CF90/s:f95:$(usex mpi "mpif90" "$(tc-getFC)"):g" \ | ||
-e "/CMK_CF90/s:\`which f90.*$::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 "/CMK_CF90/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \ | ||
-e "/F90DIR/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \ | ||
-e "/f95target/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \ | ||
-e "/f95version/s:gfortran:$(usex mpi "mpif90" "$(tc-getFC)"):g" \ | ||
-i src/arch/common/*.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/util/charmrun-src/Makefile || die | ||
|
||
# CMK optimization | ||
use cmkopt && append-cppflags -DCMK_OPTIMIZE=1 | ||
|
||
# Fix QA notice. Filed report with upstream. | ||
append-cflags -DALLOCA_H | ||
} | ||
|
||
src_compile() { | ||
local build_version="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '')" | ||
local build_options="$(get_opts)" | ||
#build only accepts -j from MAKEOPTS | ||
local build_commandline="${build_version} ${build_options} -j$(makeopts_jobs)" | ||
|
||
# Build charmm++ first. | ||
einfo "running ./build charm++ ${build_commandline}" | ||
./build charm++ ${build_commandline} || die "Failed to build charm++" | ||
|
||
if use ampi; then | ||
einfo "running ./build AMPI ${build_commandline}" | ||
./build AMPI ${build_commandline} || die "Failed to build charm++" | ||
fi | ||
|
||
# make pdf/html docs | ||
if use doc; then | ||
emake -j1 -C doc/charm++ | ||
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. This | ||
# patch cannot be applied during src_prepare() because the charmc wrapper | ||
# is used during building. | ||
epatch "${FILESDIR}/charm-6.5.1-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 libs incl. charm objects | ||
for i in lib*/*.{so,a}; do | ||
[[ ${i} = *.a ]] && use !static-libs && continue | ||
if [[ -L ${i} ]]; then | ||
i=$(readlink -e "${i}") || die | ||
fi | ||
[[ ${i} = *.so ]] && dolib.so "${i}" || dolib "${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++/* | ||
docompress -x /usr/share/doc/${PF}/examples | ||
fi | ||
|
||
# Install pdf/html docs | ||
if use doc; then | ||
cd "${S}/doc/charm++" | ||
# Install pdfs. | ||
insinto /usr/share/doc/${PF}/pdf | ||
doins *.pdf | ||
# Install html. | ||
docinto html | ||
dohtml -r manual/* | ||
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'." | ||
} |