summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-02-26 15:13:28 +0100
committerPatrick Lauer <patrick@gentoo.org>2016-02-26 15:14:21 +0100
commitfe368002f2bdb44f834eef33ce21e9852c588c7e (patch)
tree025c7e168a4fc9ce38981ba96c8bfa7a75972204 /dev-cpp/eigen/eigen-3.2.8-r2.ebuild
parentapp-text/libebook: Fix build with boost-1.59, bug 574764 (diff)
downloadgentoo-fe368002f2bdb44f834eef33ce21e9852c588c7e.tar.gz
gentoo-fe368002f2bdb44f834eef33ce21e9852c588c7e.tar.bz2
gentoo-fe368002f2bdb44f834eef33ce21e9852c588c7e.zip
dev-cpp/eigen: Re-fix pkgconfig file
Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-cpp/eigen/eigen-3.2.8-r2.ebuild')
-rw-r--r--dev-cpp/eigen/eigen-3.2.8-r2.ebuild112
1 files changed, 112 insertions, 0 deletions
diff --git a/dev-cpp/eigen/eigen-3.2.8-r2.ebuild b/dev-cpp/eigen/eigen-3.2.8-r2.ebuild
new file mode 100644
index 00000000000..5cc961add28
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.2.8-r2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+FORTRAN_NEEDED="test"
+
+inherit cmake-utils fortran-2
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="http://eigen.tuxfamily.org/"
+SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="LGPL-2 GPL-3"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="altivec debug doc openmp test"
+IUSE+=" cpu_flags_x86_sse2"
+IUSE+=" cpu_flags_x86_sse3"
+IUSE+=" cpu_flags_x86_sse4_1"
+IUSE+=" cpu_flags_x86_sse4_2"
+IUSE+=" cpu_flags_x86_ssse3"
+#IUSE+=" cpu_flags_x86_x87"
+
+RDEPEND="!dev-cpp/eigen:0"
+DEPEND="
+ doc? ( app-doc/doxygen[dot,latex] )
+ test? (
+ dev-libs/gmp:0
+ dev-libs/mpfr:0
+ media-libs/freeglut
+ media-libs/glew
+ sci-libs/adolc
+ sci-libs/cholmod
+ sci-libs/fftw:3.0
+ sci-libs/pastix
+ sci-libs/umfpack
+ sci-libs/scotch
+ sci-libs/spqr
+ sci-libs/superlu
+ dev-qt/qtcore:4
+ virtual/opengl
+ virtual/pkgconfig
+ )
+ "
+# Missing:
+# METIS-5
+# GOOGLEHASH
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.7-pastix-5.2-backport.patch
+ "${FILESDIR}"/${PN}-3.2.7-adaolc-backport.patch
+)
+
+src_unpack() {
+ default
+ mv ${PN}* ${P} || die
+}
+
+src_prepare() {
+ sed \
+ -e 's:-g2::g' \
+ -i cmake/EigenConfigureTesting.cmake || die
+
+ sed -i CMakeLists.txt \
+ -e "/add_subdirectory(demos/d" \
+ || die "sed disable unused bundles failed"
+
+ if ! use test; then
+ sed -i CMakeLists.txt \
+ -e "/add_subdirectory(blas/d" \
+ -e "/add_subdirectory(lapack/d" \
+ || die "sed disable unused bundles failed"
+ fi
+
+ sed -i -e "/Unknown build type/d" CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_compile doc
+}
+
+src_test() {
+ local mycmakeargs=(
+ -DEIGEN_BUILD_TESTS=ON
+ -DEIGEN_TEST_ALTIVEC="$(usex altivec)"
+ -DEIGEN_TEST_OPENMP="$(usex openmp)"
+ -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+ -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+ -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+ -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+ -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+# -DEIGEN_TEST_X87="$(usex cpu_flags_x86_x87)"
+ )
+ cmake-utils_src_configure
+ cmake-utils_src_compile blas
+ cmake-utils_src_compile buildtests
+ cmake-utils_src_test
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc -r "${BUILD_DIR}"/doc/html
+
+ # Debian installs it and some projects started using it.
+ insinto /usr/share/cmake/Modules/
+ doins "${S}/cmake/FindEigen3.cmake"
+}