sci-biology/tree-puzzle: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Tue, 10 Dec 2019 23:48:25 +0000 (00:48 +0100)
committerDavid Seifert <soap@gentoo.org>
Tue, 10 Dec 2019 23:48:25 +0000 (00:48 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
sci-biology/tree-puzzle/tree-puzzle-5.2.ebuild

index 27dd0bc2212fc3fdee2e9cadb138ec52037de0ec..8e2a07f8183e06dff48f6955c3db0da8e298436a 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="Maximum likelihood analysis for nucleotide, amino acid, and two-state data"
 HOMEPAGE="http://www.tree-puzzle.de"
@@ -13,44 +13,41 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE="mpi"
+RESTRICT="test"
 
 DEPEND="mpi? ( virtual/mpi )"
 RDEPEND="${DEPEND}"
 
-RESTRICT="test"
-
-pkg_setup () {
-       use mpi && [ $(tc-getCC) = icc ] && die "The parallelized version of tree-puzzle cannot be compiled using icc.
-       Either disable the \"mpi\" USE flag to compile only the non-parallelized
-       version of the program, or use gcc as your compiler (CC=\"gcc\")."
-}
+PATCHES=( "${FILESDIR}"/${PN}-impl-dec.patch )
 
-src_prepare() {
-       epatch "${FILESDIR}"/${PN}-impl-dec.patch
+pkg_setup() {
+       use mpi && [[ $(tc-getCC) == icc* ]] &&
+               die "The parallelized version of tree-puzzle cannot be compiled using icc.
+                       Either disable the \"mpi\" USE flag to compile only the non-parallelized
+                       version of the program, or use gcc as your compiler (CC=\"gcc\")."
 }
 
 src_configure() {
        default
 
        if ! use mpi; then
-                       sed \
-                               -e 's:bin_PROGRAMS = puzzle$(EXEEXT) ppuzzle:bin_PROGRAMS = puzzle :' \
-                               -e 's:DIST_SOURCES = $(ppuzzle_SOURCES) $(puzzle_SOURCES):DIST_SOURCES = $(puzzle_SOURCES):' \
-                               -i "${S}"/src/Makefile || die
+               sed \
+                       -e 's:bin_PROGRAMS = puzzle$(EXEEXT) ppuzzle:bin_PROGRAMS = puzzle :' \
+                       -e 's:DIST_SOURCES = $(ppuzzle_SOURCES) $(puzzle_SOURCES):DIST_SOURCES = $(puzzle_SOURCES):' \
+                       -i src/Makefile || die
        fi
 }
 
 src_install() {
        dobin src/puzzle
        use mpi && dobin src/ppuzzle
-       dodoc AUTHORS ChangeLog README
+       einstalldocs
 
        # User manual
-       insinto /usr/share/doc/${PF}
-       doins doc/tree-puzzle.pdf
+       dodoc doc/tree-puzzle.pdf
 
        # Example data files
        insinto /usr/share/${PN}/data
-       rm data/Makefile*
-       doins data/*
+       rm data/Makefile* || die
+       doins -r data/.
 }