rebuilt with java-openjdk support [release 1.7rc4-3mamba;Fri Mar 25 2011]

This commit is contained in:
gil 2024-01-06 00:10:22 +01:00
parent 5842a81c8d
commit 03620ced1d
5 changed files with 318 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# java-rhino # java-rhino
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.

View File

@ -0,0 +1,11 @@
--- ./build.xml.sav 2007-03-07 15:06:11.000000000 -0500
+++ ./build.xml 2007-03-07 15:06:25.000000000 -0500
@@ -73,7 +73,7 @@
<target name="compile" depends="init">
<ant antfile="src/build.xml" target="compile"/>
- <ant antfile="toolsrc/build.xml" target="compile"/>
+ <!-- <ant antfile="toolsrc/build.xml" target="compile"/> -->
<antcall target="xmlimplsrc-compile" />
</target>

View File

@ -0,0 +1,94 @@
diff -ur rhino1_7R2pre.orig/examples/Matrix.java rhino1_7R2pre/examples/Matrix.java
--- rhino1_7R2pre.orig/examples/Matrix.java 2008-07-28 10:45:22.000000000 -0400
+++ rhino1_7R2pre/examples/Matrix.java 2008-08-11 00:06:20.483267501 -0400
@@ -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]";
}
diff -ur rhino1_7R2pre.orig/examples/PrimitiveWrapFactory.java rhino1_7R2pre/examples/PrimitiveWrapFactory.java
--- rhino1_7R2pre.orig/examples/PrimitiveWrapFactory.java 2008-07-28 10:45:22.000000000 -0400
+++ rhino1_7R2pre/examples/PrimitiveWrapFactory.java 2008-08-11 00:07:30.546266985 -0400
@@ -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)
diff -ur rhino1_7R2pre.orig/src/org/mozilla/javascript/WrapFactory.java rhino1_7R2pre/src/org/mozilla/javascript/WrapFactory.java
--- rhino1_7R2pre.orig/src/org/mozilla/javascript/WrapFactory.java 2008-07-28 10:45:14.000000000 -0400
+++ rhino1_7R2pre/src/org/mozilla/javascript/WrapFactory.java 2008-08-11 00:07:57.706710143 -0400
@@ -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)
diff -ur rhino1_7R2pre.orig/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java
--- rhino1_7R2pre.orig/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java 2008-07-28 10:45:18.000000000 -0400
+++ rhino1_7R2pre/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java 2008-08-11 00:06:20.483267501 -0400
@@ -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);
}
}
diff -ur rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java
--- rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java 2008-07-28 10:45:20.000000000 -0400
+++ rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java 2008-08-11 00:06:20.483267501 -0400
@@ -115,7 +115,7 @@
}
@Override
- public Object getDefaultValue(Class<?> hint) {
+ public Object getDefaultValue(Class hint) {
return uri();
}
diff -ur rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java
--- rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java 2008-07-28 10:45:20.000000000 -0400
+++ rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java 2008-08-11 00:06:20.484267636 -0400
@@ -145,7 +145,7 @@
}
@Override
- public Object getDefaultValue(Class<?> hint) {
+ public Object getDefaultValue(Class hint) {
return toString();
}
diff -ur rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java
--- rhino1_7R2pre.orig/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java 2008-07-28 10:45:20.000000000 -0400
+++ rhino1_7R2pre/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java 2008-08-11 00:06:20.498268536 -0400
@@ -165,7 +165,7 @@
}
@Override
- public final Object getDefaultValue(Class<?> hint) {
+ public final Object getDefaultValue(Class hint) {
return this.toString();
}
--- rhino1_7R2pre.orig/xmlimplsrc/buildorig 2009-02-13 14:17:57.000000000 -0500
+++ rhino1_7R2pre/xmlimplsrc/build.xml 2009-02-13 14:29:42.000000000 -0500
@@ -67,6 +67,7 @@
<target name="e4x-compile" if="jdk1.5?">
<javac
+ bootclasspath="/usr/lib/jvm/java-openjdk/jre/lib/rt.jar"
srcdir="xmlimplsrc"
destdir="${classes}"
deprecation="on"

30
java-rhino.script Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# rhino script
# JPackage Project <http://www.jpackage.org/>
# Source functions library
. /usr/share/java-utils/java-functions
# Source system prefs
if [ -f /etc/rhino.conf ] ; then
. /etc/rhino.conf
fi
# Source user prefs
if [ -f $HOME/.rhinorc ] ; then
. $HOME/.rhinorc
fi
# Configuration
MAIN_CLASS=org.mozilla.javascript.tools.shell.Main
BASE_JARS="rhino xmlbeans/xbean"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

181
java-rhino.spec Normal file
View File

@ -0,0 +1,181 @@
%define pkgver 1_7R2-RC4
%define buildver 1_7R2
%define api_version 1.7
%define javahome %{_jvmdir}/jdk
Name: java-rhino
Version: 1.7rc4
Release: 3mamba
Summary: Rhino - JavaScript for Java
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.mozilla.org/rhino/
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino%{pkgver}.zip
#Source1: http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip
Source2: java-rhino.script
Patch0: java-rhino-1.7R2-RC3-disabledebuggertool.patch
Patch1: java-rhino-1_7R2pre-build.patch
License: GPL, MPL 1.1
BuildRequires: apache-ant
%if "%{stage1}" != "1"
BuildRequires: apache-xmlbeans
BuildRequires: java-backport-util-concurrent
BuildRequires: java-bea-stax-api
BuildRequires: java-retrotranslator
%endif
BuildRequires: jpackage-utils
%if "%{stage1}" != "1"
Requires: apache-xmlbeans
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
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.
%package demo
Group: Documentation
Summary: Examples for %{name}
%description demo
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 package contains examples for %{name}.
#%package manual
#Group: Documentation
#Summary: Manual for %{name}
#%description manual
#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 package contains documentation for %{name}.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
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 package contains javadoc for %{name}.
%prep
%setup -q -n rhino1_7R2
%patch1 -p1
%patch0 -b .sav
for j in $(find . -name "*.jar"); do
mv $j ${j}.no
done
perl -pi -e 's|.*<get.*src=.*>\n||' build.xml testsrc/build.xml toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
#install -D -p -m 644 %{S;1} toolsrc/org/mozilla/javascript/tools/debugger/downloaded/swingExSrc.zip
perl -pi -e 's|^Class-Path:.*\n||g' src/manifest
perl -pi -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties
cp -pr toolsrc/org/mozilla/javascript/tools src/org/mozilla/javascript
cp -pr xmlimplsrc/org/mozilla/javascript/xmlimpl src/org/mozilla/javascript
%build
#:<< EOF
export JAVA_HOME=%javahome
%if "%{stage1}" != "1"
export CLASSPATH=$(build-classpath bea-stax-api backport-util-concurrent retrotranslator-runtime retrotranslator-transformer)
%endif
ant \
-Dxbean.jar=$(build-classpath xmlbeans/xbean) \
-Djsr173.jar=$(build-classpath bea-stax-api) \
deepclean jar smalljar copy-all javadoc
#EOF
pushd examples
mkdir -p target/classes
export CLASSPATH=../build/rhino%{buildver}/js.jar:$(build-classpath xmlbeans/xbean)
%javahome/bin/javac -d target/classes `find . -name '*.java'`
%javahome/bin/jar cf ../build/rhino%{buildver}/rhino-examples-%{api_version}.jar target/classes
popd
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -pm 644 build/rhino%{buildver}/js.jar \
%{buildroot}%{_javadir}/rhino-%{api_version}.jar
install -pm 644 build/rhino%{buildver}/smalljs.jar\
%{buildroot}%{_javadir}/rhino-small-%{api_version}.jar
install -pm 644 build/rhino%{buildver}/rhino-examples-%{api_version}.jar \
%{buildroot}%{_javadir}/rhino-examples-%{api_version}.jar
(
cd %{buildroot}%{_javadir}
ln -s rhino-%{api_version}.jar js-%{api_version}.jar
ln -s rhino-small-%{api_version}.jar smalljs-%{api_version}.jar
)
(
cd %{buildroot}%{_javadir}
for jar in *-%{api_version}*; do
ln -s ${jar} `echo $jar| sed "s|-%{api_version}||g"`
done
)
mkdir -p %{buildroot}%{_javadocdir}/rhino-%{version}
cp -a build/rhino%{buildver}/javadoc/* %{buildroot}%{_javadocdir}/rhino-%{version}
ln -s rhino-%{version} %{buildroot}%{_javadocdir}/rhino
find %{buildroot}%{_javadocdir}/rhino-%{version} -type f -name '*.html' | %{_bindir}/xargs %{__perl} -pi -e 's/\r$//g'
mkdir -p %{buildroot}%{_bindir}
install -m 755 %{S:2} %{buildroot}%{_bindir}/rhino
mkdir -p %{buildroot}%{_datadir}/rhino-%{version}
cp -a build/rhino%{buildver}/examples/* %{buildroot}%{_datadir}/rhino-%{version}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/rhino
%{_javadir}/js-%{api_version}.jar
%{_javadir}/js.jar
%{_javadir}/rhino-%{api_version}.jar
%{_javadir}/rhino.jar
%{_javadir}/rhino-small-%{api_version}.jar
%{_javadir}/rhino-small.jar
%{_javadir}/smalljs-%{api_version}.jar
%{_javadir}/smalljs.jar
%doc LICENSE.txt
%files demo
%defattr(-,root,root)
%{_javadir}/rhino-examples-%{api_version}.jar
%{_javadir}/rhino-examples.jar
%{_datadir}/rhino-%{version}
#%files manual
#%defattr(-,root,root)
#%doc build/rhino%{buildver}/docs/*
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/rhino-%{version}
%{_javadocdir}/rhino
%changelog
* Fri Mar 25 2011 gil <puntogil@libero.it> 1.7rc4-3mamba
- rebuilt with java-openjdk support
* Fri Aug 21 2009 gil <puntogil@libero.it> 1.7rc4-2mamba
- update to 1.7rc4
* Sun Feb 22 2009 gil <puntogil@libero.it> 1.7-1mamba
- package created by autospec