From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1316C1381F3 for ; Mon, 29 Apr 2013 16:32:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AFE62E0AB6; Mon, 29 Apr 2013 16:32:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 006CCE0AA6 for ; Mon, 29 Apr 2013 16:32:41 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DED7733DF8A for ; Mon, 29 Apr 2013 16:32:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 85061E44CF for ; Mon, 29 Apr 2013 16:32:39 +0000 (UTC) From: "Sebastien Fabbro" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastien Fabbro" Message-ID: <1367252488.0d1553c53e3ace23b3d32ca4d8d315415b30f728.bicatali@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/armadillo/, sci-libs/armadillo/files/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/armadillo/ChangeLog sci-libs/armadillo/armadillo-3.6.3-r1.ebuild sci-libs/armadillo/armadillo-3.810.2.ebuild sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch sci-libs/armadillo/metadata.xml X-VCS-Directories: sci-libs/armadillo/ sci-libs/armadillo/files/ X-VCS-Committer: bicatali X-VCS-Committer-Name: Sebastien Fabbro X-VCS-Revision: 0d1553c53e3ace23b3d32ca4d8d315415b30f728 X-VCS-Branch: master Date: Mon, 29 Apr 2013 16:32:39 +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: cf460d0e-ff30-4386-ae7f-0d65f2e65e18 X-Archives-Hash: de1b7968a9b9a5f20720e644dea81948 commit: 0d1553c53e3ace23b3d32ca4d8d315415b30f728 Author: Sébastien Fabbro gentoo org> AuthorDate: Mon Apr 29 16:21:28 2013 +0000 Commit: Sebastien Fabbro gentoo org> CommitDate: Mon Apr 29 16:21:28 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0d1553c5 sci-libs/armadillo: Version bump Package-Manager: portage-2.2.01.21890-prefix RepoMan-Options: --force --- sci-libs/armadillo/ChangeLog | 7 ++++ ...lo-3.6.3-r1.ebuild => armadillo-3.810.2.ebuild} | 35 +++++++++++++++---- .../files/armadillo-3.810.2-example-makefile.patch | 33 ++++++++++++++++++ .../armadillo/files/armadillo-3.810.2-hdf5.patch | 19 +++++++++++ sci-libs/armadillo/metadata.xml | 20 ++++++++--- 5 files changed, 101 insertions(+), 13 deletions(-) diff --git a/sci-libs/armadillo/ChangeLog b/sci-libs/armadillo/ChangeLog index 71af4a9..ac1aaf0 100644 --- a/sci-libs/armadillo/ChangeLog +++ b/sci-libs/armadillo/ChangeLog @@ -2,6 +2,13 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*armadillo-3.810.2 (29 Apr 2013) + + 29 Apr 2013; Sébastien Fabbro +armadillo-3.810.2.ebuild, + +files/armadillo-3.810.2-example-makefile.patch, + +files/armadillo-3.810.2-hdf5.patch, -armadillo-3.6.3-r1.ebuild, metadata.xml: + sci-libs/armadillo: Version bump + 28 Feb 2013; Sébastien Fabbro armadillo-3.6.3-r1.ebuild: sci-libs/armadillo: Small prefix fix diff --git a/sci-libs/armadillo/armadillo-3.6.3-r1.ebuild b/sci-libs/armadillo/armadillo-3.810.2.ebuild similarity index 60% rename from sci-libs/armadillo/armadillo-3.6.3-r1.ebuild rename to sci-libs/armadillo/armadillo-3.810.2.ebuild index 0258f25..84523a3 100644 --- a/sci-libs/armadillo/armadillo-3.6.3-r1.ebuild +++ b/sci-libs/armadillo/armadillo-3.810.2.ebuild @@ -6,16 +6,16 @@ EAPI=5 CMAKE_IN_SOURCE_BUILD=1 -inherit cmake-utils toolchain-funcs multilib +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="LGPL-3" +LICENSE="MPL-2.0" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="atlas blas doc examples lapack" +IUSE="atlas blas debug doc examples hdf5 int64 lapack tbb" RDEPEND=" dev-libs/boost @@ -26,14 +26,24 @@ DEPEND="${DEPEND} atlas? ( virtual/pkgconfig ) blas? ( virtual/pkgconfig ) lapack? ( virtual/pkgconfig )" +PDEPEND="${RDEPEND} + hdf5? ( sci-libs/hdf5 ) + tbb? ( dev-cpp/tbb )" src_prepare() { + epatch "${FILESDIR}"/${P}-{hdf5,example-makefile}.patch # avoid the automagic cmake macros sed -i -e '/ARMA_Find/d' CMakeLists.txt || die } src_configure() { - local mycmakeargs=( -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" ) + local mycmakeargs=( + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" + $(cmake-utils_use debug ARMA_EXTRA_DEBUG) + $(cmake-utils_use hdf5 ARMA_USE_HDF5) + $(cmake-utils_use int64 ARMA_64BIT_WORD) + $(cmake-utils_use tbb ARMA_TBB_ALLOC) + ) if use blas; then mycmakeargs+=( -DBLAS_FOUND=ON @@ -47,10 +57,10 @@ src_configure() { ) fi if use atlas; then - local c=atlas-cblas l=atlas-lapack - $(tc-getPKG_CONFIG) --exists atlas-cblas-threads && c+=-threads - $(tc-getPKG_CONFIG) --exists atlas-lapack-threads && l+=-threads - mycmakeargs=( + 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 -DCLAPACK_FOUND=ON -DATLAS_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags ${c} | sed 's/-I//')" @@ -61,6 +71,15 @@ src_configure() { cmake-utils_src_configure } +src_test() { + pushd examples > /dev/null + emake CXXFLAGS="-I../include ${CXXFLAGS}" EXTRA_LIB_FLAGS="-L.." + 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 diff --git a/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch b/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch new file mode 100644 index 0000000..90169ed --- /dev/null +++ b/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch @@ -0,0 +1,33 @@ +--- examples/Makefile.cmake.orig 2013-04-29 09:13:58.164963641 -0700 ++++ examples/Makefile.cmake 2013-04-29 09:18:42.371460644 -0700 +@@ -1,7 +1,7 @@ + # The generated "Makefile" from "Makefile.cmake" is only usable after + # the Armadillo library has been configured and installed by CMake. + +-CXX=g++ ++CXX:=g++ + #CXX=g++-4.2 + ## Under MacOS you may have an old compiler as default (e.g. GCC 4.0). + ## However, GCC 4.2 or later is available and preferable due to better +@@ -26,7 +26,7 @@ + + + +-LIB_FLAGS = -larmadillo $(EXTRA_LIB_FLAGS) ++LIB_FLAGS = $(EXTRA_LIB_FLAGS) -larmadillo + ## NOTE: on Ubuntu and Debian based systems you may need to add + ## -lgfortran to LIB_FLAGS + +@@ -73,10 +73,10 @@ + all: example1 example2 + + example1: example1.cpp +- $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_FLAGS) -o $@ + + example2: example2.cpp +- $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_FLAGS) -o $@ + + + .PHONY: clean diff --git a/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch b/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch new file mode 100644 index 0000000..1d2e2ff --- /dev/null +++ b/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig 2013-02-28 14:51:42.032554805 -0800 ++++ CMakeLists.txt 2013-02-28 14:53:05.730978799 -0800 +@@ -191,11 +191,11 @@ + # find_package(HDF5) + # message(STATUS "HDF5_FOUND = ${HDF5_FOUND}") + # +-# if(HDF5_FOUND) +-# set(ARMA_USE_HDF5 true) +-# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${HDF5_INCLUDE_DIRS}) +-# set(ARMA_LIBS ${ARMA_LIBS} ${HDF5_LIBRARIES}) +-# endif() ++if(HDF5_FOUND) ++ set(ARMA_USE_HDF5 true) ++ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${HDF5_INCLUDE_DIRS}) ++ set(ARMA_LIBS ${ARMA_LIBS} ${HDF5_LIBRARIES}) ++endif() + + message(STATUS "*** ") + message(STATUS "*** The Armadillo run-time library component will be an alias for the following libraries:") diff --git a/sci-libs/armadillo/metadata.xml b/sci-libs/armadillo/metadata.xml index 3581e19..ec31109 100644 --- a/sci-libs/armadillo/metadata.xml +++ b/sci-libs/armadillo/metadata.xml @@ -1,8 +1,8 @@ - sci - +sci + Armadillo is a C++ linear algebra library (matrix maths) aiming towards a good balance between speed and ease of use. Integer, floating point and complex numbers are supported, as well as a @@ -14,7 +14,17 @@ need for temporaries. This is accomplished through recursive templates and template meta-programming. - - Link with sci-libs/atlas libraries for cblas and clapack - + + + Link with sci-libs/atlas libraries for cblas and + clapack + + + Use 64 bits integer for matrix indexation + + + Use matrix allocation from the Threads Building Blocks + dev-cpp/tbb + +