diff options
author | Nicolas Bock <nicolasbock@gentoo.org> | 2014-10-28 16:28:49 +0000 |
---|---|---|
committer | Nicolas Bock <nicolasbock@gentoo.org> | 2014-10-28 16:28:49 +0000 |
commit | df6b32e929a8c949addb6ef023e61c80868a2cea (patch) | |
tree | 7d9ade719d8d9969499e36600e441442c727127d /sci-physics | |
parent | work with dash (bug #527110) (diff) | |
download | historical-df6b32e929a8c949addb6ef023e61c80868a2cea.tar.gz historical-df6b32e929a8c949addb6ef023e61c80868a2cea.tar.bz2 historical-df6b32e929a8c949addb6ef023e61c80868a2cea.zip |
sci-physics/lammps-20141021-r1: Added more optional modules in build.
Package-Manager: portage-2.2.8-r2/cvs/Linux x86_64
Manifest-Sign-Key: 0xAC91CA52
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/lammps/ChangeLog | 7 | ||||
-rw-r--r-- | sci-physics/lammps/Manifest | 3 | ||||
-rw-r--r-- | sci-physics/lammps/lammps-20141021-r1.ebuild | 206 |
3 files changed, 214 insertions, 2 deletions
diff --git a/sci-physics/lammps/ChangeLog b/sci-physics/lammps/ChangeLog index d4e9ea521f23..c41e25c8229c 100644 --- a/sci-physics/lammps/ChangeLog +++ b/sci-physics/lammps/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-physics/lammps # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.45 2014/10/25 01:54:09 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/ChangeLog,v 1.46 2014/10/28 16:28:46 nicolasbock Exp $ + +*lammps-20141021-r1 (28 Oct 2014) + + 28 Oct 2014; Nicolas Bock <nicolasbock@gentoo.org> +lammps-20141021-r1.ebuild: + sci-physics/lammps-20141021-r1: Added more optional modules in build. 25 Oct 2014; Patrick Lauer <patrick@gentoo.org> metadata.xml: Remove unneeded useflags from metadata.xml diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest index 4412d299aa77..d4bbe13d73c2 100644 --- a/sci-physics/lammps/Manifest +++ b/sci-physics/lammps/Manifest @@ -27,6 +27,7 @@ EBUILD lammps-20140808.ebuild 4687 SHA256 1b152c7423025ba0204164e7dd7191295f8013 EBUILD lammps-20140815.ebuild 4778 SHA256 d2d3387803fd197e05a6d117c4544d8e51fe206dd60eea9beb33106103d6f2b0 SHA512 af78c852df35410442b226f2d86e1e619c36e2523e29f6675fb2fde26f7bb24a88d8c9bf1fba428a3a049280e946490915690c3663219f0279c8b56fb397801b WHIRLPOOL 2eafa50d48884efbe4edcc3621090e334ea9f4a4d832b113255265902900eff3c8bb34e21836113f3ba5d654fde0ea36350b596b106b7d4d236b4f8a05eded7b EBUILD lammps-20140905.ebuild 4783 SHA256 ed835ef15e69a980d8d4d6cd0d66ce99c94c22c7ac118297c93e1eff78c6da03 SHA512 1cf76c67df78229adc9663c264bb943c1d590cb914bd0dd01184832e8b4cb2acadeeec28226dee1898f8dd41199abf55108a2092a83443a181da398dc96cdad0 WHIRLPOOL 35f297d276b052baa5ec9a03a944eeb070eb416564be779ea44fd40dcad92ea78493a1e3909f7ee74e4156afa2c399758ea905c727d700055dabef661b6cee7d EBUILD lammps-20140925.ebuild 4783 SHA256 19d7179a8f26cb4083179a60ba606dd5f2698c9d81db46653a183c1362beb39c SHA512 542d146fe5e20bc77484a247f25dfbbeb1b7c3de19d289af2c65edc320a24ec3dd0fbc062b47e21386d0ba53372dd8efa5616b847a99bf6ba6846634ca505ddd WHIRLPOOL 9e037e4fab154eccc5f9249ad6f83cd7db3db0a368da6dfae15ccebf717bdc0691a36e6a28adb573e97ffdb4f0553039f7d6c1a93b762ae26f8dc286b67260fa +EBUILD lammps-20141021-r1.ebuild 4958 SHA256 d5db171128c1fbac9b0b6066b3c67a225374d7e78d1d1783672b88552dd4cd6d SHA512 cd35c33df090d340bfb757fae182d380e796affb915067d2f1c913661de296dfcff5c243afaaee2f95f33ce614c736807824e2040f02d49b6a39deec1583ddfb WHIRLPOOL ac3688f205b0d9d6fdabaae489af9387e2bc765f0a2a40c991ef9594ef1b3a8fde8cf9e01af9daf42ebba3b5b8a667b25c4da5bc8bfa5304f3698b5759243551 EBUILD lammps-20141021.ebuild 4783 SHA256 204a6d23edb40f52f363536b109d6d7f097a35e273ae73028ee05cf3cdd86e7f SHA512 d8f9d45f226e4b8912966e80b26a278bec3a7efa3c7b3fdeb7b08e8413e45f8b900312956a9f86535bb7633abbd3137e9a52008555caad6692ec818803a9fd17 WHIRLPOOL db1dec825edc138282f1f276065c3fa6221b3938b6d38b52e92f0489422fa6d97f77ecffa12fed2708f9e6cea4c2c0a5c439ddcd731a137c9533e9f9dad39533 -MISC ChangeLog 7860 SHA256 b5717292f40dde137f89bf7de02bc838ecfce506510e9ea8ede87f5363c9211e SHA512 62de2d5f6cca250047d0cbebff932a220330c2910d0ad816afeed5ead7688f072de6d4af68319c7bdb18f124a206c0a54e78c02b12db18edce321759e8a1f5e8 WHIRLPOOL 8bfdfc32fdacc627d035c025e17e3cada98c13da915e907430e079427f6ad6cc0b12ddd6b4442613de156e0455454ed26f35dd169f82f9e78e11ec5177771216 +MISC ChangeLog 8053 SHA256 7c368b8db76e89f47ed545997fe2572f630b975e0b729b200391f10d7d1d1d5f SHA512 270d2cbdfbcee5c71f5fcb33ff2fa11664a70b010045093ced93e76028028079bf62328a8afbe7a1a47fac3b1addfc7f5763c57f30a0255877f1484767d283a8 WHIRLPOOL 159661a14b9fc86ace8fffb35976e5f24244c20fe1ed09e1dde1a243a9bbf511b88892c77ad8d555f6758220fc6f8480966614a911735bc249b1fd4bcdc804e2 MISC metadata.xml 1337 SHA256 c49d3c9030c88c7cd0b079b4ffe0c8b1251de0c334da7a7059f7fbc68a4ac9b1 SHA512 a5f7e2193663f88104c258f9bdd8e7ab581c1584bad57aea14dab7499fac076db6db26299cad8f273d1fabb7fcf22c1c25461b8cb6f229e489b6bce8195a3782 WHIRLPOOL 2b47343be9bffc283319c0bc96b5a481ad99391bbb8771a9431ac38bb7f1d210470f96d96a4b430251cfb6b424801cbcf5fac0ba04f4a7824323e27e2926842d diff --git a/sci-physics/lammps/lammps-20141021-r1.ebuild b/sci-physics/lammps/lammps-20141021-r1.ebuild new file mode 100644 index 000000000000..70112ecbdb6f --- /dev/null +++ b/sci-physics/lammps/lammps-20141021-r1.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/lammps/lammps-20141021-r1.ebuild,v 1.1 2014/10/28 16:28:46 nicolasbock Exp $ + +EAPI=5 + +inherit eutils flag-o-matic fortran-2 multilib + +convert_month() { + case $1 in + 01) echo Jan + ;; + 02) echo Feb + ;; + 03) echo Mar + ;; + 04) echo Apr + ;; + 05) echo May + ;; + 06) echo Jun + ;; + 07) echo Jul + ;; + 08) echo Aug + ;; + 09) echo Sep + ;; + 10) echo Oct + ;; + 11) echo Nov + ;; + 12) echo Dec + ;; + *) echo unknown + ;; + esac +} + +MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2} + +DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator" +HOMEPAGE="http://lammps.sandia.gov/" +SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples gzip lammps-memalign mpi static-libs" + +DEPEND=" + mpi? ( + virtual/blas + virtual/lapack + virtual/mpi + ) + sci-libs/voro++ + " +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +lmp_emake() { + local LAMMPS_INCLUDEFLAGS + LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')" + LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')" + + # The lammps makefile uses CC to indicate the C++ compiler. + emake \ + ARCHIVE=$(tc-getAR) \ + CC=$(usex mpi "mpic++" "$(tc-getCXX)") \ + F90=$(usex mpi "mpif90" "$(tc-getFC)") \ + LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \ + CCFLAGS="${CXXFLAGS}" \ + F90FLAGS="${FCFLAGS}" \ + LINKFLAGS="${LDFLAGS}" \ + LMP_INC="${LAMMPS_INCLUDEFLAGS}" \ + MPI_INC=$(usex mpi '' "-I../STUBS") \ + MPI_PATH=$(usex mpi '' '-L../STUBS') \ + MPI_LIB=$(usex mpi '' '-lmpi_stubs') \ + user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\ + "$@" +} + +src_prepare() { + # Fix inconsistent use of SHFLAGS. + sed -i \ + -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \ + -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \ + src/VORONOI/Makefile.lammps || die + + # Fix missing .so name. + sed -i \ + -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \ + src/MAKE/Makefile.serial || die + + # Fix makefile in tools. + sed -i \ + -e 's:g++:$(CXX) $(CXXFLAGS):' \ + -e 's:gcc:$(CC) $(CCFLAGS):' \ + -e 's:ifort:$(FC) $(FCFLAGS):' \ + tools/Makefile || die +} + +src_compile() { + # Prepare compiler flags. + append-cxxflags -fPIC -I../../src + append-fflags -fPIC + + # Compile stubs for serial version. + use mpi || lmp_emake -C src stubs + + # Build packages + emake -C src yes-asphere + emake -C src yes-body + emake -C src yes-class2 + emake -C src yes-colloid + emake -C src yes-dipole + emake -C src yes-fld + #emake -C src yes-gpu + emake -C src yes-granular + # Need OpenKIM external dependency. + #emake -C src yes-kim + # Need Kokkos external dependency. + #emake -C src yes-kokkos + emake -C src yes-kspace + emake -C src yes-manybody + emake -C src yes-mc + lmp_emake -C src yes-meam + lmp_emake -j1 -C lib/meam -f Makefile.gfortran + emake -C src yes-misc + emake -C src yes-molecule + #emake -C src yes-mpiio + emake -C src yes-opt + emake -C src yes-peri + emake -C src yes-poems + lmp_emake -C lib/poems -f Makefile.g++ + emake -C src yes-reax + lmp_emake -j1 -C lib/reax -f Makefile.gfortran + emake -C src yes-replica + emake -C src yes-rigid + emake -C src yes-shock + emake -C src yes-snap + emake -C src yes-srd + emake -C src yes-voronoi + emake -C src yes-xtc + + emake -C src yes-user-eff + emake -C src yes-user-fep + use mpi && emake -C src yes-user-lb + emake -C src yes-user-phonon + emake -C src yes-user-sph + + if use mpi; then + emake -C src yes-user-atc + lmp_emake -C lib/atc -f Makefile.g++ + fi + + if use static-libs; then + # Build static library. + lmp_emake -C src makelib + lmp_emake -C src -f Makefile.lib serial + fi + + # Build shared library. + lmp_emake -C src makeshlib + lmp_emake -C src -f Makefile.shlib serial + + # Compile main executable. + lmp_emake -C src serial + + # Compile tools. + emake -C tools binary2txt chain micelle2d data2xmovie +} + +src_install() { + use static-libs && newlib.a src/liblammps_serial.a liblammps.a + newlib.so src/liblammps_serial.so liblammps.so.0.0.0 + dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so + dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0 + newbin src/lmp_serial lmp + dobin tools/binary2txt + # Don't forget to add header files of optional packages as they are added + # to this ebuild. There may also be .mod files from Fortran based + # packages. + insinto "/usr/include/${PN}" + doins -r src/*.h lib/meam/*.mod + + local LAMMPS_POTENTIALS="usr/share/${PN}/potentials" + insinto "/${LAMMPS_POTENTIALS}" + doins potentials/* + echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps + doenvd 99lammps + + if use examples; then + local LAMMPS_EXAMPLES="/usr/share/${PN}/examples" + insinto "${LAMMPS_EXAMPLES}" + doins -r examples/* + fi + + dodoc README + if use doc; then + dodoc doc/Manual.pdf + dohtml -r doc/* + fi +} |