From ee2c4043788cc4cc2b24bfb6356a9e16fe607a93a6c36438787dbdcfe824b977 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 24 Sep 2008 15:27:47 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rhino?expand=0&rev=1 --- .gitattributes | 23 +++++ .gitignore | 1 + ready | 0 rhino-1.7-gcj.patch | 131 ++++++++++++++++++++++++++++ rhino-debugger.script | 30 +++++++ rhino-docs.tar.bz2 | 3 + rhino-idswitch.script | 30 +++++++ rhino-js.pom | 25 ++++++ rhino-jsc.script | 30 +++++++ rhino.changes | 24 ++++++ rhino.pom | 6 ++ rhino.script | 30 +++++++ rhino.spec | 194 ++++++++++++++++++++++++++++++++++++++++++ rhino1_7R2pre.tar.bz2 | 3 + 14 files changed, 530 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ready create mode 100644 rhino-1.7-gcj.patch create mode 100644 rhino-debugger.script create mode 100644 rhino-docs.tar.bz2 create mode 100644 rhino-idswitch.script create mode 100644 rhino-js.pom create mode 100644 rhino-jsc.script create mode 100644 rhino.changes create mode 100644 rhino.pom create mode 100644 rhino.script create mode 100644 rhino.spec create mode 100644 rhino1_7R2pre.tar.bz2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/rhino-1.7-gcj.patch b/rhino-1.7-gcj.patch new file mode 100644 index 0000000..ed37030 --- /dev/null +++ b/rhino-1.7-gcj.patch @@ -0,0 +1,131 @@ +--- src/org/mozilla/javascript/FieldAndMethods.java ++++ src/org/mozilla/javascript/FieldAndMethods.java +@@ -0,0 +1,84 @@ ++/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (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.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Rhino code, released ++ * May 6, 1999. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1997-2000 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Norris Boyd ++ * Cameron McCormack ++ * Frank Mitchell ++ * Mike Shaver ++ * Kurt Westerfeld ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * the GNU General Public License Version 2 or later (the "GPL"), in which ++ * case the provisions of the GPL are applicable instead of those above. If ++ * you wish to allow use of your version of this file only under the terms of ++ * the GPL and not to allow others to use your version of this file under the ++ * MPL, indicate your decision by deleting the provisions above and replacing ++ * them with the notice and other provisions required by the GPL. If you do ++ * not delete the provisions above, a recipient may use your version of this ++ * file under either the MPL or the GPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++package org.mozilla.javascript; ++ ++import java.lang.reflect.*; ++import java.util.*; ++ ++public class FieldAndMethods extends NativeJavaMethod ++{ ++ static final long serialVersionUID = -9222428244284796755L; ++ ++ FieldAndMethods(Scriptable scope, MemberBox[] methods, Field field) ++ { ++ super(methods); ++ this.field = field; ++ setParentScope(scope); ++ setPrototype(ScriptableObject.getFunctionPrototype(scope)); ++ } ++ ++ @Override ++ public Object getDefaultValue(Class hint) ++ { ++ if (hint == ScriptRuntime.FunctionClass) ++ return this; ++ Object rval; ++ Class type; ++ try { ++ rval = field.get(javaObject); ++ type = field.getType(); ++ } catch (IllegalAccessException accEx) { ++ throw Context.reportRuntimeError1( ++ "msg.java.internal.private", field.getName()); ++ } ++ Context cx = Context.getContext(); ++ rval = cx.getWrapFactory().wrap(cx, this, rval, type); ++ if (rval instanceof Scriptable) { ++ rval = ((Scriptable) rval).getDefaultValue(hint); ++ } ++ return rval; ++ } ++ ++ Field field; ++ Object javaObject; ++} +--- src/org/mozilla/javascript/JavaMembers.java ++++ src/org/mozilla/javascript/JavaMembers.java +@@ -892,41 +892,3 @@ + MemberBox setter; + NativeJavaMethod setters; + } +- +-class FieldAndMethods extends NativeJavaMethod +-{ +- static final long serialVersionUID = -9222428244284796755L; +- +- FieldAndMethods(Scriptable scope, MemberBox[] methods, Field field) +- { +- super(methods); +- this.field = field; +- setParentScope(scope); +- setPrototype(ScriptableObject.getFunctionPrototype(scope)); +- } +- +- @Override +- public Object getDefaultValue(Class hint) +- { +- if (hint == ScriptRuntime.FunctionClass) +- return this; +- Object rval; +- Class type; +- try { +- rval = field.get(javaObject); +- type = field.getType(); +- } catch (IllegalAccessException accEx) { +- throw Context.reportRuntimeError1( +- "msg.java.internal.private", field.getName()); +- } +- Context cx = Context.getContext(); +- rval = cx.getWrapFactory().wrap(cx, this, rval, type); +- if (rval instanceof Scriptable) { +- rval = ((Scriptable) rval).getDefaultValue(hint); +- } +- return rval; +- } +- +- Field field; +- Object javaObject; +-} diff --git a/rhino-debugger.script b/rhino-debugger.script new file mode 100644 index 0000000..b3a9c57 --- /dev/null +++ b/rhino-debugger.script @@ -0,0 +1,30 @@ +#!/bin/sh +# +# rhino script +# JPackage Project + +# 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.debugger.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 "$@" diff --git a/rhino-docs.tar.bz2 b/rhino-docs.tar.bz2 new file mode 100644 index 0000000..a72d7cf --- /dev/null +++ b/rhino-docs.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afe2824349af04ed9b36787e3c2f35e57f09d0bab82b2ad632887c90a9711dd9 +size 219739 diff --git a/rhino-idswitch.script b/rhino-idswitch.script new file mode 100644 index 0000000..e7a4616 --- /dev/null +++ b/rhino-idswitch.script @@ -0,0 +1,30 @@ +#!/bin/sh +# +# rhino script +# JPackage Project + +# 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.idswitch.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 "$@" diff --git a/rhino-js.pom b/rhino-js.pom new file mode 100644 index 0000000..c212df9 --- /dev/null +++ b/rhino-js.pom @@ -0,0 +1,25 @@ + + + + 4.0.0 + rhino + js + 1.7R1 + jar + Rhino + http://www.mozilla.org/rhino/ + Rhino: JavaScript for Java + + + + Mozilla Public License version 1.1 + http://www.mozilla.org/MPL/MPL-1.1.html + repo + + + + + http://lxr.mozilla.org/mozilla/source/js/rhino/ + + + diff --git a/rhino-jsc.script b/rhino-jsc.script new file mode 100644 index 0000000..6144adc --- /dev/null +++ b/rhino-jsc.script @@ -0,0 +1,30 @@ +#!/bin/sh +# +# rhino script +# JPackage Project + +# 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.jsc.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 "$@" diff --git a/rhino.changes b/rhino.changes new file mode 100644 index 0000000..de6c276 --- /dev/null +++ b/rhino.changes @@ -0,0 +1,24 @@ +------------------------------------------------------------------- +Mon Sep 8 14:14:08 CEST 2008 - mvyskocil@suse.cz + +- Removed a src.zip - contains a non-free source codes. + +------------------------------------------------------------------- +Fri Sep 5 17:13:50 CEST 2008 - mvyskocil@suse.cz + +- Fixed a build with gcj (to prevent of a build cycles with build of openjdk6) + +------------------------------------------------------------------- +Fri Sep 5 14:42:26 CEST 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 2 15:24:37 CEST 2008 - mvyskocil@suse.cz + +- Initial packaging of rhino 1.6 (based on Jpackage 1.7) + diff --git a/rhino.pom b/rhino.pom new file mode 100644 index 0000000..8fa1ff7 --- /dev/null +++ b/rhino.pom @@ -0,0 +1,6 @@ + + 4.0.0 + rhino + rhino + 1.7R1 + diff --git a/rhino.script b/rhino.script new file mode 100644 index 0000000..9ec291a --- /dev/null +++ b/rhino.script @@ -0,0 +1,30 @@ +#!/bin/sh +# +# rhino script +# JPackage Project + +# 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 "$@" diff --git a/rhino.spec b/rhino.spec new file mode 100644 index 0000000..d6b8478 --- /dev/null +++ b/rhino.spec @@ -0,0 +1,194 @@ +# +# spec file for package rhino (Version 1.7) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +%define section free +%define cvs_version 1_7R2 +%define archive_version 1_7R2pre + +Name: rhino +Version: 1.7 +Release: 3 +Summary: JavaScript for Java +License: MOZILLA PUBLIC LICENSE (MPL/NPL) +Source0: ftp://ftp.mozilla.org/pub/mozilla.org/js/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 +# 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 +Url: http://www.mozilla.org/rhino/ +Group: Development/Libraries/Java +Requires: bea-stax-api +Requires: xmlbeans +BuildRequires: ant +BuildRequires: jpackage-utils +BuildRequires: bea-stax-api +BuildRequires: xmlbeans +BuildRequires: unzip +BuildArch: noarch +#BuildRequires: java-devel +BuildRequires: java-1_5_0-gcj-compat-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%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 +License: MOZILLA PUBLIC LICENSE (MPL/NPL) +Summary: JavaScript for Java +Group: Development/Libraries/Java + +%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. + + + +%package manual +License: MOZILLA PUBLIC LICENSE (MPL/NPL) +Summary: JavaScript for Java +Group: Development/Libraries/Java + +%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. + + + +%package javadoc +License: MOZILLA PUBLIC LICENSE (MPL/NPL) +Summary: JavaScript for Java +Group: Development/Libraries/Java + +%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. + + + +%prep +%setup -q -n %{name}%{archive_version} -a 100 +# Fix build +%{__perl} -pi -e 's|.*\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#\#/%{_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 OPT_JAR_LIST=: +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 +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 + +%install +# 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) +# poms +%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms +%{__cp} -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-js.pom +%{__cp} -a %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom +%add_to_maven_depmap %{name} %{name} %{version} JPP %{name} +%add_to_maven_depmap %{name} js %{version} JPP js +# javadoc +%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version} +%{__cp} -a 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' +# scripts +%{__mkdir_p} %{buildroot}%{_bindir} +%{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name} +%{__install} -p -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/%{name}-debugger +%{__install} -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}-idswitch +%{__install} -p -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/%{name}-jsc +# examples +%{__mkdir_p} %{buildroot}%{_datadir}/%{name} +%{__cp} -a examples/* %{buildroot}%{_datadir}/%{name} + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(0644,root,root,0755) +%doc LICENSE.txt +%attr(0755,root,root) %{_bindir}/%{name} +%attr(0755,root,root) %{_bindir}/%{name}-debugger +%attr(0755,root,root) %{_bindir}/%{name}-idswitch +%attr(0755,root,root) %{_bindir}/%{name}-jsc +%{_javadir}/*.jar +%{_datadir}/maven2 +%{_mavendepmapfragdir} + +%files demo +%defattr(0644,root,root,0755) +%{_datadir}/%{name} + +%files manual +%defattr(0644,root,root,0755) +%doc %{name}/* + +%files javadoc +%defattr(0644,root,root,0755) +%{_javadocdir}/%{name}-%{version} +%{_javadocdir}/%{name} + +%changelog +* 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) diff --git a/rhino1_7R2pre.tar.bz2 b/rhino1_7R2pre.tar.bz2 new file mode 100644 index 0000000..3597d25 --- /dev/null +++ b/rhino1_7R2pre.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd00a5eeb7cab1c81845d1b32de61b53d2f8af9c0224e7619e985e7156bc7ccd +size 2466525