summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-02-26 02:03:09 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-02-26 02:03:41 +0000
commit761ed9021b56763e34df0caa7b86fcca3df7f2b7 (patch)
tree02f871b05f45f9877da0e535d567dd3291d43088 /sci-astronomy/casacore/casacore-2.0.3.ebuild
parentsci-astronomy/casa-data: take smaller data package instead of subversion base... (diff)
downloadgentoo-761ed9021b56763e34df0caa7b86fcca3df7f2b7.tar.gz
gentoo-761ed9021b56763e34df0caa7b86fcca3df7f2b7.tar.bz2
gentoo-761ed9021b56763e34df0caa7b86fcca3df7f2b7.zip
sci-astronomy/casacore: Version bump and re-keywording
Package-Manager: portage-2.2.27
Diffstat (limited to 'sci-astronomy/casacore/casacore-2.0.3.ebuild')
-rw-r--r--sci-astronomy/casacore/casacore-2.0.3.ebuild82
1 files changed, 82 insertions, 0 deletions
diff --git a/sci-astronomy/casacore/casacore-2.0.3.ebuild b/sci-astronomy/casacore/casacore-2.0.3.ebuild
new file mode 100644
index 000000000000..e7956849013e
--- /dev/null
+++ b/sci-astronomy/casacore/casacore-2.0.3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# python3 is experimental and only one python is supported
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils toolchain-funcs fortran-2 python-single-r1
+
+DESCRIPTION="Core libraries for the Common Astronomy Software Applications"
+HOMEPAGE="https://github.com/casacore/casacore"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="c++11 +data doc fftw hdf5 openmp python threads test"
+
+RDEPEND="
+ sci-astronomy/wcslib:0=
+ sci-libs/cfitsio:0=
+ sys-libs/readline:0=
+ virtual/blas
+ virtual/lapack
+ data? ( sci-astronomy/casa-data )
+ fftw? ( sci-libs/fftw:3.0= )
+ hdf5? ( sci-libs/hdf5:0= )
+ python? ( dev-libs/boost:0=[python,${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( sci-astronomy/casa-data )"
+
+pkg_pretend() {
+ if [[ $(tc-getCC)$ == *gcc* ]] && [[ ${MERGE_TYPE} != binary ]]; then
+ use c++11 && [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) && \
+ die "You are using gcc but gcc-4.7 or higher is required for C++11"
+ use openmp && ! tc-has-openmp && \
+ die "You are using gcc but without OpenMP capabilities that you requested"
+ fi
+}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ fortran-2_pkg_setup
+}
+
+src_configure() {
+ has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
+ local mycmakeargs=(
+ -DENABLE_SHARED=ON
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DDATA_DIR="${EPREFIX}/usr/share/casa/data"
+ -DBUILD_PYTHON="$(usex python)"
+ -DBUILD_TESTING="$(usex test)"
+ -DCXX11="$(usex c++11)"
+ -DUSE_FFTW3="$(usex fftw)"
+ -DUSE_HDF5="$(usex hdf5)"
+ -DUSE_OPENMP="$(usex openmp)"
+ -DUSE_THREADS="$(usex threads)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ doxygen doxygen.cfg || die
+ fi
+}
+
+src_install(){
+ cmake-utils_src_install
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/html
+ fi
+}