commit:     6e6616f8521d20074bbca6522e2a5570718d5736
Author:     Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Wed Jan 11 23:26:50 2017 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Wed Jan 11 23:26:50 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=6e6616f8

dev-java/htsjdk: add a live ebuild, add a note

Not sure if current build system still creates $HOME/.git but from
reading github Issues it seem it is still needed: users are even asked
to run 'git clone' to work around the issue when gradle fails to do that.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-java/htsjdk/htsjdk-2.5.1.ebuild                |  4 ++--
 .../{htsjdk-2.5.1.ebuild => htsjdk-9999.ebuild}    | 26 +++++++++++-----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/dev-java/htsjdk/htsjdk-2.5.1.ebuild 
b/dev-java/htsjdk/htsjdk-2.5.1.ebuild
index 0f1e162..6ba163f 100644
--- a/dev-java/htsjdk/htsjdk-2.5.1.ebuild
+++ b/dev-java/htsjdk/htsjdk-2.5.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -36,7 +36,7 @@ java_prepare(){
 }
 
 src_compile(){
-       # work around gradle writing $HOME/.gradle
+       # work around gradle writing $HOME/.gradle and $HOME/.git
        # https://github.com/samtools/htsjdk/issues/660#issuecomment-232155965
        GRADLE_USER_HOME="${WORKDIR}" ./gradlew build || die
 }

diff --git a/dev-java/htsjdk/htsjdk-2.5.1.ebuild 
b/dev-java/htsjdk/htsjdk-9999.ebuild
similarity index 59%
copy from dev-java/htsjdk/htsjdk-2.5.1.ebuild
copy to dev-java/htsjdk/htsjdk-9999.ebuild
index 0f1e162..e957674 100644
--- a/dev-java/htsjdk/htsjdk-2.5.1.ebuild
+++ b/dev-java/htsjdk/htsjdk-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -6,11 +6,11 @@ EAPI="6"
 
 JAVA_PKG_IUSE="doc source"
 
-inherit java-pkg-2 java-ant-2
+inherit git-r3 java-pkg-2 java-ant-2
 
 DESCRIPTION="Java API for high-throughput sequencing data (HTS) formats."
 HOMEPAGE="https://samtools.github.io/htsjdk/";
-SRC_URI="https://github.com/samtools/htsjdk/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+EGIT_REPO_URI="https://github.com/samtools/htsjdk.git";
 
 LICENSE="MIT"
 SLOT="0"
@@ -36,18 +36,18 @@ java_prepare(){
 }
 
 src_compile(){
-       # work around gradle writing $HOME/.gradle
+       # work around gradle writing $HOME/.gradle and $HOME/.git
        # https://github.com/samtools/htsjdk/issues/660#issuecomment-232155965
-       GRADLE_USER_HOME="${WORKDIR}" ./gradlew build || die
+       GRADLE_USER_HOME="${WORKDIR}" ./gradlew || die
 }
 
 src_install() {
-       cd dist || die
-
-       for i in *.jar; do
-               java-pkg_newjar $i ${i/-[0-9]*.jar/.jar}
-       done
-
-       use source && java-pkg_dosrc "${S}"/src/java/*
-       use doc && java-pkg_dojavadoc "${S}"/javadoc
+       cd build/libs || die
+
+       #for i in *-SNAPSHOT.jar; do
+       #       java-pkg_newjar $i ${i/-[0-9]*.jar/.jar}
+       #done
+       java-pkg_newjar "${S}"/build/libs/*-SNAPSHOT.jar htsjdk.jar
+       use source && java-pkg_dosrc "${S}"/build/libs/*-sources.jar
+       use doc && java-pkg_dojavadoc "${S}"/build/libs/*-javadoc.jar
 }

Reply via email to