commit:     5e2fcfa47bb951d319e95d9340bc724aeb045002
Author:     Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Wed Dec  7 12:52:28 2016 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Wed Dec  7 12:52:28 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=5e2fcfa4

sci-biology/ensembl-tools: mimic upstream's INSTALL.pl so we can install on 
Gentoo

Seems the code fetching VEP plugins will need more reverse-engineering unless
this can be completed during run-time (do not know).

Package-Manager: portage-2.3.2

 sci-biology/ensembl-tools/ensembl-tools-86.ebuild | 37 ++++++++++++++---------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/sci-biology/ensembl-tools/ensembl-tools-86.ebuild 
b/sci-biology/ensembl-tools/ensembl-tools-86.ebuild
index 95e9525..793f51e 100644
--- a/sci-biology/ensembl-tools/ensembl-tools-86.ebuild
+++ b/sci-biology/ensembl-tools/ensembl-tools-86.ebuild
@@ -7,14 +7,14 @@ EAPI=5
 PERL_EXPORT_PHASE_FUNCTIONS=no
 inherit perl-module
 
-DESCRIPTION="Bioinformatics tools incl. Variant Effect Predictor (VEP)"
+DESCRIPTION="Variant Effect Predictor (VEP), AssemblyMapper, IDMapper, 
RegionReporter tools"
 HOMEPAGE="http://www.ensembl.org/info/docs/tools/vep/script
        http://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html";
 SRC_URI="https://github.com/Ensembl/ensembl-tools/archive/release/${PV}.zip -> 
${P}.zip"
 
 LICENSE="Apache-2.0"
 SLOT="0"
-KEYWORDS="" # BUG: needs Bio::EnsEMBL::Registry
+KEYWORDS=""
 IUSE=""
 
 DEPEND="dev-perl/File-Copy-Recursive
@@ -28,26 +28,33 @@ S="${WORKDIR}/ensembl-tools-release-${PV}"
 
 src_install(){
        perl_set_version
-       insinto ${VENDOR_LIB}/${PN}
-       cd scripts/variant_effect_predictor || die
-       # FIXME: INSTALL.pl does not exit upon error
-       ./INSTALL.pl --DESTDIR="${DESTDIR}"/"${EPREFIX}" --AUTO=ac || die
+       pushd scripts/variant_effect_predictor || die
+       # BUG1: the INSTALL.pl does not exit upon error with non-zero exit code
+       # BUG2: it complains if ${VENDOR_LIB}/${PN} is not in PERL5LIB
+       # perl INSTALL.pl --AUTO=acf --NO_HTSLIB --PLUGINS all --DESTDIR 
${VENDOR_LIB}/${PN} || die
        newdoc README.txt variant_effect_predictor.txt
-       cd ../../scripts/region_reporter || die
+       dobin variant_effect_predictor.pl gtf2vep.pl filter_vep.pl 
convert_cache.pl
+       insinto /usr/share/"${PN}"/examples
+       doins example_*
+       popd
+       pushd scripts/region_reporter || die
        dobin *.pl
        newdoc README.txt region_reporter.txt
-       cd ../../scripts/assembly_converter
+       popd
+       pushd scripts/assembly_converter
        dobin *.pl
-       insinto /usr/share/"${PN}"/examples
        doins assemblymapper.in
-       #insinto ${VENDOR_LIB}/${PN}
-       #doins *.pm
        newdoc README.txt assembly_converter.txt
-       insinto /usr/share/"${PN}"/examples
-       doins assemblymapper.in
-       cd ../../scripts/id_history_converter
+       popd
+       pushd scripts/id_history_converter
        dobin *.pl
        newdoc README.txt id_history_converter.txt
-       insinto /usr/share/"${PN}"/examples
        doins idmapper.in
+       popd
+}
+
+pkg_postinst(){
+       einfo "Probably you want to download some of the files from 
ftp://ftp.ensembl.org/pub/release-86/variation/VEP/";
 }
+# TODO The INSTALL.pl fetches 
https://raw.githubusercontent.com/Ensembl/VEP_plugins/release/86/plugin_config.txt
+# and calls eval on its contents

Reply via email to