[Jpackage-commits] rpms/free/rhino rhino-build.patch, 1.1, 1.1.2.1 rhino-class-loader.patch, NONE, 1.1.2.1 rhino-debugger.script, 1.1, 1.1.2.1 rhino-dojo.patch, 1.1, 1.1.2.1 rhino-idswitch.script, 1.1, 1.1.2.1 rhino-jsc.script, 1.1, 1.1.2.1 rhino.script, 1.2, 1.2.4.1 rhino.spec, 1.10.2.1, 1.10.2.2

jpackage jpackage at ryu.zarb.org
Wed Feb 11 22:12:50 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/rhino
In directory ryu.zarb.org:/tmp/tTmYgDY1vB/rpms/free/rhino

Modified Files:
      Tag: JPACKAGE-5_0
	rhino-build.patch rhino-debugger.script rhino-dojo.patch 
	rhino-idswitch.script rhino-jsc.script rhino.script rhino.spec 
Added Files:
      Tag: JPACKAGE-5_0
	rhino-class-loader.patch 
Log Message:
1.7-1.r2.6.jpp5

Index: rhino-dojo.patch
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino-dojo.patch,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** rhino-dojo.patch	11 Aug 2008 04:21:08 -0000	1.1
--- rhino-dojo.patch	11 Feb 2009 21:12:47 -0000	1.1.2.1
***************
*** 1,6 ****
! diff -Naur -x '*.jar' rhino/src/org/mozilla/javascript/BaseFunction.java rhino1_6R4/src/org/mozilla/javascript/BaseFunction.java
! --- rhino/src/org/mozilla/javascript/BaseFunction.java	2006-09-09 13:14:10.000000000 -0400
! +++ rhino1_6R4/src/org/mozilla/javascript/BaseFunction.java	2006-09-27 17:03:18.000000000 -0400
! @@ -373,6 +373,28 @@
           return sb.toString();
       }
--- 1,5 ----
! --- rhino1_7R2/src/org/mozilla/javascript/BaseFunction.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/src/org/mozilla/javascript/BaseFunction.java	2008-12-10 16:13:48.841102316 -0500
! @@ -401,6 +401,28 @@
           return sb.toString();
       }
***************
*** 31,72 ****
   
       public int getLength() { return 0; }
