diff options
Diffstat (limited to 'dev-java/jvyaml')
-rw-r--r-- | dev-java/jvyaml/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1 | 3 | ||||
-rw-r--r-- | dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch | 34 | ||||
-rw-r--r-- | dev-java/jvyaml/jvyaml-0.2.1-r1.ebuild | 48 |
4 files changed, 93 insertions, 1 deletions
diff --git a/dev-java/jvyaml/ChangeLog b/dev-java/jvyaml/ChangeLog index 7bcb6a4fbb3a..83a1745c4f8a 100644 --- a/dev-java/jvyaml/ChangeLog +++ b/dev-java/jvyaml/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/jvyaml # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jvyaml/ChangeLog,v 1.5 2007/02/18 19:19:22 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jvyaml/ChangeLog,v 1.6 2007/03/08 05:54:25 nichoj Exp $ + +*jvyaml-0.2.1-r1 (08 Mar 2007) + + 08 Mar 2007; Joshua Nichols <nichoj@gentoo.org> + +files/jvyaml-0.2.1-tests.patch, +jvyaml-0.2.1-r1.ebuild: + Added a patch which should fix issues with running tests. Made junit be + only a build time dependency. 18 Feb 2007; Petteri Räty <betelgeuse@gentoo.org> -jvyaml-0.1.ebuild, -jvyaml-0.2.ebuild: diff --git a/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1 b/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1 new file mode 100644 index 000000000000..1e2c86f6afcf --- /dev/null +++ b/dev-java/jvyaml/files/digest-jvyaml-0.2.1-r1 @@ -0,0 +1,3 @@ +MD5 9936e39850a2fc778e8bd36697a094f6 jvyaml-src-0.2.1.tar.gz 202550 +RMD160 92b11e208f194365e669f0923294fa5a37e60723 jvyaml-src-0.2.1.tar.gz 202550 +SHA256 a21c47679bac174b6185265358c7c8e151ac1ee8c4f9fbceebe9b15a37a10382 jvyaml-src-0.2.1.tar.gz 202550 diff --git a/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch b/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch new file mode 100644 index 000000000000..5dac1832afee --- /dev/null +++ b/dev-java/jvyaml/files/jvyaml-0.2.1-tests.patch @@ -0,0 +1,34 @@ +Only in jvyaml-0.2.1-patched/: build +Files jvyaml-0.2.1/lib/jvyaml.jar and jvyaml-0.2.1-patched/lib/jvyaml.jar differ +diff -ru jvyaml-0.2.1/src/test/org/jvyaml/YAMLDumpTest.java jvyaml-0.2.1-patched/src/test/org/jvyaml/YAMLDumpTest.java +--- jvyaml-0.2.1/src/test/org/jvyaml/YAMLDumpTest.java 2006-09-24 13:07:19.000000000 -0400 ++++ jvyaml-0.2.1-patched/src/test/org/jvyaml/YAMLDumpTest.java 2007-03-08 00:39:04.000000000 -0500 +@@ -28,6 +28,8 @@ + import java.util.List; + import java.util.HashMap; + import java.util.ArrayList; ++import java.util.TimeZone; ++import java.text.DecimalFormat; + + import junit.framework.TestCase; + +@@ -71,9 +73,18 @@ + final java.util.Calendar cal = java.util.Calendar.getInstance(); + cal.clear(); + cal.set(1982,5-1,3); // Java's months are zero-based... ++ ++ // Nasty hack to figure out timezone so we can figure out what to ++ // expect when we do YAML#dump ++ TimeZone tz = cal.getTimeZone(); ++ int offset = tz.getOffset(cal.getTimeInMillis()) / 3600000; ++ DecimalFormat format = new DecimalFormat("00"); ++ String offsetString = format.format(offset); ++ offsetString = ( offset >= 0 ? "+" : "") + offsetString; + + final TestBean toDump = new TestBean("Ola Bini", 24, cal.getTime()); +- assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 +02:00\n", YAML.dump(toDump)); ++// assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 +02:00\n", YAML.dump(toDump)); ++ assertEquals("--- !java/object:org.jvyaml.TestBean\nname: Ola Bini\nage: 24\nborn: 1982-05-03 00:00:00 " + offsetString + ":00\n", YAML.dump(toDump)); + + } + }// YAMLDumpTest diff --git a/dev-java/jvyaml/jvyaml-0.2.1-r1.ebuild b/dev-java/jvyaml/jvyaml-0.2.1-r1.ebuild new file mode 100644 index 000000000000..09deaf74efdc --- /dev/null +++ b/dev-java/jvyaml/jvyaml-0.2.1-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jvyaml/jvyaml-0.2.1-r1.ebuild,v 1.1 2007/03/08 05:54:25 nichoj Exp $ + +inherit java-pkg-2 java-ant-2 eutils + +DESCRIPTION="Java YAML parser and emitter" +HOMEPAGE="https://jvyaml.dev.java.net/" +SRC_URI="https://${PN}.dev.java.net/files/documents/5215/41455/${PN}-src-${PV}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="source test" +DEPEND=">=virtual/jdk-1.4 + test? ( + dev-java/ant + dev-java/junit + ) + !test? ( + dev-java/ant-core + ) + source? ( app-arch/zip )" +RDEPEND=">=virtual/jre-1.4" + +src_unpack() { + unpack ${A} + cd ${S} + # https://jvyaml.dev.java.net/issues/show_bug.cgi?id=6 + epatch ${FILESDIR}/${PN}-0.2-tests.patch + + # https://jvyaml.dev.java.net/issues/show_bug.cgi?id=5 + epatch ${FILESDIR}/${P}-tests.patch + + cd lib + rm *.jar + use test && java-pkg_jar-from --build-only junit +} + +src_install() { + java-pkg_dojar lib/${PN}.jar + dodoc README + dodoc CREDITS + use source && java-pkg_dosrc src/* +} + +src_test() { + eant test +} |