commit:     3912bd2a872c92103fec73d3b6ef90038e65b3f4
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 07:31:33 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 07:31:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3912bd2a

sci-libs/taucs: Port to EAPI 7

Closes: https://bugs.gentoo.org/725588
Closes: https://bugs.gentoo.org/740974
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-libs/taucs/files/taucs-2.2-no-test-cilk.patch |  4 +-
 sci-libs/taucs/files/taucs-2.2-respect-ar.patch   | 22 +++++++++
 sci-libs/taucs/taucs-2.2.ebuild                   | 60 +++++++++++------------
 3 files changed, 54 insertions(+), 32 deletions(-)

diff --git a/sci-libs/taucs/files/taucs-2.2-no-test-cilk.patch 
b/sci-libs/taucs/files/taucs-2.2-no-test-cilk.patch
index 68ecc3bf94b..332d1138dea 100644
--- a/sci-libs/taucs/files/taucs-2.2-no-test-cilk.patch
+++ b/sci-libs/taucs/files/taucs-2.2-no-test-cilk.patch
@@ -1,5 +1,5 @@
---- testscript.orig    2012-07-06 19:42:51.000000000 +0100
-+++ testscript 2012-07-06 19:43:17.000000000 +0100
+--- a/testscript
++++ b/testscript
 @@ -12,17 +12,6 @@
  ulimit -s >> testscript.log
  echo '==============' >> testscript.log

diff --git a/sci-libs/taucs/files/taucs-2.2-respect-ar.patch 
b/sci-libs/taucs/files/taucs-2.2-respect-ar.patch
new file mode 100644
index 00000000000..4ab95441a2d
--- /dev/null
+++ b/sci-libs/taucs/files/taucs-2.2-respect-ar.patch
@@ -0,0 +1,22 @@
+--- a/config/linux.mk
++++ b/config/linux.mk
+@@ -25,7 +25,7 @@
+ LDFLAGS   = 
+ LOUTFLG   = $(COUTFLG)
+ 
+-AR        = ar cr
++ARFLAGS   = cr
+ AOUTFLG   =
+ 
+ RANLIB    = ranlib
+--- a/configurator/taucs_config.c
++++ b/configurator/taucs_config.c
+@@ -558,7 +558,7 @@
+ 
+       fprintf(f, "%s: $(%s_content) $(STDDEPS)\n",get_full_name(i,0),base);
+       fprintf(f,"\t- $(RM) %s\n",get_full_name(i,0));
+-      fprintf(f,"\t$(AR) $(AOUTFLG)%s 
$(%s_content)\n",get_full_name(i,0),base);
++      fprintf(f,"\t$(AR) $(ARFLAGS) $(AOUTFLG)%s 
$(%s_content)\n",get_full_name(i,0),base);
+       fprintf(f,"\t$(RANLIB) %s\n",get_full_name(i,0));
+     }
+ 

diff --git a/sci-libs/taucs/taucs-2.2.ebuild b/sci-libs/taucs/taucs-2.2.ebuild
index c3da7a074eb..8ff8000be8d 100644
--- a/sci-libs/taucs/taucs-2.2.ebuild
+++ b/sci-libs/taucs/taucs-2.2.ebuild
@@ -1,39 +1,47 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit eutils fortran-2 toolchain-funcs
+inherit fortran-2 toolchain-funcs
 
 DESCRIPTION="C library of sparse linear solvers"
 HOMEPAGE="http://www.tau.ac.il/~stoledo/taucs/";
 SRC_URI="http://www.tau.ac.il/~stoledo/${PN}/${PV}/${PN}.tgz -> ${P}.tgz"
 
-SLOT="0"
 LICENSE="LGPL-2.1"
-IUSE="cilk doc static-libs"
+SLOT="0"
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cilk doc"
+RESTRICT="test"
 
 RDEPEND="
        virtual/blas
        virtual/lapack
-       || ( sci-libs/metis sci-libs/parmetis )
+       || (
+               sci-libs/metis
+               sci-libs/parmetis
+       )
        cilk? ( dev-lang/cilk )"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 S="${WORKDIR}"
 
-src_prepare() {
+PATCHES=(
        # test with cilk has memory leaks
-       epatch "${FILESDIR}"/${P}-no-test-cilk.patch
-}
+       "${FILESDIR}"/${P}-no-test-cilk.patch
+       # bug 725588
+       "${FILESDIR}"/${P}-respect-ar.patch
+)
 
 src_configure() {
-       cat > config/linux_shared.mk <<-EOF
+       cat > config/linux_shared.mk <<-EOF || die
+               AR=$(tc-getAR)
                FC=$(tc-getFC)
                CC=$(tc-getCC)
                LD=$(tc-getFC)
+               RANLIB=$(tc-getRANLIB)
                CFLAGS=${CFLAGS} -fPIC
                FFLAGS=${FFLAGS} -fPIC
                LDFLAGS=${LDFLAGS} -fPIC
@@ -42,28 +50,22 @@ src_configure() {
                LIBF77=
        EOF
 
-       echo "LIBMETIS=$($(tc-getPKG_CONFIG) --libs metis)" >> 
config/linux_shared.mk
+       echo "LIBMETIS=$($(tc-getPKG_CONFIG) --libs metis)" >> 
config/linux_shared.mk || die
        # no cat <<EOF because -o has a trailing space
        if use cilk; then
-               echo "CILKC=cilkc" >> config/linux_shared.mk
-               echo "CILKFLAGS=-O2 -I${EPREFIX}/usr/include/cilk -fPIC" >> 
config/linux_shared.mk
-               echo "CILKOUTFLG=-o " >> config/linux_shared.mk
+               echo "CILKC=cilkc" >> config/linux_shared.mk || die
+               echo "CILKFLAGS=-O2 -I${EPREFIX}/usr/include/cilk -fPIC" >> 
config/linux_shared.mk || die
+               echo "CILKOUTFLG=-o " >> config/linux_shared.mk || die
        fi
-       sed -e 's/ -fPIC//g' \
-               config/linux_shared.mk \
-               > config/linux_static.mk || die
+       sed -e 's/ -fPIC//g' config/linux_shared.mk || die
 }
 
 src_compile() {
        # not autotools configure
-       if use static-libs; then
-               ./configure variant=_static || die
-               emake
-       fi
-       ./configure variant=_shared || die
+       CC=$(tc-getCC) ./configure variant=_shared || die
        emake
 
-       cd lib/linux_shared
+       cd lib/linux_shared || die
        $(tc-getFC) ${LDFLAGS} -shared -Wl,-soname=libtaucs.so.1 \
                -Wl,--whole-archive libtaucs.a -Wl,--no-whole-archive \
                $($(tc-getPKG_CONFIG) --libs blas lapack metis) \
@@ -81,13 +83,11 @@ src_test() {
 }
 
 src_install() {
-       use static-libs && dolib.a lib/linux_static/libtaucs.a
-       ln -s libtaucs.so.1.0.0 lib/linux_shared/libtaucs.so.1
-       ln -s libtaucs.so.1 lib/linux_shared/libtaucs.so
+       ln -s libtaucs.so.1.0.0 lib/linux_shared/libtaucs.so.1 || die
+       ln -s libtaucs.so.1 lib/linux_shared/libtaucs.so || die
        dolib.so lib/linux_shared/libtaucs.so*
 
-       insinto /usr/include
-       doins build/*/*.h src/*.h
+       doheader build/*/*.h src/*.h
 
        use doc && dodoc doc/*.pdf
 }

Reply via email to