! diff -Naur -x '*.jar' rhino/src/org/mozilla/javascript/Context.java rhino1_6R4/src/org/mozilla/javascript/Context.java
! --- rhino/src/org/mozilla/javascript/Context.java	2006-09-09 13:14:10.000000000 -0400
! +++ rhino1_6R4/src/org/mozilla/javascript/Context.java	2006-09-27 17:03:18.000000000 -0400
! @@ -1178,6 +1178,33 @@
!          }
       }
   
  +        public final String decompileReader(Scriptable scope, Reader in,
! +    		                                       String sourceName, int lineno,
! +    		                                       Object securityDomain)
! +    		        throws IOException
! +    		    {
! +    		        Script script = compileReader(scope, in, sourceName, lineno,
! +    		                                      securityDomain);
! +    		        if (script != null) {
! +    					// System.err.println(script);
! +    		            return decompileScript(script, 0);
! +    		        } else {
! +    		            return null;
! +    		        }
! +    		    }
! +    		
  +        public final String compressReader(Scriptable scope, Script script, String source,
! +    			String sourceName, int lineno, Object securityDomain){
! +        	
! +    		if (script != null) {
! +    			// System.err.println(script);    			
! +    			return compressScript(script, 0, source,lineno);    			
! +    		} else {
! +    			return null;
! +    		}
! +    	}
! +       
! +    		
       /**
        * Check whether a string is ready to be compiled.
        * <p>
! @@ -1361,6 +1388,27 @@
       }
   
--- 30,70 ----
   
       public int getLength() { return 0; }
! --- rhino1_7R2/src/org/mozilla/javascript/Context.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/src/org/mozilla/javascript/Context.java	2008-12-10 16:17:52.086973772 -0500
! @@ -1241,6 +1241,33 @@
!                  this, scope, args);
       }
   
  +        public final String decompileReader(Scriptable scope, Reader in,
! +                                                     String sourceName, int lineno,
! +                                                     Object securityDomain)
! +                      throws IOException
! +                  {
! +                      Script script = compileReader(scope, in, sourceName, lineno,
! +                                                    securityDomain);
! +                      if (script != null) {
! +                                      // System.err.println(script);
! +                          return decompileScript(script, 0);
! +                      } else {
! +                          return null;
! +                      }
! +                  }
! +
  +        public final String compressReader(Scriptable scope, Script script, String source,
! +                      String sourceName, int lineno, Object securityDomain){
! +
! +              if (script != null) {
! +                      // System.err.println(script);
! +                      return compressScript(script, 0, source,lineno);
! +              } else {
! +                      return null;
! +              }
! +      }
! +
! +
       /**
        * Check whether a string is ready to be compiled.
        * <p>
! @@ -1424,6 +1451,27 @@
       }
   
***************
*** 96,100 ****
        * <p>
        * Decompiles a previously compiled JavaScript function object to
! @@ -2240,7 +2288,6 @@
                   sourceReader = null;
               }
--- 94,98 ----
        * <p>
        * Decompiles a previously compiled JavaScript function object to
! @@ -2358,7 +2406,6 @@
                   sourceReader = null;
               }
***************
*** 104,108 ****
           if (returnFunction) {
               p.calledByCompileFunction = true;
! @@ -2251,6 +2298,7 @@
           } else {
               tree = p.parse(sourceReader, sourceName, lineno);
--- 102,106 ----
           if (returnFunction) {
               p.calledByCompileFunction = true;
! @@ -2369,6 +2416,7 @@
           } else {
               tree = p.parse(sourceReader, sourceName, lineno);
***************
*** 112,119 ****
               if (!(tree.getFunctionCount() == 1
                     && tree.getFirstChild() != null
! diff -Naur -x '*.jar' rhino/src/org/mozilla/javascript/Decompiler.java rhino1_6R4/src/org/mozilla/javascript/Decompiler.java
! --- rhino/src/org/mozilla/javascript/Decompiler.java	2006-09-09 13:14:10.000000000 -0400
! +++ rhino1_6R4/src/org/mozilla/javascript/Decompiler.java	2006-09-27 17:03:18.000000000 -0400
! @@ -37,6 +37,11 @@
   
   package org.mozilla.javascript;
--- 110,116 ----
               if (!(tree.getFunctionCount() == 1
                     && tree.getFirstChild() != null
! --- rhino1_7R2/src/org/mozilla/javascript/Decompiler.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/src/org/mozilla/javascript/Decompiler.java	2008-12-10 16:13:48.845099830 -0500
! @@ -41,6 +41,11 @@
   
   package org.mozilla.javascript;
***************
*** 127,131 ****
    * The following class save decompilation information about the source.
    * Source information is returned from the parser as a String
! @@ -70,6 +75,264 @@
    * the final constant pool entry from information available at parse
    * time.
--- 124,128 ----
    * The following class save decompilation information about the source.
    * Source information is returned from the parser as a String
! @@ -74,6 +79,264 @@
    * the final constant pool entry from information available at parse
    * time.
***************
*** 392,396 ****
   {
       /**
! @@ -266,6 +529,512 @@
           return new String(sourceBuffer, offset, sourceTop - offset);
       }
--- 389,393 ----
   {
       /**
! @@ -270,6 +533,512 @@
           return new String(sourceBuffer, offset, sourceTop - offset);
       }
***************
*** 905,912 ****
        * Decompile the source information associated with this js
        * function/script back into a string.  For the most part, this
! diff -Naur -x '*.jar' rhino/src/org/mozilla/javascript/TokenStream.java rhino1_6R4/src/org/mozilla/javascript/TokenStream.java
! --- rhino/src/org/mozilla/javascript/TokenStream.java	2006-09-09 13:14:10.000000000 -0400
! +++ rhino1_6R4/src/org/mozilla/javascript/TokenStream.java	2006-09-27 17:03:18.000000000 -0400
! @@ -64,9 +64,12 @@
       private final static int
           EOF_CHAR = -1;
--- 902,938 ----
        * Decompile the source information associated with this js
        * function/script back into a string.  For the most part, this
! --- rhino1_7R2/src/org/mozilla/javascript/NativeFunction.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/src/org/mozilla/javascript/NativeFunction.java	2008-12-10 16:13:48.849099824 -0500
! @@ -75,6 +75,27 @@
!          }
!      }
!  
! +    /**
! +     * Compress the script.
! +     * <p>
! +     *
! +     * @param parseTree Mapping for each function node and corresponding parameters & variables names
! +     * @param indent How much to indent the decompiled result
! +     * @param flags Flags specifying format of decompilation output
! +     * @return compressed script
! +     */
! +    final String compress(ScriptOrFnNode parseTree, int indent, int flags)
! +    {
! +        String encodedSource = getEncodedSource();
! +        if (encodedSource == null) {
! +            return super.compress(indent, flags);
! +        } else {
! +            UintMap properties = new UintMap(1);
! +            properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
! +            return Decompiler.compress(encodedSource, flags, properties, parseTree);
! +        }
! +    }
! +
!      @Override
!      public int getLength()
!      {
! --- rhino1_7R2/src/org/mozilla/javascript/TokenStream.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/src/org/mozilla/javascript/TokenStream.java	2008-12-10 16:13:48.846099919 -0500
! @@ -68,9 +68,12 @@
       private final static int
           EOF_CHAR = -1;
***************
*** 921,925 ****
           this.lineno = lineno;
           if (sourceReader != null) {
! @@ -736,6 +739,8 @@
   
               case '/':
--- 947,951 ----
           this.lineno = lineno;
           if (sourceReader != null) {
! @@ -754,6 +757,8 @@
   
               case '/':
***************
*** 930,936 ****
                       skipLine();
                       continue retry;
! diff -Naur -x '*.jar' rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java
! --- rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java	1969-12-31 19:00:00.000000000 -0500
! +++ rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java	2006-09-27 17:04:27.000000000 -0400
  @@ -0,0 +1,63 @@
  +
--- 956,961 ----
                       skipLine();
                       continue retry;
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java.orig	2008-12-10 16:13:48.846099919 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/AbstractCellEditor.java	2008-12-10 16:13:48.846099919 -0500
  @@ -0,0 +1,63 @@
  +
***************
*** 997,1003 ****
  +    }
  +}
! diff -Naur -x '*.jar' rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java
! --- rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java	1969-12-31 19:00:00.000000000 -0500
! +++ rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java	2006-09-27 17:04:27.000000000 -0400
  @@ -0,0 +1,356 @@
  +/*
--- 1022,1027 ----
  +    }
  +}
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java.orig	2008-12-10 16:13:48.847099847 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/JTreeTable.java	2008-12-10 16:13:48.847099847 -0500
  @@ -0,0 +1,356 @@
  +/*
***************
*** 1357,1363 ****
  +    }
  +}
! diff -Naur -x '*.jar' rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java
! --- rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java	1969-12-31 19:00:00.000000000 -0500
! +++ rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java	2006-09-27 17:04:27.000000000 -0400
  @@ -0,0 +1,128 @@
  +/*
--- 1381,1460 ----
  +    }
  +}
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java.orig	2008-12-10 16:13:48.848099816 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java	2008-12-10 16:13:48.847099847 -0500
! @@ -0,0 +1,71 @@
! +/*
! + * TreeTableModel.java
! + *
! + * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
! + *
! + * This software is the confidential and proprietary information of Sun
! + * Microsystems, Inc. ("Confidential Information").  You shall not
! + * disclose such Confidential Information and shall use it only in
! + * accordance with the terms of the license agreement you entered into
! + * with Sun.
! + *
! + * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
! + * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
! + * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
! + * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
! + * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
! + * THIS SOFTWARE OR ITS DERIVATIVES.
! + *
! + */
! +
! +
! +         package org.mozilla.javascript.tools.debugger.downloaded;
! +         import javax.swing.tree.TreeModel;
! +       
! +
! +/**
! + * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
! + * to add methods for getting inforamtion about the set of columns each 
! + * node in the TreeTableModel may have. Each column, like a column in 
! + * a TableModel, has a name and a type associated with it. Each node in 
! + * the TreeTableModel can return a value for each of the columns and 
! + * set that value if isCellEditable() returns true. 
! + *
! + * @author Philip Milne 
! + * @author Scott Violet
! + */
! +public interface TreeTableModel extends TreeModel
! +{
! +    /**
! +     * Returns the number ofs availible column.
! +     */
! +    public int getColumnCount();
! +
! +    /**
! +     * Returns the name for column number <code>column</code>.
! +     */
! +    public String getColumnName(int column);
! +
! +    /**
! +     * Returns the type for column number <code>column</code>.
! +     */
! +    public Class getColumnClass(int column);
! +
! +    /**
! +     * Returns the value to be displayed for node <code>node</code>, 
! +     * at column number <code>column</code>.
! +     */
! +    public Object getValueAt(Object node, int column);
! +
! +    /**
! +     * Indicates whether the the value for node <code>node</code>, 
! +     * at column number <code>column</code> is editable.
! +     */
! +    public boolean isCellEditable(Object node, int column);
! +
! +    /**
! +     * Sets the value for node <code>node</code>, 
! +     * at column number <code>column</code>.
! +     */
! +    public void setValueAt(Object aValue, Object node, int column);
! +}
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java.orig	2008-12-10 16:13:48.847099847 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModelAdapter.java	2008-12-10 16:13:48.847099847 -0500
  @@ -0,0 +1,128 @@
  +/*
***************
*** 1489,1572 ****
  +}
  +
! diff -Naur -x '*.jar' rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java
! --- rhino/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java	1969-12-31 19:00:00.000000000 -0500
! +++ rhino1_6R4/toolsrc/org/mozilla/javascript/tools/debugger/downloaded/TreeTableModel.java	2006-09-27 17:04:27.000000000 -0400
! @@ -0,0 +1,71 @@
! +/*
! + * TreeTableModel.java
! + *
! + * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
! + *
! + * This software is the confidential and proprietary information of Sun
! + * Microsystems, Inc. ("Confidential Information").  You shall not
! + * disclose such Confidential Information and shall use it only in
! + * accordance with the terms of the license agreement you entered into
! + * with Sun.
! + *
! + * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
! + * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
! + * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
! + * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
! + * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
! + * THIS SOFTWARE OR ITS DERIVATIVES.
! + *
! + */
! +
! +
! +         package org.mozilla.javascript.tools.debugger.downloaded;
! +         import javax.swing.tree.TreeModel;
! +       
! +
! +/**
! + * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
! + * to add methods for getting inforamtion about the set of columns each 
! + * node in the TreeTableModel may have. Each column, like a column in 
! + * a TableModel, has a name and a type associated with it. Each node in 
! + * the TreeTableModel can return a value for each of the columns and 
! + * set that value if isCellEditable() returns true. 
! + *
! + * @author Philip Milne 
! + * @author Scott Violet
! + */
! +public interface TreeTableModel extends TreeModel
! +{
! +    /**
! +     * Returns the number ofs availible column.
! +     */
! +    public int getColumnCount();
! +
! +    /**
! +     * Returns the name for column number <code>column</code>.
! +     */
! +    public String getColumnName(int column);
! +
! +    /**
! +     * Returns the type for column number <code>column</code>.
! +     */
! +    public Class getColumnClass(int column);
! +
! +    /**
! +     * Returns the value to be displayed for node <code>node</code>, 
! +     * at column number <code>column</code>.
! +     */
! +    public Object getValueAt(Object node, int column);
! +
! +    /**
! +     * Indicates whether the the value for node <code>node</code>, 
! +     * at column number <code>column</code> is editable.
! +     */
! +    public boolean isCellEditable(Object node, int column);
! +
! +    /**
! +     * Sets the value for node <code>node</code>, 
! +     * at column number <code>column</code>.
! +     */
! +    public void setValueAt(Object aValue, Object node, int column);
! +}
! --- rhino1_7R1/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties.orig	2008-01-11 09:48:28.000000000 +0000
! +++ rhino1_7R1/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties	2008-01-11 20:00:53.000000000 +0000
! @@ -65,6 +65,8 @@
       \    -opt [-1|0-9]      Set optimization level.\n\
!      \    -f script-filename Execute script file.\n\
       \    -e script-source   Evaluate inline script.\n\
  +    \    -o output-filename Set the output filename.\n\
--- 1586,1594 ----
  +}
  +
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties.orig	2008-11-05 14:13:24.000000000 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties	2008-12-10 16:15:33.772975233 -0500
! @@ -68,6 +68,8 @@
       \    -opt [-1|0-9]      Set optimization level.\n\
