commit:     c83750b1c6bb6583fd9626b8adcd484b7c8952b7
Author:     Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
AuthorDate: Fri Jan  6 10:58:12 2017 +0000
Commit:     Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
CommitDate: Fri Jan  6 10:58:12 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=c83750b1

Added sci-libs/wannier-2.0.1.1, the Linux didtribution packagers patched 
version from Launchpad. The favourite of the sci-physics/abinit developers.

Package-Manager: Portage-2.3.2, Repoman-2.3.1

 .../files/wannier90-2.0.1.1-runtest.patch          | 12 +++
 sci-libs/wannier90/metadata.xml                    | 14 ++++
 sci-libs/wannier90/wannier90-2.0.0.ebuild          | 64 --------------
 sci-libs/wannier90/wannier90-2.0.1.1.ebuild        | 97 ++++++++++++++++++++++
 4 files changed, 123 insertions(+), 64 deletions(-)

diff --git a/sci-libs/wannier90/files/wannier90-2.0.1.1-runtest.patch 
b/sci-libs/wannier90/files/wannier90-2.0.1.1-runtest.patch
new file mode 100644
index 0000000..c9656ac
--- /dev/null
+++ b/sci-libs/wannier90/files/wannier90-2.0.1.1-runtest.patch
@@ -0,0 +1,12 @@
+diff -Naurp wannier90-2.0.1.1.orig/tests/run_test.pl 
wannier90-2.0.1.1/tests/run_test.pl
+--- wannier90-2.0.1.1.orig/tests/run_test.pl   2016-02-08 11:51:52.000000000 
+0000
++++ wannier90-2.0.1.1/tests/run_test.pl        2017-01-05 12:10:29.584850729 
+0000
+@@ -2,7 +2,7 @@
+ #
+ use Cwd;
+ my $cwd = cwd();
+-$wanex="../wannier90.x" ;
++$wanex="../src/wannier90.x" ;
+ $wanex=$cwd."/".$wanex ;
+ print " Running test set of inputs\n";
+ @tests_found = <./test*>;

diff --git a/sci-libs/wannier90/metadata.xml b/sci-libs/wannier90/metadata.xml
index ae9640f..425b195 100644
--- a/sci-libs/wannier90/metadata.xml
+++ b/sci-libs/wannier90/metadata.xml
@@ -5,4 +5,18 @@
                <email>s...@gentoo.org</email>
                <name>Gentoo Science Project</name>
        </maintainer>
+       <maintainer type="person">
+               <email>hloupy.ho...@centrum.cz</email>
+               <name>Honza Macháček</name>
+       </maintainer>
+       <longdescription lang="en">
+       Wannier90 is an electronic-structure software computing 
maximally-localized Wannier functions (MLWF).
+       It works on top of other electronic-structure software, such as Abinit, 
FLEUR, and PwSCF.
+       The project and associated repository on Launchpad only deal with 
patches over the official release,
+       as well as its packaging into the Debian and Ubuntu distributions.
+       </longdescription>
+       <upstream>
+       <doc>http://www.wannier.org/</doc>
+       <remote-id type="launchpad">wannier90</remote-id>
+       </upstream>
 </pkgmetadata>

diff --git a/sci-libs/wannier90/wannier90-2.0.0.ebuild 
b/sci-libs/wannier90/wannier90-2.0.0.ebuild
deleted file mode 100644
index 66fde81..0000000
--- a/sci-libs/wannier90/wannier90-2.0.0.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils fortran-2 multilib toolchain-funcs
-
-DESCRIPTION="Calculates maximally localized Wannier functions (MLWFs)"
-HOMEPAGE="http://www.wannier.org/";
-SRC_URI="http://wannier.org/code/${P}.tar.gz";
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux"
-IUSE="doc examples perl static-libs test"
-
-RDEPEND="
-       virtual/blas
-       virtual/lapack
-       perl? ( dev-lang/perl )"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig
-       doc? ( virtual/latex-base
-               dev-texlive/texlive-latexextra
-       )"
-
-src_configure() {
-       cat <<- EOF >> "${S}"/make.sys
-               F90 = $(tc-getFC)
-               FCOPTS = ${FCFLAGS:- ${FFLAGS:- -O2}}
-               LDOPTS = ${LDFLAGS}
-               LIBS = $($(tc-getPKG_CONFIG) --libs blas lapack)
-       EOF
-}
-
-src_compile() {
-       emake -j1 wannier
-       emake -j1 lib
-       if use doc; then
-               VARTEXFONTS="${T}/fonts"
-               emake -j1 doc
-       fi
-}
-
-src_test() {
-       einfo "Compare the 'Standard' and 'Current' outputs of this test."
-       cd tests
-       emake test
-       cat wantest.log
-}
-
-src_install() {
-       dobin wannier90.x
-       use perl && dobin utility/kmesh.pl
-       use static-libs && dolib.a libwannier.a
-       doheader src/obj/*.mod
-       if use examples; then
-               insinto /usr/share/${PN}
-               doins -r examples
-       fi
-       use doc && dodoc doc/*.pdf
-       dodoc README README.install CHANGE.log
-}

diff --git a/sci-libs/wannier90/wannier90-2.0.1.1.ebuild 
b/sci-libs/wannier90/wannier90-2.0.1.1.ebuild
new file mode 100644
index 0000000..3958bfb
--- /dev/null
+++ b/sci-libs/wannier90/wannier90-2.0.1.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils eutils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="Calculates maximally localized Wannier functions (MLWFs)"
+HOMEPAGE="http://www.wannier.org/";
+#SRC_URI="http://wannier.org/code/${P}.tar.gz";
+SRC_URI="https://launchpad.net/${PN}/2.0/${PV}/+download/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="doc mpi perl test"
+
+RDEPEND="
+       virtual/blas
+       virtual/lapack
+       perl? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       doc? ( virtual/latex-base
+               dev-texlive/texlive-latexextra
+               dev-tex/revtex
+       )"
+
+pkg_setup() {
+       # fortran-2.eclass does not handle mpi wrappers
+       if use mpi; then
+               export FC="mpif90"
+               export F77="mpif77"
+               export CC="mpicc"
+               export CXX="mpic++"
+               export MPIFC="mpif90"
+               export MPICC="mpicc"
+       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
+}
+
+src_prepare() {
+       epatch "${FILESDIR}"/"$P"-runtest.patch
+}
+
+src_configure() {
+       export LINALG_INCLUDES="$($(tc-getPKG_CONFIG) --cflags blas lapack)"
+       export LINALG_LIBS="$($(tc-getPKG_CONFIG) --libs blas lapack)"
+       autotools-utils_src_configure
+}
+
+src_compile() {
+       autotools-utils_src_compile
+       pushd "${BUILD_DIR}"/utility > /dev/null || die
+       emake || die "emake in utility failed"
+       popd > /dev/null || die
+       if use doc; then
+               VARTEXFONTS="${T}/fonts"
+               pushd "${BUILD_DIR}"/doc/user_guide > /dev/null || die
+               emake || die 'emake in doc/user_guide failed'
+               cd "${BUILD_DIR}"/doc/tutorial
+               emake || die 'emake in doc/tutorial failed'
+               cd "${BUILD_DIR}"/utility/w90vdw/doc
+               emake || die 'emake in utility/w90vdw/doc failed'
+               cd "${BUILD_DIR}"/utility/w90pov/doc
+               emake || die 'emake in utility/w90pov/doc failed'
+               popd > /dev/null || die
+       fi
+}
+
+src_test() {
+       einfo "Compare the 'Standard' and 'Current' outputs of this test."
+#      cd tests
+#      emake test
+       autotools-utils_src_compile check
+       cat "${BUILD_DIR}"/tests/wantest.log
+}
+
+src_install() {
+       autotools-utils_src_install
+       dobin "${BUILD_DIR}"/utility/w90pov/src/w90pov.x
+       dobin "${BUILD_DIR}"/utility/PL_assessment/w90_pl_assess.x
+       use perl && dobin "$S"/utility/w90_kmesh.pl
+       if use doc; then
+               dodoc "${BUILD_DIR}"/doc/tutorial/tutorial.pdf
+               dodoc "${BUILD_DIR}"/doc/user_guide/user_guide.pdf
+               dodoc "${BUILD_DIR}"/utility/w90vdw/doc/w90vdw.pdf
+               dodoc "${BUILD_DIR}"/utility/w90pov/doc/w90pov.pdf
+       fi
+}

Reply via email to