public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: dev-cpp/eigen/
Date: Mon, 22 Feb 2016 13:25:58 +0000 (UTC)	[thread overview]
Message-ID: <1456139419.9533a3000f15dd70f312f36705ad78e744fdfc0d.jlec@gentoo> (raw)

commit:     9533a3000f15dd70f312f36705ad78e744fdfc0d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 11:10:19 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 11:10:19 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=9533a300

dev-cpp/eigen: Bump to EAPI=6

* Drop version dependend code from ebuilds
* Fix error handling logic
* Propargate cahnges to live ebuild

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

 dev-cpp/eigen/eigen-3.2.7-r1.ebuild | 45 ++++++++++------------
 dev-cpp/eigen/eigen-3.2.8.ebuild    | 19 ++++++----
 dev-cpp/eigen/eigen-9999.ebuild     | 76 ++++++++++++++++++-------------------
 3 files changed, 67 insertions(+), 73 deletions(-)

diff --git a/dev-cpp/eigen/eigen-3.2.7-r1.ebuild b/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
index ae40239..0c6777e 100644
--- a/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
+++ b/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
@@ -1,33 +1,23 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
 FORTRAN_NEEDED=fortran
 
-if [[ ${PV} == "9999" ]] ; then
-	inherit mercurial
-	EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
-	SRC_URI=""
-	KEYWORDS=""
-else
-	inherit vcs-snapshot
-	SRC_URI="
-		https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2
-		https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
-		"
-	PATCHES=( "${DISTDIR}"/${P}-cmake.patch )
-	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-fi
-
-inherit alternatives-2 cmake-utils fortran-2 multilib numeric
+inherit alternatives-2 cmake-utils fortran-2 multilib numeric vcs-snapshot
 
 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
+	https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
+"
 
 SLOT="3"
 LICENSE="MPL-2.0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="adolc doc fortran fftw gmp metis mkl pastix sparse static-libs test"
 
 CDEPEND="
@@ -42,7 +32,8 @@ CDEPEND="
 		sci-libs/cholmod[metis?]
 		sci-libs/spqr
 		sci-libs/superlu
-		sci-libs/umfpack )"
+		sci-libs/umfpack
+	)"
 DEPEND="
 	doc? ( app-doc/doxygen[dot,latex] )
 	test? ( ${CDEPEND} )"
@@ -51,6 +42,8 @@ RDEPEND="
 	!dev-cpp/eigen:0
 	${CDEPEND}"
 
+PATCHES=( "${DISTDIR}"/${P}-cmake.patch )
+
 src_prepare() {
 	sed -i \
 		-e "s:/usr:${EPREFIX}/usr:g" \
@@ -61,12 +54,14 @@ src_prepare() {
 		{blas,lapack}/CMakeLists.txt || die
 
 	# TOFIX: static-libs for blas are always built with PIC
-	use static-libs || sed -i \
-		-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
-		-e "/TARGETS/s/eigen_[a-z]*_static//g" \
-		-e "/add_library(eigen_[a-z]*_static/d" \
-		-e "/target_link_libraries(eigen_[a-z]*_static/d" \
-		{blas,lapack}/CMakeLists.txt || die
+	if ! use static-libs; then
+		sed \
+			-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
+			-e "/TARGETS/s/eigen_[a-z]*_static//g" \
+			-e "/add_library(eigen_[a-z]*_static/d" \
+			-e "/target_link_libraries(eigen_[a-z]*_static/d" \
+			-i {blas,lapack}/CMakeLists.txt || die
+	fi
 
 	sed -i -e "/Unknown build type/d" CMakeLists.txt || die
 

diff --git a/dev-cpp/eigen/eigen-3.2.8.ebuild b/dev-cpp/eigen/eigen-3.2.8.ebuild
index 12b0a5d..1da50f4 100644
--- a/dev-cpp/eigen/eigen-3.2.8.ebuild
+++ b/dev-cpp/eigen/eigen-3.2.8.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
 FORTRAN_NEEDED=fortran
 
@@ -32,7 +32,8 @@ CDEPEND="
 		sci-libs/cholmod[metis?]
 		sci-libs/spqr
 		sci-libs/superlu
-		sci-libs/umfpack )"
+		sci-libs/umfpack
+	)"
 DEPEND="
 	doc? ( app-doc/doxygen[dot,latex] )
 	test? ( ${CDEPEND} )"
@@ -53,12 +54,14 @@ src_prepare() {
 		{blas,lapack}/CMakeLists.txt || die
 
 	# TOFIX: static-libs for blas are always built with PIC
-	use static-libs || sed -i \
-		-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
-		-e "/TARGETS/s/eigen_[a-z]*_static//g" \
-		-e "/add_library(eigen_[a-z]*_static/d" \
-		-e "/target_link_libraries(eigen_[a-z]*_static/d" \
-		{blas,lapack}/CMakeLists.txt || die
+	if ! use static-libs; then
+		sed \
+			-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
+			-e "/TARGETS/s/eigen_[a-z]*_static//g" \
+			-e "/add_library(eigen_[a-z]*_static/d" \
+			-e "/target_link_libraries(eigen_[a-z]*_static/d" \
+			-i {blas,lapack}/CMakeLists.txt || die
+	fi
 
 	sed -i -e "/Unknown build type/d" CMakeLists.txt || die
 

diff --git a/dev-cpp/eigen/eigen-9999.ebuild b/dev-cpp/eigen/eigen-9999.ebuild
index 64caa71..5c7c661 100644
--- a/dev-cpp/eigen/eigen-9999.ebuild
+++ b/dev-cpp/eigen/eigen-9999.ebuild
@@ -1,33 +1,21 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
 FORTRAN_NEEDED=fortran
 
-if [[ ${PV} == "9999" ]] ; then
-	inherit mercurial
-	EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
-	SRC_URI=""
-	KEYWORDS=""
-else
-	inherit vcs-snapshot
-	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
-		"
-	PATCHES=( "${DISTDIR}"/${P}-cmake.patch	)
-	KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-fi
-
-inherit alternatives-2 cmake-utils fortran-2 multilib
+inherit alternatives-2 cmake-utils fortran-2 mercurial multilib
 
 DESCRIPTION="C++ template library for linear algebra"
 HOMEPAGE="http://eigen.tuxfamily.org/"
+SRC_URI=""
+EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
 
 SLOT="3"
 LICENSE="MPL-2.0"
+KEYWORDS=""
 IUSE="adolc doc fortran fftw gmp metis mkl pastix sparse static-libs test"
 
 CDEPEND="
@@ -42,7 +30,8 @@ CDEPEND="
 		sci-libs/cholmod[metis?]
 		sci-libs/spqr
 		sci-libs/superlu
-		sci-libs/umfpack )"
+		sci-libs/umfpack
+	)"
 DEPEND="
 	doc? ( app-doc/doxygen[dot,latex] )
 	test? ( ${CDEPEND} )"
@@ -61,12 +50,21 @@ src_prepare() {
 		{blas,lapack}/CMakeLists.txt || die
 
 	# TOFIX: static-libs for blas are always built with PIC
-	use static-libs || sed -i \
-		-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
-		-e "/TARGETS/s/eigen_[a-z]*_static//g" \
-		-e "/add_library(eigen_[a-z]*_static/d" \
-		-e "/target_link_libraries(eigen_[a-z]*_static/d" \
-		{blas,lapack}/CMakeLists.txt || die
+	if ! use static-libs; then
+		sed \
+			-e "/add_dependencies/s/eigen_[a-z]*_static//g" \
+			-e "/TARGETS/s/eigen_[a-z]*_static//g" \
+			-e "/add_library(eigen_[a-z]*_static/d" \
+			-e "/target_link_libraries(eigen_[a-z]*_static/d" \
+			-i {blas,lapack}/CMakeLists.txt || die
+	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
 }
 
@@ -78,7 +76,9 @@ src_configure() {
 		-DEIGEN_BUILD_BTL=OFF
 	)
 	export VARTEXFONTS="${T}/fonts"
-	CMAKE_BUILD_TYPE="release" cmake-utils_src_configure
+	export PKG_CONFIG_LIBDIR=/usr/$(get_libdir)/
+
+	cmake-utils_src_configure
 	# use fortran && FORTRAN_LIBS="blas lapack" not ready
 	use fortran && FORTRAN_LIBS="blas"
 }
@@ -97,21 +97,17 @@ src_install() {
 	for x in ${FORTRAN_LIBS}; do
 		local libname="eigen_${x}"
 		emake DESTDIR="${D}" -C "${BUILD_DIR}/${x}" install ${libname}
-		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
+		create_pkgconfig \
+			--description "${DESCRIPTION} ${x^^} implementation" \
+			--libs "-L\${libdir} -l${libname}" \
+			--libs-private "-lm" \
+			$([[ ${x} == lapack ]] && echo "--requires 'blas'") \
+			${libname}
 		alternatives_for ${x} eigen 0 \
 			/usr/$(get_libdir)/pkgconfig/${x}.pc ${libname}.pc
-		insinto /usr/$(get_libdir)/pkgconfig
-		doins ${libname}.pc
 	done
+
+	# Debian installs it and some projects started using it.
+	insinto /usr/share/cmake/Modules/
+	doins "${S}/cmake/FindEigen3.cmake"
 }


             reply	other threads:[~2016-02-22 13:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 13:25 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-25  5:43 [gentoo-commits] proj/sci:master commit in: dev-cpp/eigen/ Benda XU
2017-05-13 15:56 Justin Lecher
2016-02-24 18:31 Justin Lecher
2016-02-20 15:40 Justin Lecher
2015-12-24  8:55 Justin Lecher
2015-12-04 17:33 Marius Brehler
2015-12-04  7:01 Justin Lecher
2015-11-30 10:58 Justin Lecher
2014-10-17 22:47 Jauhien Piatlicki
2014-09-16  0:27 Christoph Junghans
2014-09-12  9:03 Jauhien Piatlicki
2014-04-24 23:09 Sebastien Fabbro
2014-04-24 23:09 Sebastien Fabbro
2014-04-22 20:47 Sebastien Fabbro
2014-01-18  7:39 Justin Lecher
2014-01-18  7:38 Justin Lecher
2013-10-20 10:35 Honza Macháček
2013-08-07 21:34 Sebastien Fabbro
2013-04-29 16:32 Sebastien Fabbro
2012-12-13  0:10 Sebastien Fabbro
2012-11-19 19:11 Sebastien Fabbro
2012-10-25 15:54 Justin Lecher
2012-07-26 21:07 Sebastien Fabbro
2012-07-09 23:48 Sebastien Fabbro
2012-07-09 20:57 Sebastien Fabbro
2012-06-29  0:27 Sebastien Fabbro
2012-03-25  1:36 Andrea Arteaga
2012-02-10 21:39 Andrea Arteaga
2011-12-20 18:00 Sebastien Fabbro
2011-10-07 10:53 Andrea Arteaga
2011-08-29 14:49 Justin Lecher
2011-08-29 13:52 Andrea Arteaga
2011-08-19 15:29 Andrea Arteaga
2011-08-19  0:29 Andrea Arteaga
2011-08-19  0:25 Andrea Arteaga

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=1456139419.9533a3000f15dd70f312f36705ad78e744fdfc0d.jlec@gentoo \
    --to=jlec@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