From cc28b9f8549047216b17ff331deedda1141b337e Mon Sep 17 00:00:00 2001 From: David Seifert Date: Wed, 11 Dec 2019 00:48:09 +0100 Subject: sci-biology/glimmerhmm: Port to EAPI 7 Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: David Seifert --- .../files/glimmerhmm-3.0.1-fix-data-path.patch | 20 ++++++++++++++ sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild | 31 ++++++++++------------ 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 sci-biology/glimmerhmm/files/glimmerhmm-3.0.1-fix-data-path.patch (limited to 'sci-biology/glimmerhmm') diff --git a/sci-biology/glimmerhmm/files/glimmerhmm-3.0.1-fix-data-path.patch b/sci-biology/glimmerhmm/files/glimmerhmm-3.0.1-fix-data-path.patch new file mode 100644 index 000000000000..3ad5090086eb --- /dev/null +++ b/sci-biology/glimmerhmm/files/glimmerhmm-3.0.1-fix-data-path.patch @@ -0,0 +1,20 @@ +--- a/train/trainGlimmerHMM ++++ b/train/trainGlimmerHMM +@@ -12,7 +12,7 @@ + use Cwd; + + use FindBin; +-use lib $FindBin::Bin; ++use lib "/usr/share/glimmerhmm/lib"; + use orf; + use formtrain; + use dectree_allinfo; +@@ -20,7 +20,7 @@ + use splitiso; + + my $workdir=cwd(); +-my $scriptdir=$FindBin::Bin; # directory where all training programs should be ++my $scriptdir="/usr/libexec/glimmerhmm/training_utils"; # directory where all training programs should be + + #print "workdir=$workdir scriptdir=$scriptdir\n";exit; + diff --git a/sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild b/sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild index 1d3cf1171d76..5424e942a7f7 100644 --- a/sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild +++ b/sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2014 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 MY_P=GlimmerHMM @@ -13,27 +13,22 @@ SRC_URI="ftp://ftp.cbcb.umd.edu/pub/software/glimmerhmm/${MY_P}-${PV}.tar.gz" LICENSE="Artistic" SLOT="0" -IUSE="" KEYWORDS="amd64 x86" -src_unpack() { - unpack ${A} - mv GlimmerHMM ${P} -} +S="${WORKDIR}/${MY_P}" -src_prepare() { - sed \ - -e 's|\(my $scriptdir=\)$FindBin::Bin|\1"/usr/libexec/'${PN}'/training_utils"|' \ - -e 's|\(use lib\) $FindBin::Bin|\1 "/usr/share/'${PN}'/lib"|' \ - -i "${S}/train/trainGlimmerHMM" || die +PATCHES=( + "${FILESDIR}"/${PV}-gentoo.patch + "${FILESDIR}"/${PN}-3.0.1-fix-data-path.patch +) - epatch "${FILESDIR}"/${PV}-gentoo.patch +src_configure() { tc-export CC CXX } src_compile() { - emake -C "${S}/sources" - emake -C "${S}/train" + emake -C sources + emake -C train } src_install() { @@ -41,8 +36,10 @@ src_install() { insinto /usr/share/${PN}/lib doins train/*.pm + insinto /usr/share/${PN}/models - doins -r trained_dir/* + doins -r trained_dir/. + exeinto /usr/libexec/${PN}/training_utils doexe train/{build{1,2,-icm,-icm-noframe},erfapp,falsecomp,findsites,karlin,score,score{2,ATG,ATG2,STOP,STOP2},splicescore} -- cgit v1.2.3-65-gdbad