public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2016-02-24 18:27 Justin Lecher
  0 siblings, 0 replies; 6+ messages in thread
From: Justin Lecher @ 2016-02-24 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     a7f522cb19676c477b48a0c6a51dce9e9f45a3ed
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 18:27:26 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 18:27:39 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7f522cb

dev-cpp/eigen: Forward porting ebuild changes, Backwards the patches

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=575512

Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-cpp/eigen/eigen-3.2.8-r1.ebuild                | 71 +++++++++++++++++++---
 ...ort.patch => eigen-3.2.7-adaolc-backport.patch} |  0
 ...patch => eigen-3.2.7-pastix-5.2-backport.patch} |  0
 3 files changed, 63 insertions(+), 8 deletions(-)

diff --git a/dev-cpp/eigen/eigen-3.2.8-r1.ebuild b/dev-cpp/eigen/eigen-3.2.8-r1.ebuild
index 447ca29..d79230b 100644
--- a/dev-cpp/eigen/eigen-3.2.8-r1.ebuild
+++ b/dev-cpp/eigen/eigen-3.2.8-r1.ebuild
@@ -2,9 +2,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
-inherit cmake-utils
+FORTRAN_NEEDED="test"
+
+inherit cmake-utils fortran-2
 
 DESCRIPTION="C++ template library for linear algebra"
 HOMEPAGE="http://eigen.tuxfamily.org/"
@@ -13,10 +15,43 @@ 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="debug doc"
+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"
 
-DEPEND="doc? ( app-doc/doxygen[dot,latex] )"
 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
@@ -24,14 +59,27 @@ src_unpack() {
 }
 
 src_prepare() {
+	sed \
+		-e 's:-g2::g' \
+		-i cmake/EigenConfigureTesting.cmake || die
+
 	sed -i CMakeLists.txt \
 		-e "/add_subdirectory(demos/d" \
-		-e "/add_subdirectory(blas/d" \
-		-e "/add_subdirectory(lapack/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
 
+	sed \
+		-e '/Cflags/s|:.*|: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}|g' \
+		-i eigen3.pc.in || die
+
 	cmake-utils_src_prepare
 }
 
