gil pushed to htmlunit-core-js (master). "update to 2.16"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri May 22 12:56:52 UTC 2015


From 2e1bf8ad2747902669ed1709f12620755e3d3f56 Mon Sep 17 00:00:00 2001
From: gil <puntogil at libero.it>
Date: Fri, 22 May 2015 14:56:38 +0200
Subject: update to 2.16


diff --git a/.gitignore b/.gitignore
index 1988cfe..f4d98fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 /htmlunit-core-js-2.9.tar.xz
 /htmlunit-core-js-2.9-build-fix.patch
+/core-js-2.16.tar.gz
+/htmlunit-rhino-fork-f102c00ed06e3941c360f2a698dc267162d2f64a.tar.gz
diff --git a/htmlunit-core-js-2.16-build.patch b/htmlunit-core-js-2.16-build.patch
new file mode 100644
index 0000000..d8fb847
--- /dev/null
+++ b/htmlunit-core-js-2.16-build.patch
@@ -0,0 +1,290 @@
+diff -Nru htmlunit-core-js-core-js-2.16/build.xml htmlunit-core-js-core-js-2.16.build/build.xml
+--- htmlunit-core-js-core-js-2.16/build.xml	2015-04-17 16:59:00.000000000 +0200
++++ htmlunit-core-js-core-js-2.16.build/build.xml	2015-05-22 14:01:55.794364009 +0200
+@@ -13,14 +13,14 @@
+ Marc Guillemot
+ Ahmed Ashour
+ ====================================================================== -->
+-<project name="htmlunit-core-js build" default="jar-all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
++<project name="htmlunit-core-js build" default="jar-all" basedir=".">
+ 
+ 	<property name="version" value="2.16"/>
+ 
+-	<property name="target-jvm" value="1.5"/>
+-	<property name="source-level" value="1.5"/>
++	<property name="target-jvm" value="1.6"/>
++	<property name="source-level" value="1.6"/>
+     <property file="build.properties"/>
+-	<property name="rhino.basedir" location="../htmlunit-rhino-fork"/>
++	<property name="rhino.basedir" location="${basedir}/htmlunit-rhino-fork"/>
+ 	<property name="classes" value="${rhino.basedir}/build/classes"/>
+ 	<property name="repackaged-rhino.dir" value="target/repackaged-rhino"/>
+ 	<property name="jar" location="target/htmlunit-core-js-${version}.jar" />
+@@ -65,7 +65,7 @@
+ 		<antcall target="beautify"/>
+ 
+ 		<mkdir dir='${repackaged-rhino.dir}/classes'/>
+-		<javac destdir='${repackaged-rhino.dir}/classes' debug='true' encoding="ISO-8859-1" source='1.5' target='1.5' includeAntRuntime='false'>
++		<javac destdir='${repackaged-rhino.dir}/classes' debug='true' encoding="utf-8" source='1.6' target='1.6' includeAntRuntime='false'>
+ 			<src path='${repackaged-rhino.dir}/src' />
+ 		</javac>
+ 		<copy toDir="${repackaged-rhino.dir}/classes">
+@@ -93,7 +93,7 @@
+         <echo message="*******************************************************************"/>
+     </target>
+ 
+-	<target name="jar-with-source" depends="repackage, generate-rhino-diff">
++	<target name="jar-with-source" depends="repackage">
+ 		<basename property="rhino.diff.filename" file="${rhino.diff}"/>
+ 		<dirname property="rhino.diff.dirname" file="${rhino.diff}"/>
+ 		<jar destfile="${jar}">
+@@ -113,7 +113,7 @@
+ 		<javadoc sourcepath='${repackaged-rhino.dir}/src' destdir='${javadoc.dir}'
+ 		           author='true' version='true' use='true'
+ 		           windowtitle="HtmlUnit core-js-${version}"
+-		           doctitle="HtmlUnit core-js-${version}" encoding="ISO-8859-1"
++		           doctitle="HtmlUnit core-js-${version}" encoding="utf-8"
+ 		 />
+ 		<jar destfile="${jar.javadoc}">
+ 			<fileset dir='${javadoc.dir}' />
+@@ -136,26 +136,11 @@
+ 	</target>
+ 
+ 	<target name="check-maven-ant-tasks">
+-		<mkdir dir="lib"/>
+-		<property name="maven-ant-tasks.url" value="http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar"/>
+-		<get src="${maven-ant-tasks.url}" dest="lib" skipexisting="true"/>
+ 	</target>
+ 
+ 	<target name="deploy-snapshot" depends="check-maven-ant-tasks,jar-with-source"
+ 			description="Deploys a snapshot to Sonatype snapshot repository">
+ 
+-		<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
+-		<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
+-			classpathref="maven-ant-tasks.classpath" />
+-
+-		<artifact:mvn>
+-			<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file" />
+-			<arg value="-Durl=${maven-snapshots-repository-url}" />
+-			<arg value="-DrepositoryId=${maven-snapshots-repository-id}" />
+-			<arg value="-DpomFile=pom.xml" />
+-			<arg value="-Dfile=${jar}" />
+-		</artifact:mvn>
+-
+ 		<!-- "uniqueVersion=true" will not have sources because of different timestamps,
+ 		     "uniqueVersion=false" will not be refreshed from snapshot repository  -->
+ 		<!--
+@@ -172,15 +157,6 @@
+ 
+ 	<target name="install-local" depends="check-maven-ant-tasks,jar-with-source"
+ 			description="Installs the jars into the local Maven repository">
+-		<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
+-		<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
+-			classpathref="maven-ant-tasks.classpath" />
+-
+-		<artifact:pom id="maven.project" file="pom.xml" />
+-		<artifact:install file="${jar}">
+-			<pom refid="maven.project"/>
+-			<attach file="${jar.sources}" classifier="sources" />
+-		</artifact:install>
+ 	</target>
+ 
+     <target name="copy-to-htmlunit" depends="repackage">
+diff -Nru htmlunit-core-js-core-js-2.16/htmlunit-rhino-fork/build.xml htmlunit-core-js-core-js-2.16.build/htmlunit-rhino-fork/build.xml
+--- htmlunit-core-js-core-js-2.16/htmlunit-rhino-fork/build.xml	2015-05-08 09:55:36.000000000 +0200
++++ htmlunit-core-js-core-js-2.16.build/htmlunit-rhino-fork/build.xml	2015-05-22 14:23:22.248817945 +0200
+@@ -148,6 +148,7 @@
+     <javadoc sourcefiles="${apiClasses}"
+              sourcepath="src"
+              destdir="${dist.dir}/javadoc"
++             encoding="utf-8"
+              version="true"
+              author="true"
+              windowtitle="${Name}" />
+@@ -158,6 +159,7 @@
+     <mkdir dir="${dist.dir}/javadoc"/>
+     <javadoc sourcepath="src"
+              destdir="${dist.dir}/javadoc"
++             encoding="utf-8"
+              version="true"
+              package="true"
+              author="true"
+@@ -173,7 +175,7 @@
+   <!--
+     Compiles and tests all sources and then creates the distribution file
+   -->
+-  <target name="all" depends="deepclean,compile-all,junit-all,dist">
++  <target name="all" depends="deepclean,compile-all,dist">
+   </target>
+ 
+   <target name="dist" depends="deepclean,jar,copy-all,javadoc">
+diff -Nru htmlunit-core-js-core-js-2.16/htmlunit-rhino-fork/testsrc/build.xml htmlunit-core-js-core-js-2.16.build/htmlunit-rhino-fork/testsrc/build.xml
+--- htmlunit-core-js-core-js-2.16/htmlunit-rhino-fork/testsrc/build.xml	2015-05-08 09:55:36.000000000 +0200
++++ htmlunit-core-js-core-js-2.16.build/htmlunit-rhino-fork/testsrc/build.xml	2015-05-22 14:17:04.461534890 +0200
+@@ -54,7 +54,6 @@
+ 
+   <target name="junit-compile">
+     <mkdir dir="${test.classes}" />
+-    <antcall target="get-junit"/>
+     <javac
+       destdir="${test.classes}" debug="true"
+       encoding="UTF-8"
+@@ -62,8 +61,8 @@
+       source="${source-level}"
+     >
+       <classpath>
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
++        <fileset dir="/usr/share/java" includes="hamcrest/all.jar"/>
+         <pathelement path="${classes}" />
+       </classpath>
+       <src path="testsrc"/>
+@@ -75,7 +74,6 @@
+ 
+   <target name="compile">
+     <mkdir dir="${test.classes}" />
+-	<antcall target="get-junit"/>
+     <javac
+       srcdir="testsrc"
+       destdir="${test.classes}" debug="true"
+@@ -83,8 +81,8 @@
+       source="${source-level}"
+     >
+       <classpath>
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
++        <fileset dir="/usr/share/java" includes="hamcrest/all.jar"/>
+         <pathelement path="${classes}" />
+       </classpath>
+       <sourcepath path="testsrc" />
+@@ -110,13 +108,13 @@
+     <get src="${test.emma_ant.url}" dest="lib/emma_ant.jar" usetimestamp="true"/>
+   </target>
+ 
+-  <target name="coverage-instrument" depends="get-emma">
++  <target name="coverage-instrument">
+     <property name="coverage.dir" location="${build.dir}/coverage"/>
+     <property name="coverage.classes.dir" location="${build.dir}/coverage/classes"/>
+     <mkdir dir="${coverage.classes.dir}"/>
+     <path id="emma.lib">
+-      <pathelement location="lib/emma.jar" />
+-      <pathelement location="lib/emma_ant.jar" />
++      <fileset dir="/usr/share/java" includes="emma.jar" />
++      <fileset dir="/usr/share/java" includes="emma_ant.jar" />
+     </path>
+     <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+     <property name="coverage.instrumentationfile" location="${coverage.dir}/instrumentation"/>
+@@ -136,7 +134,7 @@
+ 	
+   <target name="junit" depends="junit-compile,coverage-instrument">
+     <junit printsummary="on" fork="true" forkmode="once" maxmemory="${test.vm.mx}" showoutput="true"
+-    	failureproperty="junitFailed">
++    	haltonfailure="no">
+       <!--
+       <jvmarg value="-Xdebug"/>
+       <jvmarg value="-Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=localhost:14000"/>
+@@ -150,14 +148,15 @@
+       <sysproperty key="user.country" value="US"/>
+       <sysproperty key="user.timezone" value="America/Los_Angeles"/>
+       <classpath>
+-        <pathelement location="${xbean.jar}"/>
+-        <pathelement location="${jsr173.jar}"/>
+         <pathelement path="${coverage.classes.dir}" />
+         <pathelement path="${classes}" />
+         <pathelement path="${test.classes}" />
+-        <pathelement path="lib/emma.jar"/>
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="emma.jar" />
++        <fileset dir="/usr/share/java" includes="emma_ant.jar" />
++        <fileset dir="/usr/share/java" includes="bea-stax-api.jar"/>
++        <fileset dir="/usr/share/java" includes="xmlbeans/xbean.jar"/>
++        <fileset dir="/usr/share/java" includes="junit.jar" />
++        <fileset dir="/usr/share/java" includes="hamcrest/all.jar"/>
+         <pathelement location="${test.jstests.jar}"/>
+       </classpath>
+       <batchtest todir="build/test">
+@@ -188,8 +187,8 @@
+         <classpath>
+         <pathelement path="${classes}" />
+         <pathelement path="${test.classes}" />
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
++        <fileset dir="/usr/share/java" includes="hamcrest/all.jar"/>
+         <pathelement location="${test.jstests.jar}"/>
+       </classpath>
+ 
+@@ -209,8 +208,8 @@
+       <classpath>
+         <pathelement path="${classes}" />
+         <pathelement path="${test.classes}" />
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
++        <fileset dir="/usr/share/java" includes="hamcrest/all.jar"/>
+         <pathelement location="${test.jstests.jar}"/>
+       </classpath>
+       <batchtest todir="build/test/benchmark">
+@@ -263,8 +262,8 @@
+       maxmemory="${test.vm.mx}"
+     >
+       <classpath>
+-        <pathelement location="${xbean.jar}"/>
+-        <pathelement location="${jsr173.jar}"/>
++        <fileset dir="/usr/share/java" includes="bea-stax-api.jar"/>
++        <fileset dir="/usr/share/java" includes="xmlbeans/xbean.jar"/>
+         <pathelement path="${classes}" />
+         <pathelement path="${test.classes}" />
+         <pathelement location="${test.jstests.jar}"/>
+diff -Nru htmlunit-core-js-core-js-2.16/src/build.xml htmlunit-core-js-core-js-2.16.build/src/build.xml
+--- htmlunit-core-js-core-js-2.16/src/build.xml	2015-04-17 16:59:00.000000000 +0200
++++ htmlunit-core-js-core-js-2.16.build/src/build.xml	2015-05-22 14:01:55.795363954 +0200
+@@ -35,14 +35,13 @@
+ 
+   <target name="junit-compile">
+     <mkdir dir="${test.classes}" />
+-    <antcall target="get-junit"/>
+     <javac
+       destdir="${test.classes}" debug="true" includeantruntime="false"
+       target="${target-jvm}"
+       source="${source-level}"
+     >
+       <classpath>
+-        <pathelement path="lib/junit.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
+         <pathelement path="${classes}" />
+       </classpath>
+         <src path="."/>
+@@ -51,7 +50,6 @@
+ 
+   <target name="compile">
+     <mkdir dir="${test.classes}" />
+-	<antcall target="get-junit"/>
+     <javac
+       srcdir="."
+       destdir="${test.classes}" debug="true"
+@@ -59,7 +57,7 @@
+       source="${source-level}"
+     >
+       <classpath>
+-        <pathelement path="lib/junit.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
+         <pathelement path="${classes}" />
+       </classpath>
+       <sourcepath path="." />
+@@ -78,9 +76,9 @@
+       <classpath>
+         <pathelement path="${classes}" />
+         <pathelement path="${test.classes}" />
+-        <pathelement path="lib/emma.jar"/>
+-        <pathelement path="lib/junit.jar" />
+-        <pathelement path="lib/hamcrest.jar" />
++        <fileset dir="/usr/share/java" includes="emma.jar"/>
++        <fileset dir="/usr/share/java" includes="hamcrest/core.jar" />
++        <fileset dir="/usr/share/java" includes="junit.jar" />
+       </classpath>
+       <batchtest todir="${build.dir}/htmlunittest">
+         <fileset dir="${test.classes}" includes="**/*Test.class"/>
diff --git a/htmlunit-core-js.spec b/htmlunit-core-js.spec
index b130bcf..235b026 100644
--- a/htmlunit-core-js.spec
+++ b/htmlunit-core-js.spec
@@ -1,22 +1,32 @@
-Name:           htmlunit-core-js
-Version:        2.9
-Release:        8%{?dist}
-Summary:        Rhino fork for htmlunit
-License:        MPLv1.1
-URL:            http://htmlunit.sourceforge.net/
-# svn export http://htmlunit.svn.sourceforge.net/svnroot/htmlunit/tags/core-js-2.9 htmlunit-core-js-2.9
-# tar caf ~/rpmbuild/htmlunit-core-js-2.9.tar.xz htmlunit-core-js-2.9
-Source0:        %{name}-%{version}.tar.xz
-Patch0:         %{name}-%{version}-build-fix.patch
-
-BuildArch:      noarch
-
-BuildRequires:  jpackage-utils
-BuildRequires:  java-devel
-BuildRequires:  junit
-BuildRequires:  ant
-
-Requires:       jpackage-utils
+%global rhino_fork_githash f102c00ed06e3941c360f2a698dc267162d2f64a
+Name:          htmlunit-core-js
+Version:       2.16
+Release:       1%{?dist}
+Summary:       Rhino fork for htmlunit
+License:       MPLv2.0
+URL:           http://htmlunit.sourceforge.net/
+Source0:       https://github.com/HtmlUnit/htmlunit-core-js/archive/core-js-%{version}.tar.gz
+# Modified version of Mozilla Rhino 1.7.7
+# see http://central.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.16/htmlunit-core-js-2.16-sources.jar#rhinoDiff.txt
+Source1:       https://github.com/HtmlUnit/htmlunit-rhino-fork/archive/%{rhino_fork_githash}/htmlunit-rhino-fork-%{rhino_fork_githash}.tar.gz
+
+Patch0:        %{name}-2.16-build.patch
+
+BuildRequires: ant
+BuildRequires: java-devel
+BuildRequires: javapackages-local
+BuildRequires: junit
+
+%if 0
+# Test use
+BuildRequires: ant-junit
+BuildRequires: bea-stax-api
+BuildRequires: emma
+BuildRequires: hamcrest
+BuildRequires: xmlbeans
+%endif
+
+BuildArch:     noarch
 
 %description
 This is a fork of Rhino to support HtmlUnit.
