From 1dd1021d6608584b3157e00c529cea7bcc52abd4 Mon Sep 17 00:00:00 2001 From: Honza Macháček Date: Thu, 17 Jan 2013 15:39:36 +0100 Subject: sci-physics/openmx added, version 3.6. sci-physics/atompaw version bumped to 3.0.1.9. New versions of sci-physics/abinit and sci-libs/bigdft added, but sci-libs/bigdft-1.7_pre12 is a version from the Abinit site, and the bigdft support in sci-physics/abinit-7.0.4 segfaults; on the other hand abinit-7.0.4 supports openmp. GPU support in sci-libs/bigdft-1.7_pre12 and sci-physics/abinit-7.0.4 not yet tested. --- sci-libs/bigdft/ChangeLog | 11 +- sci-libs/bigdft/Manifest | 1 + sci-libs/bigdft/bigdft-1.7_pre12.ebuild | 142 +++++++++ .../bigdft-1.7-dev.12-libxc_dir_include.patch | 50 +++ .../files/bigdft-1.7-dev.12-nolib_mods.patch | 25 ++ .../bigdft/files/bigdft-1.7-dev.12-tests.tar.bz2 | Bin 0 -> 22103 bytes sci-physics/abinit/ChangeLog | 9 +- sci-physics/abinit/Manifest | 3 +- sci-physics/abinit/abinit-7.0.4.ebuild | 341 +++++++++++++++++++++ sci-physics/abinit/files/7.0.4-test_dirs.patch | 12 + sci-physics/atompaw/ChangeLog | 8 +- sci-physics/atompaw/Manifest | 2 +- sci-physics/atompaw/atompaw-3.0.1.4.ebuild | 70 ----- sci-physics/atompaw/atompaw-3.0.1.9.ebuild | 70 +++++ sci-physics/openmx/ChangeLog | 9 + sci-physics/openmx/Manifest | 2 + sci-physics/openmx/openmx-3.6.ebuild | 96 ++++++ 17 files changed, 776 insertions(+), 75 deletions(-) create mode 100644 sci-libs/bigdft/bigdft-1.7_pre12.ebuild create mode 100644 sci-libs/bigdft/files/bigdft-1.7-dev.12-libxc_dir_include.patch create mode 100644 sci-libs/bigdft/files/bigdft-1.7-dev.12-nolib_mods.patch create mode 100644 sci-libs/bigdft/files/bigdft-1.7-dev.12-tests.tar.bz2 create mode 100644 sci-physics/abinit/abinit-7.0.4.ebuild create mode 100644 sci-physics/abinit/files/7.0.4-test_dirs.patch delete mode 100644 sci-physics/atompaw/atompaw-3.0.1.4.ebuild create mode 100644 sci-physics/atompaw/atompaw-3.0.1.9.ebuild create mode 100644 sci-physics/openmx/ChangeLog create mode 100644 sci-physics/openmx/Manifest create mode 100644 sci-physics/openmx/openmx-3.6.ebuild diff --git a/sci-libs/bigdft/ChangeLog b/sci-libs/bigdft/ChangeLog index 1f24f098c..82de595f0 100644 --- a/sci-libs/bigdft/ChangeLog +++ b/sci-libs/bigdft/ChangeLog @@ -1,9 +1,18 @@ # ChangeLog for sci-libs/bigdft -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ <<<<<<< HEAD +*bigdft-1.7_pre12 (17 Jan 2013) + + 17 Jan 2013; Honza Macháček + +bigdft-1.7_pre12.ebuild, +files/bigdft-1.7-dev.12-libxc_dir_include.patch, + +files/bigdft-1.7-dev.12-nolib_mods.patch, + +files/bigdft-1.7-dev.12-tests.tar.bz2: + New version 1.7-dev.12 (1.7_pre12) from the Abinit site added; used by + sci-physics/abinit-7.0.4 but apparently segfaults it. + *bigdft-1.6_pre1-r4 (01 Sep 2012) 01 Sep 2012; Honza Macháček diff --git a/sci-libs/bigdft/Manifest b/sci-libs/bigdft/Manifest index 5f1f645ce..39acfb0cf 100644 --- a/sci-libs/bigdft/Manifest +++ b/sci-libs/bigdft/Manifest @@ -1,2 +1,3 @@ DIST bigdft-1.6-tuto.1.tar.gz 7510733 SHA256 32020c7e58b36fe1f58a47ef02af99bd0da81c6da7d6f15e89b8075494d39d87 SHA512 48684413b0807b5dcee4b97b5b83d9a839c44043801b923c5f0ce7c8a92024cfee64c1065d4d2ffc67cb249cfcd485680b5526aaaedba06e6a88ccc52ba290f2 WHIRLPOOL d6efcc6f9ded331c42e8e3b13a9260e2acd922c4fa0bf303455e33924a930df6aa01abec897c1d190d5016a5bb3781c491e8a17d500e5485717989bddd4f579d DIST bigdft-1.6.0.tar.gz 8876759 SHA256 2d3212ef5f1ebc10fe7c627397ac6282ad41e1433ec6e66905f9d39a302913c0 SHA512 facbb78d126885dd04fed6451aa9cd1f5c755055e146cda1d2d4e90e3310fc3066b661635477db96d5b143ffaaa3ebb01107681437fd9965f3c764cf1b034361 WHIRLPOOL 97bc6c28296a92b09139e3a65266daa583011620fad5aed208e0e48627ab1d9c0ef9993d6c4c3cce5696d5c707bcdfb4b8ca7e64379909b3cf073206e32f9572 +DIST bigdft-1.7-dev.12.tar.gz 8904633 SHA256 2f899f287dd508dc616fb798cc9d01d1c79951dc68c277fb0ce19ea0ad690332 SHA512 35efe93edd7e6fb08abe919c59913c173f23e17a50104ad92e510dba5ba35ba8117012249d620896affc8acc05c9d85c6c61a411bc903750db6593456e9e8142 WHIRLPOOL 94a8d6d25fe82f3f1b89d15b4e23293d018bfb66c96fd1061a09e6352fb6811e79a15161bd3ca92e5f544253c8fa9f919d41fe069635ac07f33e21cc70878719 diff --git a/sci-libs/bigdft/bigdft-1.7_pre12.ebuild b/sci-libs/bigdft/bigdft-1.7_pre12.ebuild new file mode 100644 index 000000000..de32f986b --- /dev/null +++ b/sci-libs/bigdft/bigdft-1.7_pre12.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit autotools-utils eutils flag-o-matic fortran-2 toolchain-funcs + +REAL_P="${P/_pre/-dev.}" + +DESCRIPTION="A DFT electronic structure code using a wavelet basis set" +HOMEPAGE="http://inac.cea.fr/L_Sim/BigDFT/" +SRC_URI="http://forge.abinit.org/fallbacks/${REAL_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="cuda doc etsf_io mpi netcdf openmp opencl test" + +RDEPEND=" + =sci-libs/libxc-1*[fortran] + virtual/blas + virtual/fortran + virtual/lapack + dev-libs/libyaml + mpi? ( virtual/mpi ) + cuda? ( dev-util/nvidia-cuda-sdk ) + opencl? ( + || ( + dev-util/nvidia-cuda-sdk + dev-util/amdstream + ) + ) + etsf_io? ( sci-libs/etsf_io ) + netcdf? ( || ( + sci-libs/netcdf[fortran] + sci-libs/netcdf-fortran + ) + )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + >=sys-devel/autoconf-2.59 + doc? ( virtual/latex-base ) + app-arch/tar + app-arch/bzip2" + +S="${WORKDIR}/${REAL_P}" + +DOCS=( README INSTALL ChangeLog AUTHORS NEWS ) + +FORTRAN_STANDARD=90 + +pkg_setup() { + # fortran-2.eclass does not handle mpi wrappers + if use mpi; then + export FC="mpif90" + export F77="mpif77" + export CC="mpicc" + else + tc-export FC F77 CC + fi + + fortran-2_pkg_setup + if use openmp; then + tc-has-openmp || \ + die "Please select an openmp capable compiler like gcc[openmp]" + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/"${REAL_P}"-libxc_dir_include.patch \ + "${FILESDIR}"/"${REAL_P}"-nolib_mods.patch + tar -xjf "${FILESDIR}"/"${REAL_P}"-tests.tar.bz2 -C "${S}"/tests/DFT/postSCF/ + eautoreconf +} + +src_configure() { + local openmp="" + use openmp && openmp="-fopenmp" + local modules="${EPREFIX}/usr/$(get_libdir)/finclude" + local netcdff_libs="-lnetcdff" + filter-flags '-m*' '-O*' "-pipe" + local nvcflags="${CFLAGS}" + _filter-var nvcflags '-m*' '-O*' "-pipe" + local myeconfargs=( + $(use_enable mpi) + --enable-optimised-convolution + --enable-pseudo + --enable-libbigdft + --enable-binaries + --disable-minima-hopping + --disable-internal-libyaml + --enable-internal-libabinit + --with-moduledir="${modules}" + --with-ext-linalg="$(pkg-config --libs-only-l lapack) \ + $(pkg-config --libs-only-l blas)" + --with-ext-linalg-path="$(pkg-config --libs-only-L lapack) \ + $(pkg-config --libs-only-L blas)" + --enable-libxc + --disable-internal-libxc + --with-libxc-include="${modules}" + $(use_enable cuda cuda-gpu) + $(use_with cuda cuda-path /opt/cuda) + $(use_with cuda nvcc-flags "${nvcflags}") + $(use_enable opencl) + $(use_with etsf_io etsf-io) + "$(use etsf_io && echo "--with-netcdf-libs=$(pkg-config --libs netcdf) ${netcdff_libs}")" + FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}} ${openmp} -I${modules}" + LD="$(tc-getLD)" + CPP="$(tc-getCPP)" + ) + autotools-utils_src_configure +} + +src_compile() { + #autotools-utils_src_compile() expanded + _check_build_dir + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + emake -j1 + sed -i -e's%\$(top_builddir)/[^ ]*/lib\([^ /$-]*\)\.a%-l\1%g' bigdft.pc + popd > /dev/null + + #autotools-utils_src_compile + use doc && autotools-utils_src_compile doc +} + +src_test() { + if use test; then + #autotools-utils_src_test() expanded + _check_build_dir + pushd "${BUILD_DIR}" > /dev/null || die + # Run default src_test as defined in ebuild.sh + cd tests + emake -j1 check + popd > /dev/null + fi +} + +src_install() { + autotools-utils_src_install HAVE_LIBXC=1 +} diff --git a/sci-libs/bigdft/files/bigdft-1.7-dev.12-libxc_dir_include.patch b/sci-libs/bigdft/files/bigdft-1.7-dev.12-libxc_dir_include.patch new file mode 100644 index 000000000..9084d08e5 --- /dev/null +++ b/sci-libs/bigdft/files/bigdft-1.7-dev.12-libxc_dir_include.patch @@ -0,0 +1,50 @@ +--- configure.ac.orig 2011-11-23 14:02:15.000000000 +0000 ++++ configure.ac 2011-11-23 14:09:19.000000000 +0000 +@@ -743,14 +743,17 @@ + ac_build_libxc="no" + AC_ARG_ENABLE(libxc, AS_HELP_STRING([--without-libxc], [Do not link with libXC library (default = yes).]), ac_use_libxc=$enableval, ac_use_libxc="yes") + AC_ARG_ENABLE(internal-libxc, AS_HELP_STRING([--disable-internal-libxc], [Do not build and link with internal libXC library (default = yes).]), ac_internal_libxc=$enableval, ac_internal_libxc="yes") +-AC_ARG_WITH(libxc-path, AS_HELP_STRING([--with-libxc-path], [Give the path for an external libXC library, lib and module files (default = None).]), ++AC_ARG_WITH(libxc-path, AS_HELP_STRING([--with-libxc-path], [Give the path for an external libXC library, lib files (default = None).]), + ac_libxc_dir=$withval, ac_libxc_dir=) ++AC_ARG_WITH(libxc-include, AS_HELP_STRING([--with-libxc-include], [Give the path for an external libXC library module files (default = None).]), ++ ac_libxc_dir_include=$withval, ac_libxc_dir_include=) + if test x"$ac_use_libxc" = x"yes" ; then + ac_build_libxc=$ac_internal_libxc + if test "$ac_internal_libxc" = "yes" ; then + ac_build_libxc="yes" + ac_use_libxc="yes" + ac_libxc_dir="$top_builddir"/libxc-1.1.0/src ++ ac_libxc_dir_include="$ac_libxc_dir"/include + AC_SUBST(LIBXC_DIR, "\$(top_builddir)"/libxc-1.1.0/src) + AC_SUBST(LIBXC_INCLUDE, "-I\$(top_builddir)"/libxc-1.1.0/src) + LDFLAGS="$LDFLAGS -L\$(top_builddir)/libxc-1.1.0/src/.libs" +@@ -758,6 +761,9 @@ + else + if test -n "$ac_libxc_dir" ; then + LDFLAGS="$LDFLAGS -L$ac_libxc_dir/lib" ++ if test x"$ac_libxc_dir_include" = x ; then ++ ac_libxc_dir_include="$ac_libxc_dir"/include ++ fi + + dnl Test the given implementation of libXC. + ac_libxc_libname="xc" +@@ -766,13 +772,13 @@ + ac_libxc_libname="dft_xc" + AC_CHECK_LIB($ac_libxc_libname, xc_f90_lda_vxc, withlibxc=yes, withlibxc=no) + fi +- AC_CHECK_FILE($ac_libxc_dir/include/libxc_funcs_m.$ax_fc_mod_ext, funcs="yes", funcs="no") +- AC_CHECK_FILE($ac_libxc_dir/include/xc_f90_lib_m.$ax_fc_mod_ext, lib="yes", lib="no") +- AC_CHECK_FILE($ac_libxc_dir/include/xc_f90_types_m.$ax_fc_mod_ext, types="yes", types="no") ++ AC_CHECK_FILE($ac_libxc_dir_include/libxc_funcs_m.$ax_fc_mod_ext, funcs="yes", funcs="no") ++ AC_CHECK_FILE($ac_libxc_dir_include/xc_f90_lib_m.$ax_fc_mod_ext, lib="yes", lib="no") ++ AC_CHECK_FILE($ac_libxc_dir_include/xc_f90_types_m.$ax_fc_mod_ext, types="yes", types="no") + if test "$withlibxc" = "yes" -a "$funcs" = "yes" -a "$lib" = "yes" -a "$types" = "yes"; then + ac_use_libxc="yes" +- AC_SUBST(LIBXC_DIR, $ac_libxc_dir/include) +- AC_SUBST(LIBXC_INCLUDE, "-I"$ac_libxc_dir/include) ++ AC_SUBST(LIBXC_DIR, $ac_libxc_dir_include) ++ AC_SUBST(LIBXC_INCLUDE, "-I"$ac_libxc_dir_include) + LIBXC_LIBS="-l"$ac_libxc_libname + fi + else diff --git a/sci-libs/bigdft/files/bigdft-1.7-dev.12-nolib_mods.patch b/sci-libs/bigdft/files/bigdft-1.7-dev.12-nolib_mods.patch new file mode 100644 index 000000000..8137a48ab --- /dev/null +++ b/sci-libs/bigdft/files/bigdft-1.7-dev.12-nolib_mods.patch @@ -0,0 +1,25 @@ +diff -Naurp bigdft-1.7-dev.12.orig/src/Makefile.am bigdft-1.7-dev.12/src/Makefile.am +--- bigdft-1.7-dev.12.orig/src/Makefile.am 2012-07-16 07:46:11.000000000 +0000 ++++ bigdft-1.7-dev.12/src/Makefile.am 2013-01-09 14:09:58.198905489 +0000 +@@ -45,6 +45,9 @@ EXTRA_DIST = \ + # ------------- + if BUILD_LIB_BIGDFT + lib_bigdft = libbigdft.a libdft_common.a ++else ++lib_bigdft = ++endif + PS_SOURCES = PSolver/Build_Kernel.f90 \ + PSolver/xcenergy.f90 \ + PSolver/3Dgradient.f90 \ +@@ -53,11 +56,6 @@ PS_SOURCES = PSolver/Build_Kernel.f90 \ + PSolver/wofz.f90 \ + lib/fft/fft3d.f90 + PS_MODULES = PSolver/Poisson_Solver.f90 +-else +-lib_bigdft = +-PS_SOURCES = +-PS_MODULES = +-endif + if BUILD_BINARIES + binaries_sources = bigdft memguess splsad NEB frequencies MDanalysis $(minima_hopping_sources) bart abscalc BigDFT2Wannier WaCo + local_binaries = test_forces diff --git a/sci-libs/bigdft/files/bigdft-1.7-dev.12-tests.tar.bz2 b/sci-libs/bigdft/files/bigdft-1.7-dev.12-tests.tar.bz2 new file mode 100644 index 000000000..d74c56176 Binary files /dev/null and b/sci-libs/bigdft/files/bigdft-1.7-dev.12-tests.tar.bz2 differ diff --git a/sci-physics/abinit/ChangeLog b/sci-physics/abinit/ChangeLog index a57ab4c07..d814a8ab8 100644 --- a/sci-physics/abinit/ChangeLog +++ b/sci-physics/abinit/ChangeLog @@ -1,7 +1,14 @@ # ChangeLog for sci-physics/abinit -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*abinit-7.0.4 (17 Jan 2013) + + 17 Jan 2013; Honza Macháček + +files/7.0.4-test_dirs.patch, +abinit-7.0.4.ebuild: + New version 7.0.4 added; openmp now supported, but on the other hand, bigdft + support segfaults + *abinit-6.12.3-r2 (19 Jun 2012) 19 Jun 2012; Honza Macháček diff --git a/sci-physics/abinit/Manifest b/sci-physics/abinit/Manifest index 6392e02a1..689bd12de 100644 --- a/sci-physics/abinit/Manifest +++ b/sci-physics/abinit/Manifest @@ -1 +1,2 @@ -DIST abinit-6.12.3.tar.gz 58483889 RMD160 d2a1009af7eaafa9d4df99aa6e98e35faa644931 SHA1 ab7bca747639902d586155cb5d335595e3b2b1dc SHA256 243a3832e258d12998d9d188141cfedeabdbfee9867c1951d7f27b8230dec5e9 SHA512 a14764c7c031890ea9cb64dd8fb439959fae4b50d59985bd2e9d9c12a06f71f92491c015c64c7273b4089cd57934a699f3d4c3c2f377032cbd655aa887241a65 WHIRLPOOL caa5e8159fac7353ee87663f195419acee57246f1a3015941368ed026c3a15a07cf135dbf57fc8a81f0cdd24c042af1ccc1c63e3e20a73042d3462530bd5b904 +DIST abinit-6.12.3.tar.gz 58483889 SHA256 243a3832e258d12998d9d188141cfedeabdbfee9867c1951d7f27b8230dec5e9 SHA512 a14764c7c031890ea9cb64dd8fb439959fae4b50d59985bd2e9d9c12a06f71f92491c015c64c7273b4089cd57934a699f3d4c3c2f377032cbd655aa887241a65 WHIRLPOOL caa5e8159fac7353ee87663f195419acee57246f1a3015941368ed026c3a15a07cf135dbf57fc8a81f0cdd24c042af1ccc1c63e3e20a73042d3462530bd5b904 +DIST abinit-7.0.4.tar.gz 61715030 SHA256 b3ad895b75b92b3ff05e873d42d0b26f6e6113b9de4579966f7b6d1b49d6004e SHA512 8edfe4019c968e6f912d0678fe331fc8a6ce2848f1b16973336d4181d010a776ed1ea2c5500499dac895d9d773d72165e20524705cf8928f91ede873272b0417 WHIRLPOOL 35da8681a68e435b460a11112e6cf6990fdf141d53d5849be45225d50e803e2bfc65cb05e5e576c704411be5734e47ed2e4ccca1fd1689311bd4febea937f0f8 diff --git a/sci-physics/abinit/abinit-7.0.4.ebuild b/sci-physics/abinit/abinit-7.0.4.ebuild new file mode 100644 index 000000000..2218c1051 --- /dev/null +++ b/sci-physics/abinit/abinit-7.0.4.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit autotools-utils eutils flag-o-matic fortran-2 multilib toolchain-funcs + +DESCRIPTION="Find total energy, charge density and electronic structure using density functional theory" +HOMEPAGE="http://www.abinit.org/" +SRC_URI="http://ftp.abinit.org/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cuda cuda-double -debug +etsf_io +fftw +fftw-threads +fox gsl gui +hdf5 libabinit mpi +netcdf openmp python -test +threads -vdwxc" + +RDEPEND="~sci-libs/bigdft-1.7_pre12 + =sci-libs/libxc-1*[fortran] + sci-physics/atompaw[libxc] + etsf_io? ( sci-libs/etsf_io ) + fox? ( >=sci-libs/fox-4.1.2-r1[sax] ) + netcdf? ( + || ( + sci-libs/netcdf[fortran] + sci-libs/netcdf-fortran + ) + hdf5? ( + sci-libs/netcdf[hdf5] + ) + ) + hdf5? ( sci-libs/hdf5[fortran] ) + sci-libs/wannier90 + virtual/blas + virtual/lapack + gsl? ( sci-libs/gsl ) + fftw? ( + sci-libs/fftw:3.0 + fftw-threads? ( sci-libs/fftw:3.0[threads] ) + ) + mpi? ( virtual/mpi ) + python? ( dev-python/numpy ) + cuda? ( dev-util/nvidia-cuda-sdk )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + gui? ( >=virtual/jdk-1.6.0 + app-arch/sharutils + sys-apps/gawk ) + dev-perl/Text-Markdown" + +S=${WORKDIR}/${P%[a-z]} + +lat1loc="" + +DOCS=( AUTHORS ChangeLog COPYING INSTALL KNOWN_PROBLEMS NEWS PACKAGING + README README.ChangeLog README.GPU README.xlf RELNOTES THANKS ) + +FORTRAN_STANDARD=90 + +pkg_setup() { + # Doesn't compile with gcc-4.0, only >=4.1 + if [[ $(tc-getFC) == *gfortran ]]; then + if [[ $(gcc-major-version) -eq 4 ]] \ + && [[ $(gcc-minor-version) -lt 1 ]]; then + die "Requires gcc-4.1 or newer" + fi + fi + + # fortran-2.eclass does not handle mpi wrappers + if use mpi; then + export FC="mpif90" + export F77="mpif77" + export CC="mpicc" + export CXX="mpic++" + else + tc-export FC F77 CC CXX + fi + + # Preprocesor macross can make some lines really long + append-fflags -ffree-line-length-none + + fortran-2_pkg_setup + if use openmp; then + tc-has-openmp || \ + die "Please select an openmp capable compiler like gcc[openmp]" + fi + + # Sort out some USE options + if use fftw-threads && ! use fftw; then + ewarn "fftw-threads set but fftw not used, ignored" + fi + if use cuda-double && ! use cuda; then + ewarn "cuda-double set but cuda not used, ignored" + fi + if use gui; then + lat1loc="$(locale |awk '/LC_CTYPE="(.*)"/{sub("LC_CTYPE=\"",""); sub("\" *$", ""); print}')" + if locale charmap |grep -i "\"; then + einfo "Good, locale compatible with the GUI build" + else + ewarn "The locale ${lat1loc} incompatible with the GUI build" + if latloc=`locale -a| grep -i "\"`; then + if echo "${latloc}" |grep -q "^fr"; then + lat1loc="$(echo "${latloc}" | grep -im1 "^fr")" + else + lat1loc="$(echo "${latloc}" | grep -im1 "iso88591")" + fi + einfo "Will use ${lat1loc} to build the GUI" + else + ewarn "No ISO-8859-1 nor ISO-8859-15 locale available, the GUI build may crash" + fi + fi + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/6.2.2-change-default-directories.patch \ + "${FILESDIR}"/6.12.1-autoconf.patch \ + "${FILESDIR}"/6.12.1-xmalloc.patch \ + "${FILESDIR}"/7.0.4-test_dirs.patch + eautoreconf + sed -e"s/\(grep '\^-\)\(\[LloW\]\)'/\1\\\(\2\\\|pthread\\\)'/g" -i configure + +} + +src_configure() { + local openmp="" + use openmp && openmp="-fopenmp" + local libs="" + local modules="-I/usr/$(get_libdir)/finclude $(FoX-config --sax --fcflags)" + local FoX_libs="${libs} $(FoX-config --sax --libs)" + local trio_flavor="" + use etsf_io && trio_flavor="${trio_flavor}+etsf_io" + use fox && trio_flavor="${trio_flavor}+fox" + use netcdf && trio_flavor="${trio_flavor}+netcdf" + test "no${trio_flavor}" = "no" && trio_flavor="none" + local netcdff_libs="-lnetcdff" + use hdf5 && netcdff_libs="${netcdff_libs} -lhdf5_fortran" + local fft_flavor="fftw3" + local fft_libs="" + # The fftw threads support is protected by black magick. + # Anybody removes it, dies. + # New USE flag "fftw-threads" was added to control usage + # of the threaded fftw variant. Since fftw-3.3 has expanded + # the paralel options by MPI and OpenMP support, analogical + # USE flags should be added to select them in future; + # unusable with previous FFTW versions, they are postponed + # for now. + if use fftw-threads; then + fft_flavor="fftw3-threads" + if has_version '>=sci-libs/fftw-3.3'; then + # pkg-config files for fftw-3.3 are broken + # All the parallel stuff is separated + # from the main body of common routines, + # and -lfftw3 must be always included alongside. + # Until version 3.3 this used to be masked by + # .la files. + # Bug 384645 + fft_libs="${fft_libs} $(pkg-config --libs fftw3_threads) $(pkg-config --libs fftw3)" + else + fft_libs="${fft_libs} $(pkg-config --libs fftw3_threads)" + fi + else + fft_libs="${fft_libs} $(pkg-config --libs fftw3)" + fi + local gpu_flavor="none" + if use cuda; then + gpu_flavor="cuda-single" + if use cuda-double; then + gpu_flavor="cuda-double" + fi + fi + + local myeconfargs=( + --enable-clib + --enable-exports + $(use_enable gui) + $(use_enable debug debug enhanced) + $(use_enable mpi) + $(use_enable mpi mpi-io) + $(use_enable openmp) + $(use_enable vdwxc) + $(use_enable cuda gpu) + "$(use cuda && echo "--with-gpu-flavor=${gpu_flavor}")" + "$(use cuda && echo "--with-gpu-prefix=/opt/cuda/")" + "$(use gsl && echo "--with-math-flavor=gsl")" + "$(use gsl && echo "--with-math-incs=$(pkg-config --cflags gsl)")" + "$(use gsl && echo "--with-math-libs=$(pkg-config --libs gsl)")" + --with-linalg-flavor="atlas" + --with-linalg-libs="$(pkg-config --libs lapack)" + --with-trio-flavor="${trio_flavor}" + "$(use netcdf && echo "--with-netcdf-incs=-I/usr/include")" + "$(use netcdf && echo "--with-netcdf-libs=$(pkg-config --libs netcdf) ${netcdff_libs}")" + "$(use fox && echo "--with-fox-incs=${modules}")" + "$(use fox && echo "--with-fox-libs=${FoX_libs}")" + "$(use etsf_io && echo "--with-etsf-io-incs=${modules}")" + "$(use etsf_io && echo "--with-etsf-io-libs=${libs} -letsf_io -letsf_io_utils -letsf_io_low_level")" + --with-dft-flavor="libxc+bigdft+atompaw+wannier90" + --with-libxc-incs="${modules}" + --with-libxc-libs="${libs} -lxc" + --with-bigdft-incs="${modules}" + --with-bigdft-libs="$(pkg-config --libs bigdft)" + --with-atompaw-incs="${modules}" + --with-atompaw-libs="${libs} -latompaw" + --with-wannier90-bins="/usr/bin" + --with-wannier90-incs="${modules}" + --with-wannier90-libs="${libs} -lwannier $(pkg-config --libs lapack)" + "$(use fftw && echo "--with-fft-flavor=${fft_flavor}")" + "$(use fftw && echo "--with-fft-incs=-I/usr/include")" + "$(use fftw && echo "--with-fft-libs=${fft_libs}")" + --with-timer-flavor="abinit" + LD="$(tc-getLD)" + FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}} ${openmp} ${modules} -I/usr/include" + ) + + MARKDOWN=Markdown.pl autotools-utils_src_configure + + if use gui; then + # autotools-utils_src_configure() part expanded + _check_build_dir + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + mkdir -p gui + cd gui + ECONF_SOURCE="${S}"/gui econf UUDECODE="uudecode" + fi +} + +src_compile() { + autotools-utils_src_compile + + # Apparently libabinit.a is not built by default + # Used by BigDFT. Should probably be built separately, + # as a package of its own: BigDFT used by Abinit. + # Does libabinit.a depend on BigDFT, if used? + # Can Abinit use external libabinit.a? + use libabinit && autotools-utils_src_compile libabinit.a + + if use gui; then + #autotools-utils_src_compile() expanded + # _check_build_dir has already been called + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + # now what the function cannot be called to do + cd gui + LC_CTYPE="${lat1loc}" emake || die "Making GUI failed" + popd > /dev/null + fi + + sed -i -e's/libatlas/lapack/' "${AUTOTOOLS_BUILD_DIR}"/config.pc +} + +src_test() { + einfo "The tests take quite a while, easily several hours" + # autotools-utils_src_test() expanded + _check_build_dir + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + # again something the autotools-utils function cannot be called to do + # now quite a lot of work actually + cd tests + emake tests_acc || ewarn "Accuracy tests failed" + emake tests_paw || ewarn "PAW tests failed" + emake tests_gw || ewarn "GW tests failed" + emake tests_gw_paw || ewarn "GW-PAW tests failed" + emake tests_bs || ewarn "BSE tests failed" + emake tests_tddft || ewarn "TDDFT tests failed" + emake tests_eph || ewarn "Elphon tests failed" + + local REPORT + for REPORT in $(find . -name report); do + REPORT=${REPORT#*/} + elog "Parameters and unusual results for ${REPORT%%/*} tests" + echo "Parameters and unusual results for ${REPORT%%/*} tests" >>tests_summary.txt + while read line; do + elog "${line}" + echo "${line}" >>tests_summary.txt + done \ + < <(grep -v -e succeeded -e passed ${REPORT}) + done + + local testdir + find . -name "tmp-test*" -print | \ + while read testdir; do + if [ -e summary_of_tests.tar ]; then + tar rvf summary_of_tests.tar ${testdir} + else tar cvf summary_of_tests.tar ${testdir} + fi + done + popd > /dev/null + + elog "The full test results will be installed as summary_of_tests.tar.bz2." + elog "Also a concise report tests_summary.txt is installed." +} + +src_install() { + #autotools-utils_src_install() expanded + _check_build_dir + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null + emake DESTDIR="${D}" install || die "make install failed" + + use libabinit && dolib libabinit.a + + if use gui; then + pushd gui + emake DESTDIR="${D}" install || die "The GUI install failed" + popd + fi + + if use test; then + for dc in tests_summary.txt summary_of_tests.tar; do + test -e tests/"${dc}" && dodoc tests/"${dc}" || ewarn "Copying tests results failed" + done + fi + + popd > /dev/null + + # XXX: support installing them from builddir as well!!! + if [[ ${DOCS} ]]; then + dodoc "${DOCS[@]}" || die "dodoc failed" + else + local f + # same list as in PMS + for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \ + THANKS BUGS FAQ CREDITS CHANGELOG; do + if [[ -s ${f} ]]; then + dodoc "${f}" || die "(default) dodoc ${f} failed" + fi + done + fi + if [[ ${HTML_DOCS} ]]; then + dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" + fi + + # Remove libtool files and unnecessary static libs + remove_libtool_files +} + +pkg_postinst() { + if use test; then + elog "The full test results will be installed as summary_tests.tar.bz2." + elog "Also a concise report tests_summary.txt is installed." + fi +} diff --git a/sci-physics/abinit/files/7.0.4-test_dirs.patch b/sci-physics/abinit/files/7.0.4-test_dirs.patch new file mode 100644 index 000000000..94915a0e1 --- /dev/null +++ b/sci-physics/abinit/files/7.0.4-test_dirs.patch @@ -0,0 +1,12 @@ +diff -Naurp abinit-7.0.4.orig/tests/Makefile.am abinit-7.0.4/tests/Makefile.am +--- abinit-7.0.4.orig/tests/Makefile.am 2012-12-08 15:07:26.000000000 +0000 ++++ abinit-7.0.4/tests/Makefile.am 2013-01-08 13:58:56.721725346 +0000 +@@ -3607,7 +3607,7 @@ tests_gw_paw: nightly-stamp + tests_bs: nightly-stamp + rm -fr */tmp-bs* + $(MAKE) tests_v67mbpt dirname=bs start=01 stop=01 +- cd v6/tmp-bs* ; mv fldiff.report fldiff_keep.report ++ cd v67mbpt/tmp-bs* ; mv fldiff.report fldiff_keep.report + $(MAKE) tests_v67mbpt dirname=bs start=04 stop=04 + $(MAKE) tests_tutorial dirname=bs start=bs_1 stop=bs_4 + echo diff --git a/sci-physics/atompaw/ChangeLog b/sci-physics/atompaw/ChangeLog index 91aeda882..66ddb4e1a 100644 --- a/sci-physics/atompaw/ChangeLog +++ b/sci-physics/atompaw/ChangeLog @@ -1,7 +1,13 @@ # ChangeLog for sci-physics/atompaw -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*atompaw-3.0.1.9 (17 Jan 2013) + + 17 Jan 2013; Honza Macháček + -atompaw-3.0.1.4.ebuild, +atompaw-3.0.1.9.ebuild: + Version bumped to 3.0.1.9 + 22 May 2012; Justin Lecher -atompaw-3.0.1.3.ebuild, atompaw-3.0.1.4.ebuild, metadata.xml: Add missing eutils.eclass, bump to EAPI=4, remove unnecessary bits diff --git a/sci-physics/atompaw/Manifest b/sci-physics/atompaw/Manifest index 5c355704b..a36521dcf 100644 --- a/sci-physics/atompaw/Manifest +++ b/sci-physics/atompaw/Manifest @@ -1,3 +1,3 @@ -DIST atompaw-3.0.1.4.tar.gz 3785477 SHA256 69c303d28c3698e3ec640b8405b3bfe78a61c2e5a1f5abef92be652040b634db SHA512 adb4fb99647214cae48e81102ca46dfd8500adb5c6a97a62feb0ce2fe48a7fb699f3c873a6b8cef6cd4f856095ab6bbd85f2a941ebcd43ef3d212de22352ed17 WHIRLPOOL 9bfcc48f6d917b33360938186fc55f9982aa25df874380706c17cfe0d6a784379504de737ec2a0eb281e3866011130bf63a92958ff8d6b0308306e4ff1198052 +DIST atompaw-3.0.1.9.tar.gz 3809640 SHA256 6acc591ec3f5c5bb4652a40e4d8414619d680e84e370143d4ca36df7d50f0c63 SHA512 0608e289bfd51bfdce618f24c3056b8258ae2273ecc8671f931dd553d8356bd245911f0c2e461a890b4bf3e14f0fa5f3ac2d0c6c60bc19665b56236619ccf1d4 WHIRLPOOL 5a1a37fc1913a5e510d516ea996842e0cc193856298137c05b28e25d5f653b3c9ef34356fe95829164ab20f7d9e5627c3eac273d3be7511a80150d128aa72e0f DIST atompaw.pdf 334715 SHA256 10a70f0c31e4a0a06e31b2b922b938742daf8635c87b95f5a48609555d9397ed SHA512 287f521a10b144bf8c6f59f21a025a8b1e0f6a23d576abe347be8fd41f8577dec0febd289618384d6e7796f0f68bfb41672c9d6d7bf1658f245cff20463ffff7 WHIRLPOOL ae9280374777fd61751d60b4944f3d21aceb86d3b6f4879ced1c26200e33d8ebb08b99e81cffd562e43643274f83bd6d4263360d399acee7eefad3f36791606a DIST atompawEqns.pdf 198480 SHA256 181af33190b77b630c1fb94882d0cbc5f79281346f93c25ef4d645806f2c1dc6 SHA512 e0b7fcbce906ceda953e000378786d3b679b68a5dd3d1a53b8d41a61e80bfa5a83fa04a6b8945b274ffe351491bffe3bdd801937f1b838f90b21e462fb09b9e9 WHIRLPOOL 9ba9c90df0c368b935fce573a6be30c492819fda4245f10d217bff3576f82b21036aeee837c28e5b694220f2749a6cf7e26b797b2690624dbfbc3bb598cc2bdd diff --git a/sci-physics/atompaw/atompaw-3.0.1.4.ebuild b/sci-physics/atompaw/atompaw-3.0.1.4.ebuild deleted file mode 100644 index c9e0cfcc3..000000000 --- a/sci-physics/atompaw/atompaw-3.0.1.4.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -inherit autotools-utils eutils fortran-2 multilib toolchain-funcs - -DESCRIPTION="PAW atomic data generator" -HOMEPAGE="http://www.wfu.edu/~natalie/papers/pwpaw/man.html" -SRC_URI=" - http://www.wfu.edu/~natalie/papers/pwpaw/${P}.tar.gz - doc? ( - http://www.wfu.edu/~natalie/papers/pwpaw/atompaw.pdf - http://www.wfu.edu/~natalie/papers/pwpaw/notes/atompaw/atompawEqns.pdf )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc libxc" - -RDEPEND=" - virtual/blas - virtual/lapack - libxc? ( sci-libs/libxc[fortran] )" -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -DOCS=( README ) - -FORTRAN_STANDARD=90 - -src_unpack() { - unpack ${P}.tar.gz - if use doc; then - cp "${DISTDIR}"/atompaw.pdf "${DISTDIR}"/atompawEqns.pdf "${S}"/doc/ || die - fi -} - -src_prepare() { - epatch "${FILESDIR}"/3.0.1-longplot.patch -} - -src_configure() { - local modules="-I/usr/$(get_libdir)/finclude" - local myeconfargs=( - $(use_enable libxc) - --with-linalg-flavor=atlas - --with-linalg-libs="$(pkg-config --libs lapack)" - --with-libxc-incs="-I/usr/include ${modules}" - --with-libxc-libs="${libs} -lxc" - FC="$(tc-getFC)" FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" - CC="$(tc-getCC)" LDFLAGS="${LDFLAGS:- ${CFLAGS:- -O2}}" - ) - autotools-utils_src_configure -} - -src_compile() { - autotools-utils_src_compile -j1 -} - -src_test() { - use test && autotools-utils_src_test -} - -src_install() { - autotools-utils_src_install - - use doc && dodoc doc/atompaw.pdf doc/atompawEqns.pdf -} diff --git a/sci-physics/atompaw/atompaw-3.0.1.9.ebuild b/sci-physics/atompaw/atompaw-3.0.1.9.ebuild new file mode 100644 index 000000000..e38535457 --- /dev/null +++ b/sci-physics/atompaw/atompaw-3.0.1.9.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit autotools-utils eutils fortran-2 multilib toolchain-funcs + +DESCRIPTION="PAW atomic data generator" +HOMEPAGE="http://www.wfu.edu/~natalie/papers/pwpaw/man.html" +SRC_URI=" + http://www.wfu.edu/~natalie/papers/pwpaw/${P}.tar.gz + doc? ( + http://www.wfu.edu/~natalie/papers/pwpaw/atompaw.pdf + http://www.wfu.edu/~natalie/papers/pwpaw/notes/atompaw/atompawEqns.pdf )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc libxc" + +RDEPEND=" + virtual/blas + virtual/lapack + libxc? ( sci-libs/libxc[fortran] )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +DOCS=( README ) + +FORTRAN_STANDARD=90 + +src_unpack() { + unpack ${P}.tar.gz + if use doc; then + cp "${DISTDIR}"/atompaw.pdf "${DISTDIR}"/atompawEqns.pdf "${S}"/doc/ || die + fi +} + +src_prepare() { + epatch "${FILESDIR}"/3.0.1-longplot.patch +} + +src_configure() { + local modules="-I/usr/$(get_libdir)/finclude" + local myeconfargs=( + $(use_enable libxc) + --with-linalg-flavor=atlas + --with-linalg-libs="$(pkg-config --libs lapack)" + --with-libxc-incs="-I/usr/include ${modules}" + --with-libxc-libs="${libs} -lxc" + FC="$(tc-getFC)" FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" + CC="$(tc-getCC)" LDFLAGS="${LDFLAGS:- ${CFLAGS:- -O2}}" + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile -j1 +} + +src_test() { + use test && autotools-utils_src_test +} + +src_install() { + autotools-utils_src_install + + use doc && dodoc doc/atompaw.pdf doc/atompawEqns.pdf +} diff --git a/sci-physics/openmx/ChangeLog b/sci-physics/openmx/ChangeLog new file mode 100644 index 000000000..37b46f62f --- /dev/null +++ b/sci-physics/openmx/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sci-physics/openmx +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*openmx-3.6 (17 Jan 2013) + + 17 Jan 2013; Honza Macháček +openmx-3.6.ebuild: + Ebuild for OpenMX added + diff --git a/sci-physics/openmx/Manifest b/sci-physics/openmx/Manifest new file mode 100644 index 000000000..4e0a74a15 --- /dev/null +++ b/sci-physics/openmx/Manifest @@ -0,0 +1,2 @@ +DIST openmx3.6.tar.gz 83023744 SHA256 e344914a615d4179e724877207335e44f9d629cd3931b70e135011877355ab71 SHA512 f4d59e839bbd216893149c83d1059aa4dc4fb011d113cb40efbd99db96d558501b371628f0ea064d3091d8ef0d2c8664412b0c3541fa2a7135811e3536cb0018 WHIRLPOOL 54c72309133dbb010218ce138992362e98eb4c345eb3b2897e1d86f3f2469cc95a2024c8547cc3dc0db78befaf620e624640b6a64522c0937bf7158658a28109 +DIST patch3.6.1.tar.gz 202531 SHA256 56cba052a84c73bf332ff3a65787001376f8d50ec50e7e363a67dfb5b417febd SHA512 1f1c2c156c80a21649826cfaeb79a9b2b7d81b46920e713fb0e4489eeceb8cc6a9193c49efb0d4c1a1a69313e21186e10ed4fd97d27e63b555ce1092425c641d WHIRLPOOL 006cb7ec822ef485c03a371b9c3a99c426fc5e6e1249fd17d9f5527f0220f09df1acc049e31a59d6834a3ce44431ae385268954898613a9fe31ff892262a5503 diff --git a/sci-physics/openmx/openmx-3.6.ebuild b/sci-physics/openmx/openmx-3.6.ebuild new file mode 100644 index 000000000..78f65a3c0 --- /dev/null +++ b/sci-physics/openmx/openmx-3.6.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="4" + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Open source package for Material eXplorer using DFT, norm-conserving +pseudopotentials, and pseudo-atomic localized basis functions." +HOMEPAGE="http://www.openmx-square.org/" +SRC_URI="http://www.openmx-square.org/${PN}${PV}.tar.gz + http://www.openmx-square.org/bugfixed/11Nov14/patch${PV}.1.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="-debug mpi openmp test" +S="${WORKDIR}/${PN}${PV}" + +RDEPEND="virtual/blas + virtual/lapack + sci-libs/fftw:3 + mpi? ( virtual/mpi + sci-libs/fftw:3[mpi] ) + openmp? ( sys-devel/gcc[openmp] + sci-libs/fftw:3[openmp] )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + + +pkg_setup() { + if use mpi; then + export CC="mpicc" + else + tc-export CC + fi + + if use openmp; then + export CC="${CC} -fopenmp" + fi +} + +src_prepare() { + cd "${WORKDIR}" + mv *.out "${PN}${PV}"/work/input_example + mv *.[hc] "${PN}${PV}"/source +} + +src_configure() { + CFLAGS="${CFLAGS:- -O3 -funroll-loops -ffast-math}" + local FFTW_FLAVOUR=fftw3 + if use openmp; then + FFTW_FLAVOUR=fftw3_omp + else + export CFLAGS="${CFLAGS} -Dnoomp" + fi + if use mpi; then + FFTW_FLAVOUR=fftw3_mpi + else + export CFLAGS="${CFLAGS} -Dnompi" + fi + CFLAGS="${CFLAGS} $(pkg-config --cflags lapack)" + CFLAGS="${CFLAGS} $(pkg-config --cflags ${FFTW_FLAVOUR})" + export CFLAGS + + local MX_LIB="$(pkg-config --static --libs lapack)" + local MX_LIB="${MX_LIB} $(pkg-config --static --libs ${FFTW_FLAVOUR})" + + sed -i -e "s%^CC *=.*$%CC = ${CC} ${CFLAGS}%" \ + -e "s%^LIB *=.*$%LIB = ${MX_LIB}%" \ + source/makefile +} + +src_compile() { + cd source + emake || die "make failed" +} + +src_test() { + cd work + ../source/openmx -runtest +} + +src_install() { + insinto /usr/share/${P} + doins -r DFT_DATA11 + cd work + insinto /usr/share/${P}/examples + doins -r * + cd ../source + dodir /usr/bin + emake DESTDIR="${D}/usr/bin" install + dodoc "${S}/${PN}${PV}.pdf" + use test && dodoc "${S}"/work/runtest.result +} \ No newline at end of file -- cgit v1.2.3-65-gdbad