From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-601001-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id A98E81381F3
	for <garchives@archives.gentoo.org>; Wed, 19 Jun 2013 23:51:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 922D4E0A59;
	Wed, 19 Jun 2013 23:51:51 +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 040D3E0A59
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jun 2013 23:51:50 +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 E38C533E634
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jun 2013 23:51:49 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 90435E5459
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jun 2013 23:51:48 +0000 (UTC)
From: "Sebastien Fabbro" <bicatali@gentoo.org>
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" <bicatali@gentoo.org>
Message-ID: <1371685883.ea1ef1945fdd1b8028f8c31f14ee598496e1ae91.bicatali@gentoo>
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/trilinos/
X-VCS-Repository: proj/sci
X-VCS-Files: sci-libs/trilinos/ChangeLog sci-libs/trilinos/metadata.xml sci-libs/trilinos/trilinos-11.2.3.ebuild
X-VCS-Directories: sci-libs/trilinos/
X-VCS-Committer: bicatali
X-VCS-Committer-Name: Sebastien Fabbro
X-VCS-Revision: ea1ef1945fdd1b8028f8c31f14ee598496e1ae91
X-VCS-Branch: master
Date: Wed, 19 Jun 2013 23:51:48 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 2d915be3-613f-4734-8943-7d0de41f4c6e
X-Archives-Hash: ad3a5cd25c44327611b29fc3ad63c3e0

commit:     ea1ef1945fdd1b8028f8c31f14ee598496e1ae91
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 19 23:51:23 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Wed Jun 19 23:51:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ea1ef194

sci-libs/trilinos: Version bump and rewrite

Package-Manager: portage-2.2.01.22013-prefix
RepoMan-Options: --force

---
 sci-libs/trilinos/ChangeLog              |   7 +-
 sci-libs/trilinos/metadata.xml           |  16 +++
 sci-libs/trilinos/trilinos-11.2.3.ebuild | 186 +++++++++++++++++++++++++++++++
 3 files changed, 208 insertions(+), 1 deletion(-)

diff --git a/sci-libs/trilinos/ChangeLog b/sci-libs/trilinos/ChangeLog
index c05bfeb..7f1ee3d 100644
--- a/sci-libs/trilinos/ChangeLog
+++ b/sci-libs/trilinos/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*trilinos-11.2.3 (19 Jun 2013)
+
+  19 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org> +trilinos-11.2.3.ebuild,
+  metadata.xml:
+  sci-libs/trilinos: Version bump and rewrite
+
   12 Jun 2013; Justin Lecher <jlec@gentoo.org> -trilinos-10.10.1.ebuild,
   trilinos-11.0.3.ebuild:
   Drop old, fix handling of qt support
@@ -25,4 +31,3 @@
   8 Apr 2012; Andrea Arteaga <andyspiros@gmail.com>
   +trilinos-10.10.1.ebuild +metadata.xml:
   Initial ebuild.
-

diff --git a/sci-libs/trilinos/metadata.xml b/sci-libs/trilinos/metadata.xml
index fbde4bf..46351c5 100644
--- a/sci-libs/trilinos/metadata.xml
+++ b/sci-libs/trilinos/metadata.xml
@@ -11,14 +11,30 @@
   of large-scale, complex multi-physics engineering and scientific problems.
 </longdescription>
 <use>
+  <flag name="adolc">Undocumented USE</flag>
   <flag name="arprec">Undocumented USE</flag>
   <flag name="boost">Undocumented USE</flag>
+  <flag name="clp">Undocumented USE</flag>
+  <flag name="cppunit">Undocumented USE</flag>
   <flag name="cuda">Undocumented USE</flag>
+  <flag name="eigen">Undocumented USE</flag>
+  <flag name="glpk">Undocumented USE</flag>
+  <flag name="gtest">Undocumented USE</flag>
   <flag name="hwloc">Undocumented USE</flag>
+  <flag name="hypre">Undocumented USE</flag>
+  <flag name="metis">Undocumented USE</flag>
+  <flag name="mkl">Undocumented USE</flag>
+  <flag name="mumps">Undocumented USE</flag>
+  <flag name="petsc">Undocumented USE</flag>
   <flag name="qd">Undocumented USE</flag>
