diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2009-03-15 00:43:19 -0700 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2009-03-15 00:43:19 -0700 |
commit | 7e6fd77719485c200c670a66c294bf1f41c0f0d9 (patch) | |
tree | 9ac267f9c61d81a34951bf2bde486af6d1fb04a8 /sci-libs | |
parent | Add solve-resolve-bin license. (diff) | |
download | dberkholz-7e6fd77719485c200c670a66c294bf1f41c0f0d9.tar.gz dberkholz-7e6fd77719485c200c670a66c294bf1f41c0f0d9.tar.bz2 dberkholz-7e6fd77719485c200c670a66c294bf1f41c0f0d9.zip |
Add some dependencies of abinit, split out from bundled plugins.
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/bigdft/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/bigdft/bigdft-1.2.0.ebuild | 51 | ||||
-rw-r--r-- | sci-libs/bigdft/files/bigdft-1.2.0-0001.patch | 151 | ||||
-rw-r--r-- | sci-libs/etsf_io/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/etsf_io/etsf_io-1.0.2.ebuild | 47 | ||||
-rw-r--r-- | sci-libs/etsf_io/files/1.0.2-as-needed.patch | 24 | ||||
-rw-r--r-- | sci-libs/fox/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/fox/files/1.0.2-as-needed.patch | 24 | ||||
-rw-r--r-- | sci-libs/fox/fox-4.0.3.ebuild | 57 | ||||
-rw-r--r-- | sci-libs/wannier90/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/wannier90/files/wannier90-1.1-0001.patch | 16 | ||||
-rw-r--r-- | sci-libs/wannier90/files/wannier90-1.1-0002.patch | 105 | ||||
-rw-r--r-- | sci-libs/wannier90/wannier90-1.1.ebuild | 57 |
13 files changed, 545 insertions, 0 deletions
diff --git a/sci-libs/bigdft/Manifest b/sci-libs/bigdft/Manifest new file mode 100644 index 0000000..5d723f0 --- /dev/null +++ b/sci-libs/bigdft/Manifest @@ -0,0 +1,3 @@ +AUX bigdft-1.2.0-0001.patch 4760 RMD160 fb54d83e404c35d4384d797e4372e4b7b83e0afd SHA1 ef995c8c7671ba5df253c23ed14c91974a01f07f SHA256 b368327f7a55007da142b4f84f3b7e92cb0f787400747021143c70bed3231a67 +DIST bigdft-1.2.0.tar.gz 947932 RMD160 163d16cf8cdf438c483bc773957061e293ed5695 SHA1 5570c247ca378c8de81c74d1d55c8f9bb4bd54be SHA256 d28597a0e29bad3200270985374aba3d0c2adbb35cb6b33765c3c7183e7db77f +EBUILD bigdft-1.2.0.ebuild 1218 RMD160 178ded0890c6566a647860aeab0404d6ddcb73c8 SHA1 d01318f40886a1db74748cbd4da728a618126710 SHA256 28e91e966f62fd255a73d4181a4d22f9673dc571d20030e2f9faae921038fcac diff --git a/sci-libs/bigdft/bigdft-1.2.0.ebuild b/sci-libs/bigdft/bigdft-1.2.0.ebuild new file mode 100644 index 0000000..fbb8336 --- /dev/null +++ b/sci-libs/bigdft/bigdft-1.2.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit eutils fortran + +DESCRIPTION="DFT electronic structure code using a wavelet basis set" +HOMEPAGE="http://inac.cea.fr/L_Sim/BigDFT" +SRC_URI="${HOMEPAGE}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cuda mpi" +RDEPEND="cuda? ( dev-util/nvidia-cuda-sdk ) + mpi? ( virtual/mpi ) + virtual/lapack + virtual/blas" +DEPEND="${RDEPEND} + >=sys-devel/autoconf-2.59" + +FORTRAN="gfortran ifc mpif90" + +src_prepare() { + # Patch taken from sci-physics/abinit-5.7.3 bundled version + epatch "${FILESDIR}"/${P}-0001.patch +} + +src_configure() { + if [[ -z ${FCFLAGS} ]]; then + einfo "Defaulting to ${FCFLAGS} for FCFLAGS" + : ${FCFLAGS:--O2} + fi + + # Build this as a library for sci-physics/abinit + econf \ + --disable-libabinit \ + --with-moduledir=/usr/include \ + --disable-binaries \ + $(use_enable mpi) \ + $(use_enable cuda cuda-gpu) \ + $(use_with cuda cuda-path /opt/cuda) \ + $(use_with cuda lib-cutils /opt/cuda/lib) \ + FCFLAGS="${FCFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc README NEWS AUTHORS INSTALL ChangeLog || die "dodoc failed" +} diff --git a/sci-libs/bigdft/files/bigdft-1.2.0-0001.patch b/sci-libs/bigdft/files/bigdft-1.2.0-0001.patch new file mode 100644 index 0000000..3ef8bed --- /dev/null +++ b/sci-libs/bigdft/files/bigdft-1.2.0-0001.patch @@ -0,0 +1,151 @@ +diff -urN bigdft-1.2.0.old/src/init/ionicpot.f90 bigdft-1.2.0.new/src/init/ionicpot.f90 +--- bigdft-1.2.0.old/src/init/ionicpot.f90 2009-03-08 07:28:32.000000000 +0100 ++++ bigdft-1.2.0.new/src/init/ionicpot.f90 2009-03-08 07:29:03.000000000 +0100 +@@ -8,7 +8,7 @@ + integer, intent(in) :: iproc,nproc,n1,n2,n3,n1i,n2i,n3i,i3s,n3pi + real(gp), intent(in) :: hxh,hyh,hzh + real(gp), dimension(3,at%nat), intent(in) :: rxyz +- real(dp), dimension(*), intent(in) :: pkernel ++ real(gp), dimension(*), intent(in) :: pkernel + real(gp), intent(out) :: eion,psoffset + real(gp), dimension(3,at%nat), intent(out) :: fion + real(dp), dimension(*), intent(out) :: pot_ion +@@ -757,7 +757,7 @@ + !local variables + integer :: iat,ityp + real(wp) :: pi,charge +- real(gp) :: r,sq2rl,rx,ry,rz ++ real(gp) :: r,sq2rl,rx,ry,rz,arg,derf_arg + + + pi=4.0_wp*atan(1.0_wp) +@@ -779,7 +779,9 @@ + if (r == 0.0_gp) then + potxyz = potxyz - charge*2.0_wp/(sqrt(pi)*real(sq2rl,wp)) + else +- potxyz = potxyz - charge*real(erf(r/sq2rl)/r,wp) ++ arg=r/sq2rl ++ call derf(derf_arg,arg) ++ potxyz = potxyz - charge*real(derf_arg/r,wp) + end if + + end do +@@ -799,3 +801,118 @@ + nr=15 + end if + end subroutine ext_buffers ++ ++subroutine derf(derf_yy,yy) ++ ++ use module_base ++ implicit none ++ real(gp),intent(in) :: yy ++ real(gp),intent(out) :: derf_yy ++ integer :: done,ii,isw ++ real(gp), parameter :: & ++ ! coefficients for 0.0 <= yy < .477 ++ & pp(5)=(/ 113.8641541510502e0_gp, 377.4852376853020e0_gp, & ++ & 3209.377589138469e0_gp, .1857777061846032e0_gp, & ++ & 3.161123743870566e0_gp /) ++ real(gp), parameter :: & ++ & qq(4)=(/ 244.0246379344442e0_gp, 1282.616526077372e0_gp, & ++ & 2844.236833439171e0_gp, 23.60129095234412e0_gp/) ++ ! coefficients for .477 <= yy <= 4.0 ++ real(gp), parameter :: & ++ & p1(9)=(/ 8.883149794388376e0_gp, 66.11919063714163e0_gp, & ++ & 298.6351381974001e0_gp, 881.9522212417691e0_gp, & ++ & 1712.047612634071e0_gp, 2051.078377826071e0_gp, & ++ & 1230.339354797997e0_gp, 2.153115354744038e-8_gp, & ++ & .5641884969886701e0_gp /) ++ real(gp), parameter :: & ++ & q1(8)=(/ 117.6939508913125e0_gp, 537.1811018620099e0_gp, & ++ & 1621.389574566690e0_gp, 3290.799235733460e0_gp, & ++ & 4362.619090143247e0_gp, 3439.367674143722e0_gp, & ++ & 1230.339354803749e0_gp, 15.74492611070983e0_gp/) ++ ! coefficients for 4.0 < y, ++ real(gp), parameter :: & ++ & p2(6)=(/ -3.603448999498044e-01_gp, -1.257817261112292e-01_gp, & ++ & -1.608378514874228e-02_gp, -6.587491615298378e-04_gp, & ++ & -1.631538713730210e-02_gp, -3.053266349612323e-01_gp/) ++ real(gp), parameter :: & ++ & q2(5)=(/ 1.872952849923460e0_gp , 5.279051029514284e-01_gp, & ++ & 6.051834131244132e-02_gp , 2.335204976268692e-03_gp, & ++ & 2.568520192289822e0_gp /) ++ real(gp), parameter :: & ++ & sqrpi=.5641895835477563e0_gp, xbig=13.3e0_gp, xlarge=6.375e0_gp, xmin=1.0e-10_gp ++ real(gp) :: res,xden,xi,xnum,xsq,xx ++ ++ xx = yy ++ isw = 1 ++!Here change the sign of xx, and keep track of it thanks to isw ++ if (xx<0.0e0_gp) then ++ isw = -1 ++ xx = -xx ++ end if ++ ++ done=0 ++ ++!Residual value, if yy < -6.375e0_gp ++ res=-1.0e0_gp ++ ++!abs(yy) < .477, evaluate approximation for erfc ++ if (xx<0.477e0_gp) then ++! xmin is a very small number ++ if (xx<xmin) then ++ res = xx*pp(3)/qq(3) ++ else ++ xsq = xx*xx ++ xnum = pp(4)*xsq+pp(5) ++ xden = xsq+qq(4) ++ do ii = 1,3 ++ xnum = xnum*xsq+pp(ii) ++ xden = xden*xsq+qq(ii) ++ end do ++ res = xx*xnum/xden ++ end if ++ if (isw==-1) res = -res ++ done=1 ++ end if ++ ++!.477 < abs(yy) < 4.0 , evaluate approximation for erfc ++ if (xx<=4.0e0_gp .and. done==0 ) then ++ xsq = xx*xx ++ xnum = p1(8)*xx+p1(9) ++ xden = xx+q1(8) ++ do ii=1,7 ++ xnum = xnum*xx+p1(ii) ++ xden = xden*xx+q1(ii) ++ end do ++ res = xnum/xden ++ res = res* exp(-xsq) ++ if (isw.eq.-1) res = res-1.0e0_gp ++ done=1 ++ end if ++ ++!y > 13.3e0_gp ++ if (isw > 0 .and. xx > xbig .and. done==0 ) then ++ res = 1.0e0_gp ++ done=1 ++ end if ++ ++!4.0 < yy < 13.3e0_gp .or. -6.375e0_gp < yy < -4.0 ++!evaluate minimax approximation for erfc ++ if ( ( isw > 0 .or. xx < xlarge ) .and. done==0 ) then ++ xsq = xx*xx ++ xi = 1.0e0_gp/xsq ++ xnum= p2(5)*xi+p2(6) ++ xden = xi+q2(5) ++ do ii = 1,4 ++ xnum = xnum*xi+p2(ii) ++ xden = xden*xi+q2(ii) ++ end do ++ res = (sqrpi+xi*xnum/xden)/xx ++ res = res* exp(-xsq) ++ if (isw.eq.-1) res = res-1.0e0_gp ++ end if ++ ++!All cases have been investigated ++ derf_yy = res ++ ++end subroutine derf ++ diff --git a/sci-libs/etsf_io/Manifest b/sci-libs/etsf_io/Manifest new file mode 100644 index 0000000..357c9b9 --- /dev/null +++ b/sci-libs/etsf_io/Manifest @@ -0,0 +1,3 @@ +AUX 1.0.2-as-needed.patch 983 RMD160 25f73057a074295ee28f3f1cf10a4d308846a8e5 SHA1 dadd68c543ca786bc33aba5633416e23c95c5611 SHA256 fe9190f60b438d33fa27d23430c2bd049e2e77f07759ccb825b78ed1be9eedcf +DIST etsf_io-1.0.2.tar.gz 354902 RMD160 c21111e05cfe33ccc2c7f80f8a47db2d506f54f5 SHA1 28d712321bff073b211c60dee6d02b0f79c55406 SHA256 714208a2a4268fa11bd270d73e9a747900c1dff9c16768f6b1220556171ce035 +EBUILD etsf_io-1.0.2.ebuild 1223 RMD160 f9cdf6bd7eabd69982e7f8cbb97c6c5b2626bde2 SHA1 ed63ca9f0ea48a9265d8ce3f93e746d4beac5b73 SHA256 bce1cf8b876ca73937f717203c7c3937e1ad4cab5b8ad707634f7d8ccb952f1f diff --git a/sci-libs/etsf_io/etsf_io-1.0.2.ebuild b/sci-libs/etsf_io/etsf_io-1.0.2.ebuild new file mode 100644 index 0000000..83f71fa --- /dev/null +++ b/sci-libs/etsf_io/etsf_io-1.0.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit autotools eutils fortran flag-o-matic multilib + +DESCRIPTION="A library of Fortran90 routines to read/write the ETSF file format" +HOMEPAGE="http://www.etsf.eu/resources/software/libraries_and_tools" +SRC_URI="http://www.etsf.eu/sites/default/files/${P}.tar_.gz -> ${P}.tar.gz" +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug examples" +RDEPEND="sci-libs/netcdf[fortran]" +DEPEND="${RDEPEND} + >=sys-devel/autoconf-2.59" + +FORTRAN="gfortran ifc pgf90" + +src_prepare() { + epatch "${FILESDIR}"/${PV}-as-needed.patch + eautoreconf +} + +src_configure() { + use debug || append-cppflags -DNDEBUG + + if [[ -z ${FCFLAGS} ]]; then + einfo "Defaulting to ${FCFLAGS} for FCFLAGS" + : ${FCFLAGS:--O2} + fi + + econf \ + $(use_enable examples build-tutorials) \ + --with-netcdf-ldflags="-L/usr/$(get_libdir)" \ + --with-netcdf-libs="-lnetcdff" \ + --with-moduledir=/usr/include \ + FCFLAGS="${FCFLAGS}" +# --with-netcdf-ldflags="-L/usr/$(get_libdir) -lnetcdff" \ +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc README NEWS AUTHORS INSTALL ChangeLog || die "dodoc failed" +} diff --git a/sci-libs/etsf_io/files/1.0.2-as-needed.patch b/sci-libs/etsf_io/files/1.0.2-as-needed.patch new file mode 100644 index 0000000..f56c5a2 --- /dev/null +++ b/sci-libs/etsf_io/files/1.0.2-as-needed.patch @@ -0,0 +1,24 @@ +--- configure.ac.orig 2009-03-14 22:22:16.000000000 -0700 ++++ configure.ac 2009-03-14 22:26:03.000000000 -0700 +@@ -98,6 +98,11 @@ + if test -n "$ac_netcdf_dir" ; then + LDFLAGS="$LDFLAGS $ac_netcdf_dir" + fi ++AC_ARG_WITH(netcdf-libs, AS_HELP_STRING([--with-netcdf-libs], [Give the libraries required to link with the NetCDF library (default is none).]), ++ ac_netcdf_libs=$withval, ac_netcdf_libs=) ++if test -n "$ac_netcdf_libs" ; then ++ LIBS="$LIBS $ac_netcdf_libs" ++fi + FCFLAGS_SVG=$FCFLAGS + FCFLAGS="$FCFLAGS -I$ac_netcdf_mod" + LIBS="$LIBS -lnetcdf" +@@ -113,7 +118,8 @@ + FCFLAGS=$FCFLAGS_SVG + if test "$withnetcdf" = "no" ; then + echo "LDFLAGS was $LDFLAGS" +- echo "Action: install NetCDF and set the library link path with --with-netcdf-ldflags." ++ echo "LIBS was $LIBS" ++ echo "Action: install NetCDF and set the library link path with --with-netcdf-ldflags and additional libraries with --with-netcdf-libs." + AC_MSG_ERROR(["No 'NetCDF' library found."]) + fi + diff --git a/sci-libs/fox/Manifest b/sci-libs/fox/Manifest new file mode 100644 index 0000000..5ada8b8 --- /dev/null +++ b/sci-libs/fox/Manifest @@ -0,0 +1,3 @@ +AUX 1.0.2-as-needed.patch 983 RMD160 25f73057a074295ee28f3f1cf10a4d308846a8e5 SHA1 dadd68c543ca786bc33aba5633416e23c95c5611 SHA256 fe9190f60b438d33fa27d23430c2bd049e2e77f07759ccb825b78ed1be9eedcf +DIST FoX-4.0.3-full.tar.gz 494585 RMD160 24f87b1f56f8986525e01013b7f3829f69c57821 SHA1 26e8d31434906500e0dd62c60c36dba819ef5d1a SHA256 2ea30be5e76f4ed168ed813497fc345381eefab7d26fb3dd10742b6f3fe600ca +EBUILD fox-4.0.3.ebuild 1114 RMD160 5b46c00e45373f0c81449113e7db5656c05c576c SHA1 2f0572ba3507388e40db50365dc9ea0509df772c SHA256 d41362720eb54846048c04bb9e4749e7d36772dbcd13b1d35b162aab6e8c0589 diff --git a/sci-libs/fox/files/1.0.2-as-needed.patch b/sci-libs/fox/files/1.0.2-as-needed.patch new file mode 100644 index 0000000..f56c5a2 --- /dev/null +++ b/sci-libs/fox/files/1.0.2-as-needed.patch @@ -0,0 +1,24 @@ +--- configure.ac.orig 2009-03-14 22:22:16.000000000 -0700 ++++ configure.ac 2009-03-14 22:26:03.000000000 -0700 +@@ -98,6 +98,11 @@ + if test -n "$ac_netcdf_dir" ; then + LDFLAGS="$LDFLAGS $ac_netcdf_dir" + fi ++AC_ARG_WITH(netcdf-libs, AS_HELP_STRING([--with-netcdf-libs], [Give the libraries required to link with the NetCDF library (default is none).]), ++ ac_netcdf_libs=$withval, ac_netcdf_libs=) ++if test -n "$ac_netcdf_libs" ; then ++ LIBS="$LIBS $ac_netcdf_libs" ++fi + FCFLAGS_SVG=$FCFLAGS + FCFLAGS="$FCFLAGS -I$ac_netcdf_mod" + LIBS="$LIBS -lnetcdf" +@@ -113,7 +118,8 @@ + FCFLAGS=$FCFLAGS_SVG + if test "$withnetcdf" = "no" ; then + echo "LDFLAGS was $LDFLAGS" +- echo "Action: install NetCDF and set the library link path with --with-netcdf-ldflags." ++ echo "LIBS was $LIBS" ++ echo "Action: install NetCDF and set the library link path with --with-netcdf-ldflags and additional libraries with --with-netcdf-libs." + AC_MSG_ERROR(["No 'NetCDF' library found."]) + fi + diff --git a/sci-libs/fox/fox-4.0.3.ebuild b/sci-libs/fox/fox-4.0.3.ebuild new file mode 100644 index 0000000..6c9ce11 --- /dev/null +++ b/sci-libs/fox/fox-4.0.3.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit fortran + +MY_PN="FoX" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A library designed to allow the easy use of XML from Fortran" +HOMEPAGE="http://uszla.me.uk/space/software/FoX/" +SRC_URI="http://www.uszla.me.uk/FoX/source/${MY_P}-full.tar.gz" +LICENSE="BSD ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" +RDEPEND="" +DEPEND="${RDEPEND}" +S="${WORKDIR}/${MY_P}" + +FORTRAN="gfortran ifc" + +src_configure() { + if [[ -z ${FCFLAGS} ]]; then + einfo "Defaulting to ${FCFLAGS} for FCFLAGS" + : ${FCFLAGS:--O2} + fi + + econf \ + $(use_enable debug) \ + FCFLAGS="${FCFLAGS}" +} + +src_compile() { + emake -j1 || die +} + +src_test() { + emake check || die + einfo "Please look at the last few RESULT lines for a summary." +} + +src_install() { + emake install_prefix="${D}/usr" install || die + + pushd "${D}" 2>/dev/null + mv usr/finclude usr/include || die + sed -i \ + -e "s:finclude:include:g" \ + -e "s:${D}::g" \ + usr/bin/FoX-config || die + popd 2>/dev/null + + dodoc README.FoX.txt Changelog || die + dohtml -r DoX/ || die +} diff --git a/sci-libs/wannier90/Manifest b/sci-libs/wannier90/Manifest new file mode 100644 index 0000000..5bdf49d --- /dev/null +++ b/sci-libs/wannier90/Manifest @@ -0,0 +1,4 @@ +AUX wannier90-1.1-0001.patch 616 RMD160 b92b6bf4f80dab94bc560325a8cde388a6c7a844 SHA1 375d6a8ff738e6e6ba55009802e2b651e95fa6e8 SHA256 05398424121dbe53f35559b0e0e372ea841f5dd5a9ede53df66afb805b5ef22a +AUX wannier90-1.1-0002.patch 5596 RMD160 36dd891904566fef47f601cc436bf0c89e10fcc3 SHA1 8dc7ff37147530a3a63484ef2695d2141bd20433 SHA256 2476ccf3090cbab54b699327df20b81c5aa75bd2b5c0b203841d5ec6128c620a +DIST wannier90-1.1.tar.gz 6259705 RMD160 3d4f322eb61f32bd083c3697d1f40b75904d33f2 SHA1 3c8910919994f3828021ef860342c34ee3c35b90 SHA256 aa19c43723ac7808c44cdc8830fc1e81e049b303837ef2642c72e2d55553d09a +EBUILD wannier90-1.1.ebuild 1146 RMD160 2b5a905776c77435f6f010784ff81d059b0f71e1 SHA1 55e134536e1420bd76729bed0b78122d70c86b75 SHA256 aabbbbaff5c0ab70421e4c6ccab2a13fc8df2aea23241c7d35958a3c2abc299f diff --git a/sci-libs/wannier90/files/wannier90-1.1-0001.patch b/sci-libs/wannier90/files/wannier90-1.1-0001.patch new file mode 100644 index 0000000..e68c5f4 --- /dev/null +++ b/sci-libs/wannier90/files/wannier90-1.1-0001.patch @@ -0,0 +1,16 @@ +diff -urN wannier90-1.1.old/src/wannier_lib.F90 wannier90-1.1.new/src/wannier_lib.F90 +--- wannier90-1.1.old/src/wannier_lib.F90 2007-12-20 10:58:37.000000000 +0100 ++++ wannier90-1.1.new/src/wannier_lib.F90 2008-04-28 17:27:19.000000000 +0200 +@@ -166,6 +166,12 @@ + exclude_bands_loc(1:num_exclude_bands) = exclude_bands(1:num_exclude_bands) + end if + ++ if (postproc_setup) then ++ call kmesh_write() ++ write(stdout,'(1x,a25,f11.3,a)') 'Time to write kmesh ',io_time(),' (sec)' ++ write(stdout,'(/a)') ' '//trim(seedname)//'.nnkp written.' ++ endif ++ + + call kmesh_dealloc() + call param_dealloc() diff --git a/sci-libs/wannier90/files/wannier90-1.1-0002.patch b/sci-libs/wannier90/files/wannier90-1.1-0002.patch new file mode 100644 index 0000000..391a34c --- /dev/null +++ b/sci-libs/wannier90/files/wannier90-1.1-0002.patch @@ -0,0 +1,105 @@ +diff -urN wannier90-1.1.old/src/disentangle.F90 wannier90-1.1.new/src/disentangle.F90 +--- wannier90-1.1.old/src/disentangle.F90 2009-03-07 15:44:11.000000000 +0100 ++++ wannier90-1.1.new/src/disentangle.F90 2009-03-07 15:48:05.000000000 +0100 +@@ -1784,9 +1784,9 @@ + ! [BIG ITERATION LOOP (iter)] + + if (.not.dis_converged) then +- write(stdout,'(/5x,a)') '<<< Warning: Maximum number of disentanglement & +- &iterations reached >>>' +- write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>' ++ write(stdout,'(/5x,a)') & ++ '<<< Warning: Maximum number of disentanglement iterations reached >>>' ++ write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>' + endif + + if (icompflag.eq.1) then +@@ -2551,8 +2551,8 @@ + ! [BIG ITERATION LOOP (iter)] + + if (.not.dis_converged) then +- write(stdout,'(/5x,a)') '<<< Warning: Maximum number of disentanglement & +- &iterations reached >>>' ++ write(stdout,'(/5x,a)') & ++ '<<< Warning: Maximum number of disentanglement iterations reached >>>' + write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>' + endif + +diff -urN wannier90-1.1.old/src/overlap.F90 wannier90-1.1.new/src/overlap.F90 +--- wannier90-1.1.old/src/overlap.F90 2009-03-07 15:44:11.000000000 +0100 ++++ wannier90-1.1.new/src/overlap.F90 2009-03-07 15:48:36.000000000 +0100 +@@ -141,8 +141,8 @@ + nn_found=.true. + nn=inn + else +- call io_error('Error reading '//trim(seedname)//'.mmn.& +- & More than one matching nearest neighbour found') ++ call io_error('Error reading '//trim(seedname)// & ++ '.mmn. More than one matching nearest neighbour found') + endif + endif + end do +diff -urN wannier90-1.1.old/src/parameters.F90 wannier90-1.1.new/src/parameters.F90 +--- wannier90-1.1.old/src/parameters.F90 2009-03-07 15:44:11.000000000 +0100 ++++ wannier90-1.1.new/src/parameters.F90 2009-03-07 15:50:46.000000000 +0100 +@@ -1054,8 +1054,9 @@ + write(stdout,'(1x,a)') '+----------------------------------------------------------------------------+' + do nsp=1,num_species + do nat=1,atoms_species_num(nsp) +- write(stdout,'(1x,a1,1x,a2,1x,i3,3F10.5,3x,a1,1x,3F10.5,4x,a1)') '|',atoms_symbol(nsp),nat,atoms_pos_frac(:,nat,nsp),& +- '|',atoms_pos_cart(:,nat,nsp)*lenconfac,'|' ++ write(stdout,'(1x,a1,1x,a2,1x,i3,3F10.5,3x,a1,1x,3F10.5,4x,a1)') & ++& '|',atoms_symbol(nsp),nat,atoms_pos_frac(:,nat,nsp),& ++& '|',atoms_pos_cart(:,nat,nsp)*lenconfac,'|' + end do + end do + write(stdout,'(1x,a)') '*----------------------------------------------------------------------------*' +@@ -1073,8 +1074,8 @@ + write(stdout,'(1x,a)') '| Frac. Coord. l mr r z-axis x-axis Z/a |' + write(stdout,'(1x,a)') '+----------------------------------------------------------------------------+' + do nsp=1,num_proj +- write(stdout,'(1x,a1,3(1x,f5.2),1x,i2,1x,i2,1x,i2,3(1x,f6.3),3(1x,f6.3),& +- & 2x,f4.1,1x,a1)') '|',proj_site(1,nsp),proj_site(2,nsp),& ++ write(stdout,'(1x,a1,3(1x,f5.2),1x,i2,1x,i2,1x,i2,3(1x,f6.3),3(1x,f6.3),2x,f4.1,1x,a1)')& ++& '|',proj_site(1,nsp),proj_site(2,nsp),& + proj_site(3,nsp),proj_l(nsp), proj_m(nsp),proj_radial(nsp),& + proj_z(1,nsp),proj_z(2,nsp),proj_z(3,nsp),proj_x(1,nsp),& + proj_x(2,nsp),proj_x(3,nsp),proj_zona(nsp),'|' +@@ -2738,8 +2739,8 @@ + dummy=utility_strip(in_data(line)) + dummy=adjustl(dummy) + pos1=index(dummy,':') +- if(pos1==0) call io_error('param_read_projection: malformed projection & +- &definition: '//trim(dummy)) ++ if(pos1==0) & ++ call io_error('param_read_projection: malformed projection definition: '//trim(dummy)) + sites=0 + ctemp=dummy(:pos1-1) + ! Read the atomic site +@@ -2980,11 +2981,11 @@ + endif + end if + if(sites==-1) then +- if(counter+sum(ang_states) > num_proj) call io_error('param_get_projection: & +- &too many projections defined') ++ if(counter+sum(ang_states) > num_proj) & ++ call io_error('param_get_projection: too many projections defined') + else +- if(counter+sites*sum(ang_states) > num_proj) call io_error('param_get_projection:& +- & too many projections defined') ++ if(counter+sites*sum(ang_states) > num_proj) & ++ call io_error('param_get_projection: too many projections defined') + end if + ! + if(sites==-1) then +@@ -3025,8 +3026,8 @@ + + ! check there are enough projections and add random projections if required + if (.not. lpartrandom) then +- if (counter.ne.num_proj) call io_error('param_get_projections:& +- & Fewer projections defined than the number of Wannier functions requested') ++ if (counter.ne.num_proj) call io_error(& ++ 'param_get_projections: Fewer projections defined than the number of Wannier functions requested') + else + call random_seed() + do loop=counter+1,num_proj diff --git a/sci-libs/wannier90/wannier90-1.1.ebuild b/sci-libs/wannier90/wannier90-1.1.ebuild new file mode 100644 index 0000000..325785d --- /dev/null +++ b/sci-libs/wannier90/wannier90-1.1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +inherit eutils fortran + +DESCRIPTION="Calculates maximally localized Wannier functions (MLWFs)" +HOMEPAGE="http://www.wannier.org/" +SRC_URI="http://quasiamore.mit.edu/wannier/code/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +RDEPEND="" +DEPEND="${RDEPEND}" + +FORTRAN="gfortran ifc mpif90" + +src_prepare() { + # Patch taken from sci-physics/abinit-5.7.3 bundled version + epatch "${FILESDIR}"/${P}-0001.patch + epatch "${FILESDIR}"/${P}-0002.patch +} + +src_configure() { + if [[ -n ${FFLAGS} ]]; then + FCFLAGS="${FFLAGS}" + else + FCFLAGS="-O2" + einfo "Defaulting to ${FCFLAGS} for FFFLAGS" + fi + + cat <<- EOF >> "${S}"/make.sys + F90 = ${FORTRANC} + FCOPTS = ${FCFLAGS} + LDOPTS = ${LDFLAGS} + LIBS = -llapack -lblas + EOF +} + +src_compile() { + emake wannier lib || die +} + +src_test() { + einfo "Compare the 'Standard' and 'Current' outputs of this test." + pushd tests + emake test || die + cat wantest.log +} + +src_install() { + dobin wannier90.x || die + dolib.a libwannier.a || die + dodoc doc/*pdf README CHANGE.log || die +} |