commit:     251f5c99d0ef0a397afc1d01999106577450e534
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 26 05:07:52 2019 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Jun 26 06:06:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=251f5c99

sci-libs/lapack: add eselect-ldso USE flag.

profiles: mask eselect-ldso USE flags on fbsd and rpath ARCH.

  eselect-ldso USE depends on ld.so to do runtime library switching.

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 profiles/arch/amd64-fbsd/use.mask       |  4 ++++
 profiles/arch/x86-fbsd/use.mask         |  4 ++++
 profiles/features/prefix/rpath/use.mask |  3 +++
 sci-libs/lapack/lapack-3.8.0.ebuild     | 20 ++++++++++++--------
 sci-libs/lapack/metadata.xml            |  2 ++
 5 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/profiles/arch/amd64-fbsd/use.mask 
b/profiles/arch/amd64-fbsd/use.mask
index 09bc13e678a..d457d88580e 100644
--- a/profiles/arch/amd64-fbsd/use.mask
+++ b/profiles/arch/amd64-fbsd/use.mask
@@ -110,3 +110,7 @@ opencl
 # Hans de Graaff <[email protected]> (27 Dec 2014)
 # dev-libs/jemalloc is not keyworded
 jemalloc
+
+# Benda Xu <[email protected]> (26 Jun 2019)
+# Not tested
+eselect-ldso
\ No newline at end of file

diff --git a/profiles/arch/x86-fbsd/use.mask b/profiles/arch/x86-fbsd/use.mask
index a5de147c236..6746ea43d4d 100644
--- a/profiles/arch/x86-fbsd/use.mask
+++ b/profiles/arch/x86-fbsd/use.mask
@@ -64,3 +64,7 @@ vaapi
 # Chí-Thanh Christopher Nguyễn <[email protected]> (22 Aug 2013)
 # virtual/opencl is not keyworded
 opencl
+
+# Benda Xu <[email protected]> (26 Jun 2019)
+# Not tested
+eselect-ldso

diff --git a/profiles/features/prefix/rpath/use.mask 
b/profiles/features/prefix/rpath/use.mask
index 294cb12c1d1..bc446ee8012 100644
--- a/profiles/features/prefix/rpath/use.mask
+++ b/profiles/features/prefix/rpath/use.mask
@@ -7,3 +7,6 @@
 # multilib is never going to work as expected in Prefix rpath
 multilib
 
+# Benda Xu <[email protected]> (26 Jun 2019)
+# Not supported
+eselect-ldso

diff --git a/sci-libs/lapack/lapack-3.8.0.ebuild 
b/sci-libs/lapack/lapack-3.8.0.ebuild
index df848e027d5..3fb7fa9984d 100644
--- a/sci-libs/lapack/lapack-3.8.0.ebuild
+++ b/sci-libs/lapack/lapack-3.8.0.ebuild
@@ -11,22 +11,22 @@ SRC_URI="http://www.netlib.org/${PN}/${P}.tar.gz";
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86"
-IUSE="lapacke doc"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos"
+IUSE="lapacke doc eselect-ldso"
 # TODO: static-libs 64bit-index
 
 RDEPEND="
-       >=app-eselect/eselect-blas-0.2
-       >=app-eselect/eselect-lapack-0.2
+       eselect-ldso? ( >=app-eselect/eselect-blas-0.2
+       >=app-eselect/eselect-lapack-0.2 )
        !app-eselect/eselect-cblas
        !sci-libs/blas-reference
        !sci-libs/cblas-reference
        !sci-libs/lapack-reference
        !sci-libs/lapacke-reference
-       doc? ( app-doc/blas-docs )
-       virtual/pkgconfig"
+       virtual/fortran
+       doc? ( app-doc/blas-docs )"
 DEPEND="${RDEPEND}
-       virtual/fortran"
+       virtual/pkgconfig"
 
 src_configure() {
        local mycmakeargs=(
@@ -41,6 +41,7 @@ src_configure() {
 src_install () {
        cmake-utils_src_install
 
+       use eselect-ldso || return
        # Create private lib directory for eselect::blas (ld.so.conf)
        dodir /usr/$(get_libdir)/blas/reference
        dosym ../../libblas.so usr/$(get_libdir)/blas/reference/libblas.so
@@ -55,8 +56,9 @@ src_install () {
 }
 
 pkg_postinst () {
-       local me=reference libdir=$(get_libdir)
+       use eselect-ldso || return
 
+       local me=reference libdir=$(get_libdir)
        # check eselect-blas
        eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
        local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
@@ -83,6 +85,8 @@ pkg_postinst () {
 }
 
 pkg_postrm () {
+       use eselect-ldso || return
+
        eselect blas validate
        eselect lapack validate
 }

diff --git a/sci-libs/lapack/metadata.xml b/sci-libs/lapack/metadata.xml
index 7b291ef6bfd..adc276993c4 100644
--- a/sci-libs/lapack/metadata.xml
+++ b/sci-libs/lapack/metadata.xml
@@ -24,5 +24,7 @@ This package installs the reference FORTRAN 77 implementation 
from Netlib.
   </longdescription>
   <use>
     <flag name="lapacke">Build LAPACKE</flag>
+    <flag name="eselect-ldso">Enable runtime library switching by
+    eselect and ld.so.</flag>
   </use>
 </pkgmetadata>

Reply via email to