summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/armadillo/armadillo-3.4.4.ebuild')
-rw-r--r--sci-libs/armadillo/armadillo-3.4.4.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/sci-libs/armadillo/armadillo-3.4.4.ebuild b/sci-libs/armadillo/armadillo-3.4.4.ebuild
new file mode 100644
index 000000000000..a7c75f8948a9
--- /dev/null
+++ b/sci-libs/armadillo/armadillo-3.4.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+CMAKE_IN_SOURCE_BUILD=1
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="Streamlined C++ linear algebra library"
+HOMEPAGE="http://arma.sourceforge.net/"
+SRC_URI="mirror://sourceforge/arma/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="blas doc examples lapack"
+
+RDEPEND="
+ dev-libs/boost
+ blas? ( virtual/blas )
+ lapack? ( virtual/lapack )"
+
+DEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # avoid the automagic cmake macros
+ sed -i -e '/ARMA_Find/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=()
+ if use blas; then
+ mycmakeargs+=(
+ -DBLAS_FOUND=ON
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
+ )
+ fi
+ if use lapack; then
+ mycmakeargs+=(
+ -DLAPACK_FOUND=ON
+ -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc README.txt
+ use doc && dodoc *pdf && dohtml *html
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}