diff options
-rw-r--r-- | sci-libs/armadillo/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/armadillo/armadillo-6.100.1.ebuild | 119 |
2 files changed, 120 insertions, 0 deletions
diff --git a/sci-libs/armadillo/Manifest b/sci-libs/armadillo/Manifest index 2cc449c762bf..f8e3c0591612 100644 --- a/sci-libs/armadillo/Manifest +++ b/sci-libs/armadillo/Manifest @@ -3,3 +3,4 @@ DIST armadillo-3.6.2.tar.gz 3016818 SHA256 04f64c632e619989616c7f219310a06cb1618 DIST armadillo-4.650.4.tar.gz 5408567 SHA256 ccc56580ec932ec9beade5679b07ecbed889e9b602866f673d1a05a7692b4bf8 SHA512 a548150ba5484fce35b0bc6023982939946f2f00b733dff2cd5b46101b1c344342061389cb4363cdaa04c5e3cca3278a40febe2ed705316552dd71f841c46037 WHIRLPOOL 331493d8b9c92b9e1908880c6f6510edb12e93193a9ceb77d0b8ce9d0bfb493dc48e590ea949d39c3c19f6fc3b05446b7e00525512e3055be0f907427c28f7d4 DIST armadillo-5.500.2.tar.gz 5442223 SHA256 a29d964fb879199a2ec06e67d0c33faa704bd493f48ff8d4abe3898baf735d19 SHA512 26d5819dd2349c85e6a1b6a42723ab7647b484afe3cc3896389a80a2d2e69ce2d9938a3e03fcb23019940297554e515dbd8ec154cbb1218fd6dd247661aa838f WHIRLPOOL 27b34795993342e78e2bddfb0b3f695b7c9b2c6c5d0370152d2475c777d6308ea7b05c1bc15a9425ee51cafcd3f7eb127e785fa4e348611bd2cc540b82315ab3 DIST armadillo-5.600.2.tar.gz 5447327 SHA256 3a4e16f07dddd16313128eb1cab8e2f257d7461bde4a1d277c85181dcd6d1eda SHA512 68801cfcdb0cd9121a61da8d22f85f4fd781238e82b0304e7954a510e42be3da94a534b55640f912fca60c07c38828c3bab6aa4fb0328f73118ac18cd135e030 WHIRLPOOL 0e7dfff990526596fe05efe5280da0b7b60f3f2eecf98f81033b71ebaeb82fb7f243819ce7797ddcdf3290a7a810009caacaf69a1a31380bf2f013379a71917e +DIST armadillo-6.100.1.tar.gz 5448282 SHA256 4f93fe657de27cbfbd25bea929c2fcf79981ad71dd388310d5d003ccfce4e32f SHA512 82500cf77689d972865a1383318a2cfd474fd624c78fa7c3c1548cfa9ace5c64b441683cb77d57dbb9ab243b26e0ab15625ed4ce384e026d0bfd5bac3fe6d3c4 WHIRLPOOL b54b7910e36bd14a79e354db9d22a3a5a38227293f6c850e27e5bba8c1ef78aecace8c04356ae25a2d72e83b160690af37267b93ddba2108fac64b95bbad7e79 diff --git a/sci-libs/armadillo/armadillo-6.100.1.ebuild b/sci-libs/armadillo/armadillo-6.100.1.ebuild new file mode 100644 index 000000000000..718248c6aa23 --- /dev/null +++ b/sci-libs/armadillo/armadillo-6.100.1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +CMAKE_IN_SOURCE_BUILD=1 + +inherit cmake-utils toolchain-funcs multilib eutils + +DESCRIPTION="Streamlined C++ linear algebra library" +HOMEPAGE="http://arma.sourceforge.net/" +SRC_URI="mirror://sourceforge/arma/${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0/6" +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="arpack blas debug doc examples hdf5 lapack mkl superlu tbb test" +REQUIRED_USE="test? ( lapack )" + +RDEPEND=" + dev-libs/boost + arpack? ( sci-libs/arpack ) + blas? ( virtual/blas ) + lapack? ( virtual/lapack ) + superlu? ( sci-libs/superlu ) +" +DEPEND="${RDEPEND} + arpack? ( virtual/pkgconfig ) + blas? ( virtual/pkgconfig ) + hdf5? ( sci-libs/hdf5 ) + lapack? ( virtual/pkgconfig ) + mkl? ( sci-libs/mkl ) + tbb? ( dev-cpp/tbb )" +PDEPEND="${RDEPEND} + hdf5? ( sci-libs/hdf5 ) + mkl? ( sci-libs/mkl ) + tbb? ( dev-cpp/tbb )" + +src_prepare() { + # avoid the automagic cmake macros + sed -i -e '/ARMA_Find/d' CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" + $(cmake-utils_use debug ARMA_EXTRA_DEBUG) + $(cmake-utils_use mkl ARMA_USE_MKL_ALLOC) + $(cmake-utils_use tbb ARMA_USE_TBB_ALLOC) + ) + if use arpack; then + mycmakeargs+=( + -DARPACK_FOUND=ON + -DARPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs arpack)" + ) + fi +# if use atlas; then +# local c=atlas-cblas l=atlas-clapack +# $(tc-getPKG_CONFIG) --exists ${c}-threads && c+=-threads +# $(tc-getPKG_CONFIG) --exists ${l}-threads && l+=-threads +# mycmakeargs+=( +# -DCBLAS_FOUND=ON +# -DCBLAS_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${c} | sed 's/-I//')" +# -DCBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${c})" +# -DCLAPACK_FOUND=ON +# -DCLAPACK_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${l} | sed 's/-I//')" +# -DCLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${l})" +# ) +# fi + if use blas; then + mycmakeargs+=( + -DBLAS_FOUND=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)" + ) + fi + if use hdf5; then + mycmakeargs+=( + -DHDF5_FOUND=ON + -DHDF5_LIBRARIES="-lhdf5" + ) + fi + if use lapack; then + mycmakeargs+=( + -DLAPACK_FOUND=ON + -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)" + ) + fi + if use superlu; then + mycmakeargs+=( + -DSuperLU_FOUND=ON + -DSuperLU_LIBRARIES="$($(tc-getPKG_CONFIG) --libs superlu)" + ) + fi + + cmake-utils_src_configure +} + +src_test() { + pushd examples > /dev/null + emake \ + CXXFLAGS="-I../include ${CXXFLAGS} -DARMA_USE_BLAS -DARMA_USE_LAPACK" \ + EXTRA_LIB_FLAGS="-L.. $($(tc-getPKG_CONFIG) --libs blas lapack)" + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example1 || die + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example2 || die + emake clean + popd > /dev/null +} + +src_install() { + cmake-utils_src_install + dodoc README.txt + use doc && dodoc *pdf && dohtml *html + if use examples; then + insinto /usr/share/examples/${PF} + doins -r examples/* + fi +} |