@@ -43,10 +91,17 @@ src_compile() {
 src_test() {
 	local mycmakeargs=(
 		-DEIGEN_BUILD_TESTS=ON
-		-DEIGEN_TEST_NO_FORTRAN=ON
-		-DEIGEN_TEST_NO_OPENGL=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
 }

diff --git a/dev-cpp/eigen/files/eigen-3.2.8-adaolc-backport.patch b/dev-cpp/eigen/files/eigen-3.2.7-adaolc-backport.patch
similarity index 100%
rename from dev-cpp/eigen/files/eigen-3.2.8-adaolc-backport.patch
rename to dev-cpp/eigen/files/eigen-3.2.7-adaolc-backport.patch

diff --git a/dev-cpp/eigen/files/eigen-3.2.8-pastix-5.2-backport.patch b/dev-cpp/eigen/files/eigen-3.2.7-pastix-5.2-backport.patch
similarity index 100%
rename from dev-cpp/eigen/files/eigen-3.2.8-pastix-5.2-backport.patch
rename to dev-cpp/eigen/files/eigen-3.2.7-pastix-5.2-backport.patch


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2018-09-10 11:36 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2018-09-10 11:36 UTC (permalink / raw
  To: gentoo-commits

commit:     bcda4e0253c1993c78d3fc3891216720fd04abcd
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 10 11:33:50 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep 10 11:36:17 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcda4e02

dev-cpp/eigen: Fix prototype

Closes: https://bugs.gentoo.org/665488
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 dev-cpp/eigen/eigen-3.3.5-r1.ebuild                | 101 +++++++++++++++++++++
 .../eigen/files/eigen-3.3.5-fix-prototype.patch    |  19 ++++
 2 files changed, 120 insertions(+)

diff --git a/dev-cpp/eigen/eigen-3.3.5-r1.ebuild b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
new file mode 100644
index 00000000000..2e8c6f919e8
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED="test"
+inherit cmake-utils cuda 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="MPL-2.0"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="altivec c++11 cuda debug doc neon openmp test" #zvector vsx
+RESTRICT="!test? ( test )"
+
+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[sparse]
+		sci-libs/cholmod
+		sci-libs/fftw:3.0
+		sci-libs/pastix
+		sci-libs/umfpack
+		sci-libs/scotch
+		sci-libs/spqr
+		sci-libs/superlu
+		virtual/opengl
+		virtual/pkgconfig
+		cuda? ( dev-util/nvidia-cuda-toolkit )
+	)
+"
+# Missing:
+# METIS-5
+# GOOGLEHASH
+
+PATCHES=( "${FILESDIR}/${P}-fix-prototype.patch" )
+
+src_unpack() {
+	default
+	mv ${PN}* ${P} || die
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	sed -e 's:-g2::g' \
+		-i cmake/EigenConfigureTesting.cmake || die
+
+	sed -e "/add_subdirectory(demos/d" \
+		-i CMakeLists.txt || die
+
+	if ! use test; then
+		sed -e "/add_subdirectory(test/d" \
+			-i CMakeLists.txt || die
+
+		sed -e "/add_subdirectory(blas/d" \
+			-e "/add_subdirectory(lapack/d" \
+			-i CMakeLists.txt || die
+	fi
+	sed -e "/Unknown build type/d" \
+		-i CMakeLists.txt || die
+
+	use cuda && cuda_src_prepare
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	use doc && cmake-utils_src_compile doc
+}
+
+src_test() {
+	local mycmakeargs=(
+		-DEIGEN_TEST_NOQT=ON
+		-DEIGEN_TEST_ALTIVEC="$(usex altivec)"
+		-DEIGEN_TEST_CXX11="$(usex c++11)"
+		-DEIGEN_TEST_CUDA="$(usex cuda)"
+		-DEIGEN_TEST_OPENMP="$(usex openmp)"
+		-DEIGEN_TEST_NEON64="$(usex neon)"
+	)
+	cmake-utils_src_configure
+	cmake-utils_src_compile blas
+	cmake-utils_src_compile buildtests
+	cmake-utils_src_test
+}
+
+src_install() {
+	use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+	cmake-utils_src_install
+
+	# Debian installs it and some projects started using it.
+	insinto /usr/share/cmake/Modules/
+	doins "${S}/cmake/FindEigen3.cmake"
+}

diff --git a/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
new file mode 100644
index 00000000000..e4d128f502e
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Gael Guennebaud <g.gael@free.fr>
+# Date 1528444561 -7200
+# Node ID 27cac8430247a65739fcd0b83ef984d0a9c010c7
+# Parent  d4cbff8d06baf95045869ed7d0c012d641c88fcf
+fix prototype
+
+diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
+--- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
++++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
+@@ -173,7 +173,7 @@
+   /** 
+    * Set the restart value (default is 30)  
+    */
+-  Index set_restart(const Index restart) { m_restart=restart; }
++  void set_restart(const Index restart) { m_restart=restart; }
+   
+   /** 
+    * Set the number of eigenvalues to deflate at each restart 
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2020-07-21 15:50 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2020-07-21 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     d402f6a2790e3383890aefc340ff7e0b96cee949
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 21 13:21:45 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 21 15:50:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d402f6a2

dev-cpp/eigen: EAPI-7 bump, switch to cmake.eclass

- Update HOMEPAGE
- Drop IUSE="c++11", build was broken anyway with it disabled
- Drop obsolete slot 0 blocker
- Sort dependencies
- Drop useless src_unpack(), just define ${S} instead
- Properly configure CMAKEPACKAGE_INSTALL_DIR instead of manual doins
- configure in src_configure, compile in src_compile, drop src_test()
- Drop obsolete -g2 removal
- Consolidate and improve conditional !test seds
- Replace CMAKE_BUILD_TYPE override sed with patch
- Change FindEigen3.cmake module install path

Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-cpp/eigen/eigen-3.3.7-r1.ebuild                | 100 +++++++++++++++++++++
 dev-cpp/eigen/files/eigen-3.3.7-gentoo-cmake.patch |  24 +++++
 2 files changed, 124 insertions(+)

diff --git a/dev-cpp/eigen/eigen-3.3.7-r1.ebuild b/dev-cpp/eigen/eigen-3.3.7-r1.ebuild
new file mode 100644
index 00000000000..ed987bda82b
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.3.7-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="http://eigen.tuxfamily.org/index.php?title=Main_Page"
+SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="MPL-2.0"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_ppc_vsx cuda debug doc openmp test" #zvector
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	doc? (
+		app-doc/doxygen[dot]
+		dev-texlive/texlive-bibtexextra
+		dev-texlive/texlive-fontsextra
+		dev-texlive/texlive-fontutils
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexextra
+	)
+	test? ( virtual/pkgconfig )
+"
+DEPEND="
+	cuda? ( dev-util/nvidia-cuda-toolkit )
+	test? (
+		dev-libs/gmp:0
+		dev-libs/mpfr:0
+		media-libs/freeglut
+		media-libs/glew
+		sci-libs/adolc[sparse]
+		sci-libs/cholmod
+		sci-libs/fftw:3.0
+		sci-libs/pastix
+		sci-libs/scotch
+		sci-libs/spqr
+		sci-libs/superlu
+		sci-libs/umfpack
+		virtual/opengl
+	)
+"
+# Missing:
+# METIS-5
+# GOOGLEHASH
+
+S="${WORKDIR}/${PN}-${PN}-323c052e1731"
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo-cmake.patch )
+
+src_prepare() {
+	cmake_src_prepare
+
+	cmake_comment_add_subdirectory demos
+
+	if ! use test; then
+		sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+			-i CMakeLists.txt || die
+	fi
+
+	use cuda && cuda_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKEPACKAGE_INSTALL_DIR="${EPREFIX}"/usr/$(get_libdir)/cmake/${PN}${SLOT}
+	)
+	use test && mycmakeargs+=(
+		-DEIGEN_TEST_CXX11=ON
+		-DEIGEN_TEST_NOQT=ON
+		-DEIGEN_TEST_ALTIVEC=$(usex cpu_flags_ppc_altivec)
+		-DEIGEN_TEST_CUDA=$(usex cuda)
+		-DEIGEN_TEST_OPENMP=$(usex openmp)
+		-DEIGEN_TEST_NEON64=$(usex cpu_flags_arm_neon)
+		-DEIGEN_TEST_VSX=$(usex cpu_flags_ppc_vsx)
+	)
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+	use doc && cmake_src_compile doc
+	if use test; then
+		cmake_src_compile blas
+		cmake_src_compile buildtests
+	fi
+}
+
+src_install() {
+	use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+	cmake_src_install
+}

diff --git a/dev-cpp/eigen/files/eigen-3.3.7-gentoo-cmake.patch b/dev-cpp/eigen/files/eigen-3.3.7-gentoo-cmake.patch
new file mode 100644
index 00000000000..0389cd3b933
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.7-gentoo-cmake.patch
@@ -0,0 +1,24 @@
+Let us properly override with CMAKE_BUILD_TYPE=Gentoo
+
+--- a/CMakeLists.txt	2018-12-11 18:57:55.000000000 +0100
++++ b/CMakeLists.txt	2020-07-21 16:43:33.467680534 +0200
+@@ -14,18 +14,7 @@
+ set(Eigen_BINARY_DIR ${Eigen3_BINARY_DIR})
+ 
+ # guard against bad build-type strings
+-
+-if (NOT CMAKE_BUILD_TYPE)
+-  set(CMAKE_BUILD_TYPE "Release")
+-endif()
+-
+-string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+-
++# yeah no.
+ 
+ #############################################################################
+ # retrieve version infomation                                               #


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2020-12-14 21:04 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2020-12-14 21:04 UTC (permalink / raw
  To: gentoo-commits

commit:     9f6c2af0a63c4da5f8a78a628dbd15fe9038c281
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 21:04:14 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 21:04:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f6c2af0

dev-cpp/eigen: Version bump to 3.3.9

Bug: https://bugs.gentoo.org/712808
Bug: https://bugs.gentoo.org/754327
Closes: https://bugs.gentoo.org/759961
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-cpp/eigen/Manifest                             |   1 +
 dev-cpp/eigen/eigen-3.3.9.ebuild                   | 107 +++++++++++++++++++++
 .../eigen-3.3.9-disable-cholmod_support.patch      |  20 ++++
 dev-cpp/eigen/files/eigen-3.3.9-max-macro.patch    |  17 ++++
 4 files changed, 145 insertions(+)

diff --git a/dev-cpp/eigen/Manifest b/dev-cpp/eigen/Manifest
index 3f46b99e025..a412a3a8629 100644
--- a/dev-cpp/eigen/Manifest
+++ b/dev-cpp/eigen/Manifest
@@ -1,3 +1,4 @@
 DIST eigen-3.3.7-gitlab.tar.bz2 1663474 BLAKE2B 70c2f6305ca205d62755cf5e90961088938b8daf56b7cc27abf52f0731064858ada523009d6bf5f014e24b34ceeafe59f918c385d12ccfe249ddb675e13d37a8 SHA512 ea3f1570de3be9ec230d2fbd0f2ae246bf5fd13da79835bf546eb31524796f26f9f633ee779f77942b370a8d540c5cbbd8dd033ccec53a44b692c7e407d6266f
 DIST eigen-3.3.7.tar.bz2 1665168 BLAKE2B 544d35d1c7a4125affa094c6aa372c2aeca4e99bc60c496ff393d538c1c467b454491a772121450e3a1a43a582d073b4b7584918354d0b9175121fde88947c4b SHA512 c12bfd034d0a1112bf2df3f773ad98f36b2b53fbbfceac5f143ee1793322746fb8a6546d7db7da2a1000da6a535bd8cea0c4125b549afc90a6570743b02dcf3d
 DIST eigen-3.3.8.tar.gz 2141903 BLAKE2B c33e699ba08338e7b9b215c9466e161229164ed3c466ce3d760c6917749af33c0414c3bc4bbdd216e3466e69ece8a38ca8beb78b7e0f1609894df6bb4a7fcca3 SHA512 5b4b5985b0294e07b3ed1155720cbbfea322fe9ccad0fc8b0a10060b136a9169a15d5b9cb7a434470cadd45dff0a43049edc20d2e1070005481a120212edc355
+DIST eigen-3.3.9.tar.gz 2142379 BLAKE2B 437dc190fdf7a416d0a5cf81703ef4cc73c195f0f3e7c853e0ab38cf904608ddd4485cc4e15eb0cd5e3c401276f270f3c86f538f205cc91b8c83e131d1bc916d SHA512 16244cc89f2e1879543232b965cbf653b3ccf10e967c8c437a41e27d8320392bdf584d8c24b8a97406ab7d1481d5154da74e0702ec1334ae6a46de83f4573a46

diff --git a/dev-cpp/eigen/eigen-3.3.9.ebuild b/dev-cpp/eigen/eigen-3.3.9.ebuild
new file mode 100644
index 00000000000..27c31cc3550
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.3.9.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="http://eigen.tuxfamily.org/index.php?title=Main_Page"
+SRC_URI="https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_ppc_vsx cuda debug doc openmp test" #zvector
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	doc? (
+		app-doc/doxygen[dot]
+		dev-texlive/texlive-bibtexextra
+		dev-texlive/texlive-fontsextra
+		dev-texlive/texlive-fontutils
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexextra
+	)
+	test? ( virtual/pkgconfig )
+"
+DEPEND="
+	cuda? ( dev-util/nvidia-cuda-toolkit )
+	test? (
+		dev-libs/gmp:0
+		dev-libs/mpfr:0
+		media-libs/freeglut
+		media-libs/glew
+		sci-libs/adolc[sparse]
+		sci-libs/cholmod
+		sci-libs/fftw:3.0
+		sci-libs/pastix
+		sci-libs/scotch
+		sci-libs/spqr
+		sci-libs/superlu
+		sci-libs/umfpack
+		virtual/opengl
+	)
+"
+# Missing:
+# METIS-5
+# GOOGLEHASH
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch
+	"${FILESDIR}"/${PN}-3.3.9-max-macro.patch
+	# disable the cholmod tests, they always fail
+	"${FILESDIR}"/${PN}-3.3.9-disable-cholmod_support.patch
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	cmake_comment_add_subdirectory demos
+
+	if ! use test; then
+		sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+			-i CMakeLists.txt || die
+	fi
+
+	use cuda && cuda_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKEPACKAGE_INSTALL_DIR=$(get_libdir)/cmake/${PN}${SLOT}
+	)
+	use test && mycmakeargs+=(
+		# the OpenGL testsuite is extremely brittle, bug #712808
+		-DEIGEN_TEST_NO_OPENGL=ON
+		-DEIGEN_TEST_CXX11=ON
+		-DEIGEN_TEST_NOQT=ON
+		-DEIGEN_TEST_ALTIVEC=$(usex cpu_flags_ppc_altivec)
+		-DEIGEN_TEST_CUDA=$(usex cuda)
+		-DEIGEN_TEST_OPENMP=$(usex openmp)
+		-DEIGEN_TEST_NEON64=$(usex cpu_flags_arm_neon)
+		-DEIGEN_TEST_VSX=$(usex cpu_flags_ppc_vsx)
+	)
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+	if use doc; then
+		cmake_src_compile doc
+		HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+	fi
+	if use test; then
+		cmake_src_compile blas
+		cmake_src_compile buildtests
+
+		# tests generate random data, which
+		# obviously fails for some seeds
+		export EIGEN_SEED=712808
+	fi
+}

diff --git a/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch b/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch
new file mode 100644
index 00000000000..e3b9db5a170
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch
@@ -0,0 +1,20 @@
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -46,16 +46,7 @@
+ 
+ set(SPARSE_LIBS " ")
+ 
+-find_package(Cholmod)
+-if(CHOLMOD_FOUND)
+-  add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
+-  include_directories(${CHOLMOD_INCLUDES})
+-  set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
+-  set(CHOLMOD_ALL_LIBS  ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
+-  ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
+-else()
+-  ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
+-endif()
++ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
+ 
+ find_package(Umfpack)
+ if(UMFPACK_FOUND)

diff --git a/dev-cpp/eigen/files/eigen-3.3.9-max-macro.patch b/dev-cpp/eigen/files/eigen-3.3.9-max-macro.patch
new file mode 100644
index 00000000000..c5fdc2ed582
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.9-max-macro.patch
@@ -0,0 +1,17 @@
+--- a/unsupported/test/forward_adolc.cpp
++++ b/unsupported/test/forward_adolc.cpp
+@@ -7,12 +7,13 @@
+ // Public License v. 2.0. If a copy of the MPL was not distributed
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ 
+-#include "main.h"
+ #include <Eigen/Dense>
+ 
+ #define NUMBER_DIRECTIONS 16
+ #include <unsupported/Eigen/AdolcForward>
+ 
++#include "main.h"
++
+ template<typename Vector>
+ EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)
+ {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2021-12-29 15:42 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2021-12-29 15:42 UTC (permalink / raw
  To: gentoo-commits

commit:     16201b90f28703f497ad9be073725fddcb55732f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 29 14:30:11 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 15:41:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16201b90

dev-cpp/eigen: Don't compress (and duplicate) html doc dir

Closes: https://bugs.gentoo.org/830064
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-cpp/eigen/eigen-3.4.0-r1.ebuild                  |  1 +
 dev-cpp/eigen/files/eigen-3.4.0-doc-nocompress.patch | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/dev-cpp/eigen/eigen-3.4.0-r1.ebuild b/dev-cpp/eigen/eigen-3.4.0-r1.ebuild
index efe66bd9b8a6..f9c413a6790b 100644
--- a/dev-cpp/eigen/eigen-3.4.0-r1.ebuild
+++ b/dev-cpp/eigen/eigen-3.4.0-r1.ebuild
@@ -54,6 +54,7 @@ DEPEND="
 PATCHES=(
 	#"${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch
 	"${FILESDIR}"/${PN}-3.3.9-max-macro.patch
+	"${FILESDIR}"/${P}-doc-nocompress.patch # bug 830064
 )
 
 src_prepare() {

diff --git a/dev-cpp/eigen/files/eigen-3.4.0-doc-nocompress.patch b/dev-cpp/eigen/files/eigen-3.4.0-doc-nocompress.patch
new file mode 100644
index 000000000000..b9c252ebb09c
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.4.0-doc-nocompress.patch
@@ -0,0 +1,15 @@
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -112,11 +112,7 @@
+   COMMAND doxygen
+   COMMAND doxygen Doxyfile-unsupported
+   COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_BINARY_DIR}/doc/html/group__TopicUnalignedArrayAssert.html ${Eigen_BINARY_DIR}/doc/html/TopicUnalignedArrayAssert.html
+-  COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
+-  COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz eigen-doc/unsupported/_formulas.log eigen-doc/_formulas.log
+-  COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc.tgz eigen-doc
+-  COMMAND ${CMAKE_COMMAND} -E rename eigen-doc.tgz eigen-doc/eigen-doc.tgz
+-  COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
++  COMMAND ${CMAKE_COMMAND} -E remove html/unsupported/_formulas.log html/_formulas.log
+   WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
+ 
+ add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/
@ 2024-07-16 23:04 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2024-07-16 23:04 UTC (permalink / raw
  To: gentoo-commits

commit:     c7a9b7d8cdac586964c6f68ba8095ba7471f37b9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 23:03:41 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 23:03:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7a9b7d8

dev-cpp/eigen: properly guard VSX use

Fixes build on VSX-less ppc* hardware.

Closes: https://bugs.gentoo.org/936107
Thanks-to: jonys <vidra.jonas <AT> seznam.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/eigen/eigen-3.4.0-r3.ebuild              | 458 +++++++++++++++++++++++
 dev-cpp/eigen/files/eigen-3.4.0-ppc-no-vsx.patch | 195 ++++++++++
 2 files changed, 653 insertions(+)

diff --git a/dev-cpp/eigen/eigen-3.4.0-r3.ebuild b/dev-cpp/eigen/eigen-3.4.0-r3.ebuild
new file mode 100644
index 000000000000..c39a0ba39812
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.4.0-r3.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2 llvm toolchain-funcs
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="https://eigen.tuxfamily.org/index.php?title=Main_Page"
+
+if [[ ${PV} = *9999* ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.com/lib${PN}/${PN}.git"
+	if [[ ${PV} = 3.4.9999* ]] ; then
+		EGIT_COMMIT="3.4"
+	fi
+else
+	SRC_URI="
+		https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2
+		test? ( lapack? ( https://downloads.tuxfamily.org/${PN}/lapack_addons_3.4.1.tgz -> ${PN}-lapack_addons-3.4.1.tgz ) )
+	"
+	KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+LICENSE="MPL-2.0"
+SLOT="3"
+
+# The following lines are shamelessly stolen from ffmpeg-9999.ebuild with modifications
+ARM_CPU_FEATURES=(
+	neon:NEON
+)
+PPC_CPU_FEATURES=(
+	altivec:ALTIVEC
+	vsx:VSX
+)
+X86_CPU_FEATURES=(
+	avx:AVX
+	avx2:AVX2
+	avx512f:AVX512
+	avx512dq:AVX512DQ
+	f16c:FP16C
+	fma3:FMA
+	popcnt:POPCNT
+	sse:SSE
+	sse2:SSE2
+	sse3:SSE3
+	ssse3:SSSE3
+	sse4_1:SSE4_1
+	sse4_2:SSE4_2
+)
+# MIPS_CPU_FEATURES=(
+# 	msa:MSA
+# )
+# S390_CPU_FEATURES=(
+# 	z13:Z13
+# 	z14:Z14
+# )
+
+CPU_FEATURES_MAP=(
+	"${ARM_CPU_FEATURES[@]/#/cpu_flags_arm_}"
+	"${PPC_CPU_FEATURES[@]/#/cpu_flags_ppc_}"
+	"${X86_CPU_FEATURES[@]/#/cpu_flags_x86_}"
+	# "${MIPS_CPU_FEATURES[@]/#/cpu_flags_mips_}"
+	# "${S390_CPU_FEATURES[@]/#/cpu_flags_s390_}"
+)
+
+IUSE_TEST_BACKENDS=(
+	"adolc"
+	"boost"
+	"cholmod"
+	"fftw"
+	"klu"
+	"opengl"
+	"openmp"
+	"pastix"
+	"sparsehash"
+	"spqr"
+	"superlu"
+	"umfpack"
+)
+
+IUSE="${CPU_FEATURES_MAP[*]%:*} clang cuda hip debug doc lapack mathjax test ${IUSE_TEST_BACKENDS[*]}" #zvector
+
+# Tests failing again because of compiler issues
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	doc? (
+		app-text/doxygen[dot]
+		dev-texlive/texlive-bibtexextra
+		dev-texlive/texlive-fontsextra
+		dev-texlive/texlive-fontutils
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexextra
+		mathjax? ( dev-libs/mathjax )
+	)
+	test? ( virtual/pkgconfig )
+"
+
+# METIS
+# MPREAL
+# dev-libs/mpfr:0
+# dev-libs/gmp:0
+
+TEST_BACKENDS="
+		boost? ( dev-libs/boost )
+		adolc? ( sci-libs/adolc[sparse] )
+		cholmod? ( sci-libs/cholmod:= )
+		fftw? ( sci-libs/fftw )
+		spqr? ( sci-libs/spqr )
+		klu? ( sci-libs/klu )
+		opengl? (
+			media-libs/freeglut
+			media-libs/glew
+			media-libs/libglvnd
+		)
+		pastix? ( sci-libs/pastix[-mpi] )
+		sparsehash? (
+			amd64? ( dev-cpp/sparsehash )
+			arm64? ( dev-cpp/sparsehash )
+			ppc64? ( dev-cpp/sparsehash )
+			x86?   ( dev-cpp/sparsehash )
+		)
+		superlu? ( sci-libs/superlu )
+		umfpack? ( sci-libs/umfpack )
+"
+DEPEND="
+	test? (
+		cuda? (
+			!clang? (
+				dev-util/nvidia-cuda-toolkit
+			)
+			clang? (
+				sys-devel/clang[llvm_targets_NVPTX]
+				openmp? ( sys-libs/libomp[llvm_targets_NVPTX,offload] )
+			)
+		)
+		hip? ( dev-util/hip )
+		lapack? ( virtual/lapacke )
+		${TEST_BACKENDS}
+	)
+"
+
+REQUIRED_USE="
+	test? ( !lapack )
+	|| ( ${IUSE_TEST_BACKENDS[*]} )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.3.9-max-macro.patch"
+	"${FILESDIR}/${PN}-3.4.0-doc-nocompress.patch" # bug 830064
+	"${FILESDIR}/${PN}-3.4.0-buildstring.patch"
+	"${FILESDIR}/${PN}-3.4.0-noansi.patch"
+	"${FILESDIR}/${PN}-3.4.0-cxxstandard.patch"
+	"${FILESDIR}/${PN}-3.4.0-ppc-no-vsx.patch" # bug 936107
+)
+
+# TODO should be in cuda.eclass
+cuda_set_CUDAHOSTCXX() {
+	local compiler
+	tc-is-gcc && compiler="gcc"
+	tc-is-clang && compiler="clang"
+	[[ -z "$compiler" ]] && die "no compiler specified"
+
+	local package="sys-devel/${compiler}"
+	local version="${package}"
+	local CUDAHOSTCXX_test
+	while
+		CUDAHOSTCXX="${CUDAHOSTCXX_test}"
+		version=$(best_version "${version}")
+		if [[ -z "${version}" ]]; then
+			if [[ -z "${CUDAHOSTCXX}" ]]; then
+				die "could not find supported version of ${package}"
+			fi
+			break
+		fi
+		CUDAHOSTCXX_test="$(
+			dirname "$(
+				realpath "$(
+					which "${compiler}-$(echo "${version}" | grep -oP "(?<=${package}-)[0-9]*")"
+				)"
+			)"
+		)"
+		version="<${version}"
+	do ! echo "int main(){}" | nvcc "-ccbin ${CUDAHOSTCXX_test}" - -x cu &>/dev/null; done
+
+	export CUDAHOSTCXX
+}
+
+pkg_setup() {
+	use test && use cuda && use clang && llvm_pkg_setup
+}
+
+src_unpack() {
+	if [[ ${PV} = *9999* ]] ; then
+		git-r3_src_unpack
+	else
+		unpack "${P}.tar.bz2"
+
+		if use test && use lapack; then
+			cd "${S}/lapack" || die
+			unpack "${PN}-lapack_addons-3.4.1.tgz"
+		fi
+	fi
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	sed \
+		-e "/add_subdirectory(bench\/spbench/s/^/#DONOTCOMPILE /g" \
+		-e "/add_subdirectory(demos/s/^/#DONOTCOMPILE /g" \
+		-i CMakeLists.txt || die
+
+	if ! use test; then
+		sed \
+			-e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(scripts/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(failtest/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+			-e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+			-i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS="yes"
+		-DBUILD_TESTING="$(usex test)"
+
+		-DEIGEN_BUILD_DOC="$(usex doc)" # Enable creation of Eigen documentation
+		-DEIGEN_BUILD_PKGCONFIG="yes" # Build pkg-config .pc file for Eigen
+	)
+	if use doc || use test; then
+		mycmakeargs+=(
+			# needs Qt4
+			-DEIGEN_TEST_NOQT="yes" # Disable Qt support in unit tests
+		)
+	fi
+
+	if use doc; then
+		mycmakeargs+=(
+			-DEIGEN_DOC_USE_MATHJAX="$(usex mathjax)" # Use MathJax for rendering math in HTML docs
+			-DEIGEN_INTERNAL_DOCUMENTATION=no # Build internal documentation
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			# the OpenGL testsuite is extremely brittle, bug #712808
+			-DOpenGL_GL_PREFERENCE="GLVND"
+			-DEIGEN_TEST_OPENGL="$(usex opengl)" # Enable OpenGL support in unit tests
+			-DEIGEN_TEST_OPENMP="$(usex openmp)" # Enable/Disable OpenMP in tests/examples
+
+			-DCMAKE_DISABLE_FIND_PACKAGE_MPREAL=ON
+
+			-DEIGEN_TEST_CXX11=yes
+
+			# -DEIGEN_TEST_CUSTOM_CXX_FLAGS= # Additional compiler flags when compiling unit tests.
+			# -DEIGEN_TEST_CUSTOM_LINKER_FLAGS= # Additional linker flags when linking unit tests.
+			# -DEIGEN_TEST_BUILD_FLAGS= # Options passed to the build command of unit tests
+
+			# -DEIGEN_BUILD_BTL=yes # Build benchmark suite
+
+			-DEIGEN_TEST_BUILD_DOCUMENTATION="$(usex doc)" # Test building the doxygen documentation
+
+			# -DEIGEN_COVERAGE_TESTING=no # Enable/disable gcov
+			# -DEIGEN_CTEST_ERROR_EXCEPTION= # Regular expression for build error messages to be filtered out
+			# -DEIGEN_DEBUG_ASSERTS=no # Enable advanced debugging of assertions
+			# -DEIGEN_NO_ASSERTION_CHECKING=no # Disable checking of assertions using exceptions
+			# -DEIGEN_TEST_NO_EXCEPTIONS=no # Disables C++ exceptions
+			# -DEIGEN_TEST_NO_EXPLICIT_ALIGNMENT=no # Disable explicit alignment (hence vectorization) in tests/examples
+			# -DEIGEN_TEST_NO_EXPLICIT_VECTORIZATION=no # Disable explicit vectorization in tests/examples
+
+			# -DEIGEN_DASHBOARD_BUILD_TARGET=buildtests # Target to be built in dashboard mode, default is buildtests
+
+			# -DEIGEN_DEFAULT_TO_ROW_MAJOR=no # Use row-major as default matrix storage order
+
+			# -DEIGEN_TEST_MATRIX_DIR=yes # Enable testing of realword sparse matrices contained in the specified path
+			# -DEIGEN_TEST_MAX_SIZE=320 # Maximal matrix/vector size, default is 320
+			# -DEIGEN_SPLIT_LARGE_TESTS=no # Split large tests into smaller executables
+		)
+
+		use !adolc      && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Adolc="TRUE" )
+		use !boost      && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Boost="TRUE" )
+		use !cholmod    && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_CHOLMOD="TRUE" )
+		use !fftw       && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_FFTW="TRUE" )
+		use !sparsehash && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_GoogleHash="TRUE" )
+		use !klu        && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KLU="TRUE" )
+		use !opengl     && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL="TRUE" )
+		use !openmp     && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP="TRUE" )
+		use !pastix     && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_PASTIX="TRUE" )
+		use !spqr       && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SPQR="TRUE" )
+		use !superlu    && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU="TRUE" )
+		use !umfpack    && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_UMFPACK="TRUE" )
+
+		if use lapack; then
+			mycmakeargs+=(
+				-DEIGEN_ENABLE_LAPACK_TESTS=yes
+				-DEIGEN_TEST_EXTERNAL_BLAS=yes # Use external BLAS library for testsuite
+				-DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON
+			)
+		fi
+
+		if use arm; then
+			mycmakeargs+=(
+				-DEIGEN_TEST_NEON="$(usex cpu_flags_arm_neon)"
+			)
+		fi
+
+		if use arm64; then
+			mycmakeargs+=(
+				-DEIGEN_TEST_NEON64="$(usex cpu_flags_arm_neon)"
+			)
+		fi
+
+		if use ppc || use ppc64; then
+			mycmakeargs+=(
+				-DEIGEN_TEST_ALTIVEC="$(usex cpu_flags_ppc_altivec)"
+				-DEIGEN_TEST_VSX="$(usex cpu_flags_ppc_vsx)"
+			)
+		fi
+
+		if use amd64 || use x86; then
+			mycmakeargs+=(
+				# -DEIGEN_TEST_32BIT=no # Force generating 32bit code.
+				# -DEIGEN_TEST_X87=no # Force using X87 instructions. Implies no vectorization.
+				-DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+				-DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+				-DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+				-DEIGEN_TEST_FMA="$(usex cpu_flags_x86_fma3)"
+				-DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+				-DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+				-DEIGEN_TEST_AVX="$(usex cpu_flags_x86_avx)"
+				-DEIGEN_TEST_F16C="$(usex cpu_flags_x86_f16c)"
+				-DEIGEN_TEST_AVX2="$(usex cpu_flags_x86_avx2)"
+				-DEIGEN_TEST_AVX512="$(usex cpu_flags_x86_avx512f)"
+				-DEIGEN_TEST_AVX512DQ="$(usex cpu_flags_x86_avx512dq)"
+			)
+		fi
+
+		if use mips; then
+			mycmakeargs+=(
+				# -DEIGEN_TEST_MSA=no # Enable/Disable MSA in tests/examples
+			)
+		fi
+
+		if use s390; then
+			mycmakeargs+=(
+				# -DEIGEN_TEST_Z13=no # Enable/Disable S390X(zEC13) ZVECTOR in tests/examples
+				# -DEIGEN_TEST_Z14=no # Enable/Disable S390X(zEC14) ZVECTOR in tests/examples
+			)
+		fi
+
+		mycmakeargs+=(
+			-DEIGEN_TEST_CUDA="$(usex cuda)" # Enable CUDA support in unit tests
+			-DEIGEN_TEST_CUDA_CLANG="$(usex cuda "$(usex clang)")" # Use clang instead of nvcc to compile the CUDA tests
+
+			-DEIGEN_TEST_HIP="$(usex hip)" # Add HIP support.
+
+			# -DEIGEN_TEST_SYCL=no # Add Sycl support.
+			# -DEIGEN_SYCL_TRISYCL=no # Use the triSYCL Sycl implementation (ComputeCPP by default).
+		)
+
+		if use cuda; then
+			cuda_add_sandbox -w
+			if use clang; then
+				local llvm_prefix
+				llvm_prefix="$(get_llvm_prefix -b)"
+				export CC="${llvm_prefix}/bin/clang"
+				export CXX="${llvm_prefix}/bin/clang++"
+				export LIBRARY_PATH="${ESYSROOT}/usr/$(get_libdir)"
+			else
+				cuda_set_CUDAHOSTCXX
+				mycmakeargs+=(
+					-DCUDA_HOST_COMPILER="${CUDAHOSTCXX}"
+				)
+			fi
+			if [[ "${CUDA_VERBOSE}" == true ]]; then
+				mycmakeargs+=(
+					-DCUDA_VERBOSE_BUILD=yes
+				)
+				NVCCFLAGS+=" -v"
+			fi
+
+			export CUDAFLAGS="${NVCCFLAGS}"
+
+			[[ -z "${CUDAARCHS}" ]] && einfo "trying to determine host CUDAARCHS"
+			: "${CUDAARCHS:=$(__nvcc_device_query)}"
+			export CUDAARCHS
+
+			mycmakeargs+=(
+				-DEIGEN_CUDA_COMPUTE_ARCH="${CUDAARCHS}"
+			)
+		fi
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	local targets=()
+	if use doc; then
+		targets+=( doc )
+		HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+	fi
+	if use test; then
+		targets+=( buildtests )
+		if ! use lapack; then
+			targets+=( blas )
+		fi
+		# tests generate random data, which
+		# obviously fails for some seeds
+		export EIGEN_SEED=712808
+	fi
+
+	if use doc || use test; then
+		cmake_src_compile "${targets[@]}"
+	fi
+}
+
+src_test() {
+	CMAKE_SKIP_TESTS=(
+		product_small_32           #  143 (Subprocess aborted)
+		product_small_33           #  144 (Subprocess aborted)
+
+		eigensolver_selfadjoint_13 #  452 (Subprocess aborted)
+
+		cholmod_support_21         #  726 (Subprocess aborted)
+		cholmod_support_22         #  727 (Subprocess aborted)
+
+		NonLinearOptimization      #  930 (Subprocess aborted)
+		openglsupport              #  990 (Failed)
+		levenberg_marquardt        # 1020 (Subprocess aborted)
+	)
+
+	if use cuda ; then
+		cuda_add_sandbox -w
+
+		CMAKE_SKIP_TESTS+=(
+			cxx11_tensor_cast_float16_gpu
+			cxx11_tensor_gpu_5
+		)
+	fi
+
+	if use lapack ; then
+		CMAKE_SKIP_TESTS+=(
+			"^LAPACK-.*$"
+		)
+	fi
+
+	local myctestargs=(
+		-j1 # otherwise breaks due to cmake reruns
+	)
+
+	cmake_src_test
+}

diff --git a/dev-cpp/eigen/files/eigen-3.4.0-ppc-no-vsx.patch b/dev-cpp/eigen/files/eigen-3.4.0-ppc-no-vsx.patch
new file mode 100644
index 000000000000..7cfeaaf129ff
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.4.0-ppc-no-vsx.patch
@@ -0,0 +1,195 @@
+https://gitlab.com/libeigen/eigen/-/merge_requests/1028
+https://bugs.gentoo.org/936107
+--- a/Eigen/Core
++++ b/Eigen/Core
+@@ -346,7 +346,7 @@
+ #include "src/Core/CoreIterators.h"
+ #include "src/Core/ConditionEstimator.h"
+ 
+-#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
++#if defined(EIGEN_VECTORIZE_VSX)
+   #include "src/Core/arch/AltiVec/MatrixProduct.h"
+ #elif defined EIGEN_VECTORIZE_NEON
+   #include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
+--- a/Eigen/src/Core/arch/AltiVec/Complex.h
++++ b/Eigen/src/Core/arch/AltiVec/Complex.h
+@@ -100,6 +100,7 @@
+     HasAbs2   = 0,
+     HasMin    = 0,
+     HasMax    = 0,
++    HasSqrt   = 1,
+ #ifdef __VSX__
+     HasBlend  = 1,
+ #endif
+@@ -320,6 +321,7 @@
+     HasAbs2   = 0,
+     HasMin    = 0,
+     HasMax    = 0,
++    HasSqrt   = 1,
+     HasSetLinear = 0
+   };
+ };
+--- a/Eigen/src/Core/arch/AltiVec/MathFunctions.h
++++ b/Eigen/src/Core/arch/AltiVec/MathFunctions.h
+@@ -40,16 +40,14 @@
+   return pcos_float(_x);
+ }
+ 
++#ifdef __VSX__
+ #ifndef EIGEN_COMP_CLANG
+ template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
+ Packet4f prsqrt<Packet4f>(const Packet4f& x)
+ {
+   return  vec_rsqrt(x);
+ }
+-#endif
+ 
+-#ifdef __VSX__
+-#ifndef EIGEN_COMP_CLANG
+ template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
+ Packet2d prsqrt<Packet2d>(const Packet2d& x)
+ {
+@@ -74,6 +72,26 @@
+ {
+   return pexp_double(_x);
+ }
++
++template<> EIGEN_STRONG_INLINE Packet8bf psqrt<Packet8bf> (const Packet8bf& a){
++  BF16_TO_F32_UNARY_OP_WRAPPER(psqrt<Packet4f>, a);
++}
++
++#ifndef EIGEN_COMP_CLANG
++template<> EIGEN_STRONG_INLINE Packet8bf prsqrt<Packet8bf> (const Packet8bf& a){
++  BF16_TO_F32_UNARY_OP_WRAPPER(prsqrt<Packet4f>, a);
++}
++#endif
++#else
++template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
++Packet4f psqrt<Packet4f>(const Packet4f& x)
++{
++  Packet4f a;
++  for (Index i = 0; i < packet_traits<float>::size; i++) {
++    a[i] = numext::sqrt(x[i]);
++  }
++  return a;
++}
+ #endif
+ 
+ // Hyperbolic Tangent function.
+--- a/Eigen/src/Core/arch/AltiVec/PacketMath.h
++++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h
+@@ -175,16 +175,19 @@
+ #else
+     HasRsqrt = 0,
+ #endif
++    HasTanh = EIGEN_FAST_MATH,
++    HasErf = EIGEN_FAST_MATH,
++    HasRint = 1,
+ #else
+     HasSqrt = 0,
+     HasRsqrt = 0,
+-    HasTanh = EIGEN_FAST_MATH,
+-    HasErf = EIGEN_FAST_MATH,
++    HasTanh = 0,
++    HasErf = 0,
++    HasRint = 0,
+ #endif
+     HasRound = 1,
+     HasFloor = 1,
+     HasCeil = 1,
+-    HasRint = 1,
+     HasNegate = 1,
+     HasBlend = 1
+   };
+@@ -217,16 +220,17 @@
+ #else
+     HasRsqrt = 0,
+ #endif
++    HasRint = 1,
+ #else
+     HasSqrt = 0,
+     HasRsqrt = 0,
+-    HasTanh = EIGEN_FAST_MATH,
+-    HasErf = EIGEN_FAST_MATH,
++    HasRint = 0,
+ #endif
++    HasTanh = 0,
++    HasErf = 0,
+     HasRound = 1,
+     HasFloor = 1,
+     HasCeil = 1,
+-    HasRint = 1,
+     HasNegate = 1,
+     HasBlend = 1
+   };
+@@ -872,19 +876,29 @@
+   return vec_nor(c,c);
+ }
+ 
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet4i pcmp_le(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmple(a,b)); }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet4i pcmp_lt(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmplt(a,b)); }
+ template<> EIGEN_STRONG_INLINE Packet4i pcmp_eq(const Packet4i& a, const Packet4i& b) { return reinterpret_cast<Packet4i>(vec_cmpeq(a,b)); }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet8s pcmp_le(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmple(a,b)); }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet8s pcmp_lt(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmplt(a,b)); }
+ template<> EIGEN_STRONG_INLINE Packet8s pcmp_eq(const Packet8s& a, const Packet8s& b) { return reinterpret_cast<Packet8s>(vec_cmpeq(a,b)); }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet8us pcmp_le(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmple(a,b)); }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet8us pcmp_lt(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmplt(a,b)); }
+ template<> EIGEN_STRONG_INLINE Packet8us pcmp_eq(const Packet8us& a, const Packet8us& b) { return reinterpret_cast<Packet8us>(vec_cmpeq(a,b)); }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet16c pcmp_le(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmple(a,b)); }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet16c pcmp_lt(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmplt(a,b)); }
+ template<> EIGEN_STRONG_INLINE Packet16c pcmp_eq(const Packet16c& a, const Packet16c& b) { return reinterpret_cast<Packet16c>(vec_cmpeq(a,b)); }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet16uc pcmp_le(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmple(a,b)); }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet16uc pcmp_lt(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmplt(a,b)); }
+ template<> EIGEN_STRONG_INLINE Packet16uc pcmp_eq(const Packet16uc& a, const Packet16uc& b) { return reinterpret_cast<Packet16uc>(vec_cmpeq(a,b)); }
+ 
+@@ -937,6 +951,7 @@
+ }
+ template<> EIGEN_STRONG_INLINE Packet4f pceil<Packet4f>(const  Packet4f& a) { return vec_ceil(a); }
+ template<> EIGEN_STRONG_INLINE Packet4f pfloor<Packet4f>(const Packet4f& a) { return vec_floor(a); }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet4f print<Packet4f>(const Packet4f& a)
+ {
+     Packet4f res;
+@@ -947,6 +962,7 @@
+ 
+     return res;
+ }
++#endif
+ 
+ template<typename Packet> EIGEN_STRONG_INLINE Packet ploadu_common(const __UNPACK_TYPE__(Packet)* from)
+ {
+@@ -1341,12 +1357,6 @@
+   BF16_TO_F32_BINARY_OP_WRAPPER(psub<Packet4f>, a, b);
+ }
+ 
+-template<> EIGEN_STRONG_INLINE Packet8bf psqrt<Packet8bf> (const Packet8bf& a){
+-  BF16_TO_F32_UNARY_OP_WRAPPER(vec_sqrt, a);
+-}
+-template<> EIGEN_STRONG_INLINE Packet8bf prsqrt<Packet8bf> (const Packet8bf& a){
+-  BF16_TO_F32_UNARY_OP_WRAPPER(prsqrt<Packet4f>, a);
+-}
+ template<> EIGEN_STRONG_INLINE Packet8bf pexp<Packet8bf> (const Packet8bf& a){
+   BF16_TO_F32_UNARY_OP_WRAPPER(pexp_float, a);
+ }
+@@ -1390,9 +1400,11 @@
+ template<> EIGEN_STRONG_INLINE Packet8bf pround<Packet8bf> (const Packet8bf& a){
+   BF16_TO_F32_UNARY_OP_WRAPPER(pround<Packet4f>, a);
+ }
++#ifdef __VSX__
+ template<> EIGEN_STRONG_INLINE Packet8bf print<Packet8bf> (const Packet8bf& a){
+   BF16_TO_F32_UNARY_OP_WRAPPER(print<Packet4f>, a);
+ }
++#endif
+ template<> EIGEN_STRONG_INLINE Packet8bf pmadd(const Packet8bf& a, const Packet8bf& b, const Packet8bf& c) {
+   Packet4f a_even = Bf16ToF32Even(a);
+   Packet4f a_odd = Bf16ToF32Odd(a);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-16 23:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-10 11:36 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/, dev-cpp/eigen/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-07-16 23:04 Sam James
2021-12-29 15:42 Andreas Sturmlechner
2020-12-14 21:04 David Seifert
2020-07-21 15:50 Andreas Sturmlechner
2016-02-24 18:27 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox