Add dev-java/joda-time package (version 2.0 and live Git builds).
authorW. Trevor King <wking@drexel.edu>
Sun, 9 Oct 2011 18:15:47 +0000 (14:15 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 24 Sep 2014 18:46:15 +0000 (11:46 -0700)
dev-java/joda-time/Manifest [new file with mode: 0644]
dev-java/joda-time/joda-time-2.0.ebuild [new symlink]
dev-java/joda-time/joda-time-9999.ebuild [new file with mode: 0644]

diff --git a/dev-java/joda-time/Manifest b/dev-java/joda-time/Manifest
new file mode 100644 (file)
index 0000000..b4f2ac9
--- /dev/null
@@ -0,0 +1,3 @@
+DIST joda-time-2.0.tar.gz 888688 RMD160 c0a54698dbf505e3f11fba736da460d0f1b184e9 SHA1 ad3694b9797368f6aff3234bbfd0e7f69dcf9f71 SHA256 ae80c4cb3bcd86885739ec066ef16b0fe98668dceac61c5093bc5497fcfed1f0
+EBUILD joda-time-2.0.ebuild 1962 RMD160 13f2a1f4b9d80ad51e09ab62454b79fac789c89a SHA1 abfb87f5066e2e9937e932518c88f13125c506f3 SHA256 d2d4ba34f023c64c6db29f5a47fb1a0a5e83dc49b2bf3ae30356d778bc806c3e
+EBUILD joda-time-9999.ebuild 1962 RMD160 13f2a1f4b9d80ad51e09ab62454b79fac789c89a SHA1 abfb87f5066e2e9937e932518c88f13125c506f3 SHA256 d2d4ba34f023c64c6db29f5a47fb1a0a5e83dc49b2bf3ae30356d778bc806c3e
diff --git a/dev-java/joda-time/joda-time-2.0.ebuild b/dev-java/joda-time/joda-time-2.0.ebuild
new file mode 120000 (symlink)
index 0000000..303da72
--- /dev/null
@@ -0,0 +1 @@
+joda-time-9999.ebuild
\ No newline at end of file
diff --git a/dev-java/joda-time/joda-time-9999.ebuild b/dev-java/joda-time/joda-time-9999.ebuild
new file mode 100644 (file)
index 0000000..4f84529
--- /dev/null
@@ -0,0 +1,74 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+JAVA_PKG_IUSE="doc examples source test"
+
+inherit java-pkg-2 java-ant-2
+
+if [[ "${PV}" == "9999" ]]; then
+       inherit git-2
+       EGIT_REPO_URI="git://github.com/JodaOrg/${PN}.git"
+       SRC_URI=""
+       MY_P="${P}"
+else
+       #MY_P="${P}-src"
+       #SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+       #S="${WORKDIR}/${MY_P}"
+       SRC_URI="http://github.com/JodaOrg/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="A quality open-source replacement for the Java Date and Time classes."
+HOMEPAGE="http://joda-time.sourceforge.net/"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+COMMON_DEP="dev-java/joda-convert"
+DEPEND="
+       >=virtual/jdk-1.5
+       test? ( dev-java/ant-junit4 )
+       ${COMMON_DEP}"
+RDEPEND="
+       >=virtual/jre-1.5
+       ${COMMON_DEP}"
+
+JAVA_PKG_WANT_SOURCE="5"
+# chokes on static inner class making instance of non-static inner class
+EANT_FILTER_COMPILER="jikes"
+# Keep ant from trying to use maven internally
+EANT_EXTRA_ARGS="-Djunit.ant=1 -Djunit.present=1 -Djodaconvert.present=1"
+EANT_GENTOO_CLASSPATH="joda-convert"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+src_unpack() {
+       # Work around GitHub's "${PN}-<SHA1>" directory name
+       if [[ "${PV}" == "9999" ]]; then
+               git-2_src_unpack
+       else
+               unpack "${A}"
+               mv *-"${PN}"-* "${S}"
+       fi
+}
+
+src_test() {
+       ANT_TASKS="ant-junit" eant \
+               -Djunit.jar="$(java-pkg_getjar junit-4 junit.jar)" \
+               -Djodaconvert.jar="$(java-pkg_getjar joda-convert joda-convert.jar)" \
+               test
+}
+
+src_install() {
+       if [[ "${PV}" == "9999" ]]; then
+               java-pkg_newjar build/${PN}-*.jar ${PN}.jar
+       else
+               java-pkg_newjar build/${P}.jar ${PN}.jar
+       fi
+
+       dodoc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt ToDo.txt || die
+       use doc && java-pkg_dojavadoc build/docs
+       use examples && java-pkg_doexamples src/example
+       use source && java-pkg_dosrc src/java/org
+}