diff options
author | Serkan Kaba <serkan@gentoo.org> | 2008-06-10 20:49:40 +0000 |
---|---|---|
committer | Serkan Kaba <serkan@gentoo.org> | 2008-06-10 20:49:40 +0000 |
commit | 77190327e8a51ebf734b3197f599535774b2edb0 (patch) | |
tree | b319a6db3ae9ad886d7cc68f0fb4ff0df5b1e568 /dev-java/jfreechart | |
parent | Version bump and migration toE API=1 slots. Thanks to Jan Vansteenkiste <Jan@... (diff) | |
download | gentoo-2-77190327e8a51ebf734b3197f599535774b2edb0.tar.gz gentoo-2-77190327e8a51ebf734b3197f599535774b2edb0.tar.bz2 gentoo-2-77190327e8a51ebf734b3197f599535774b2edb0.zip |
Version bump and remove unused patch. Fixes bug #225713. Thanks to Jan Vansteenkiste <Jan@buitendezone.be> for reporting.
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-java/jfreechart')
-rw-r--r-- | dev-java/jfreechart/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/jfreechart/files/1.0.8-test-timezone.patch | 141 | ||||
-rw-r--r-- | dev-java/jfreechart/jfreechart-1.0.10.ebuild | 70 |
3 files changed, 78 insertions, 142 deletions
diff --git a/dev-java/jfreechart/ChangeLog b/dev-java/jfreechart/ChangeLog index 5e87cdcc4ca0..af3e7890be43 100644 --- a/dev-java/jfreechart/ChangeLog +++ b/dev-java/jfreechart/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/jfreechart # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jfreechart/ChangeLog,v 1.43 2008/05/04 11:40:06 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jfreechart/ChangeLog,v 1.44 2008/06/10 20:49:39 serkan Exp $ + +*jfreechart-1.0.10 (10 Jun 2008) + + 10 Jun 2008; Serkan Kaba <serkan@gentoo.org> + -files/1.0.8-test-timezone.patch, +jfreechart-1.0.10.ebuild: + Version bump and remove unused patch. Fixes bug #225713. Thanks to Jan + Vansteenkiste <Jan@buitendezone.be> for reporting. 04 May 2008; Christian Faulhammer <opfer@gentoo.org> jfreechart-1.0.9-r1.ebuild: diff --git a/dev-java/jfreechart/files/1.0.8-test-timezone.patch b/dev-java/jfreechart/files/1.0.8-test-timezone.patch deleted file mode 100644 index 8e00f12a0033..000000000000 --- a/dev-java/jfreechart/files/1.0.8-test-timezone.patch +++ /dev/null @@ -1,141 +0,0 @@ -Index: source/org/jfree/data/time/Week.java -=================================================================== ---- source/org/jfree/data/time/Week.java (revision 691) -+++ source/org/jfree/data/time/Week.java (revision 692) -@@ -65,6 +65,7 @@ - * 09-Jan-2007 : Fixed bug in next() (DG);
- * 28-Aug-2007 : Added new constructor to avoid problem in creating new
- * instances (DG);
-+ * 19-Dec-2007 : Fixed bug in deprecated constructor (DG);
- *
- */
-
-@@ -171,7 +172,7 @@ - */
- public Week(Date time, TimeZone zone) {
- // defer argument checking...
-- this(time, RegularTimePeriod.DEFAULT_TIME_ZONE, Locale.getDefault());
-+ this(time, zone, Locale.getDefault());
- }
-
- /**
-Index: tests/org/jfree/data/time/junit/WeekTests.java -=================================================================== ---- tests/org/jfree/data/time/junit/WeekTests.java (revision 691) -+++ tests/org/jfree/data/time/junit/WeekTests.java (revision 692) -@@ -43,6 +43,8 @@ - * 01-Jun-2006 : Added testBug1498805() method (DG); - * 11-Jul-2007 : Fixed bad time zone assumption (DG); - * 28-Aug-2007 : Added test for constructor problem (DG); -+ * 19-Dec-2007 : Set default locale for tests that are sensitive -+ * to the locale (DG); - * - */ - -@@ -288,22 +290,36 @@ - * A test case for bug 1448828. - */ - public void testBug1448828() { -- Week w = new Week(new Date(1136109830000l), -- TimeZone.getTimeZone("GMT")); -- assertEquals(2005, w.getYearValue()); -- assertEquals(52, w.getWeek()); -+ Locale saved = Locale.getDefault(); -+ Locale.setDefault(Locale.UK); -+ try { -+ Week w = new Week(new Date(1136109830000l), -+ TimeZone.getTimeZone("GMT")); -+ assertEquals(2005, w.getYearValue()); -+ assertEquals(52, w.getWeek()); -+ } -+ finally { -+ Locale.setDefault(saved); -+ } - } - - /** - * A test case for bug 1498805. - */ - public void testBug1498805() { -- TimeZone zone = TimeZone.getTimeZone("GMT"); -- GregorianCalendar gc = new GregorianCalendar(zone); -- gc.set(2005, Calendar.JANUARY, 1, 12, 0, 0); -- Week w = new Week(gc.getTime(), zone); -- assertEquals(53, w.getWeek()); -- assertEquals(new Year(2004), w.getYear()); -+ Locale saved = Locale.getDefault(); -+ Locale.setDefault(Locale.UK); -+ try { -+ TimeZone zone = TimeZone.getTimeZone("GMT"); -+ GregorianCalendar gc = new GregorianCalendar(zone); -+ gc.set(2005, Calendar.JANUARY, 1, 12, 0, 0); -+ Week w = new Week(gc.getTime(), zone); -+ assertEquals(53, w.getWeek()); -+ assertEquals(new Year(2004), w.getYear()); -+ } -+ finally { -+ Locale.setDefault(saved); -+ } - } - - /** -@@ -325,8 +341,15 @@ - */ - public void testGetFirstMillisecondWithTimeZone() { - Week w = new Week(47, 1950); -- TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); -- assertEquals(-603216000000L, w.getFirstMillisecond(zone)); -+ Locale saved = Locale.getDefault(); -+ Locale.setDefault(Locale.US); -+ try { -+ TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); -+ assertEquals(-603302400000L, w.getFirstMillisecond(zone)); -+ } -+ finally { -+ Locale.setDefault(saved); -+ } - - // try null calendar - boolean pass = false; -@@ -335,8 +358,8 @@ - } - catch (NullPointerException e) { - pass = true; -- } -- assertTrue(pass); -+ } -+ assertTrue(pass); - } - - /** -@@ -378,10 +401,17 @@ - */ - public void testGetLastMillisecondWithTimeZone() { - Week w = new Week(2, 1950); -- TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); -- assertEquals(-629827200001L, w.getLastMillisecond(zone)); -- -- // try null calendar -+ Locale saved = Locale.getDefault(); -+ Locale.setDefault(Locale.US); -+ try { -+ TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); -+ assertEquals(-629913600001L, w.getLastMillisecond(zone)); -+ } -+ finally { -+ Locale.setDefault(saved); -+ } -+ -+ // try null zone - boolean pass = false; - try { - w.getLastMillisecond((TimeZone) null); -@@ -389,7 +419,7 @@ - catch (NullPointerException e) { - pass = true; - } -- assertTrue(pass); -+ assertTrue(pass); - } - - /** diff --git a/dev-java/jfreechart/jfreechart-1.0.10.ebuild b/dev-java/jfreechart/jfreechart-1.0.10.ebuild new file mode 100644 index 000000000000..a605febcb15a --- /dev/null +++ b/dev-java/jfreechart/jfreechart-1.0.10.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jfreechart/jfreechart-1.0.10.ebuild,v 1.1 2008/06/10 20:49:39 serkan Exp $ + +EAPI=1 +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="JFreeChart is a free Java class library for generating charts" +HOMEPAGE="http://www.jfree.org/jfreechart" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="LGPL-2.1" +SLOT="1.0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="test" +COMMON_DEPEND=" + >=dev-java/itext-1.4.6 + dev-java/jcommon:1.0 + java-virtuals/servlet-api:2.3" +DEPEND=">=virtual/jdk-1.4 + ${COMMON_DEPEND} + test? ( dev-java/ant-junit )" +RDEPEND=">=virtual/jdk-1.4 + ${COMMON_DEPEND}" + +JAVA_PKG_FILTER_COMPILER="jikes" + +src_unpack() { + unpack ${A} + cd "${S}" + + # We do not fork junit tests because we need to disable X11 support for all tests + if use test; then + epatch "${FILESDIR}/${PN}-1.0.4-build.xml.patch" + fi + + rm -v *.jar lib/*.jar || die +} + +src_compile() { + # Note that compile-experimental depends on compile so it is sufficient to run + # just compile-experimental + eant -f ant/build.xml compile-experimental $(use_doc) $(get_jars) +} + +src_test() { + # X11 tests are disabled using java.awt.headless=true + ANT_TASKS="ant-junit" \ + ANT_OPTS="-Djava.awt.headless=true -Duser.timezone=UTC" \ + eant -f ant/build.xml test $(get_jars) +} + +src_install() { + java-pkg_newjar ${P}.jar ${PN}.jar + java-pkg_newjar ${P}-experimental.jar ${PN}-experimental.jar + dodoc README.txt ChangeLog NEWS || die + use doc && java-pkg_dojavadoc javadoc + use source && java-pkg_dosrc source/org +} + +get_jars() { + local antflags=" + -Ditext.jar=$(java-pkg_getjar itext iText.jar) \ + -Djcommon.jar=$(java-pkg_getjar jcommon-1.0 jcommon.jar) \ + -Dservlet.jar=$(java-pkg_getjars servlet-api-2.3)" + use test && antflags="${antflags} \ + -Djunit.jar=$(java-pkg_getjars --build-only junit)" + echo "${antflags}" +} |