@@ -29,36 +39,63 @@ Summary:        Javadoc for %{name}
 This package contains the API documentation for %{name}.
 
 %prep
-%setup -q
-%patch0 -p0
-sed -i "s|junit4|junit|" build.xml
-
-find . -regex '.*\.\(class\|jar\|zip\)' -exec rm -f '{}' \;
+%setup -q -n %{name}-core-js-%{version} -a1
+mv htmlunit-rhino-fork-%{rhino_fork_githash} htmlunit-rhino-fork
+
+# Cleanup
+find . -name "*.class"  -print -delete
+find . -name "*.jar" -print -delete
+find . -name "*.tar.*" -print -delete
+find . -name '*.zip' -print -delete
+
+%patch0 -p1
+
+cp -p htmlunit-rhino-fork/LICENSE.txt LICENSE-MPL.txt
+
+# package netscape.javascript does not exist
+sed -i 's|depends="test"||' build.xml
+%if 0
+# Fix non ASCII chars
+for s in htmlunit-rhino-fork/toolsrc/org/mozilla/javascript/tools/shell/ShellConsole.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug637811Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug685403Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug687669Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug688018Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug688021Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug688023Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug689308Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug689314Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug708801Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug714204Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug782363Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug789277Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/Bug783797Test.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/es5/Test262RegExpTest.java \
+ htmlunit-rhino-fork/testsrc/org/mozilla/javascript/tests/json/JsonParserTest.java;do
+  native2ascii -encoding UTF8 ${s} ${s}
+done
+%endif
 
 %build
