diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/charm |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/charm')
-rw-r--r-- | sys-cluster/charm/Manifest | 21 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.5.1-r1.ebuild | 207 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.5.1-r2.ebuild | 208 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.5.1-r3.ebuild | 211 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.6.0-r1.ebuild | 208 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.6.0.ebuild | 208 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.6.1.ebuild | 217 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.7.1.ebuild | 210 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch | 34 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch | 39 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch | 58 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch | 203 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch | 30 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch | 50 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch | 396 | ||||
-rw-r--r-- | sys-cluster/charm/metadata.xml | 23 |
16 files changed, 2323 insertions, 0 deletions
diff --git a/sys-cluster/charm/Manifest b/sys-cluster/charm/Manifest new file mode 100644 index 000000000000..98400453d2ae --- /dev/null +++ b/sys-cluster/charm/Manifest @@ -0,0 +1,21 @@ +AUX charm-6.5.1-CkReductionMgr.patch 1441 SHA256 35ecf0d8727004cec2fe26ea04764ef6d923d589e63fbc5f77fc9c858c72d7e8 SHA512 133a7a7d78c50f7966425f8a0f66cc22916a72de247c641fbd65f9e823a9f4044b9946bbd7e175cafde2b5d536820e2a65cd75afb593c65f11f1d7814c6c2dff WHIRLPOOL 1bd758ef9e68ff0427414304d9d4bdc004357e79c87b38bc54443a76d2527ac96d24bfa8e6a3bda033888ca984124402fc373a64c7b7ba9bf0ddd23d4eecbab5 +AUX charm-6.5.1-charmc-gentoo.patch 1305 SHA256 b1fbf52d856805101487d0cb20f3ebd36f2ae8123422e7a014cbc5fbaddc8327 SHA512 994becbf0e40c0e181222a854df98e3c7b571b517a24a0548ad323ac116f146f11b7d2e6ec4f8289ffb5926dda57d92831412e9367951387d1e224208306ed03 WHIRLPOOL 3fdae548a9d0ad0672d08a2a15711dd07da6e1c350ac7a2d95a9858b815cbff55a7e3767f957923dd9eee243c310553f35101f229eb9ac4f048165f28dc52dc5 +AUX charm-6.5.1-cleanup-config.patch 1982 SHA256 b8f11377869671705694cd940767cc44981af66df9cdb9f12c4a5d5c1d1b6710 SHA512 fb8817b3a3593ff34665a3d1a31dc2f286ad4fbd81b36a136391c6a75129bc7e93707f794805c90d07119a67d937ace2d1ce1955bd940048ba5cd2282bcb08e9 WHIRLPOOL d05bc8663be87d9191e1fe6c5ad5954298d59c9746846d1b41d47e263cf47a99349f2ca258301dac8793f1305b0bc46e7855aeb8510d5ece960a677de01e4a71 +AUX charm-6.5.1-fix-markupSanitizer.patch 6439 SHA256 8408aa89e59e72fae02179e738a924240a6a89b9eb162ebb746bb54e16be496f SHA512 fb1061dcd6af95cf147e84a7d49d32be03ac8a23378387dec5f340064b8db5b0531fa105c9745bdc9ec947b59f3384a3c878298f0380f9a12c79329c203b81f2 WHIRLPOOL 8da747d32bc891db2bd224fc1456d69a66913c36083fab6c5770f7a636252a29119deeb0142b1030a612ac251d38d635e435a771e6bb1abbbeb0a3e1b56b3c29 +AUX charm-6.5.1-fix-navmenuGenerator.patch 856 SHA256 ca39bcc048f91b66dfff009744320c231ec98e12b67f4645ee3407b4210d1c53 SHA512 c71d8a4113b494a0a0285cfeba197475ba706e00f002eb6d164df4a8ac587a6d259609b8090a1587397f10cc70d89365a6a6a660a4f14876968225acdbbf0db2 WHIRLPOOL efaaa2e88329a4515642331a99da0975fc7c1c9dfdc594c8b5d039c5e9b8d391dbc9ddceffae9a1e665f6d8429b194d533dc0927577801a2d23a1ea1861d2d66 +AUX charm-6.5.1-fix-string-parsing.patch 1658 SHA256 e6223fbb97685715ee9e1f02bb5a11cb98957046e7a73a2e2264c650b43fcb1b SHA512 81f84aa219c2e709cac252245ab43cde23a10ddd8f1c9717c77d32f1e62a88c1872452ac91d9dfb83f6a87570e9814272952acef7ac7b7264793115455e5a87e WHIRLPOOL 1858cbe6bd5d8765757b0ccf5343248b0d874d67857f01d3ec137c145aef685749dd82e3337f9d2cd81f3d00c78c9c661faa228a6ad5588942e6ef744fa3aeee +AUX charm-6.5.1-static-library-fix.patch 17080 SHA256 1cebaeb901c88a4f35a148fd51ce0c3e8050946f46b25575adad56c44296c99e SHA512 8209a8af4e316a5b961500e70450a87db2ceea9dd409cb73cdf8133dc4ba53e1bb73dfa7a2fd1c819f9a0d37b1ee9760bdda181aa73e2e5fe370d53e12cec82a WHIRLPOOL a782704014012fcfe7b28ce01514846d390c34ceadf64ef27eeb3e8e724aaf490c88ac0d8f093f3d1c8628769a58d7844849ba2587ed0288a733aac17bf40b12 +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 +EBUILD charm-6.5.1-r1.ebuild 5248 SHA256 93b0162874e938d9f7db02e04da119fba3ac3fd4582c91a8813c38b1a4fb60ee SHA512 bca23f56b551d6fb40328f8bdd25130c34f84e6b1e11236749703a0fdedbdfe40b566f13f8e3cbe07c7668582ddd0bbe880242955516c1dfdc5075571be0a573 WHIRLPOOL be1fd9b23b0dc470c294ca6453293c15d932915d42024db38d3d532a21dbe2396c0fd8026498bed5b0830725d2d861b7c266b3ae8dc2afaf3167ecb8eb0b28d5 +EBUILD charm-6.5.1-r2.ebuild 5311 SHA256 7494d776679391f581bcea53500555c7499b0e5b7e770432fd4cc5123074e94e SHA512 8cbea2a9aeab22ffbee26659991c8caed1b8545985df91e82375995b044a18be2dc3a14183260342eb7665c81bfce83e7d04f59346b718ef9aafd1f07d7c13ae WHIRLPOOL 5099624affbc9e7a7f59800e5e33bd3ed0e5e43aebdedbca3ddbf63b002152c98c035657e920d042a1ba03c5a9a0c71080d3f6445c4fcbacc2a69d28d8f1810f +EBUILD charm-6.5.1-r3.ebuild 5330 SHA256 e634172e060a4bdf5407b7f870839e40694542077e904aa2d805b845578758a7 SHA512 d31c2c5eca23229b208ec9e043b5e8b23e86341cbc24ab2b588d84a094c9f543ff63c4b8fc24a11eb4c4d55db7ad66917dc620b275ce5dd137276a6cbcb649cb WHIRLPOOL cecd50e2fc27684cc93df1af97ef0a461f1c2ff04c6cc4ef6cba87697b5e5f05b51d293c7173477e9cbeceb07d42b8f827f3fbf0cefba3d409aecba962e818b4 +EBUILD charm-6.6.0-r1.ebuild 5578 SHA256 3627c9808de5abbb146da0ee8f02b7c451a63b1167673f203b744cd4e3457099 SHA512 f049285b990d1627f4bdd2dc5f0bc5ae64bed61769f8a81787a6137ad8ad50ab5c0e80038d77c00a25523085e9ba36f3582217894e3b215b1f031c3a8f081567 WHIRLPOOL bbb601061bff6e806f3ded5283a95f849d4b4e2be95229e0434220330ea0e92f2b2aebd8c27cd387308d34890441f9ab1eda80b93d187a05dce980a3d57dc5bf +EBUILD charm-6.6.0.ebuild 5572 SHA256 a725c9221d7fc418fd48db425cbd5548e7e41b6d62247912d3eeba4ee244128c SHA512 6947f911efc5d756537ff8c06754e0f9580f8f4b9e7ee33ea96be3144ad4537da21228ecfd1321f972d97979fcf556e4f3b2646b11de7717006b4491462fafa7 WHIRLPOOL 7a1123746a0f25051751011154000ad6c2016041d50b1eace287db96a0701eb9c5ec176838fa961f4043c580d1dd01b665ccf8274ee7683af4e2ce5502d0afbb +EBUILD charm-6.6.1.ebuild 5781 SHA256 d5c8b4590f84e184a7127861ab495f4b87bd00606b5c4d078925ba42bd400673 SHA512 1c278e8e52860772ebbae872d5f172c0e69932baf8555085572d278402782d913ba647f20ef6789d26265f78272d510d5a351047df419299e322f3b0e5217474 WHIRLPOOL b7965138d62949eebee75cbc6a3d3f6ad9f4f397d488a0fcf28633356108b1549b8feac0610c3a3c6936be02ec3f5917dac9aaf981a5406c2ed0f3e961d0c9fb +EBUILD charm-6.7.1.ebuild 5598 SHA256 0062c8eca7889e002ad33c86604e577da96fc46a85196e76d0ce75e099457d79 SHA512 b40081a208590bda948ac87350eed55566c6548f273c0b80b16bdf5b68a5ae1fb8a46595960f0cf91c7a5c91083e159564a7cc51db5ed301dac296f77fb58f8b WHIRLPOOL 403539022227fd9b7381959717c4e946f8186b1b90250f4e7bf88222c726315946737536de89ef93e148c00f6202f601890f40d1d34d1d1ca6c88900ca868976 +MISC ChangeLog 3394 SHA256 766e7d9a1b2271deba9f77949ba514f4218ea86c95ef16ba6cd29b8ca00519d8 SHA512 bc78cb966005f210c9de406228944a93f9c2c95774b1253a0013e2e187573e5d4b677d70941491c95e847028d6cd5f246afe7da16c2af06c6d1247f3fe05471c WHIRLPOOL 7ac9ec7dda60237c6e0413d2d03781a1aeb0e1fcdbdfd8cf7ff1adf5dbca4bd1bf03b6969383f23679eeffe6074d00f68fac1e2990489175995a81d73792ee0f +MISC ChangeLog-2015 7846 SHA256 3f60157b6e68e52f98acbb7f51a390e26e6a9e18102fcf895b2142e1d2208a80 SHA512 9dc9e0a8b75ef75702335313571645521dbf6454baa8cb7cebe86f8368f30b1a7436107c5874223252409026cdbbb409679d20d86cdf0ee74e388ea0002701b8 WHIRLPOOL 190437d58cee19920f311e89292af2ba857bfff3cd7eb7cd5e88701fe9ad6e60c41c16f97c5caf0a4cfbf320683f6d7f7510cfc6b53661eb83e24fbe264e9b4c +MISC metadata.xml 1012 SHA256 d67875d615640f797d90aaae080ca18496f609e5d768a7b96c3b6ab5aaa29224 SHA512 e8fd7cfac25aa8428adbe77922140eee5621b18afa5f10d1ed0c7b14960affc3a1dc0896b7ea034001855ef3e1c1f12791cada0f959eb210ba78f1be44b89ffc WHIRLPOOL bca1370c270a66b0aca4b7ffde7d78a3aa8e0d3c7a4f48deedb24b55cae264422b727a12d7ae22c74bd01132a6ff8246f1ad04d52a829af05e095dd8783f2c7c diff --git a/sys-cluster/charm/charm-6.5.1-r1.ebuild b/sys-cluster/charm/charm-6.5.1-r1.ebuild new file mode 100644 index 000000000000..4f82e15a3eba --- /dev/null +++ b/sys-cluster/charm/charm-6.5.1-r1.ebuild @@ -0,0 +1,207 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-single-r1 + +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 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 + >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + media-libs/netpbm + ${PYTHON_DEPS} + )" + +REQUIRED_USE=" + doc? ( ${PYTHON_REQUIRED_USE} ) + cmkopt? ( !charmdebug !charmtracing ) + charmproduction? ( !charmdebug !charmtracing )" + +FORTRAN_STANDARD="90" + +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_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 + + # CMK optimization + use cmkopt && append-cppflags -DCMK_OPTIMIZE=1 + + # Fix QA notice. Filed report with upstream. + append-cflags -DALLOCA_H + + epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch" + epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" +} + +src_compile() { + local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} ${CFLAGS}" + + # Build charmm++ first. + einfo "running ./build charm++ ${mybuildoptions}" + ./build charm++ ${mybuildoptions} || die "Failed to build charm++" + + # make pdf/html docs + if use doc; then + python-single-r1_pkg_setup + python_fix_shebang "${S}/doc" + einfo "forcing ${EPYTHON}" + 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 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/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'." +} diff --git a/sys-cluster/charm/charm-6.5.1-r2.ebuild b/sys-cluster/charm/charm-6.5.1-r2.ebuild new file mode 100644 index 000000000000..b66af8c38b24 --- /dev/null +++ b/sys-cluster/charm/charm-6.5.1-r2.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-single-r1 + +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 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 + >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + media-libs/netpbm + ${PYTHON_DEPS} + )" + +REQUIRED_USE=" + doc? ( ${PYTHON_REQUIRED_USE} ) + cmkopt? ( !charmdebug !charmtracing ) + charmproduction? ( !charmdebug !charmtracing )" + +FORTRAN_STANDARD="90" + +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_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 + + # CMK optimization + use cmkopt && append-cppflags -DCMK_OPTIMIZE=1 + + # Fix QA notice. Filed report with upstream. + append-cflags -DALLOCA_H + + epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch" + epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" + epatch "${FILESDIR}/charm-6.5.1-static-library-fix.patch" +} + +src_compile() { + local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} -j1 ${CFLAGS}" + + # Build charmm++ first. + einfo "running ./build charm++ ${mybuildoptions}" + ./build charm++ ${mybuildoptions} || die "Failed to build charm++" + + # make pdf/html docs + if use doc; then + python-single-r1_pkg_setup + python_fix_shebang "${S}/doc" + einfo "forcing ${EPYTHON}" + 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 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/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'." +} diff --git a/sys-cluster/charm/charm-6.5.1-r3.ebuild b/sys-cluster/charm/charm-6.5.1-r3.ebuild new file mode 100644 index 000000000000..5cf9b4f6cb0e --- /dev/null +++ b/sys-cluster/charm/charm-6.5.1-r3.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs python-any-r1 + +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 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 )" + +FORTRAN_STANDARD="90" + +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_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 + + # CMK optimization + use cmkopt && append-cppflags -DCMK_OPTIMIZE=1 + + # Fix QA notice. Filed report with upstream. + append-cflags -DALLOCA_H + + epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch" + epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-string-parsing.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch" + epatch "${FILESDIR}/charm-6.5.1-static-library-fix.patch" +} + +src_compile() { + local mybuildoptions="$(usex mpi "mpi" "net")-linux$(usex amd64 "-amd64" '') $(get_opts) ${MAKEOPTS} -j1 ${CFLAGS}" + + # Build charmm++ first. + einfo "running ./build charm++ ${mybuildoptions}" + ./build charm++ ${mybuildoptions} || die "Failed to build charm++" + + # 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 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/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'." +} diff --git a/sys-cluster/charm/charm-6.6.0-r1.ebuild b/sys-cluster/charm/charm-6.6.0-r1.ebuild new file mode 100644 index 000000000000..a8d9206fc52c --- /dev/null +++ b/sys-cluster/charm/charm-6.6.0-r1.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +FORTRAN_STANDARD="90" +PYTHON_COMPAT=( python{2_7,3_4} ) + +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 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 + + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch" +} + +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++" + + # 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,o,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'." +} diff --git a/sys-cluster/charm/charm-6.6.0.ebuild b/sys-cluster/charm/charm-6.6.0.ebuild new file mode 100644 index 000000000000..b6347d0be608 --- /dev/null +++ b/sys-cluster/charm/charm-6.6.0.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 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 + + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch" +} + +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++" + + # 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,o,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'." +} diff --git a/sys-cluster/charm/charm-6.6.1.ebuild b/sys-cluster/charm/charm-6.6.1.ebuild new file mode 100644 index 000000000000..fb6f4b9f8e25 --- /dev/null +++ b/sys-cluster/charm/charm-6.6.1.ebuild @@ -0,0 +1,217 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +FORTRAN_STANDARD="90" +PYTHON_COMPAT=( python{2_7,3_4} ) + +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" + +REQUIRED_USE="ampi? ( !mpi )" + +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 )" + +S="${WORKDIR}/${PN}" + +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 + + epatch "${FILESDIR}/charm-6.5.1-fix-navmenuGenerator.patch" + epatch "${FILESDIR}/charm-6.5.1-fix-markupSanitizer.patch" +} + +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,o,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'." +} diff --git a/sys-cluster/charm/charm-6.7.1.ebuild b/sys-cluster/charm/charm-6.7.1.ebuild new file mode 100644 index 000000000000..1f2d2300a744 --- /dev/null +++ b/sys-cluster/charm/charm-6.7.1.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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'." +} diff --git a/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch new file mode 100644 index 000000000000..ad07fc3aa3bc --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch @@ -0,0 +1,34 @@ +From 6b537784e9c345dee7f7cfd108c6abc779a969ae Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Fri, 27 Sep 2013 10:50:45 -0600 +Subject: [PATCH 2/4] Fixed bug in CkReductionMgr::reduceMessages(). + +The first contribution of a child node is a single message. In this case +CkReductionMgr::reduceMessages() simply returns the message without calling +the reducer. However, when using the CkReduction::set reducer this behavior is +incorrect, and instead the reducer should be called even for one single +message so that the message is wrapped into a setElement struct. In the +current implementation, the reduction becomes corrupted because the +CkReduction::set() method one tier up in the reduction sizes the remote +contribution incorrectly assuming a setElement struct and not a simple +message. +--- + src/ck-core/ckreduction.C | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ck-core/ckreduction.C b/src/ck-core/ckreduction.C +index 07853a2..ef3e906 100644 +--- a/src/ck-core/ckreduction.C ++++ b/src/ck-core/ckreduction.C +@@ -850,7 +850,7 @@ CkReductionMsg *CkReductionMgr::reduceMessages(void) + else + {//Use the reducer to reduce the messages + //if there is only one msg to be reduced just return that message +- if(nMsgs == 1){ ++ if(nMsgs == 1 && msgArr[0]->reducer != CkReduction::set) { + ret = msgArr[0]; + }else{ + if (msgArr[0]->reducer == CkReduction::random) { +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch b/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch new file mode 100644 index 000000000000..f1502ced7d94 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-charmc-gentoo.patch @@ -0,0 +1,39 @@ +From 664eb097d1c5d1a158b1f41badc79d369a06aab6 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Fri, 27 Sep 2013 10:53:31 -0600 +Subject: [PATCH 4/4] Fix paths for gentoo. + +--- + src/scripts/charmc | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +diff --git a/src/scripts/charmc b/src/scripts/charmc +index 4d37a6b..8ec2f70 100755 +--- a/src/scripts/charmc ++++ b/src/scripts/charmc +@@ -361,19 +361,9 @@ then + 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" + + ############################################################################## + # +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch b/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch new file mode 100644 index 000000000000..ec71eb27d469 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-cleanup-config.patch @@ -0,0 +1,58 @@ +From b0af812652269a59457ad1bbf57165c0543bcd07 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Fri, 27 Sep 2013 10:49:52 -0600 +Subject: [PATCH 1/4] Commented out colliding defines in conv-autoconfig.h + +The colliding defines (bug #252) are commented out in configure. +--- + src/scripts/configure | 5 +++++ + src/scripts/configure.in | 3 +++ + 2 files changed, 8 insertions(+) + +diff --git a/src/scripts/configure b/src/scripts/configure +index acd582c..faf268f 100755 +--- a/src/scripts/configure ++++ b/src/scripts/configure +@@ -1703,6 +1703,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers conv-autoconfig.h" + + ++ac_config_commands="$ac_config_commands config-cleanup" ++ ++ + CHARMINC="." + test -r ./conv-config.sh && . ./conv-config.sh + +@@ -5259,6 +5262,7 @@ for ac_config_target in $ac_config_targets + do + case $ac_config_target in + "conv-autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS conv-autoconfig.h" ;; ++ "config-cleanup") CONFIG_COMMANDS="$CONFIG_COMMANDS config-cleanup" ;; + "libs/ck-libs/ampi/ampiCC") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampiCC" ;; + "libs/ck-libs/ampi/ampirun") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampirun" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; +@@ -5812,6 +5816,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} + + + case $ac_file$ac_mode in ++ "config-cleanup":C) sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h ;; + "default":C) chmod +x libs/ck-libs/ampi/ampiCC libs/ck-libs/ampi/ampirun + ;; + +diff --git a/src/scripts/configure.in b/src/scripts/configure.in +index d1285ed..cad9a42 100644 +--- a/src/scripts/configure.in ++++ b/src/scripts/configure.in +@@ -3,6 +3,9 @@ AC_INIT(./Makefile) + + AC_CONFIG_HEADER(conv-autoconfig.h) + ++AC_CONFIG_COMMANDS([config-cleanup], ++ [sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h]) ++ + CHARMINC="." + test -r ./conv-config.sh && . ./conv-config.sh + +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch b/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch new file mode 100644 index 000000000000..6ed4c1989b4c --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-fix-markupSanitizer.patch @@ -0,0 +1,203 @@ +From 88f5739d3f0d34c51f318fc460b843253b4242e0 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Fri, 8 Nov 2013 09:58:55 -0700 +Subject: [PATCH 2/2] Make markupSanitizer.py support python 3.1 and 3.2 + +The script only supports <python-3 because of how uni-code literals are +treated in python-3.{1,2}. In python-2, a unicode string had to be prefixed +with 'u', while this notation was dropped in python-3.{1,2}. I have added a +check to the script so that it runs now with python-2.7 and python-3.{1,2,3}. +--- + doc/markupSanitizer.py | 179 ++++++++++++++++++++++++++----------------------- + 1 file changed, 95 insertions(+), 84 deletions(-) + +diff --git a/doc/markupSanitizer.py b/doc/markupSanitizer.py +index f206cab..6fe247d 100755 +--- a/doc/markupSanitizer.py ++++ b/doc/markupSanitizer.py +@@ -4,87 +4,98 @@ from bs4 import BeautifulSoup + import sys + import os + +-# Accept filename as user input +-argc = len( sys.argv ) +-if (argc < 2): raise Exception +-fileName = sys.argv[1]; +- +-# Construct a DOM object +-soup = BeautifulSoup(open(fileName), "lxml") +- +-# Assuming, tt tags are not spewed recklessly by latex2html, +-# replace them with code tags +-for t in soup('tt'): +- t.wrap( soup.new_tag('code') ) +- t.unwrap() +- +-# Rewrap all div class=alltt blocks in pre tags +-for d in soup('div','alltt'): +- d.wrap( soup.new_tag('pre') ) +- d.unwrap() +- +-# Remove br and span tags from within pre sections +-for p in soup('pre'): +- for b in p('br'): +- b.extract() +- for s in p('span'): +- s.unwrap() +- +-# Remove all useless class 'arabic' spans +-for s in soup('span','arabic'): +- s.unwrap() +- +-# Extract the navigation bar +-navmenu = soup.find('div', 'navigation') +-if navmenu: +- navmenu.extract() +- +-# Wrap the remaining contents within a div +-if not soup.find('div', id='maincontainer'): +- soup.body['id'] = 'maincontainer' +- soup.body.name = 'div' +- soup.find('div', id='maincontainer').wrap( soup.new_tag('body') ) +- +-if navmenu: +- # If this navmenu doesn't already have a TOC, insert one +- if not navmenu.find('ul','manual-toc'): +- # Add a toc within the navmenu +- navmenuTOC = BeautifulSoup(open("tmp-navmenu.html"), "lxml") +- navmenuTOC = navmenuTOC.find('ul','manual-toc').extract() +- navmenuTOC.append( BeautifulSoup("".join([ +- '<li><a href="http://charm.cs.illinois.edu">PPL Homepage</a></li>', +- '<li><a href="http://charm.cs.illinois.edu/help">Other Manuals</a></li>']) +- ) ) +- navmenu.append(navmenuTOC) +- +- # Insert navigation symbols to prev and next links +- prevsymbol = soup.new_tag('span') +- prevsymbol['class'] = 'navsymbol' +- prevsymbol.string = u'\xab' +- prv = navmenu.find('li',id='nav-prev') +- if prv: +- prv.find('a').insert(0, prevsymbol) +- +- nextsymbol = soup.new_tag('span') +- nextsymbol['class'] = 'navsymbol' +- nextsymbol.string = u'\xbb' +- nxt = navmenu.find('li',id='nav-next') +- if nxt: +- nxt.find('a').append(nextsymbol) +- +- # Reinsert the navigation bar at the end +- soup.body.append(navmenu) +- +-# Extract the title +-titl = soup.find('title') +- +-# Replace the head section with the user-supplied head markup +-soup.find('head').extract() +-newhead = BeautifulSoup(open("../assets/head.html"), "lxml") +-newhead = newhead.find('head').extract() +-newhead.append(titl) +-soup.html.body.insert_before(newhead) +- +-# Print cleaned up markup to stdout +-print( soup.prettify(formatter="html") ) +- ++def main (): ++ # Accept filename as user input ++ argc = len( sys.argv ) ++ if (argc < 2): raise Exception ++ fileName = sys.argv[1]; ++ ++ # Construct a DOM object ++ soup = BeautifulSoup(open(fileName), "lxml") ++ ++ # Assuming, tt tags are not spewed recklessly by latex2html, ++ # replace them with code tags ++ for t in soup('tt'): ++ t.wrap( soup.new_tag('code') ) ++ t.unwrap() ++ ++ # Rewrap all div class=alltt blocks in pre tags ++ for d in soup('div','alltt'): ++ d.wrap( soup.new_tag('pre') ) ++ d.unwrap() ++ ++ # Remove br and span tags from within pre sections ++ for p in soup('pre'): ++ for b in p('br'): ++ b.extract() ++ for s in p('span'): ++ s.unwrap() ++ ++ # Remove all useless class 'arabic' spans ++ for s in soup('span','arabic'): ++ s.unwrap() ++ ++ # Extract the navigation bar ++ navmenu = soup.find('div', 'navigation') ++ if navmenu: ++ navmenu.extract() ++ ++ # Wrap the remaining contents within a div ++ if not soup.find('div', id='maincontainer'): ++ soup.body['id'] = 'maincontainer' ++ soup.body.name = 'div' ++ soup.find('div', id='maincontainer').wrap( soup.new_tag('body') ) ++ ++ if navmenu: ++ # If this navmenu doesn't already have a TOC, insert one ++ if not navmenu.find('ul','manual-toc'): ++ # Add a toc within the navmenu ++ navmenuTOC = BeautifulSoup(open("tmp-navmenu.html"), "lxml") ++ navmenuTOC = navmenuTOC.find('ul','manual-toc').extract() ++ navmenuTOC.append( BeautifulSoup("".join([ ++ '<li><a href="http://charm.cs.illinois.edu">PPL Homepage</a></li>', ++ '<li><a href="http://charm.cs.illinois.edu/help">Other Manuals</a></li>']) ++ ) ) ++ navmenu.append(navmenuTOC) ++ ++ # Insert navigation symbols to prev and next links ++ prevsymbol = soup.new_tag('span') ++ prevsymbol['class'] = 'navsymbol' ++ prevsymbol.string = u('\xab') ++ prv = navmenu.find('li',id='nav-prev') ++ if prv: ++ prv.find('a').insert(0, prevsymbol) ++ ++ nextsymbol = soup.new_tag('span') ++ nextsymbol['class'] = 'navsymbol' ++ nextsymbol.string = u('\xbb') ++ nxt = navmenu.find('li',id='nav-next') ++ if nxt: ++ nxt.find('a').append(nextsymbol) ++ ++ # Reinsert the navigation bar at the end ++ soup.body.append(navmenu) ++ ++ # Extract the title ++ titl = soup.find('title') ++ ++ # Replace the head section with the user-supplied head markup ++ soup.find('head').extract() ++ newhead = BeautifulSoup(open("../assets/head.html"), "lxml") ++ newhead = newhead.find('head').extract() ++ newhead.append(titl) ++ soup.html.body.insert_before(newhead) ++ ++ # Print cleaned up markup to stdout ++ print( soup.prettify(formatter="html") ) ++ ++if sys.version < '3': ++ import codecs ++ def u (x): ++ return codecs.unicode_escape_decode(x)[0] ++else: ++ def u (x): ++ return x ++ ++if __name__ == "__main__": ++ main() +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch b/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch new file mode 100644 index 000000000000..a19a8dba1ff7 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-fix-navmenuGenerator.patch @@ -0,0 +1,30 @@ +From 8b699f6c49df26b979da397b47c7dc7a099ed6b6 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Sat, 28 Sep 2013 07:47:36 -0600 +Subject: [PATCH] Properly test for None return value in navmenuGenerator.py + +--- + doc/navmenuGenerator.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/doc/navmenuGenerator.py b/doc/navmenuGenerator.py +index c10afb5..5e5b97c 100755 +--- a/doc/navmenuGenerator.py ++++ b/doc/navmenuGenerator.py +@@ -13,7 +13,12 @@ fileName = sys.argv[1]; + soup = BeautifulSoup(open(fileName), "lxml") + + # Get just the table of contents from the index page +-toc = soup.find("ul","ChildLinks").extract() ++toc = soup.find("ul","ChildLinks") ++ ++if toc == None: ++ sys.exit(0) ++ ++toc = toc.extract() + + # Retain only part and chapter titles + for sctn in toc.select("li > ul > li > ul"): +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch new file mode 100644 index 000000000000..1cc6b432c3d4 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch @@ -0,0 +1,50 @@ +From 14f407a5d183cdac7029cc54a9d8ae6b0cb5cbcd Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Fri, 27 Sep 2013 10:52:18 -0600 +Subject: [PATCH 3/4] charmrun.c: parsing of strings now parses "\n" into '\n' + +Since gdb lacks anything like ';' to separate several commands in one line, +the commands need to be separated by a newline character. I have added some +parsing logic so that the string "\n" will now be translated into the +character '\n'. +--- + src/arch/net/charmrun/charmrun.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/src/arch/net/charmrun/charmrun.c b/src/arch/net/charmrun/charmrun.c +index 6837712..8818cf8 100644 +--- a/src/arch/net/charmrun/charmrun.c ++++ b/src/arch/net/charmrun/charmrun.c +@@ -454,8 +454,27 @@ static int pparam_setdef(def, value) + if (*p) return -1; + return 0; + case 's' : +- *def->where.s = strdup(value); +- return 0; ++ { ++ /* Parse input string and convert a literal "\n" into '\n'. */ ++ *def->where.s = (char*) calloc(strlen(value)+1, sizeof(char)); ++ char* parsed_value = (char*) *def->where.s; ++ int i; ++ int j = 0; ++ for(i = 0; i < strlen(value); i++) ++ { ++ if(i+1 < strlen(value)) ++ { ++ if(value[i] == '\\' && value[i+1] == 'n') ++ { ++ parsed_value[j++] = '\n'; ++ i++; ++ continue; ++ } ++ } ++ parsed_value[j++] = value[i]; ++ } ++ return 0; ++ } + case 'f' : + *def->where.f = strtol(value, &p, 10); + if (*p) return -1; +-- +1.8.1.5 + diff --git a/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch b/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch new file mode 100644 index 000000000000..13efb2123b55 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-static-library-fix.patch @@ -0,0 +1,396 @@ +From 3a7261ab3a00472dd4bde0619c145c69aecf80c3 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Mon, 14 Oct 2013 07:15:14 -0600 +Subject: [PATCH] Some libraries are only built statically, + +preventing a Charm++ installation with only dynamic libraries. + +On a typical Linux system only shared libraries are installed, because of the +usual security and bloat arguments. However, if I build charm with +--build-shared, and then install only what is in lib_so, the charmc script +breaks because some Converse libraries are built purely as .o and don't end up +in lib_so. One example is seed based load balancing, e.g. libldb-rand.o. As +far as I can tell, this is not too hard to fix. In the main makefile, the +targets libldb-*.o are renamed to libldb-*.a, and the charmc script now tests +both .a and .so when linking the seed based load balancing code. +--- + src/scripts/Makefile | 136 +++++++++++++++++++++++++-------------------------- + src/scripts/charmc | 37 ++++++++------ + 2 files changed, 91 insertions(+), 82 deletions(-) + +diff --git a/src/scripts/Makefile b/src/scripts/Makefile +index 51d0e7b..1550ed2 100644 +--- a/src/scripts/Makefile ++++ b/src/scripts/Makefile +@@ -349,7 +349,7 @@ dirs+sources: + # Converse Libraries + # + ############################################################################### +-CLBLIBS=$(L)/libldb-rand.o $(L)/libldb-spray.o $(L)/libldb-workstealing.o $(L)/libldb-neighbor.o $(L)/libldb-none.o $(L)/libldb-test.o $(L)/libldb-bluegene.o ++CLBLIBS=$(L)/libldb-rand.a $(L)/libldb-spray.a $(L)/libldb-workstealing.a $(L)/libldb-neighbor.a $(L)/libldb-none.a $(L)/libldb-test.a $(L)/libldb-bluegene.a + + TRACELIBS = $(L)/libtrace-converse.a $(L)/libtracef_f.a + +@@ -363,32 +363,32 @@ TRACELIBS += $(L)/libtrace-projections.a $(L)/libtrace-summary.a \ + $(L)/libtrace-memory.a + endif + +-MEMLIBS=$(L)/libmemory-default.o $(L)/libmemory-os.o $(L)/libmemory-gnu.o \ +- $(L)/libmemory-gnuold.o $(L)/libmemory-verbose.o \ +- $(L)/libmemory-paranoid.o \ +- $(L)/libmemory-leak.o $(L)/libmemory-isomalloc.o \ +- $(L)/libmemory-os-verbose.o $(L)/libmemory-os-isomalloc.o \ +- $(L)/libmemory-os-leak.o $(L)/libmemory-os-paranoid.o \ +- $(L)/libmemory-os-lock.o $(L)/libmemory-os-wrapper.o ++MEMLIBS=$(L)/libmemory-default.a $(L)/libmemory-os.a $(L)/libmemory-gnu.a \ ++ $(L)/libmemory-gnuold.a $(L)/libmemory-verbose.a \ ++ $(L)/libmemory-paranoid.a \ ++ $(L)/libmemory-leak.a $(L)/libmemory-isomalloc.a \ ++ $(L)/libmemory-os-verbose.a $(L)/libmemory-os-isomalloc.a \ ++ $(L)/libmemory-os-leak.a $(L)/libmemory-os-paranoid.a \ ++ $(L)/libmemory-os-lock.a $(L)/libmemory-os-wrapper.a + + BUILD_CHARMDEBUG=$(shell CHARMINC=.; if test -f ./conv-config.sh; then . ./conv-config.sh; echo $$CMK_CHARMDEBUG; fi ) + + ifneq "$(BUILD_CHARMDEBUG)" "0" +-MEMLIBS += $(L)/libmemory-charmdebug.o $(L)/libmemory-charmdebug-mmap.o \ +- $(L)/libmemory-charmdebug-slot.o \ +- $(L)/libmemory-charmdebug-mmap-slot.o \ +- $(L)/libmemory-os-charmdebug.o $(L)/libmemory-hooks-charmdebug.o ++MEMLIBS += $(L)/libmemory-charmdebug.a $(L)/libmemory-charmdebug-mmap.a \ ++ $(L)/libmemory-charmdebug-slot.a \ ++ $(L)/libmemory-charmdebug-mmap-slot.a \ ++ $(L)/libmemory-os-charmdebug.a $(L)/libmemory-hooks-charmdebug.a + endif + +-THREADLIBS=$(L)/libthreads-default.o $(L)/libthreads-default-tls.o \ +- $(L)/libthreads-qt.o $(L)/libthreads-qt-tls.o \ +- $(L)/libthreads-context.o $(L)/libthreads-context-tls.o \ +- $(L)/libthreads-uJcontext.o $(L)/libthreads-uJcontext-tls.o \ +- $(L)/libthreads-pthreads.o $(L)/libthreads-fibers.o \ +- $(L)/libthreads-stackcopy.o $(L)/libthreads-memoryalias.o \ +- $(L)/libthreads-qt-memoryalias.o \ +- $(L)/libthreads-context-memoryalias.o \ +- $(L)/libthreads-uJcontext-memoryalias.o ++THREADLIBS=$(L)/libthreads-default.a $(L)/libthreads-default-tls.a \ ++ $(L)/libthreads-qt.a $(L)/libthreads-qt-tls.a \ ++ $(L)/libthreads-context.a $(L)/libthreads-context-tls.a \ ++ $(L)/libthreads-uJcontext.a $(L)/libthreads-uJcontext-tls.a \ ++ $(L)/libthreads-pthreads.a $(L)/libthreads-fibers.a \ ++ $(L)/libthreads-stackcopy.a $(L)/libthreads-memoryalias.a \ ++ $(L)/libthreads-qt-memoryalias.a \ ++ $(L)/libthreads-context-memoryalias.a \ ++ $(L)/libthreads-uJcontext-memoryalias.a + + CVLIBS=$(L)/libconv-core.a \ + $(L)/libconv-cplus-y.a $(L)/libconv-cplus-n.a \ +@@ -543,19 +543,19 @@ lz4.o: lz4.c lz4.h + $(CHARMC) -o $@ $< + + ## Converse load balancers (seed balancers, -balance) +-$(L)/libldb-none.o: cldb.none.c $(CVHEADERS) ++$(L)/libldb-none.a: cldb.none.c $(CVHEADERS) + $(CHARMC) -o $@ cldb.none.c + +-$(L)/libldb-rand.o: cldb.rand.c cldb.h $(CVHEADERS) ++$(L)/libldb-rand.a: cldb.rand.c cldb.h $(CVHEADERS) + $(CHARMC) -o $@ cldb.rand.c + +-$(L)/libldb-neighbor.o: cldb.neighbor.c cldb.neighbor.h graph.h $(CVHEADERS) ++$(L)/libldb-neighbor.a: cldb.neighbor.c cldb.neighbor.h graph.h $(CVHEADERS) + $(CHARMC) -o $@ cldb.neighbor.c + +-$(L)/libldb-workstealing.o: cldb.workstealing.c cldb.workstealing.h graph.h $(CVHEADERS) ++$(L)/libldb-workstealing.a: cldb.workstealing.c cldb.workstealing.h graph.h $(CVHEADERS) + $(CHARMC) -o $@ cldb.workstealing.c + +-$(L)/libldb-spray.o: cldb.spray.c $(CVHEADERS) ++$(L)/libldb-spray.a: cldb.spray.c $(CVHEADERS) + $(CHARMC) -o $@ cldb.spray.c + + +@@ -565,138 +565,138 @@ $(L)/libldb-spray.o: cldb.spray.c $(CVHEADERS) + #//$(L)/libldb-prioritycentralizedopt.o: cldb.prioritycentralizedopt.c cldb.prioritycentralizedopt.h $(CVHEADERS) + #// $(CHARMC) -o $@ cldb.prioritycentralizedopt.c + +-$(L)/libldb-test.o: cldb.test.c $(CVHEADERS) ++$(L)/libldb-test.a: cldb.test.c $(CVHEADERS) + $(CHARMC) -o $@ cldb.test.c + +-$(L)/libldb-bluegene.o: cldb.bluegene.c $(CVHEADERS) ++$(L)/libldb-bluegene.a: cldb.bluegene.c $(CVHEADERS) + $(CHARMC) -o $@ cldb.bluegene.c + + ## Memory allocation libraries (-memory) + MEM_DEPS=memory.c memory-gnu.c memory-gnuold.c converse.h conv-mach.h $(CVHEADERS) +-$(L)/libmemory-default.o: $(MEM_DEPS) ++$(L)/libmemory-default.a: $(MEM_DEPS) + $(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_DEFAULT memory.c + +-$(L)/libmemory-os.o: $(MEM_DEPS) ++$(L)/libmemory-os.a: $(MEM_DEPS) + $(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS memory.c + +-$(L)/libmemory-os-verbose.o: memory-verbose.c $(MEM_DEPS) ++$(L)/libmemory-os-verbose.a: memory-verbose.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_VERBOSE memory.c || touch $@ + +-$(L)/libmemory-os-paranoid.o: memory-paranoid.c $(MEM_DEPS) ++$(L)/libmemory-os-paranoid.a: memory-paranoid.c $(MEM_DEPS) + -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_PARANOID memory.c || touch $@ + +-$(L)/libmemory-os-leak.o: $(MEM_DEPS) ++$(L)/libmemory-os-leak.a: $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_LEAK memory.c || touch $@ + +-$(L)/libmemory-os-isomalloc.o: memory-isomalloc.c $(MEM_DEPS) ++$(L)/libmemory-os-isomalloc.a: memory-isomalloc.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_ISOMALLOC memory.c || touch $@ + +-$(L)/libmemory-os-lock.o: memory-lock.c $(MEM_DEPS) ++$(L)/libmemory-os-lock.a: memory-lock.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_LOCK memory.c || touch $@ + +-$(L)/libmemory-os-charmdebug.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-os-charmdebug.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_OS_WRAPPED -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@ + +-$(L)/libmemory-os-wrapper.o: memory-os-wrapper.C $(MEM_DEPS) ++$(L)/libmemory-os-wrapper.a: memory-os-wrapper.C $(MEM_DEPS) + -$(CHARMC) -o $@ memory-os-wrapper.C || touch $@ + +-$(L)/libmemory-hooks-charmdebug.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-hooks-charmdebug.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -o $@ -DCMK_MEMORY_BUILD_GNU_HOOKS -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@ + + # If the system doesn't have sbrk, these compilations may fail. + # This is OK, but then we can't use "-memory gnu" or friends. +-$(L)/libmemory-gnu.o: $(MEM_DEPS) ++$(L)/libmemory-gnu.a: $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_GNU memory.c || touch $@ + +-$(L)/libmemory-gnuold.o: $(MEM_DEPS) ++$(L)/libmemory-gnuold.a: $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_GNUOLD memory.c || touch $@ + +-$(L)/libmemory-verbose.o: memory-verbose.c $(MEM_DEPS) ++$(L)/libmemory-verbose.a: memory-verbose.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_VERBOSE memory.c || touch $@ + +-$(L)/libmemory-paranoid.o: memory-paranoid.c $(MEM_DEPS) ++$(L)/libmemory-paranoid.a: memory-paranoid.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_PARANOID memory.c || touch $@ + +-$(L)/libmemory-leak.o: memory-leak.c $(MEM_DEPS) ++$(L)/libmemory-leak.a: memory-leak.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_LEAK memory.c || touch $@ + +-$(L)/libmemory-cache.o: memory-cache.c $(MEM_DEPS) ++$(L)/libmemory-cache.a: memory-cache.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_CACHE memory.c || touch $@ + +-$(L)/libmemory-isomalloc.o: memory-isomalloc.c $(MEM_DEPS) ++$(L)/libmemory-isomalloc.a: memory-isomalloc.c $(MEM_DEPS) + -$(CHARMC) -I. -o $@ -DCMK_MEMORY_BUILD_ISOMALLOC memory.c || touch $@ + +-$(L)/libmemory-charmdebug.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-charmdebug.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG memory.c || touch $@ + +-$(L)/libmemory-charmdebug-slot.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-charmdebug-slot.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCMK_SEPARATE_SLOT memory.c || touch $@ + +-$(L)/libmemory-charmdebug-mmap.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-charmdebug-mmap.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCPD_USE_MMAP memory.c || touch $@ + +-$(L)/libmemory-charmdebug-mmap-slot.o: memory-charmdebug.c $(MEM_DEPS) ++$(L)/libmemory-charmdebug-mmap-slot.a: memory-charmdebug.c $(MEM_DEPS) + -$(CHARMC) -I. -optimize -o $@ -DCMK_MEMORY_BUILD_CHARMDEBUG -DCPD_USE_MMAP -DCMK_SEPARATE_SLOT memory.c || touch $@ + + ## Thread libraries (-thread) + + LIBTHREADSDEPS = threads.c $(CVHEADERS) QUICK_THREADS + +-$(L)/libthreads-default.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-default.a: $(LIBTHREADSDEPS) + $(CHARMC) -o $@ -DCMK_THREADS_BUILD_DEFAULT=1 -IQuickThreads -I. threads.c + +-$(L)/libthreads-default-tls.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-default-tls.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_DEFAULT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads -I. threads.c 2> /dev/null || touch $@ + +-$(L)/libthreads-qt.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-qt.a: $(LIBTHREADSDEPS) + $(CHARMC) -o $@ -DCMK_THREADS_BUILD_QT=1 -IQuickThreads threads.c + +-$(L)/libthreads-qt-tls.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-qt-tls.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_QT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads threads.c 2> /dev/null || touch $@ + +-$(L)/libthreads-context.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-context.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_CONTEXT=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-context-tls.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-context-tls.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_CONTEXT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads threads.c 2> /dev/null || touch $@ + +-$(L)/libthreads-uJcontext.o: $(LIBTHREADSDEPS) uJcontext.c ++$(L)/libthreads-uJcontext.a: $(LIBTHREADSDEPS) uJcontext.c + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_JCONTEXT=1 -IQuickThreads -I. threads.c || touch $@ + +-$(L)/libthreads-uJcontext-tls.o: $(LIBTHREADSDEPS) uJcontext.c ++$(L)/libthreads-uJcontext-tls.a: $(LIBTHREADSDEPS) uJcontext.c + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_JCONTEXT=1 -DCMK_THREADS_BUILD_TLS=1 -IQuickThreads -I. threads.c || touch $@ + +-$(L)/libthreads-pthreads.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-pthreads.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_PTHREADS=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-fibers.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-fibers.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_FIBERS=1 -IQuickThreads threads.c 2> /dev/null || touch $@ + +-$(L)/libthreads-stackcopy.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-stackcopy.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_BUILD_STACKCOPY=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-memoryalias.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-memoryalias.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_DEFAULT=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-qt-memoryalias.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-qt-memoryalias.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_QT=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-context-memoryalias.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-context-memoryalias.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_CONTEXT=1 -IQuickThreads threads.c || touch $@ + +-$(L)/libthreads-uJcontext-memoryalias.o: $(LIBTHREADSDEPS) ++$(L)/libthreads-uJcontext-memoryalias.a: $(LIBTHREADSDEPS) + -$(CHARMC) -o $@ -DCMK_THREADS_ALIAS_STACK=1 -DCMK_THREADS_BUILD_JCONTEXT=1 -IQuickThreads -I. threads.c || touch $@ + + ## Global swapping (-swapglobal) +-swapglobal-target: $(L)/libglobal-swap.o $(L)/libglobal-copy.o $(L)/loadsym.o ++swapglobal-target: $(L)/libglobal-swap.a $(L)/libglobal-copy.a $(L)/loadsym.a + +-$(L)/libglobal-swap.o: global-elfgot.C $(CVHEADERS) ++$(L)/libglobal-swap.a: global-elfgot.C $(CVHEADERS) + -$(CHARMC) -c global-elfgot.C -o $@ || touch $@ + +-$(L)/libglobal-copy.o: global-elfcopy.C $(CVHEADERS) ++$(L)/libglobal-copy.a: global-elfcopy.C $(CVHEADERS) + -$(CHARMC) -c global-elfcopy.C -o $@ || touch $@ + +-$(L)/loadsym.o: loadsym.c $(CVHEADERS) ++$(L)/loadsym.a: loadsym.c $(CVHEADERS) + -$(CHARMC) -c loadsym.c -o $@ || touch $@ + + ############################################################################### +diff --git a/src/scripts/charmc b/src/scripts/charmc +index 4d37a6b..ee4e76c 100755 +--- a/src/scripts/charmc ++++ b/src/scripts/charmc +@@ -340,6 +340,14 @@ printVersion() + echo Charm++ Version $version + } + ++getLibraryObject() ++{ ++ if [[ -f "${CHARMLIB}/$1-$2.a" ]]; then ++ echo "${CHARMLIB}/$1-$2.a" ++ else ++ echo "${CHARMLIBSO}/$1-$2.so" ++ fi ++} + + ############################################################################## + # +@@ -1616,13 +1624,12 @@ then + fi + + BAL_EXT=`getExtention $BALANCE` +-if [ -z "$BAL_EXT" ] +-then +-# Balance has no extention-- is a library reference +- BAL_OBJ="$CHARMLIB/libldb-$BALANCE.o" ++if [[ -z "$BAL_EXT" ]]; then ++ # Balance has no extension-- is a library reference ++ BAL_OBJ=$(getLibraryObject "libldb" ${BALANCE}) + else +-# Balance has some extention-- must be a .o or .a file +- BAL_OBJ="$BALANCE" ++ # Balance has some extension-- must be a .o or .a file ++ BAL_OBJ="$BALANCE" + fi + + Debug "Finished with BAL_OBJ=$BAL_OBJ, TRACEMODE=$TRACEMODE..." +@@ -1638,10 +1645,11 @@ then + fi + fi + ++Debug "Finished with BAL_OBJ=$BAL_OBJ, TRACEMODE=$TRACEMODE..." + + # Check for valid choice of MEMORY + +-MEM_OBJ="$CHARMLIB/libmemory-$MEMORY.o" ++MEM_OBJ=$(getLibraryObject "libmemory" ${MEMORY}) + + if [ ! -r $MEM_OBJ -o ! -s $MEM_OBJ ] + then +@@ -1652,7 +1660,7 @@ fi + # For memory wrapping around the OS allocator, need to add also the wrapper object + case $MEMORY in + os-*) +- MEM_OBJ=$MEM_OBJ" $CHARMLIB/libmemory-os-wrapper.o" ++ MEM_OBJ="${MEM_OBJ} $(getLibraryObject 'libmemory' 'os-wrapper')" + ;; + esac + +@@ -1670,7 +1678,8 @@ then + THREAD=${THREAD}-tls + fi + fi +-THREAD_OBJ="$CHARMLIB/libthreads-$THREAD.o" ++ ++THREAD_OBJ=$(getLibraryObject "libthreads" ${THREAD}) + + if [ ! -r $THREAD_OBJ -o ! -s $THREAD_OBJ ] + then +@@ -1836,7 +1845,7 @@ esac + + if [ "$BUILD_SHARE" = "0" ] + then +- MIDDLE_LIBS="$MEM_OBJ $THREAD_OBJ $MIDDLE_LIBS" ++ MIDDLE_LIBS="$MIDDLE_LIBS $MEM_OBJ $THREAD_OBJ" + fi + + if [ "$CHARM_SHARED" = "1" ] +@@ -1848,17 +1857,17 @@ then + then + LANG_LIBS="-L$CHARMLIBSO $OBJECTFILES $PRE_LIBRARIES" + else +- LANG_LIBS="-L$CHARMLIBSO $BAL_OBJ $OBJECTFILES $modInitObj $PRE_LIBRARIES" ++ LANG_LIBS="-L$CHARMLIBSO $OBJECTFILES $modInitObj $PRE_LIBRARIES" + fi + else +- LANG_LIBS="-L$CHARMLIB -I$CHARMINC $BAL_OBJ $OBJECTFILES $modInitObj $PRE_LIBRARIES" ++ LANG_LIBS="-L$CHARMLIB -I$CHARMINC $OBJECTFILES $modInitObj $PRE_LIBRARIES" + fi + if [ "$TRACE_WITH_TAU" = 1 ] + then + echo "Linking with the TAU libraries: $TAU_LIBS" +- ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS $TAU_LIBS" ++ ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $BAL_OBJ $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS $TAU_LIBS" + else +- ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS" ++ ALL_LIBS="$LANG_LIBS $MIDDLE_LIBS $BAL_OBJ $CMK_LIBS $POST_LIBRARIES $CMK_SYSLIBS" + fi + Debugf "All libraries are: $ALL_LIBS" + +-- +1.8.1.5 + diff --git a/sys-cluster/charm/metadata.xml b/sys-cluster/charm/metadata.xml new file mode 100644 index 000000000000..0bc87aff66bb --- /dev/null +++ b/sys-cluster/charm/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>nicolasbock@gentoo.org</email> + <name>Nicolas Bock</name> + </maintainer> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <use> + <flag name="ampi">Build implementation of MPI on top of Charm++</flag> + <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="mlogft">Compile with Charm++ message logging fault tolerance support</flag> + <flag name="numa">Support memory affinity with NUMA</flag> + <flag name="syncft">Compile with Charm++ fault tolerance support</flag> + <flag name="tcp">Use TCP (instead of UPD) for socket communication</flag> + </use> +</pkgmetadata> |