From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3280139082 for ; Sun, 29 Jan 2017 11:59:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2D3D9E0D4A; Sun, 29 Jan 2017 11:59:32 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EE664E0D52 for ; Sun, 29 Jan 2017 11:59:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C808334166B for ; Sun, 29 Jan 2017 11:59:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E65C39C1 for ; Sun, 29 Jan 2017 11:59:29 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1485691162.b41f534524a6add32b78ff817576d8640a52b59a.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/shtools/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/shtools/shtools-4.0.ebuild X-VCS-Directories: sci-libs/shtools/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: b41f534524a6add32b78ff817576d8640a52b59a X-VCS-Branch: master Date: Sun, 29 Jan 2017 11:59:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6fc0a604-ddf7-4f61-9ee5-7e1abd578b8f X-Archives-Hash: 6c1aa08d55a8c7bf44be4a0b4213015b commit: b41f534524a6add32b78ff817576d8640a52b59a Author: Justin Lecher gentoo org> AuthorDate: Sun Jan 29 11:22:47 2017 +0000 Commit: Justin Lecher gentoo org> CommitDate: Sun Jan 29 11:59:22 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=b41f5345 sci-libs/shtools: Multiple QA enhancements Properly handle fortran Properly handle multiple python versions fix doc installation dir respect FCFLAGS, AR, FC, RANLIB Add support for static-libs Drop unnecessary . from DESCRIPTION Package-Manager: Portage-2.3.3, Repoman-2.3.1 Signed-off-by: Justin Lecher gentoo.org> sci-libs/shtools/shtools-4.0.ebuild | 59 +++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/sci-libs/shtools/shtools-4.0.ebuild b/sci-libs/shtools/shtools-4.0.ebuild index 149c2bb..43bf743 100644 --- a/sci-libs/shtools/shtools-4.0.ebuild +++ b/sci-libs/shtools/shtools-4.0.ebuild @@ -5,7 +5,7 @@ EAPI=6 if [[ ${PV} == 9999 ]]; then - ECLASS="git-r3" + _ECLASS="git-r3" EGIT_REPO_URI="https://github.com/heroxbd/${PN^^}.git" S="${WORKDIR}"/${P} else @@ -14,38 +14,65 @@ else S="${WORKDIR}"/${PN^^}-${PV/_/-} fi -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python{2_7,3_{4,5}} ) -inherit python-r1 flag-o-matic toolchain-funcs ${ECLASS} +inherit fortran-2 flag-o-matic python-single-r1 toolchain-funcs ${_ECLASS} -DESCRIPTION="Spherical harmonic transforms and reconstructions, rotations." +DESCRIPTION="Spherical harmonic transforms and reconstructions, rotations" HOMEPAGE="http://shtools.ipgp.fr" LICENSE="BSD-4" SLOT="0" KEYWORDS="~amd64" +IUSE="static-libs" -RDEPEND="sci-libs/fftw:* - sys-devel/gcc:*[fortran] +RDEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + sci-libs/fftw:3.0= virtual/lapack virtual/blas - dev-python/numpy - dev-python/matplotlib ${PYTHON_DEPS}" -DEPEND="${RDEPEND}" +DEPEND="${RDEPEND} + virtual/pkgconfig +" -src_compile() { +src_prepare() { 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) + # needed by f2py in fortran 77 mode + append-fflags -fPIC + [[ $(tc-getFC) =~ gfortran ]] && append-fflags -fno-second-underscore + export _pyver=$(python_is_python3 && echo 3 || echo 2) + export 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[@]} + F95=$(tc-getFC) + F95FLAGS="${FCFLAGS}" + AR=$(tc-getAR) + RLIB=$(tc-getRANLIB) + PYTHON_VERSION=${_pyver} + ) + + sed \ + -e '/mv/s:.so:*.so:g' \ + -e "/SYSDOCPATH/s:${PN}:${PF}:g" \ + -e "/www/s:/$:/html/:g" \ + -i Makefile || die + + default +} + +src_compile() { + emake fortran "${OPTS[@]}" + emake python${_pyver} "${OPTS[@]}" } src_install() { - emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" ${OPTS[@]} install + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" "${OPTS[@]}" install-fortran + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" "${OPTS[@]}" install-python${_pyver} + if ! use static-libs; then + rm -rf "${ED}"/usr/$(get_libdir)/*.a || die + fi }