aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-01-16 20:47:32 +0100
committerJustin Lecher <jlec@gentoo.org>2014-01-18 08:38:34 +0100
commitc1bb2e08bbcadd345080790f1703591670288447 (patch)
tree11bb3de56232a9f19b7ea964c88c6ee65c648cce /dev-cpp/eigen
parentsci-chemistry/avogadro2: New package, written by me (diff)
downloadsci-c1bb2e08bbcadd345080790f1703591670288447.tar.gz
sci-c1bb2e08bbcadd345080790f1703591670288447.tar.bz2
sci-c1bb2e08bbcadd345080790f1703591670288447.zip
dev-cpp/eigen: Backport cmake fix
Package-Manager: portage-2.2.8
Diffstat (limited to 'dev-cpp/eigen')
-rw-r--r--dev-cpp/eigen/ChangeLog8
-rw-r--r--dev-cpp/eigen/Manifest1
-rw-r--r--dev-cpp/eigen/eigen-3.2.0-r1.ebuild102
-rw-r--r--dev-cpp/eigen/metadata.xml14
4 files changed, 117 insertions, 8 deletions
diff --git a/dev-cpp/eigen/ChangeLog b/dev-cpp/eigen/ChangeLog
index 521bc49e2..fc5132694 100644
--- a/dev-cpp/eigen/ChangeLog
+++ b/dev-cpp/eigen/ChangeLog
@@ -1,7 +1,13 @@
# ChangeLog for dev-cpp/eigen
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/eigen/ChangeLog,v 1.44 2011/03/25 16:01:28 jlec Exp $
+*eigen-3.2.0-r1 (16 Jan 2014)
+
+ 16 Jan 2014; Justin Lecher <jlec@gentoo.org> +eigen-3.2.0-r1.ebuild,
+ metadata.xml:
+ Backport cmake fix
+
20 Oct 2013; Honza Macháček <Hloupy.Honza@centrum.cz> eigen-9999.ebuild:
Avoid creating TeX fonts out of the sandbox.
diff --git a/dev-cpp/eigen/Manifest b/dev-cpp/eigen/Manifest
index 069b6be05..6d2fb6df8 100644
--- a/dev-cpp/eigen/Manifest
+++ b/dev-cpp/eigen/Manifest
@@ -1,2 +1,3 @@
DIST eigen-3.1.4.tar.bz2 1052745 SHA256 80ea2d76b649e9ea413090f96c32bd408f07872b50cc6844bc3136e635492414 SHA512 555aea79b5dcdb8a1c15f223bb64191d69012a9f895e15218a2e0478bc7dc3d8a61d257c072ca29cd9e5788541ac0540af45320cfdb4095360dce841dfaba692 WHIRLPOOL b0e52eb7f6a89a75e67a3f0f3ad73abd0e51bfc639960c9f5699ae48c628e6160f6b3059178f4fa5b5212357b7cd5fe31082f06e0bfe1557d4dad1332999d62f
+DIST eigen-3.2.0-cmake.patch 3294 SHA256 2be458affc18b833f31b767b823b1e490e6d0115d040a802eb334c5884c8ad88 SHA512 229c0c1f3d95ae505b5accd1aeba19f59a064218cf9b0d844dbc4c660a4cddb666f818268ba1899370877034a70a87317ca8bf14822e3b85d0bbe7f3bb5c7cf6 WHIRLPOOL ae78de8cc7f3b58749dcfefc6ac4fd96cca84e048b0337b1590d5097b4838c751c237844b4aa996ce75d10e830d406fa52ef68f509d0ae8e21a75fc589a1a6d3
DIST eigen-3.2.0.tar.bz2 1135851 SHA256 011f78960d939227f9276173d0c4cc0053bb9e0a7356539a9a6c7c89d984fab6 SHA512 ab30077c845b09aa3f652e4695f1e256c7c7ff1c0f850e38cf9867ab9659ec6008fa646c2796796ca718b996764e7e3d2811a2c6a24abacbe50a2513fc670ca5 WHIRLPOOL f1cbbc7405173ab1904a6f8272a0b7a558ec37060ce60f51b38e89f762e610844989dc99a3ba09cf34a0e94ca048ad56856adfbe69a4a54fe8c2abfd3d9ef24c
diff --git a/dev-cpp/eigen/eigen-3.2.0-r1.ebuild b/dev-cpp/eigen/eigen-3.2.0-r1.ebuild
new file mode 100644
index 000000000..13eb0f0e1
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.2.0-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+if [[ ${PV} == "9999" ]] ; then
+ _SCM=mercurial
+ EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="
+ http://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2
+ https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
+ "
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+inherit alternatives-2 cmake-utils fortran-2 multilib vcs-snapshot ${_SCM}
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="http://eigen.tuxfamily.org/"
+
+SLOT="3"
+LICENSE="MPL-2.0"
+IUSE="adolc doc fortran fftw gmp mkl sparse static-libs test"
+
+# TODO: support for pastix
+CDEPEND="
+ adolc? ( sci-libs/adolc[sparse?] )
+ fftw? ( >=sci-libs/fftw-3 )
+ gmp? ( dev-libs/gmp dev-libs/mpfr )
+ mkl? ( sci-libs/mkl )
+ sparse? (
+ dev-cpp/sparsehash
+ sci-libs/cholmod[metis]
+ sci-libs/superlu
+ sci-libs/umfpack )"
+DEPEND="
+ doc? ( app-doc/doxygen[dot,latex] )
+ test? ( ${CDEPEND} )"
+
+RDEPEND="
+ !dev-cpp/eigen:0
+ ${CDEPEND}"
+
+PATCHES=(
+ "${DISTDIR}"/${P}-cmake.patch
+ )
+
+src_configure() {
+ # TOFIX: static-libs for blas are always built with PIC
+ # TOFIX: is it worth fixing all the automagic given no library is built?
+ local mycmakeargs=(
+ -DEIGEN_BUILD_BTL=OFF
+ -DEIGEN_TEST_NO_OPENGL=ON
+ $(cmake-utils_use test EIGEN_BUILD_TESTS)
+ $(cmake-utils_use !fortran EIGEN_TEST_NO_FORTRAN)
+ )
+ export VARTEXFONTS="${T}/fonts"
+ CMAKE_BUILD_TYPE="release" cmake-utils_src_configure
+ # lapack not ready yet?
+ use fortran && FORTRAN_LIBS="blas"
+}
+
+src_compile() {
+ local targets="${FORTRAN_LIBS}"
+ use doc && targets+=" doc"
+ use test && targets+=" buildtests"
+ cmake-utils_src_compile ${targets}
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r "${CMAKE_BUILD_DIR}"/doc/html/*
+ local x
+ for x in ${FORTRAN_LIBS}; do
+ local libname="eigen_${x}"
+ cd "${CMAKE_BUILD_DIR}"/${x}
+ dolib.so lib${libname}.so
+ use static-libs && newlib.a lib${libname}_static.a lib${libname}.a
+ cat > ${libname}.pc <<-EOF
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${PN}
+ Description: ${DESCRIPTION} ${x^^} implementation
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -l${libname}
+ Libs.private: -lm
+ $([[ ${x} == lapack ]] && echo "Requires: blas")
+ EOF
+ alternatives_for ${x} eigen 0 \
+ /usr/$(get_libdir)/pkgconfig/${x}.pc ${libname}.pc
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${libname}.pc
+ done
+}
diff --git a/dev-cpp/eigen/metadata.xml b/dev-cpp/eigen/metadata.xml
index a4a932705..a7abef913 100644
--- a/dev-cpp/eigen/metadata.xml
+++ b/dev-cpp/eigen/metadata.xml
@@ -1,23 +1,23 @@
<?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">
Eigen is a lightweight C++ template library for vector and matrix math,
a.k.a. linear algebra. Unlike most other linear algebra libraries, Eigen
focuses on the simple mathematical needs of applications: games and other
OpenGL apps, spreadsheets and other office apps, etc. Eigen is dedicated to
providing optimal speed with GCC.
</longdescription>
-<use>
- <flag name="adolc">
+ <use>
+ <flag name="adolc">
Enable use for automatic differentiation using <pkg>sci-libs/adolc</pkg>
</flag>
- <flag name="mkl">
+ <flag name="mkl">
Use propertary intel blas/lapack implementation through <pkg>sci-libs/mkl</pkg>
</flag>
- <flag name="sparse">
+ <flag name="sparse">
Enable use for extra sparse matrix with <pkg>sci-libs/umfpack</pkg>, <pkg>sci-libs/cholmod</pkg>, <pkg>sci-libs/superlu</pkg> and <pkg>dev-cpp/sparsehash</pkg>
</flag>
-</use>
+ </use>
</pkgmetadata>