!      \    -f script-filename Execute script file, or "-" for interactive.\n\
       \    -e script-source   Evaluate inline script.\n\
  +    \    -o output-filename Set the output filename.\n\
***************
*** 1574,1581 ****
       \    -debug             Generate debug code.\n\
       \    -strict            Enable strict mode warnings.\n\
!      \    -fatal-warnings    Treat warnings as errors.
! --- rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/Main.java.orig	2008-07-28 10:45:18.000000000 -0400
! +++ rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/Main.java	2008-08-10 23:45:13.994268169 -0400
! @@ -69,6 +69,9 @@
       static private final int EXITCODE_RUNTIME_ERROR = 3;
       static private final int EXITCODE_FILE_NOT_FOUND = 4;
--- 1596,1603 ----
       \    -debug             Generate debug code.\n\
       \    -strict            Enable strict mode warnings.\n\
!      \    -fatal-warnings    Treat warnings as errors.\n\
! --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/shell/Main.java.orig	2008-11-05 14:13:22.000000000 -0500
! +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/shell/Main.java	2008-12-10 16:13:48.849099824 -0500
! @@ -86,6 +86,9 @@
       static private final int EXITCODE_RUNTIME_ERROR = 3;
       static private final int EXITCODE_FILE_NOT_FOUND = 4;
***************
*** 1587,1591 ****
       private static SecurityProxy securityImpl;
   
! @@ -267,6 +270,20 @@
                   shellContextFactory.call(iproxy);
                   continue;
--- 1609,1613 ----
       private static SecurityProxy securityImpl;
   
! @@ -293,6 +296,20 @@
                   shellContextFactory.call(iproxy);
                   continue;
***************
*** 1608,1612 ****
                   errorReporter.setIsReportingWarnings(true);
                   continue;
! @@ -420,10 +437,12 @@
                                     String path, Object securityDomain)
       {
--- 1630,1634 ----
                   errorReporter.setIsReportingWarnings(true);
                   continue;
! @@ -459,10 +476,12 @@
                                     String path, Object securityDomain)
       {
***************
*** 1622,1626 ****
                   exitCode = EXITCODE_FILE_NOT_FOUND;
                   return;
! @@ -443,9 +462,58 @@
               }
               script = loadScriptFromSource(cx, source, path, 1, securityDomain);
--- 1644,1648 ----
                   exitCode = EXITCODE_FILE_NOT_FOUND;
                   return;
! @@ -482,9 +501,58 @@
               }
               script = loadScriptFromSource(cx, source, path, 1, securityDomain);
***************
*** 1684,1715 ****
   
       public static Script loadScriptFromSource(Context cx, String scriptSource,
- --- rhino1_7R2pre/src/org/mozilla/javascript/NativeFunction.java.orig	2008-07-28 10:45:16.000000000 -0400
- +++ rhino1_7R2pre/src/org/mozilla/javascript/NativeFunction.java	2008-08-10 23:48:16.410392192 -0400
- @@ -75,6 +75,27 @@
-          }
-      }
-  
- +    /**
- +     * Compress the script.
- +     * <p>
- +     *
- +     * @param parseTree Mapping for each function node and corresponding parameters & variables names
- +     * @param indent How much to indent the decompiled result
- +     * @param flags Flags specifying format of decompilation output
- +     * @return compressed script
- +     */
- +    final String compress(ScriptOrFnNode parseTree, int indent, int flags)
- +    {
- +        String encodedSource = getEncodedSource();
- +        if (encodedSource == null) {
- +            return super.compress(indent, flags);
- +        } else {
- +            UintMap properties = new UintMap(1);
- +            properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
- +            return Decompiler.compress(encodedSource, flags, properties, parseTree);
- +        }
- +    }
- +
-      @Override
-      public int getLength()
-      {
--- 1706,1707 ----

Index: rhino.spec
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino.spec,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C 2 -d -r1.10.2.1 -r1.10.2.2
*** rhino.spec	8 Dec 2008 17:44:49 -0000	1.10.2.1
--- rhino.spec	11 Feb 2009 21:12:47 -0000	1.10.2.2
***************
*** 34,42 ****
  
  %define cvs_version     1_7R2
! %define archive_version 1_7R2pre
  
  Name:           rhino
  Version:        1.7
! Release:        1.r2.4%{?dist}
  Epoch:          0
  Summary:        JavaScript for Java
--- 34,42 ----
  
  %define cvs_version     1_7R2
! %define archive_version 1_7R2-RC3
  
  Name:           rhino
  Version:        1.7
! Release:        1.r2.6%{?dist}
  Epoch:          0
  Summary:        JavaScript for Java
***************
*** 52,61 ****
--- 52,64 ----
  Patch0:         rhino-build.patch
  Patch1:         rhino-dojo.patch
+ Patch2:         rhino-class-loader.patch
  URL:            http://www.mozilla.org/rhino/
  Group:          Development/Libraries/Java
+ Requires:       jline
  Requires:       stax_1_0_api
  Requires:       xmlbeans
  BuildRequires:  ant
  BuildRequires:  jpackage-utils
+ BuildRequires:  jline
  BuildRequires:  stax_1_0_api
  BuildRequires:  xmlbeans
***************
*** 98,104 ****
  
  %prep
! %setup -q -n %{name}%{archive_version}
  %patch0 -p1
  %patch1 -p1
  
  # Fix build
--- 101,108 ----
  
  %prep
! %setup -q -n %{name}%{cvs_version}
  %patch0 -p1
  %patch1 -p1
+ %patch2 -p1
  
  # Fix build
***************
*** 113,124 ****
  
  %build
! export CLASSPATH=
  export OPT_JAR_LIST=:
  %{ant} -Dxbean.jar=$(build-classpath xmlbeans/xbean) -Djsr173.jar=$(build-classpath stax_1_0_api) deepclean jar copy-all javadoc
  
  pushd examples
- export CLASSPATH=../build/%{name}%{archive_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
  %{javac} *.java
! %{jar} cvf ../build/%{name}%{archive_version}/%{name}-examples-%{version}.jar *.class
  popd
  
--- 117,128 ----
  
  %build
! export CLASSPATH=$(build-classpath jline)
  export OPT_JAR_LIST=:
  %{ant} -Dxbean.jar=$(build-classpath xmlbeans/xbean) -Djsr173.jar=$(build-classpath stax_1_0_api) deepclean jar copy-all javadoc
  
+ export CLASSPATH=`pwd`/build/%{name}%{cvs_version}/js.jar
  pushd examples
  %{javac} *.java
! %{jar} cvf ../build/%{name}%{cvs_version}/%{name}-examples-%{version}.jar *.class
  popd
  
***************
*** 128,133 ****
  # jars
  %{__mkdir_p} %{buildroot}%{_javadir}
! %{__cp} -a build/%{name}%{archive_version}/js.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
! %{__cp} -a build/%{name}%{archive_version}/%{name}-examples-%{version}.jar %{buildroot}%{_javadir}/%{name}-examples-%{version}.jar
  (cd %{buildroot}%{_javadir} && %{__ln_s} %{name}-%{version}.jar js-%{version}.jar)
  (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} `echo $jar| %{__sed} "s|-%{version}||g"`; done)
--- 132,137 ----
  # jars
  %{__mkdir_p} %{buildroot}%{_javadir}
! %{__cp} -a build/%{name}%{cvs_version}/js.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
! %{__cp} -a build/%{name}%{cvs_version}/%{name}-examples-%{version}.jar %{buildroot}%{_javadir}/%{name}-examples-%{version}.jar
  (cd %{buildroot}%{_javadir} && %{__ln_s} %{name}-%{version}.jar js-%{version}.jar)
  (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} `echo $jar| %{__sed} "s|-%{version}||g"`; done)
***************
*** 142,146 ****
  # javadoc
  %{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
! %{__cp} -a build/%{name}%{archive_version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
  %{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
  %{_bindir}/find %{buildroot}%{_javadocdir}/%{name}-%{version} -type f -name '*.html' | %{_bindir}/xargs %{__perl} -pi -e 's/\r$//g'
--- 146,150 ----
  # javadoc
  %{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
! %{__cp} -a build/%{name}%{cvs_version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
  %{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
  %{_bindir}/find %{buildroot}%{_javadocdir}/%{name}-%{version} -type f -name '*.html' | %{_bindir}/xargs %{__perl} -pi -e 's/\r$//g'
***************
*** 200,204 ****
  %defattr(0644,root,root,0755)
  %if 0
! %doc build/%{name}%{archive_version}/docs/*
  %endif
  
--- 204,208 ----
  %defattr(0644,root,root,0755)
  %if 0
! %doc build/%{name}%{cvs_version}/docs/*
  %endif
  
***************
*** 209,212 ****
--- 213,223 ----
  
  %changelog
+ * Wed Feb 11 2009 David Walluck <dwalluck at redhat.com> 0:1.7-1.r2.6
+ - 1.7R2-RC3
+ 
+ * Wed Dec 10 2008 David Walluck <dwalluck at redhat.com> 0:1.7-1.r2.5
+ - 1.7R2-RC1
+ - rediff dojo patch
+ 
  * Mon Dec 08 2008 Will Tatam <will.tatam at red61.com> 0:1.7-1.r2.4
  - Auto rebuild for JPackage 5 in mock
***************
*** 249,253 ****
  - Rebuild with Ant 1.6.2
  
! * Sat Jul 19 2003 Ville Skytt� <ville.skytta at iki.fi> - 0:1.5-1.R4.1.1jpp
  - Update to 1.5R4.1.
  - Non-versioned javadoc dir symlink.
--- 260,264 ----
  - Rebuild with Ant 1.6.2
  
! * Sat Jul 19 2003 Ville Skytt� <ville.skytta at iki.fi> - 0:1.5-1.R4.1.1jpp
  - Update to 1.5R4.1.
  - Non-versioned javadoc dir symlink.
***************
*** 257,261 ****
  - add epoch
  
! * Sun Mar 30 2003 Ville Skytt� <ville.skytta at iki.fi> - 1.5-0.r4.1jpp
  - Update to 1.5R4.
  - Rebuild for JPackage 1.5.
--- 268,272 ----
  - add epoch
  
! * Sun Mar 30 2003 Ville Skytt� <ville.skytta at iki.fi> - 1.5-0.r4.1jpp
  - Update to 1.5R4.
  - Rebuild for JPackage 1.5.

Index: rhino-build.patch
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino-build.patch,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** rhino-build.patch	11 Aug 2008 04:21:08 -0000	1.1
--- rhino-build.patch	11 Feb 2009 21:12:47 -0000	1.1.2.1
***************
*** 83,84 ****
--- 83,102 ----
       }
   
+ --- rhino1_7R2/toolsrc/org/mozilla/javascript/tools/shell/Main.java.orig	2009-02-11 12:18:47.217732045 -0500
+ +++ rhino1_7R2/toolsrc/org/mozilla/javascript/tools/shell/Main.java	2009-02-11 12:19:01.014731265 -0500
+ @@ -43,6 +43,8 @@
+  package org.mozilla.javascript.tools.shell;
+  
+  import java.io.BufferedReader;
+ +import java.io.BufferedWriter;
+ +import java.io.FileWriter;
+  import java.io.IOException;
+  import java.io.InputStream;
+  import java.io.InputStreamReader;
+ @@ -65,6 +65,7 @@
+  import org.mozilla.javascript.Scriptable;
+  import org.mozilla.javascript.ScriptableObject;
+  import org.mozilla.javascript.SecurityController;
+ +import org.mozilla.javascript.WrappedException;
+  import org.mozilla.javascript.tools.SourceReader;
+  import org.mozilla.javascript.tools.ToolErrorReporter;

Index: rhino-debugger.script
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino-debugger.script,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** rhino-debugger.script	11 Aug 2008 15:55:25 -0000	1.1
--- rhino-debugger.script	11 Feb 2009 21:12:47 -0000	1.1.2.1
***************
*** 19,23 ****
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.debugger.Main
! BASE_JARS="rhino xmlbeans/xbean"
  
  # Set parameters
--- 19,24 ----
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.debugger.Main
! BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino jline xmlbeans/xbean)"
! BASE_JARS="rhino jline xmlbeans/xbean"
  
  # Set parameters

Index: rhino-idswitch.script
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino-idswitch.script,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** rhino-idswitch.script	11 Aug 2008 15:55:25 -0000	1.1
--- rhino-idswitch.script	11 Feb 2009 21:12:47 -0000	1.1.2.1
***************
*** 19,22 ****
--- 19,23 ----
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.idswitch.Main
+ BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino xmlbeans/xbean)"
  BASE_JARS="rhino xmlbeans/xbean"
  

Index: rhino-jsc.script
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino-jsc.script,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** rhino-jsc.script	11 Aug 2008 15:55:25 -0000	1.1
--- rhino-jsc.script	11 Feb 2009 21:12:47 -0000	1.1.2.1
***************
*** 19,22 ****
--- 19,23 ----
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.jsc.Main
+ BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino xmlbeans/xbean)"
  BASE_JARS="rhino xmlbeans/xbean"
  

Index: rhino.script
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/rhino/rhino.script,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C 2 -d -r1.2 -r1.2.4.1
*** rhino.script	15 Dec 2004 14:15:57 -0000	1.2
--- rhino.script	11 Feb 2009 21:12:47 -0000	1.2.4.1
***************
*** 19,23 ****
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.shell.Main
! BASE_JARS="rhino xmlbeans/xbean"
  
  # Set parameters
--- 19,24 ----
  # Configuration
  MAIN_CLASS=org.mozilla.javascript.tools.shell.Main
! BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino jline xmlbeans/xbean)"
! BASE_JARS="rhino jline xmlbeans/xbean"
  
  # Set parameters

--- NEW FILE: rhino-class-loader.patch ---
--- rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java.orig	2008-07-28 10:45:18.000000000 -0400
+++ rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java	2008-11-14 17:58:42.682535066 -0500
@@ -40,12 +40,17 @@
 package org.mozilla.javascript.tools.shell;
 
 import java.io.InputStream;
+import java.io.IOException;
 import java.util.List;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationTargetException;
 
+import jline.ConsoleReader;
+import jline.Completor;
+import jline.ConsoleReaderInputStream;
+
 import org.mozilla.javascript.Kit;
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.ScriptableObject;
@@ -59,39 +64,13 @@
 public class ShellLine {
 
     public static InputStream getStream(Scriptable scope) {
-        // We don't want a compile-time dependency on the JLine jar, so use
-        // reflection to load and reference the JLine classes.
-        ClassLoader classLoader = ShellLine.class.getClassLoader();
-        Class<?> readerClass = Kit.classOrNull(classLoader, "jline.ConsoleReader");
-        if (readerClass == null)
-            return null;
         try {
-            // ConsoleReader reader = new ConsoleReader();
-            Constructor<?> c = readerClass.getConstructor();
-            Object reader = c.newInstance();
-        
-            // reader.setBellEnabled(false);
-            Method m = readerClass.getMethod("setBellEnabled", Boolean.TYPE);
-            m.invoke(reader, Boolean.FALSE);
-
-            // reader.addCompletor(new FlexibleCompletor(prefixes));
-            Class<?> completorClass = Kit.classOrNull(classLoader,
-                "jline.Completor");
-            m = readerClass.getMethod("addCompletor", completorClass);
-            Object completor = Proxy.newProxyInstance(classLoader,
-                    new Class[] { completorClass },
-                    new FlexibleCompletor(completorClass, scope));
-            m.invoke(reader, completor);
-            
-            // return new ConsoleReaderInputStream(reader);
-            Class<?> inputStreamClass = Kit.classOrNull(classLoader,
-                "jline.ConsoleReaderInputStream");
-            c = inputStreamClass.getConstructor(readerClass);
-            return (InputStream) c.newInstance(reader);
+            ConsoleReader reader = new ConsoleReader();
+            reader.setBellEnabled(false);
+            reader.addCompletor(new FlexibleCompletor(scope));
+            return new ConsoleReaderInputStream(reader);
+        } catch (IOException e) {
         } catch (NoSuchMethodException e) {
-        } catch (InstantiationException e) {
-        } catch (IllegalAccessException e) {
-        } catch (InvocationTargetException e) {
         }
         return null;
     }
@@ -102,29 +81,17 @@
  * complete on a line that it can fully recognize (only composed of
  * completed strings). This one completes whatever came before.
  */
-class FlexibleCompletor implements java.lang.reflect.InvocationHandler {
-    private Method completeMethod;
+class FlexibleCompletor implements Completor {
     private Scriptable global;
 
-    FlexibleCompletor(Class<?> completorClass, Scriptable global)
+    FlexibleCompletor(Scriptable global)
         throws NoSuchMethodException
     {
         this.global = global;
-        this.completeMethod = completorClass.getMethod("complete", String.class,
-                Integer.TYPE, List.class);
-    }
-    
-    @SuppressWarnings({"unchecked"})
-    public Object invoke(Object proxy, Method method, Object[] args) {
-        if (method.equals(this.completeMethod)) {
-            int result = complete((String)args[0], ((Integer) args[1]).intValue(),
-                    (List<String>) args[2]);
-            return new Integer(result);
-        }
-        throw new NoSuchMethodError(method.toString());
     }
 
-    public int complete(String buffer, int cursor, List<String> candidates) {
+    @SuppressWarnings({"unchecked"})
+    public int complete(String buffer, int cursor, List candidates) {
         // Starting from "cursor" at the end of the buffer, look backward
         // and collect a list of identifiers separated by (possibly zero)
         // dots. Then look up each identifier in turn until getting to the




More information about the JPackage-commits mailing list