+  <flag name="scalapack">Undocumented USE</flag>
   <flag name="scotch">Undocumented USE</flag>
+  <flag name="sparse">Undocumented USE</flag>
+  <flag name="superlu">Undocumented USE</flag>
   <flag name="taucs">Undocumented USE</flag>
   <flag name="tbb">Undocumented USE</flag>
+  <flag name="tvmet">Undocumented USE</flag>
   <flag name="umfpack">Undocumented USE</flag>
+  <flag name="yaml">Undocumented USE</flag>
 </use>
 </pkgmetadata>

diff --git a/sci-libs/trilinos/trilinos-11.2.3.ebuild b/sci-libs/trilinos/trilinos-11.2.3.ebuild
new file mode 100644
index 0000000..b22fa58
--- /dev/null
+++ b/sci-libs/trilinos/trilinos-11.2.3.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs multilib toolchain-funcs
+
+DESCRIPTION="Scientific library collection for large scale problems"
+HOMEPAGE="http://trilinos.sandia.gov/"
+SRC_URI="${P}-Source.tar.bz2"
+
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+LICENSE="BSD LGPL-2.1"
+SLOT="0"
+
+IUSE="
+	adolc arprec boost clp cppunit cuda eigen glpk gtest
+	hdf5 hwloc hypre metis mkl mumps netcdf petsc qd qt4
+	scalapack scotch sparse superlu taucs tbb test threads
+	tvmet yaml zlib
+"
+
+# TODO: fix export cmake function for tests
+RESTRICT="test"
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	virtual/mpi
+	adolc? ( sci-libs/adolc )
+	arprec? ( sci-libs/arprec )
+	boost? ( dev-libs/boost )
+	clp? ( sci-libs/coinor-clp )
+	cuda? ( >=dev-util/nvidia-cuda-toolkit-3.2 )
+	eigen? ( dev-cpp/eigen:3 )
+	gtest? ( dev-cpp/gtest )
+	hdf5? ( sci-libs/hdf5[mpi] )
+	hypre? ( sci-libs/hypre )
+	hwloc? ( sys-apps/hwloc )
+	mkl? ( sci-libs/mkl )
+	metis? ( || ( sci-libs/parmetis sci-libs/metis ) )
+	mumps? ( sci-libs/mumps )
+	netcdf? ( sci-libs/netcdf )
+	petsc? ( sci-libs/petsc )
+	qd? ( sci-libs/qd )
+	qt4? ( dev-qt/qtgui:4 )
+	scalapack? ( virtual/scalapack )
+	scotch? ( sci-libs/scotch )
+	sparse? ( sci-libs/cxsparse sci-libs/umfpack )
+	superlu? ( sci-libs/superlu )
+	taucs? ( sci-libs/taucs )
+	tbb? ( dev-cpp/tbb )
+	tvmet? ( dev-libs/tvmet )
+	yaml? ( dev-cpp/yaml-cpp )
+	zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+S="${WORKDIR}/${P}-Source"
+
+trilinos_conf() {
+	local dirs libs d
+	for d in $($(tc-getPKG_CONFIG) --libs-only-L $1); do
+		dirs="${dirs};${d:2}"
+	done
+	[[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_DIRS=${dirs:1}" )
+	for d in $($(tc-getPKG_CONFIG) --libs-only-l $1); do
+		libs="${libs};${d:2}"
+	done
+	[[ -n ${libs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_NAMES=${libs:1}" )
+	dirs=""
+	for d in $($(tc-getPKG_CONFIG) --cflags-only-I $1); do
+		dirs="${dirs};${d:2}"
+	done
+	[[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_INCLUDE_DIRS=${dirs:1}" )
+}
+
+trilinos_enable() {
+	cmake-utils_use $1 TPL_ENABLE_${2:-${1^^}}
+}
+
+src_configure() {
+
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=ON
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}"
+		-DTrilinos_ENABLE_ALL_PACKAGES=ON
+		-DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos"
+		-DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos"
+		-DTPL_ENABLE_BinUtils=ON
+		-DTPL_ENABLE_MPI=ON
+		-DTPL_ENABLE_BLAS=ON
+		-DTPL_ENABLE_LAPACK=ON
+		$(cmake-utils_use test Trilinos_ENABLE_TESTS)
+		$(trilinos_enable adolc)
+		$(trilinos_enable arprec)
+		$(trilinos_enable boost Boost)
+		$(trilinos_enable boost BoostLib)
+		$(trilinos_enable cppunit Cppunit)
+		$(trilinos_enable clp Clp)
+		$(trilinos_enable cuda)
+		$(trilinos_enable cuda CUSPARSE)
+		$(trilinos_enable cuda Thrust)
+		$(trilinos_enable eigen Eigen)
+		$(trilinos_enable gtest gtest)
+		$(trilinos_enable glpk)
+		$(trilinos_enable hdf5)
+		$(trilinos_enable hwloc)
+		$(trilinos_enable hypre)
+		$(trilinos_enable metis)
+		$(trilinos_enable mkl)
+		$(trilinos_enable mkl PARDISO_MKL)
+		$(trilinos_enable mumps)
+		$(trilinos_enable netcdf Netcdf)
+		$(trilinos_enable petsc)
+		$(trilinos_enable qd)
+		$(trilinos_enable qt4 QT)
+		$(trilinos_enable scalapack)
+		$(trilinos_enable scalapack BLACS)
+		$(trilinos_enable scotch Scotch)
+		$(trilinos_enable sparse AMD)
+		$(trilinos_enable sparse CSparse)
+		$(trilinos_enable sparse UMFPACK)
+		$(trilinos_enable superlu SuperLU)
+		$(trilinos_enable taucs)
+		$(trilinos_enable tbb)
+		$(trilinos_enable threads Pthread)
+		$(trilinos_enable tvmet)
+		$(trilinos_enable yaml yaml-cpp)
+		$(trilinos_enable zlib Zlib)
+	)
+
+	use eigen && \
+		mycmakeargs+=(
+		-DEigen_INCLUDE_DIRS="${EPREFIX}/usr/include/eigen3"
+	)
+	use hypre && \
+		mycmakeargs+=(
+		-DHYPRE_INCLUDE_DIRS="${EPREFIX}/usr/include/hypre"
+	)
+	use scotch && \
+		mycmakeargs+=(
+		-DScotch_INCLUDE_DIRS="${EPREFIX}/usr/include/scotch"
+	)
+
+	# cxsparse is a rewrite of csparse + extras
+	use sparse && \
+		mycmakeargs+=(
+		-DCSparse_LIBRARY_NAMES="cxsparse"
+	)
+
+	# mandatory blas and lapack
+	trilinos_conf blas BLAS
+	trilinos_conf lapack LAPACK
+	use superlu && trilinos_conf superlu SuperLU
+	use metis && trilinos_conf metis METIS
+
+	# blacs library is included in scalapack these days
+	if use scalapack; then
+		trilinos_conf scalapack SCALAPACK
+		mycmakeargs+=(
+			-DBLACS_LIBRARY_NAMES="scalapack"
+			-DBLACS_INCLUDE_DIRS="${EPREFIX}/usr/include/blacs"
+		)
+	fi
+
+	# TODO: do we need that line?
+	export CC=mpicc CXX=mpicxx && tc-export CC CXX
+
+	# cmake-utils eclass patches the base directory CMakeLists.txt
+	# which does not work for complex Trilinos CMake modules
+	CMAKE_BUILD_TYPE=RELEASE cmake-utils_src_configure
+
+	# TODO:
+	# python bindings with python-r1
+	# fix hypre bindings
+	# fix hdf5
+	# cuda/thrust is untested
+	# do we always need mpi? and for all packages: blah[mpi] ?
+	# install docs, examples
+	# see what packages are related, do we need REQUIRED_USE
+	# proper use flags description
+	# add more use flags/packages ?
+}