commit:     ee63729b2263bf690dafc7cc8fc7be73bdaf1510
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 12 00:49:29 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 06:53:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ee63729b

sci-libs/shtools: initial addition.

Package-Manager: portage-2.3.2

 sci-libs/shtools/metadata.xml           | 18 ++++++++++++
 sci-libs/shtools/shtools-4.0_rc1.ebuild | 50 +++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/sci-libs/shtools/metadata.xml b/sci-libs/shtools/metadata.xml
new file mode 100644
index 0000000..bacae8d
--- /dev/null
+++ b/sci-libs/shtools/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>hero...@gentoo.org</email>
+    <name>Benda Xu</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>s...@gentoo.org</email>
+    <name>Gentoo Science Project</name>
+  </maintainer>
+  <longdescription>
+    SHTOOLS is an archive of Fortran 95 and Python software that can
+    be used to perform spherical harmonic transforms and
+    reconstructions, rotations of data expressed in spherical
+    harmonics, and multitaper spectral analyses on the sphere.
+  </longdescription>
+</pkgmetadata>

diff --git a/sci-libs/shtools/shtools-4.0_rc1.ebuild 
b/sci-libs/shtools/shtools-4.0_rc1.ebuild
new file mode 100644
index 0000000..98ad4e2
--- /dev/null
+++ b/sci-libs/shtools/shtools-4.0_rc1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+if [[ ${PV} == 9999 ]]; then
+       ECLASS="git-r3"
+       EGIT_REPO_URI="https://github.com/heroxbd/${PN^^}.git";
+       S="${WORKDIR}"/${P}
+else
+       SRC_URI="https://github.com/${PN^^}/${PN^^}/archive/v${PV/_/-}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+       S="${WORKDIR}"/${PN^^}-${PV/_/-}
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 flag-o-matic toolchain-funcs ${ECLASS}
+
+DESCRIPTION="Spherical harmonic transforms and reconstructions, rotations."
+HOMEPAGE="http://shtools.ipgp.fr";
+
+LICENSE="BSD-4"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="sci-libs/fftw:*
+       sys-devel/gcc:*[fortran]
+       virtual/lapack
+       virtual/blas
+       ${PYTHON_DEPS}"
+
+DEPEND="dev-python/numpy
+       ${RDEPEND}"
+
+src_compile() {
+       append-ldflags -shared # needed by f2py
+        # needed by f2py in fortran 77 mode
+       use amd64 && append-fflags -fPIC
+       OPTS=( LAPACK=$($(tc-getPKG_CONFIG) lapack --libs-only-l)
+               BLAS=$($(tc-getPKG_CONFIG) blas --libs-only-l)
+               FFTW=$($(tc-getPKG_CONFIG) fftw3 --libs-only-l)
+               PYTHON_VERSION=2 )
+       emake python ${OPTS[@]}
+}
+
+src_install() {
+       emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" ${OPTS[@]} install
+}

Reply via email to