[ooo-build-commit] .: patches/dev300

Petr Mladek pmladek at kemper.freedesktop.org
Fri Aug 6 10:37:40 PDT 2010


 patches/dev300/apply                         |    5 +++++
 patches/dev300/build-java-1.4-l10ntools.diff |   16 ++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 2faa9b5a832fc02b3da8dfb0a0e22e703fc3e91e
Author: Petr Mladek <pmladek at walk.suse.cz>
Date:   Fri Aug 6 19:36:39 2010 +0200

    fix l10ntools build with java 1.4
    
    * patches/dev300/build-java-1.4-l10ntools.diff:
    * patches/dev300/apply: Java 1.4 does not have String.replace(CharSequence,
      CharSequence); we use String.replaceAll instead; it is not perfect because
      it treats the parameter as a regular expression; though, it should be
      acceptable because it is only a helper tool and we use the hack only for
      building on the very old distros

diff --git a/patches/dev300/apply b/patches/dev300/apply
index bfcb29d..d780c5d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1088,6 +1088,11 @@ build-java-1.4-regcomp.diff, i#12345, pmladek
 # Java 1.4 does not support HashMap<String, Level1Entry> and Iterator<Level2Entry> templates
 # the universal types and explicit cast must be used instead
 build-java-1.4-jurt.diff, i#12345, pmladek
+# Java 1.4 does not have String.replace(CharSequence, CharSequence)
+# we use String.replaceAll instead; it is not perfect because it treats the parameter
+# as a regular expression; though, it should be acceptable because it is only a helper tool
+# and we use the hack only for building on the very old distros
+build-java-1.4-l10ntools.diff, i#12345, pmladek
 # another fallback to load libhsqldb with JRE 1.4
 connectivity-load-libhsqldb-with-jre-1.4.diff, n#431360, pmladek
 
diff --git a/patches/dev300/build-java-1.4-l10ntools.diff b/patches/dev300/build-java-1.4-l10ntools.diff
new file mode 100644
index 0000000..fff0732
--- /dev/null
+++ b/patches/dev300/build-java-1.4-l10ntools.diff
@@ -0,0 +1,16 @@
+--- l10ntools/java/jpropex/java/JPropEx.java.old	2010-07-22 13:49:22.000000000 +0200
++++ l10ntools/java/jpropex/java/JPropEx.java	2010-08-06 19:27:55.000000000 +0200
+@@ -139,8 +139,11 @@ public class JPropEx
+     {
+         String path = makeAbs( filename );
+         //String path = makeAbs( inputFileArg );
+-        path = path.replace( rootArg + "/" , "" );
+-        path = path.replace("/","\\");
++        // FIXME: we use .replaceAll only with Java 1.4
++        //        it is not safe because rootArg should not be treated as regular expression
++        //        it is only a helper tool, so the hack with replaceAll might be acceptable just for building on the very old system
++        path = path.replaceAll( rootArg + "/" , "" );
++        path = path.replaceAll("/","\\");
+         return new SdfEntity( projectArg , path , "" /* dummy1 */ , resourceType , "", "" , "" , "" , "" /* dummy2 */ , 
+                               sourceLanguage , "",  "" , ""  , "" , "2002-02-02 02:02:02" );
+     }


More information about the ooo-build-commit mailing list