public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/armadillo/, sci-libs/armadillo/files/
Date: Mon, 29 Apr 2013 16:32:39 +0000 (UTC)	[thread overview]
Message-ID: <1367252488.0d1553c53e3ace23b3d32ca4d8d315415b30f728.bicatali@gentoo> (raw)

commit:     0d1553c53e3ace23b3d32ca4d8d315415b30f728
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 29 16:21:28 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> 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 <bicatali@gentoo.org> +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 <bicatali@gentoo.org> 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 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <herd>sci</herd>
-  <longdescription lang="en">
+<herd>sci</herd>
+<longdescription lang="en">
   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.
 </longdescription>
-  <use>
-    <flag name="atlas">Link with <pkg>sci-libs/atlas</pkg> libraries for cblas and clapack</flag>
-  </use>
+<use>
+  <flag name="atlas">
+    Link with <pkg>sci-libs/atlas</pkg> libraries for cblas and
+    clapack
+  </flag>
+  <flag name='int64'>
+    Use 64 bits integer for matrix indexation
+  </flag>
+  <flag name='tbb'>
+    Use matrix allocation from the Threads Building Blocks
+    <pkg>dev-cpp/tbb</pkg>
+  </flag> 
+</use>
 </pkgmetadata>


             reply	other threads:[~2013-04-29 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 16:32 Sebastien Fabbro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-25  4:40 [gentoo-commits] proj/sci:master commit in: sci-libs/armadillo/, sci-libs/armadillo/files/ Sebastien Fabbro
2014-02-10  4:14 Sebastien Fabbro
2014-02-16 12:55 Reinis Danne
2014-02-16 12:55 Reinis Danne
2014-06-09 16:36 Sebastien Fabbro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1367252488.0d1553c53e3ace23b3d32ca4d8d315415b30f728.bicatali@gentoo \
    --to=bicatali@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox