Accepting request 24642 from Java:packages
Copy from Java:packages/rhino based on submit request 24642 from user mvyskocil OBS-URL: https://build.opensuse.org/request/show/24642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rhino?expand=0&rev=6
This commit is contained in:
committed by
Git OBS Bridge
parent
5dbebffdb5
commit
f8bb4c968b
@@ -1,5 +1,7 @@
|
||||
--- src/org/mozilla/javascript/FieldAndMethods.java
|
||||
+++ src/org/mozilla/javascript/FieldAndMethods.java
|
||||
Index: src/org/mozilla/javascript/FieldAndMethods.java
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ src/org/mozilla/javascript/FieldAndMethods.java 2009-11-16 15:56:53.786561141 +0100
|
||||
@@ -0,0 +1,84 @@
|
||||
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
+ *
|
||||
@@ -85,9 +87,11 @@
|
||||
+ Field field;
|
||||
+ Object javaObject;
|
||||
+}
|
||||
--- src/org/mozilla/javascript/JavaMembers.java
|
||||
+++ src/org/mozilla/javascript/JavaMembers.java
|
||||
@@ -892,41 +892,3 @@
|
||||
Index: src/org/mozilla/javascript/JavaMembers.java
|
||||
===================================================================
|
||||
--- src/org/mozilla/javascript/JavaMembers.java.orig 2009-11-16 15:55:49.870562134 +0100
|
||||
+++ src/org/mozilla/javascript/JavaMembers.java 2009-11-16 15:56:53.786561141 +0100
|
||||
@@ -893,41 +893,3 @@
|
||||
MemberBox setter;
|
||||
NativeJavaMethod setters;
|
||||
}
|
||||
|
159
rhino-288467.patch
Normal file
159
rhino-288467.patch
Normal file
@@ -0,0 +1,159 @@
|
||||
Index: toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java
|
||||
===================================================================
|
||||
--- toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java.orig 2009-11-16 15:55:49.986561156 +0100
|
||||
+++ toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java 2009-11-16 15:56:51.102061154 +0100
|
||||
@@ -42,6 +42,7 @@
|
||||
package org.mozilla.javascript.tools.debugger;
|
||||
|
||||
import javax.swing.*;
|
||||
+import javax.swing.filechooser.*;
|
||||
import javax.swing.text.*;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.table.*;
|
||||
@@ -333,7 +334,14 @@
|
||||
statusBar = new JLabel();
|
||||
statusBar.setText("Thread: ");
|
||||
contentPane.add(statusBar, BorderLayout.SOUTH);
|
||||
- dlg = new JFileChooser();
|
||||
+ try {
|
||||
+ dlg = new JFileChooser();
|
||||
+ } catch (SecurityException e) {
|
||||
+ // Work around bug in JFileChooser when security is enforced.
|
||||
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4802383
|
||||
+ dlg = new JFileChooser(new FileWrapper("."),
|
||||
+ new FileSystemViewWrapper());
|
||||
+ }
|
||||
|
||||
javax.swing.filechooser.FileFilter filter =
|
||||
new javax.swing.filechooser.FileFilter() {
|
||||
@@ -3592,7 +3600,130 @@
|
||||
|
||||
default:
|
||||
throw new IllegalArgumentException(String.valueOf(type));
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * A <code>FileSystemView</code> that ensures <code>File</code> objects
|
||||
+ * returned from methods are instances of <code>FileWrapper</code>.
|
||||
+ * This class is used to work around bugs in {@link JFileChooser}.
|
||||
+ */
|
||||
+class FileSystemViewWrapper extends FileSystemView {
|
||||
|
||||
+ private FileSystemView v = FileSystemView.getFileSystemView();
|
||||
+
|
||||
+ public File createFileObject(File dir, String filename) {
|
||||
+ return new FileWrapper(v.createFileObject(dir, filename));
|
||||
+ }
|
||||
+
|
||||
+ public File createFileObject(String path) {
|
||||
+ return new FileWrapper(v.createFileObject(path));
|
||||
+ }
|
||||
+
|
||||
+ public File createNewFolder(File containingDir) throws IOException {
|
||||
+ return new FileWrapper(v.createNewFolder(containingDir));
|
||||
+ }
|
||||
+
|
||||
+ public File getChild(File parent, String fileName) {
|
||||
+ return new FileWrapper(v.getChild(parent, fileName));
|
||||
+ }
|
||||
+
|
||||
+ public File getDefaultDirectory() {
|
||||
+ return new FileWrapper(v.getDefaultDirectory());
|
||||
+ }
|
||||
+
|
||||
+ public File[] getFiles(File dir, boolean useFileHiding) {
|
||||
+ File[] fs = v.getFiles(dir, useFileHiding);
|
||||
+ File[] ret = new File[fs.length];
|
||||
+ for (int i = 0; i < fs.length; i++) {
|
||||
+ ret[i] = new FileWrapper(fs[i]);
|
||||
}
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ public File getHomeDirectory() {
|
||||
+ return new FileWrapper(v.getHomeDirectory());
|
||||
+ }
|
||||
+
|
||||
+ public File getParentDirectory(File dir) {
|
||||
+ return new FileWrapper(v.getParentDirectory(dir));
|
||||
+ }
|
||||
+
|
||||
+ public File[] getRoots() {
|
||||
+ File[] fs = v.getRoots();
|
||||
+ File[] ret = new File[fs.length];
|
||||
+ for (int i = 0; i < fs.length; i++) {
|
||||
+ ret[i] = new FileWrapper(fs[i]);
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ public String getSystemDisplayName(File f) {
|
||||
+ return v.getSystemDisplayName(f);
|
||||
+ }
|
||||
+
|
||||
+ public Icon getSystemIcon(File f) {
|
||||
+ return getSystemIcon(f);
|
||||
+ }
|
||||
+
|
||||
+ public String getSystemTypeDescription(File f) {
|
||||
+ return v.getSystemTypeDescription(f);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isComputerNode(File dir) {
|
||||
+ return v.isComputerNode(dir);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isDrive(File dir) {
|
||||
+ return v.isDrive(dir);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isFileSystem(File f) {
|
||||
+ return v.isFileSystem(f);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isFileSystemRoot(File dir) {
|
||||
+ return v.isFileSystemRoot(dir);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isFloppyDrive(File dir) {
|
||||
+ return v.isFloppyDrive(dir);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isHiddenFile(File f) {
|
||||
+ return v.isHiddenFile(f);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isParent(File folder, File file) {
|
||||
+ return v.isParent(folder, file);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isRoot(File f) {
|
||||
+ return v.isRoot(f);
|
||||
+ }
|
||||
+
|
||||
+ public Boolean isTraversable(File f) {
|
||||
+ return v.isTraversable(f);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * A <code>File</code> that always returns <code>false</code> from
|
||||
+ * {@link #canWrite()}. This class is used to work around bugs in
|
||||
+ * {@link JFileChooser}.
|
||||
+ */
|
||||
+class FileWrapper extends File {
|
||||
+
|
||||
+ public FileWrapper(File f) {
|
||||
+ this(f.toString());
|
||||
+ }
|
||||
+
|
||||
+ public FileWrapper(String pathname) {
|
||||
+ super(pathname);
|
||||
+ }
|
||||
+
|
||||
+ public boolean canWrite() {
|
||||
+ return false;
|
||||
}
|
||||
}
|
112
rhino-build.patch
Normal file
112
rhino-build.patch
Normal file
@@ -0,0 +1,112 @@
|
||||
Index: examples/Matrix.java
|
||||
===================================================================
|
||||
--- examples/Matrix.java.orig 2009-11-16 15:55:50.618560322 +0100
|
||||
+++ examples/Matrix.java 2009-11-16 15:56:33.046061289 +0100
|
||||
@@ -249,7 +249,7 @@
|
||||
* Use the convenience method from Context that takes care of calling
|
||||
* toString, etc.
|
||||
*/
|
||||
- public Object getDefaultValue(Class<?> typeHint) {
|
||||
+ public Object getDefaultValue(Class typeHint) {
|
||||
return "[object Matrix]";
|
||||
}
|
||||
|
||||
Index: examples/PrimitiveWrapFactory.java
|
||||
===================================================================
|
||||
--- examples/PrimitiveWrapFactory.java.orig 2009-11-16 15:55:50.618560322 +0100
|
||||
+++ examples/PrimitiveWrapFactory.java 2009-11-16 15:56:33.046061289 +0100
|
||||
@@ -57,7 +57,7 @@
|
||||
public class PrimitiveWrapFactory extends WrapFactory {
|
||||
@Override
|
||||
public Object wrap(Context cx, Scriptable scope, Object obj,
|
||||
- Class<?> staticType)
|
||||
+ Class staticType)
|
||||
{
|
||||
if (obj instanceof String || obj instanceof Number ||
|
||||
obj instanceof Boolean)
|
||||
Index: src/org/mozilla/javascript/WrapFactory.java
|
||||
===================================================================
|
||||
--- src/org/mozilla/javascript/WrapFactory.java.orig 2009-11-16 15:55:50.618560322 +0100
|
||||
+++ src/org/mozilla/javascript/WrapFactory.java 2009-11-16 15:56:33.082060680 +0100
|
||||
@@ -75,7 +75,7 @@
|
||||
* @return the wrapped value.
|
||||
*/
|
||||
public Object wrap(Context cx, Scriptable scope,
|
||||
- Object obj, Class<?> staticType)
|
||||
+ Object obj, Class staticType)
|
||||
{
|
||||
if (obj == null || obj == Undefined.instance
|
||||
|| obj instanceof Scriptable)
|
||||
Index: toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java
|
||||
===================================================================
|
||||
--- toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java.orig 2009-11-16 15:55:50.622561663 +0100
|
||||
+++ toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java 2009-11-16 15:56:33.106060535 +0100
|
||||
@@ -67,7 +67,7 @@
|
||||
return super.defineClass(name, data, 0, data.length, domain);
|
||||
}
|
||||
|
||||
- public void linkClass(Class<?> cl) {
|
||||
+ public void linkClass(Class cl) {
|
||||
resolveClass(cl);
|
||||
}
|
||||
}
|
||||
Index: xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java
|
||||
===================================================================
|
||||
--- xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java.orig 2009-11-16 15:55:50.622561663 +0100
|
||||
+++ xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java 2009-11-16 15:56:33.130060740 +0100
|
||||
@@ -115,7 +115,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public Object getDefaultValue(Class<?> hint) {
|
||||
+ public Object getDefaultValue(Class hint) {
|
||||
return uri();
|
||||
}
|
||||
|
||||
Index: xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java
|
||||
===================================================================
|
||||
--- xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java.orig 2009-11-16 15:55:50.622561663 +0100
|
||||
+++ xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java 2009-11-16 15:56:33.182060668 +0100
|
||||
@@ -145,7 +145,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public Object getDefaultValue(Class<?> hint) {
|
||||
+ public Object getDefaultValue(Class hint) {
|
||||
return toString();
|
||||
}
|
||||
|
||||
Index: xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java
|
||||
===================================================================
|
||||
--- xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java.orig 2009-11-16 15:55:50.622561663 +0100
|
||||
+++ xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java 2009-11-16 15:56:33.206060612 +0100
|
||||
@@ -165,7 +165,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public final Object getDefaultValue(Class<?> hint) {
|
||||
+ public final Object getDefaultValue(Class hint) {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
Index: toolsrc/org/mozilla/javascript/tools/shell/Main.java
|
||||
===================================================================
|
||||
--- toolsrc/org/mozilla/javascript/tools/shell/Main.java.orig 2009-11-16 15:55:50.622561663 +0100
|
||||
+++ toolsrc/org/mozilla/javascript/tools/shell/Main.java 2009-11-16 15:56:33.234061036 +0100
|
||||
@@ -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;
|
||||
@@ -64,6 +66,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;
|
||||
|
101
rhino-class-loader.patch
Normal file
101
rhino-class-loader.patch
Normal file
@@ -0,0 +1,101 @@
|
||||
Index: toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java
|
||||
===================================================================
|
||||
--- toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java.orig 2009-11-16 15:55:50.086562039 +0100
|
||||
+++ toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java 2009-11-16 15:56:47.018560292 +0100
|
||||
@@ -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 Integer.valueOf(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
|
19
rhino-component-info.xml
Normal file
19
rhino-component-info.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="">
|
||||
<component id="rhino"
|
||||
licenseType=""
|
||||
version="@VERSION@"
|
||||
tag="@TAG@"
|
||||
description=""
|
||||
|
||||
>
|
||||
|
||||
<artifact id="js.jar"/>
|
||||
|
||||
|
||||
<export>
|
||||
<include input="js.jar"/>
|
||||
|
||||
</export>
|
||||
</component>
|
||||
</project>
|
@@ -18,7 +18,8 @@ fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.mozilla.javascript.tools.debugger.Main
|
||||
BASE_JARS="rhino xmlbeans/xbean"
|
||||
BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino jline xmlbeans/xbean)"
|
||||
BASE_JARS="rhino jline xmlbeans/xbean"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
|
1729
rhino-dojo.patch
Normal file
1729
rhino-dojo.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,7 @@ fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.mozilla.javascript.tools.idswitch.Main
|
||||
BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino xmlbeans/xbean)"
|
||||
BASE_JARS="rhino xmlbeans/xbean"
|
||||
|
||||
# Set parameters
|
||||
|
@@ -18,6 +18,7 @@ fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.mozilla.javascript.tools.jsc.Main
|
||||
BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino xmlbeans/xbean)"
|
||||
BASE_JARS="rhino xmlbeans/xbean"
|
||||
|
||||
# Set parameters
|
||||
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 18 12:06:17 UTC 2009 - mvyskocil@suse.cz
|
||||
|
||||
- fixed bnc#554532 - rhino does not work at all
|
||||
* Update to 1_7R2, return back the examples
|
||||
* merged with rhino-1.7-1.r2.8.jpp6.src.rpm
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 13 09:42:42 CET 2008 - mvyskocil@suse.cz
|
||||
|
||||
|
@@ -18,7 +18,8 @@ fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.mozilla.javascript.tools.shell.Main
|
||||
BASE_JARS="rhino xmlbeans/xbean"
|
||||
BASE_FLAGS="-Xbootclasspath/p:$(build-classpath rhino jline xmlbeans/xbean)"
|
||||
BASE_JARS="rhino jline xmlbeans/xbean"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
|
82
rhino.spec
82
rhino.spec
@@ -1,7 +1,9 @@
|
||||
#
|
||||
# spec file for package rhino (Version 1.7)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2000-2009, JPackage Project
|
||||
# All rights reserved.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,37 +17,48 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define section free
|
||||
%define cvs_version 1_7R2
|
||||
%define archive_version 1_7R2pre
|
||||
%define archive_version 1_7R2
|
||||
|
||||
Name: rhino
|
||||
Version: 1.7
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: JavaScript for Java
|
||||
License: MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino%{archive_version}.tar.bz2
|
||||
License: MPL ..
|
||||
# wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino%{archive_version}.zip
|
||||
# unzip -q rhino%{archive_version}.zip
|
||||
# find rhino%{archive_version}/ -name '*jar' | xargs rm -rf
|
||||
# tar -cjf rhino%{archive_version}.tar.bz2 rhino%{archive_version}/
|
||||
Source0: rhino%{archive_version}.tar.bz2
|
||||
Source2: rhino.script
|
||||
Source3: rhino-debugger.script
|
||||
Source4: rhino-idswitch.script
|
||||
Source5: rhino-jsc.script
|
||||
Source6: rhino-js.pom
|
||||
Source7: rhino.pom
|
||||
Source8: rhino-component-info.xml
|
||||
# export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/www
|
||||
# vs -z3 co mozilla-org/html/rhino
|
||||
# cd mozilla-org/html/
|
||||
# rm -r rhino/apidocs # the javadoc is in different directory
|
||||
# tar -cjf rhino-docs.tar.bz2 rhino
|
||||
Source100: rhino-docs.tar.bz2
|
||||
Patch0: rhino-1.7-gcj.patch
|
||||
Patch0: rhino-build.patch
|
||||
Patch1: rhino-dojo.patch
|
||||
Patch2: rhino-class-loader.patch
|
||||
Patch3: rhino-288467.patch
|
||||
#PATCH-FIX-OPENSUSE: allow build under gcj
|
||||
Patch100: rhino-1.7-gcj.patch
|
||||
Url: http://www.mozilla.org/rhino/
|
||||
Group: Development/Libraries/Java
|
||||
Requires: jline
|
||||
Requires: bea-stax-api
|
||||
Requires: xmlbeans
|
||||
BuildRequires: ant
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: jline
|
||||
BuildRequires: bea-stax-api
|
||||
BuildRequires: xmlbeans-mini
|
||||
BuildRequires: unzip
|
||||
@@ -61,10 +74,10 @@ Rhino is an open-source implementation of JavaScript written entirely
|
||||
in Java. It is typically embedded into Java applications to provide
|
||||
scripting to end users.
|
||||
|
||||
|
||||
This version contains Dojo's JavaScript compression patch.
|
||||
|
||||
%package demo
|
||||
License: MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
License: MPL ..
|
||||
Summary: JavaScript for Java
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@@ -76,7 +89,7 @@ scripting to end users.
|
||||
|
||||
|
||||
%package manual
|
||||
License: MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
License: MPL ..
|
||||
Summary: JavaScript for Java
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@@ -88,7 +101,7 @@ scripting to end users.
|
||||
|
||||
|
||||
%package javadoc
|
||||
License: MOZILLA PUBLIC LICENSE (MPL/NPL)
|
||||
License: MPL ..
|
||||
Summary: JavaScript for Java
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@@ -100,41 +113,41 @@ scripting to end users.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}%{archive_version} -a 100
|
||||
%setup -q -n %{name}%{cvs_version} -a 100
|
||||
%patch0 -p0 -b .sav0
|
||||
%patch1 -p0 -b .sav1
|
||||
%patch2 -p0 -b .sav2
|
||||
%patch3 -p0 -b .sav3
|
||||
%patch100 -p0 -b .sav0
|
||||
# Fix build
|
||||
%{__perl} -pi -e 's|.*<get.*src=.*>\n||' build.xml testsrc/build.xml toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
|
||||
# Fix manifest
|
||||
%{__perl} -pi -e 's|^Class-Path:.*\n||g' src/manifest
|
||||
# Add jpp release info to version
|
||||
%{__perl} -pi -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
|
||||
(cd rhino; sed -i 's#\<apidocs/\>#/%{_javadocdir}/%{name}-%{version}#' *.html)
|
||||
%patch0 -b .sav0
|
||||
# FIXME: these classes cannot be build with gcj
|
||||
(cd examples; rm {CounterTest,RunScript4}.java)
|
||||
|
||||
%build
|
||||
export CLASSPATH=
|
||||
export CLASSPATH=$(build-classpath jline)
|
||||
export OPT_JAR_LIST=:
|
||||
ant \
|
||||
%{ant} \
|
||||
-Dxbean.jar=$(build-classpath xmlbeans/xbean) \
|
||||
-Djsr173.jar=$(build-classpath bea-stax-api) \
|
||||
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
||||
deepclean jar copy-all javadoc
|
||||
%if 0
|
||||
# % if 0
|
||||
pushd examples
|
||||
export CLASSPATH=../build/%{name}%{archive_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
|
||||
javac -C *.java
|
||||
jar cvf ../build/%{name}%{archive_version}/%{name}-examples-%{version}.jar *.class
|
||||
popd
|
||||
%endif
|
||||
# % endif
|
||||
|
||||
%install
|
||||
# jars
|
||||
%{__mkdir_p} %{buildroot}%{_javadir}
|
||||
%{__cp} -a build/%{name}%{archive_version}/js.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||||
%if 0
|
||||
# % if 0
|
||||
%{__cp} -a build/%{name}%{archive_version}/%{name}-examples-%{version}.jar %{buildroot}%{_javadir}/%{name}-examples-%{version}.jar
|
||||
%endif
|
||||
# % endif
|
||||
(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)
|
||||
# poms
|
||||
@@ -170,7 +183,7 @@ popd
|
||||
%attr(0755,root,root) %{_bindir}/%{name}-jsc
|
||||
%{_javadir}/*.jar
|
||||
%{_datadir}/maven2
|
||||
%{_mavendepmapfragdir}
|
||||
%config %{_mavendepmapfragdir}
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
@@ -186,24 +199,3 @@ popd
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Nov 13 2008 mvyskocil@suse.cz
|
||||
- fixed bnc#444259 - rhino contains conflicting class in rhino-examples.jar
|
||||
- don't build and install a rhino-examples.jar
|
||||
* Thu Oct 16 2008 mvyskocil@suse.cz
|
||||
- Use xerces-j2-bootstrap to prevent another build cycle
|
||||
- Added a xerces-j2 and non-bootstrap xml-commons* packages to BuildIgnore
|
||||
* Wed Oct 01 2008 adrian@suse.de
|
||||
- Use xmlbeans-mini, instead of xmlbeans in BuildRequires to
|
||||
get rid of all the new build cycles
|
||||
* Mon Sep 08 2008 mvyskocil@suse.cz
|
||||
- Removed a src.zip - contains a non-free source codes.
|
||||
* Fri Sep 05 2008 mvyskocil@suse.cz
|
||||
- Fixed a build with gcj (to prevent of a build cycles with build of openjdk6)
|
||||
* Fri Sep 05 2008 mvyskocil@suse.cz
|
||||
- Update to 1.7 (from jpackage 1.7, due some license issues in source tarball )
|
||||
- Add a doc from Mozilla's CVS
|
||||
- Removed a patches:
|
||||
- rhino-dojo patch contains part with permissive licnse
|
||||
- rhino-build patch is not necessary for java 5+
|
||||
* Tue Sep 02 2008 mvyskocil@suse.cz
|
||||
- Initial packaging of rhino 1.6 (based on Jpackage 1.7)
|
||||
|
3
rhino1_7R2.tar.bz2
Normal file
3
rhino1_7R2.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:57b2d633bcc30d30ac3d761e75283d3d6bc850ca40f078a57ed73780000fc29f
|
||||
size 562942
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd00a5eeb7cab1c81845d1b32de61b53d2f8af9c0224e7619e985e7156bc7ccd
|
||||
size 2466525
|
Reference in New Issue
Block a user