commit: 6e0e46ff5c3099e4b206fc30d76a564bb4135b21 Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> AuthorDate: Fri Apr 20 21:39:48 2018 +0000 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> CommitDate: Fri Apr 20 21:39:48 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=6e0e46ff
sci-biology/gatk: cleanup gatk-3.8.1 and improve a bit gatk-9999 The gatk-9999 ebuild does not work because it calls 'git fetch' instead of 'git clone'. See https://github.com/broadinstitute/gatk/issues/4687 and https://github.com/broadinstitute/gatk#building for more details. Package-Manager: Portage-2.3.28, Repoman-2.3.9 sci-biology/gatk/gatk-3.8.1.ebuild | 7 ++-- sci-biology/gatk/gatk-9999.ebuild | 80 +++++++++++++++++++++++++++----------- 2 files changed, 61 insertions(+), 26 deletions(-) diff --git a/sci-biology/gatk/gatk-3.8.1.ebuild b/sci-biology/gatk/gatk-3.8.1.ebuild index b2610a770..f46c1d322 100644 --- a/sci-biology/gatk/gatk-3.8.1.ebuild +++ b/sci-biology/gatk/gatk-3.8.1.ebuild @@ -5,11 +5,12 @@ EAPI=5 inherit java-pkg-2 git-r3 # building from tar.gz snapshots is unsupported -# fetch -3.8-1.tar.gz -MY_PV=${PV/.1/-1} +MY_PV=${PV/.1/-1} # convert 3.8.1 to 3.8-1 DESCRIPTION="The Genome Analysis Toolkit" HOMEPAGE="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit" -EGIT_REPO_URI="https://github.com/broadgsa/gatk.git" +EGIT_REPO_URI="https://github.com/broadgsa/gatk.git" # git tree for <=gatk-3 +# check out 3.8-1 branch but using a proper commit, not ${MY_PV} +# https://github.com/broadinstitute/gatk/issues/4685#issuecomment-383188772 EGIT_COMMIT="41147a655594c2aae6e2cad8462bd1648570b32b" # building outside of git is not possible, # see https://github.com/broadinstitute/picard/issues/605 diff --git a/sci-biology/gatk/gatk-9999.ebuild b/sci-biology/gatk/gatk-9999.ebuild index 4b6d7f1cc..09c4abc0f 100644 --- a/sci-biology/gatk/gatk-9999.ebuild +++ b/sci-biology/gatk/gatk-9999.ebuild @@ -1,49 +1,83 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 -EANT_BUILD_TARGET="dist" -EANT_NEEDS_TOOLS="true" -JAVA_ANT_REWRITE_CLASSPATH="true" +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) -inherit git-2 java-pkg-2 +inherit java-pkg-2 git-r3 # building from tar.gz snapshots is unsupported DESCRIPTION="The Genome Analysis Toolkit" HOMEPAGE="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit" -SRC_URI="" -EGIT_REPO_URI="https://github.com/broadgsa/gatk.git" +EGIT_REPO_URI="https://github.com/broadinstitute/gatk.git" # git tree for >=gatk-4 +EGIT_CLONE_TYPE="mirror" +# building outside of git is not possible, +# see https://github.com/broadinstitute/picard/issues/605 +# +# +# must run 'git clone https://github.com/broadinstitute/gatk.git gatk' +# see https://github.com/broadinstitute/gatk/issues/4687 -LICENSE="MIT" +LICENSE="BSD-3" # since gatk-4 SLOT="0" IUSE="" -KEYWORDS="" +KEYWORDS="~amd64" # 148.19 MB git download and 134MB "${W}"/.m2 download COMMON_DEPS="" +# gatk-4 needs java-1.8 DEPEND=" - >=virtual/jdk-1.6 - dev-vcs/git - dev-java/maven-bin:* + >=virtual/jdk-1.8 + >=dev-vcs/git-2.5 + >=dev-vcs/git-lfs-1.1.0 + >=dev-java/maven-bin-3.1:* || ( dev-java/netbeans-java ) dev-java/cofoja ${COMMON_DEPS}" RDEPEND=" - >=virtual/jre-1.6 + >=virtual/jre-1.8 >=sci-biology/SnpEff-2.0.5 + >=dev-lang/R-3.2.5 ${COMMON_DEPS}" +#S="${WORKDIR}/${PN}-${MY_PV}" + +# https://maven.apache.org/settings.html +# The two settings files are located at: +# The Maven installation directory: $M2_HOME/conf/settings.xml +# The user's home directory: ${user.home}/.m2/settings.xml +# +# localRepository: This value is the path of this build system's local repository. +# The default value is ${user.home}/.m2/repository. This element is especially +# useful for a main build server allowing all logged-in users to build from a +# common local repository. +# interactiveMode: true if Maven should attempt to interact with the user for input, +# false if not. Defaults to true. +# usePluginRegistry: true if Maven should use the ${user.home}/.m2/plugin-registry.xml +# file to manage plugin versions, defaults to false. Note that for the current version +# of Maven 2.0, the plugin-registry.xml file should not be depended upon. Consider it +# dormant for now. +# offline: true if this build system should operate in offline mode, defaults to false. +# This element is useful for build servers which cannot connect to a remote repository, +# either because of network setup or security reasons. + src_prepare() { - sh ant-bridge.sh || die # BUG: this download and compiles lot of stuff - java-pkg-2_src_prepare + default } -src_install() { - mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository || die - find public -name \*.jar | grep -v tests | grep -v cofoja | while read f; do \ - java-pkg_dojar $f # FIXME: Java QA Notice: installing versioned jar 'gatk-tools-public-3.6.jar' - done +src_compile(){ + # work around gradle writing $HOME/.gradle, requiring $HOME/.git and $HOME/.m2/ + # https://github.com/samtools/htsjdk/issues/660#issuecomment-232155965 + # make jure SDK-1.8 is available, JRE-1.8 is not enough + # + # https://github.com/broadinstitute/gatk#building + # gradlew tragets are bundle, localJar, sparkJar, ... + GRADLE_USER_HOME="${WORKDIR}" ./gradlew --stacktrace --debug bundle || die } -pkg_postinst(){ - einfo "The ebuild also installs bundled SnpEff-2.0.5.jar file until the" - einfo "installation layout gets more testing" +src_install() { + cd build/libs || die + java-pkg_dojar "${PN}".jar + java-pkg_dojar "${PN}"-*-SNAPSHOT.jar + java-pkg_dolauncher ${PN} --main picard.cmdline.PicardCommandLine + #use source && java-pkg_dosrc "${S}"/src/java/* + #use doc && java-pkg_dojavadoc "${S}"/javadoc }