-ant -DupdateRhinoOriginal.skip=true jar-all
-
-%install
 
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-cp -p target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+%ant jar-all
 
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -rp target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap
+%install
+%mvn_artifact pom.xml target/%{name}-%{version}.jar
+%mvn_file net.sourceforge.htmlunit:%{name} %{name}
+%mvn_install -J target/javadoc
 
 %files -f .mfiles
-%doc README.txt release.txt
-%license LICENSE.txt
+%doc README.html
+%license LICENSE.txt LICENSE-MPL.txt
 
-%files javadoc
-%{_javadocdir}/%{name}
-%license LICENSE.txt
+%files javadoc -f .mfiles-javadoc
+%license LICENSE.txt LICENSE-MPL.txt
 
 %changelog
+* Fri Apr 24 2015 gil cattaneo <puntogil at libero.it> 2.16-1
+- update to 2.16
+
 * Thu Feb 05 2015 gil cattaneo <puntogil at libero.it> 2.9-8
 - introduce license macro
 
diff --git a/sources b/sources
index 93169e7..eb75e1a 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-bddca18145024b6e7698c86a41ccf0ab  htmlunit-core-js-2.9.tar.xz
-d5037df84f7317bbbd56fafc01eebda2  htmlunit-core-js-2.9-build-fix.patch
+874edf656639b33447f606e0efd4f71e  core-js-2.16.tar.gz
+69304b127b13930724673e8dc5051d54  htmlunit-rhino-fork-f102c00ed06e3941c360f2a698dc267162d2f64a.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/htmlunit-core-js.git/commit/?h=master&id=2e1bf8ad2747902669ed1709f12620755e3d3f56


More information about the scm-commits mailing list