commit:     d3c1f86342377dd4deaad96af58e47cab06bf3df
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Tue Mar  3 04:27:56 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Tue Mar  3 04:27:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d3c1f863

sci-libs/meschach: install test programs and stile changes

Package-Manager: Portage-2.3.91, Repoman-2.3.20
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sci-libs/meschach/meschach-1.2b.ebuild | 47 +++++++++++++++++++---------------
 sci-libs/meschach/metadata.xml         |  1 -
 2 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/sci-libs/meschach/meschach-1.2b.ebuild 
b/sci-libs/meschach/meschach-1.2b.ebuild
index b7a3017..5cf39eb 100644
--- a/sci-libs/meschach/meschach-1.2b.ebuild
+++ b/sci-libs/meschach/meschach-1.2b.ebuild
@@ -5,6 +5,9 @@ EAPI="7"
 
 inherit autotools eutils
 
+MAJOR="$(ver_cut 1)"
+VERSION="$(ver_cut 1-2)"
+
 DESCRIPTION="Meschach is a C-language library of routines for performing 
matrix computations."
 HOMEPAGE="http://homepage.divms.uiowa.edu/~dstewart/meschach";
 
SRC_URI="http://cdn-fastly.deb.debian.org/debian/pool/main/m/meschach/${PN}_${PV}.orig.tar.gz
 \
@@ -13,8 +16,7 @@ 
http://cdn-fastly.deb.debian.org/debian/pool/main/m/meschach/${PN}_${PV}-14.debi
 LICENSE="meschach"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="complex +double float munroll old segmem sparse test unroll"
-RESTRICT="!test? ( test )"
+IUSE="complex +double float munroll old segmem sparse unroll"
 REQUIRED_USE="
                ^^ ( double float )
 "
@@ -24,6 +26,8 @@ PATCHES=(
        "${WORKDIR}/debian/patches/${PN}_${PV}-13.configure.diff"
 )
 
+DOCS=( README )
+
 src_prepare() {
        default
        sed -i -- 's/CFLAGS = -O3 -fPIC/CFLAGS = @CFLAGS@ -fPIC/g' makefile.in
@@ -47,27 +51,30 @@ src_configure() {
 }
 
 src_compile() {
-       emake DESTDIR="${D}" all
-       use test && emake alltorture
+       emake vers="${VERSION}" DESTDIR="${D}" all
+       emake alltorture
 }
 
 src_install() {
-       dolib.so libmeschach.so
-       insinto /usr/include/meschach
+       ln -s "lib${PN}.so" "lib${PN}.so.${MAJOR}"
+       ln -s "lib${PN}.so.${MAJOR}" "lib${PN}.so.${VERSION}"
+
+       dolib.so "lib${PN}.so"
+       dolib.so "lib${PN}.so.${MAJOR}"
+       dolib.so "lib${PN}.so.${VERSION}"
+       insinto "/usr/include/${PN}"
        doins *.h
-       use test && dodir /usr/libexec/meschach
-       use test && exeinto /usr/libexec/meschach
-       use test && doexe iotort
-       use test && doexe itertort
-       use test && doexe macheps
-       use test && doexe maxint
-       use test && doexe memtort
-       use test && doexe mfuntort
-       use test && doexe sptort
-       use test && doexe torture
-       use test && doexe ztorture
-       use test && insinto /usr/libexec/meschach
-       use test && doins *.dat
+       exeinto "/usr/libexec/${PN}"
+       doexe iotort
+       doexe itertort
+       doexe macheps
+       doexe maxint
+       doexe memtort
+       doexe mfuntort
+       doexe sptort
+       doexe torture
+       doexe ztorture
+       insinto "/usr/share/${P}"
+       doins *.dat
        dodoc -r DOC/.
-       dodoc README
 }

diff --git a/sci-libs/meschach/metadata.xml b/sci-libs/meschach/metadata.xml
index fc8c04d..fde1c14 100644
--- a/sci-libs/meschach/metadata.xml
+++ b/sci-libs/meschach/metadata.xml
@@ -35,7 +35,6 @@ allocation/deallocation of memory.
     <flag name="old">build no longer supported functions</flag>
     <flag name="segmem">should be set if you are working with a machine or 
compiler that does not allow large arrays to be allocated. See README</flag>
     <flag name="sparse">incorporate sparse matrix functions</flag>
-    <flag name="test">build test programs</flag>
     <flag name="unroll">unroll low level loops on vectors</flag>
   </use>
 </pkgmetadata>

Reply via email to