diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-03-22 02:24:52 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-03-22 02:24:52 +0000 |
commit | 92ad9f848cb5af40a8f859987bb5420cbf922ce2 (patch) | |
tree | 52f74b39d28b66fee881e227e442f3cdc9f4df2e /dev-java | |
parent | RESTRICT test because the upstream distribution doesn't have them. (diff) | |
download | gentoo-2-92ad9f848cb5af40a8f859987bb5420cbf922ce2.tar.gz gentoo-2-92ad9f848cb5af40a8f859987bb5420cbf922ce2.tar.bz2 gentoo-2-92ad9f848cb5af40a8f859987bb5420cbf922ce2.zip |
Prepare for generic src_test.
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/commons-codec/ChangeLog | 8 | ||||
-rw-r--r-- | dev-java/commons-codec/commons-codec-1.3-r1.ebuild | 10 | ||||
-rw-r--r-- | dev-java/commons-codec/files/1.3-tests-fix.patch | 84 |
3 files changed, 97 insertions, 5 deletions
diff --git a/dev-java/commons-codec/ChangeLog b/dev-java/commons-codec/ChangeLog index 3ce4dfeb37e5..c0056ea2779a 100644 --- a/dev-java/commons-codec/ChangeLog +++ b/dev-java/commons-codec/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-java/commons-codec -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-codec/ChangeLog,v 1.28 2007/07/29 19:22:17 tgall Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-codec/ChangeLog,v 1.29 2008/03/22 02:24:52 betelgeuse Exp $ + + 22 Mar 2008; Petteri Räty <betelgeuse@gentoo.org> + +files/1.3-tests-fix.patch, commons-codec-1.3-r1.ebuild: + Prepare for generic src_test. 29 Jul 2007; Tom Gall <tgall@gentoo.org> commons-codec-1.3-r1.ebuild: stable on ppc64 diff --git a/dev-java/commons-codec/commons-codec-1.3-r1.ebuild b/dev-java/commons-codec/commons-codec-1.3-r1.ebuild index 7d7692c3977f..69a86074dc01 100644 --- a/dev-java/commons-codec/commons-codec-1.3-r1.ebuild +++ b/dev-java/commons-codec/commons-codec-1.3-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-codec/commons-codec-1.3-r1.ebuild,v 1.11 2007/07/29 19:22:17 tgall Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-codec/commons-codec-1.3-r1.ebuild,v 1.12 2008/03/22 02:24:52 betelgeuse Exp $ -JAVA_PKG_IUSE="doc source" +EAPI=1 +JAVA_PKG_IUSE="doc source test" inherit java-pkg-2 java-ant-2 @@ -20,6 +21,7 @@ RDEPEND=">=virtual/jre-1.3 dev-java/log4j" DEPEND=">=virtual/jdk-1.3 + test? ( dev-java/ant-junit:0 ) ${RDEPEND}" S="${WORKDIR}" @@ -27,6 +29,7 @@ S="${WORKDIR}" src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}/1.3-tests-fix.patch" sed -i "s_../LICENSE_LICENSE.txt_" build.xml || die "sed failed" echo "conf.home=./src/conf" >> build.properties echo "source.home=./src/java" >> build.properties @@ -34,6 +37,7 @@ src_unpack() { echo "dist.home=./output/dist" >> build.properties echo "test.home=./src/test" >> build.properties echo "final.name=commons-codec" >> build.properties + java-ant_xml-rewrite -f build.xml -c -e javac -a encoding -v ISO8859-1 } src_install() { diff --git a/dev-java/commons-codec/files/1.3-tests-fix.patch b/dev-java/commons-codec/files/1.3-tests-fix.patch new file mode 100644 index 000000000000..a8632cb371ea --- /dev/null +++ b/dev-java/commons-codec/files/1.3-tests-fix.patch @@ -0,0 +1,84 @@ +--- /var/tmp/portage/dev-java/commons-codec-1.3-r1/work/src/test/org/apache/commons/codec/language/SoundexTest.java 2004-06-02 03:55:38.000000000 +0300 ++++ src/test/org/apache/commons/codec/language/SoundexTest.java 2008-03-22 04:22:58.000000000 +0200 +@@ -1,9 +1,10 @@ + /*
+- * Copyright 2001-2004 The Apache Software Foundation.
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at + *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+@@ -19,6 +20,7 @@ +
+ import junit.framework.Test;
+ import junit.framework.TestSuite;
++ + import org.apache.commons.codec.EncoderException;
+ import org.apache.commons.codec.StringEncoder;
+ import org.apache.commons.codec.StringEncoderAbstractTest;
+@@ -26,13 +28,13 @@ + /**
+ * Tests {@link Soundex}
+ *
+- * @version $Id: 1.3-tests-fix.patch,v 1.1 2008/03/22 02:24:52 betelgeuse Exp $
+ * @author Apache Software Foundation
++ * @version $Id: 1.3-tests-fix.patch,v 1.1 2008/03/22 02:24:52 betelgeuse Exp $ + */
+ public class SoundexTest extends StringEncoderAbstractTest {
+
+ public static Test suite() {
+- return (new TestSuite(SoundexTest.class));
++ return new TestSuite(SoundexTest.class); + }
+
+ private Soundex encoder = null;
+@@ -340,30 +342,39 @@ + /**
+ * Fancy characters are not mapped by the default US mapping.
+ *
+- * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080
++ * http://issues.apache.org/bugzilla/show_bug.cgi?id=29080 + */
+ public void testUsMappingOWithDiaeresis() {
+ assertEquals("O000", this.getEncoder().encode("o"));
++ if ( Character.isLetter('ö') ) { + try {
+ assertEquals("Ö000", this.getEncoder().encode("ö"));
+ fail("Expected IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
++ } else { ++ assertEquals("", this.getEncoder().encode("ö")); ++ } + }
+
+ /**
+ * Fancy characters are not mapped by the default US mapping.
+ *
+- * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080
++ * http://issues.apache.org/bugzilla/show_bug.cgi?id=29080 + */
+ public void testUsMappingEWithAcute() {
+ assertEquals("E000", this.getEncoder().encode("e"));
++ if ( Character.isLetter('é') ) { + try {
+ assertEquals("É000", this.getEncoder().encode("é"));
+ fail("Expected IllegalArgumentException not thrown");
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
++ } else { ++ assertEquals("", this.getEncoder().encode("é")); + }
++ } ++ + }
|