public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tiziano Müller" <dev-zero@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/dev-zero:master commit in: sci-chemistry/cp2k/
Date: Thu, 17 Mar 2016 10:50:21 +0000 (UTC)	[thread overview]
Message-ID: <1458211814.984ab3fd0c2449a31c3f63eb4518f3b35d122f9b.dev-zero@gentoo> (raw)

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
+}


             reply	other threads:[~2016-03-17 10:50 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458211814.984ab3fd0c2449a31c3f63eb4518f3b35d122f9b.dev-zero@gentoo \
    --to=dev-zero@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox