public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/
@ 2016-03-17 10:50 Tiziano Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Tiziano Müller @ 2016-03-17 10:50 UTC (permalink / raw
  To: gentoo-commits

commit:     984ab3fd0c2449a31c3f63eb4518f3b35d122f9b
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 10:50:14 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 10:50:14 2016 +0000
URL:        https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=984ab3fd

sci-chemistry/cp2k: initial commit

 sci-chemistry/cp2k/Manifest        |  1 +
 sci-chemistry/cp2k/cp2k-3.0.ebuild | 81 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/sci-chemistry/cp2k/Manifest b/sci-chemistry/cp2k/Manifest
new file mode 100644
index 0000000..19a80c6
--- /dev/null
+++ b/sci-chemistry/cp2k/Manifest
@@ -0,0 +1 @@
+DIST cp2k-3.0.tar.bz2 48249778 SHA256 1acfacef643141045b7cbade7006f9b7538476d861eeecd9658c9e468dc61151 SHA512 3a3af3fbfdd9748b0b41f89981d866ab1c64f30ac238b10e17c28e1eb247f349bfb536db6ecdd68151445424d7c467aecc818fe8bcf141f575d1910c46d35a80 WHIRLPOOL 99dcf5ec0f424336fba7ff61d673ff132404081ce2ac18a3bb7feeaaee19d1a7efb9940d1a9ca59e9b42033dd47276c513651e63c6a699c2bba32e1d1ed0714a

diff --git a/sci-chemistry/cp2k/cp2k-3.0.ebuild b/sci-chemistry/cp2k/cp2k-3.0.ebuild
new file mode 100644
index 0000000..1d2218c
--- /dev/null
+++ b/sci-chemistry/cp2k/cp2k-3.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit flag-o-matic fortran-2 toolchain-funcs python-any-r1
+
+FORTRAN_STANDARD=2003
+FORTRAN_NEED_OPENMP=1
+# OpenMP support would be optional
+
+DESCRIPTION="Quantum chemistry and solid state physics software package"
+HOMEPAGE="https://www.cp2k.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+fftw openmp"
+
+RDEPEND="virtual/blas
+	fftw? ( sci-libs/fftw:3.0=[fortran,openmp?,threads] )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	${PYTHON_DEPS}"
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+	fortran-2_pkg_setup
+}
+
+src_configure() {
+	if use openmp ; then
+		append-fflags -fopenmp
+		append-ldflags -fopenmp
+	fi
+
+	declare -a libs defines
+
+	if use fftw ; then
+		if use openmp ; then
+			libs+=($(pkg-config --libs fftw3))
+		else
+			libs+=($(pkg-config --libs fftw3_omp))
+		fi
+		defines+=(-D__FFTW3)
+		echo ${defines[*]}
+	fi
+
+	cat > arch/custom.gentoo << EOF
+CC         = $(tc-getCC)
+# empty CPP var makes it use the compiler directly instead of two-step
+CPP        =
+FC         = $(tc-getFC)
+LD         = $(tc-getFC)
+AR         = $(tc-getAR) -r
+CPPFLAGS   = ${defines[*]} ${CPPFLAGS}
+FCFLAGS    = -ffree-form -ffree-line-length-none ${defines[*]} ${CPPFLAGS} ${FCFLAGS}
+LDFLAGS    = ${LDFLAGS}
+LIBS       = $(pkg-config --libs lapack) ${libs[*]}
+DATA_DIR   = ${EPREFIX}/usr/share/cp2k
+EOF
+}
+
+src_compile() {
+	cd makefiles # using `-C makefiles` does not work, because "reasons"
+	emake ARCH=custom VERSION=gentoo
+}
+
+src_install() {
+	for e in cp2k cp2k_shell ; do
+		newbin exe/custom/$e.gentoo $e
+	done
+
+	insinto /usr/share/cp2k
+	doins -r data/*
+
+	dodoc README
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/
@ 2016-03-17 14:45 Tiziano Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Tiziano Müller @ 2016-03-17 14:45 UTC (permalink / raw
  To: gentoo-commits

commit:     eb5d6d5e83c9ce811323f665d72f42c69cc36087
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 14:45:31 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 14:45:31 2016 +0000
URL:        https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=eb5d6d5e

sci-chemistry/cp2k: fix some issues with the openmp flag

 sci-chemistry/cp2k/cp2k-3.0.ebuild | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sci-chemistry/cp2k/cp2k-3.0.ebuild b/sci-chemistry/cp2k/cp2k-3.0.ebuild
index 1d2218c..c589efb 100644
--- a/sci-chemistry/cp2k/cp2k-3.0.ebuild
+++ b/sci-chemistry/cp2k/cp2k-3.0.ebuild
@@ -18,10 +18,11 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+fftw openmp"
+IUSE="+fftw +openmp"
 
 RDEPEND="virtual/blas
-	fftw? ( sci-libs/fftw:3.0=[fortran,openmp?,threads] )"
+	fftw? ( openmp? ( sci-libs/fftw:3.0=[fortran,openmp] )
+		!openmp? ( sci-libs/fftw:3.0=[fortran,threads] ) )"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	${PYTHON_DEPS}"
@@ -41,9 +42,9 @@ src_configure() {
 
 	if use fftw ; then
 		if use openmp ; then
-			libs+=($(pkg-config --libs fftw3))
-		else
 			libs+=($(pkg-config --libs fftw3_omp))
+		else
+			libs+=($(pkg-config --libs fftw3_threads))
 		fi
 		defines+=(-D__FFTW3)
 		echo ${defines[*]}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/
@ 2016-04-18 10:33 Tiziano Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Tiziano Müller @ 2016-04-18 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     036f87ea3e73231d043fa86b8f04d2bc5f17bb67
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 10:33:23 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 10:33:23 2016 +0000
URL:        https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=036f87ea

sci-chemistry/cp2k: support libint/libxc

 sci-chemistry/cp2k/cp2k-3.0.ebuild | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/sci-chemistry/cp2k/cp2k-3.0.ebuild b/sci-chemistry/cp2k/cp2k-3.0.ebuild
index c589efb..b7daf1b 100644
--- a/sci-chemistry/cp2k/cp2k-3.0.ebuild
+++ b/sci-chemistry/cp2k/cp2k-3.0.ebuild
@@ -18,11 +18,13 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+fftw +openmp"
+IUSE="+fftw +libint +libxc +openmp"
 
 RDEPEND="virtual/blas
 	fftw? ( openmp? ( sci-libs/fftw:3.0=[fortran,openmp] )
-		!openmp? ( sci-libs/fftw:3.0=[fortran,threads] ) )"
+		!openmp? ( sci-libs/fftw:3.0=[fortran,threads] ) )
+	libint? ( sci-libs/libint:1 )
+	libxc? ( =sci-libs/libxc-2.2*[fortran] )"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	${PYTHON_DEPS}"
@@ -33,23 +35,34 @@ pkg_setup() {
 }
 
 src_configure() {
+	libs=()
+	pkgs=("lapack")
+
 	if use openmp ; then
 		append-fflags -fopenmp
 		append-ldflags -fopenmp
 	fi
 
-	declare -a libs defines
-
 	if use fftw ; then
+		append-cppflags -D__FFTW3
+
 		if use openmp ; then
-			libs+=($(pkg-config --libs fftw3_omp))
+			pkgs+=("fftw3_omp")
 		else
-			libs+=($(pkg-config --libs fftw3_threads))
+			pkgs+=("fftw3_threads")
 		fi
-		defines+=(-D__FFTW3)
-		echo ${defines[*]}
 	fi
 
+	if use libint ; then
+		append-cppflags -D__LIBINT
+		libs+=("-lint" "-lderiv")
+	fi
+	if use libxc ; then
+		append-cppflags -D__LIBXC2
+		libs+=("-lxc" "-lxcf90")
+	fi
+
+	# /usr/include must be included explicitly to have gfortran look for .mod-files there
 	cat > arch/custom.gentoo << EOF
 CC         = $(tc-getCC)
 # empty CPP var makes it use the compiler directly instead of two-step
@@ -57,10 +70,10 @@ CPP        =
 FC         = $(tc-getFC)
 LD         = $(tc-getFC)
 AR         = $(tc-getAR) -r
-CPPFLAGS   = ${defines[*]} ${CPPFLAGS}
-FCFLAGS    = -ffree-form -ffree-line-length-none ${defines[*]} ${CPPFLAGS} ${FCFLAGS}
+CPPFLAGS   = ${CPPFLAGS} $(pkg-config --cflags ${pkgs[*]})
+FCFLAGS    = -ffree-form -ffree-line-length-none ${CPPFLAGS} -I/usr/include $(pkg-config --cflags ${pkgs[*]}) ${FCFLAGS}
 LDFLAGS    = ${LDFLAGS}
-LIBS       = $(pkg-config --libs lapack) ${libs[*]}
+LIBS       = $(pkg-config --libs ${pkgs[*]}) ${libs[*]}
 DATA_DIR   = ${EPREFIX}/usr/share/cp2k
 EOF
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/
@ 2016-04-22  8:40 Tiziano Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Tiziano Müller @ 2016-04-22  8:40 UTC (permalink / raw
  To: gentoo-commits

commit:     c8e6ee71ad4d6e9e6804f56a1e56eab18426284b
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 08:40:02 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 08:40:02 2016 +0000
URL:        https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=c8e6ee71

sci-chemistry/cp2k: add mpi support

 sci-chemistry/cp2k/cp2k-3.0.ebuild | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/sci-chemistry/cp2k/cp2k-3.0.ebuild b/sci-chemistry/cp2k/cp2k-3.0.ebuild
index b7daf1b..8a047fe 100644
--- a/sci-chemistry/cp2k/cp2k-3.0.ebuild
+++ b/sci-chemistry/cp2k/cp2k-3.0.ebuild
@@ -18,13 +18,17 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+fftw +libint +libxc +openmp"
+IUSE="+fftw +libint +libxc +openmp mpi"
 
 RDEPEND="virtual/blas
 	fftw? ( openmp? ( sci-libs/fftw:3.0=[fortran,openmp] )
 		!openmp? ( sci-libs/fftw:3.0=[fortran,threads] ) )
 	libint? ( sci-libs/libint:1 )
-	libxc? ( =sci-libs/libxc-2.2*[fortran] )"
+	libxc? ( =sci-libs/libxc-2.2*[fortran] )
+	mpi? (
+		virtual/mpi[fortran]
+		virtual/scalapack
+		)"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	${PYTHON_DEPS}"
@@ -35,14 +39,22 @@ pkg_setup() {
 }
 
 src_configure() {
+	incs=("-I/usr/include")
 	libs=()
-	pkgs=("lapack")
+	pkgs=()
 
 	if use openmp ; then
 		append-fflags -fopenmp
 		append-ldflags -fopenmp
 	fi
 
+	if use mpi ; then
+		append-cppflags -D__parallel -D__SCALAPACK -D__MPI_VERSION=3
+		pkgs+=("scalapack")
+	else
+		pkgs+=("lapack")
+	fi
+
 	if use fftw ; then
 		append-cppflags -D__FFTW3
 
@@ -62,16 +74,24 @@ src_configure() {
 		libs+=("-lxc" "-lxcf90")
 	fi
 
+	CC=$(tc-getCC)
+	FC=$(tc-getFC)
+
+	if use mpi ; then
+		CC=mpicc
+		FC=mpifort
+	fi
+
 	# /usr/include must be included explicitly to have gfortran look for .mod-files there
 	cat > arch/custom.gentoo << EOF
-CC         = $(tc-getCC)
+CC         = ${CC}
 # empty CPP var makes it use the compiler directly instead of two-step
 CPP        =
-FC         = $(tc-getFC)
-LD         = $(tc-getFC)
+FC         = ${FC}
+LD         = ${FC}
 AR         = $(tc-getAR) -r
-CPPFLAGS   = ${CPPFLAGS} $(pkg-config --cflags ${pkgs[*]})
-FCFLAGS    = -ffree-form -ffree-line-length-none ${CPPFLAGS} -I/usr/include $(pkg-config --cflags ${pkgs[*]}) ${FCFLAGS}
+CPPFLAGS   = ${CPPFLAGS} ${incs[*]} $(pkg-config --cflags ${pkgs[*]})
+FCFLAGS    = -ffree-form -ffree-line-length-none ${CPPFLAGS} ${incs[*]} $(pkg-config --cflags ${pkgs[*]}) ${FCFLAGS}
 LDFLAGS    = ${LDFLAGS}
 LIBS       = $(pkg-config --libs ${pkgs[*]}) ${libs[*]}
 DATA_DIR   = ${EPREFIX}/usr/share/cp2k


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-22  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22  8:40 [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/ Tiziano Müller
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 10:33 Tiziano Müller
2016-03-17 14:45 Tiziano Müller
2016-03-17 10:50 Tiziano Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox