From 35a11c15c8ff580b28f3a9fd24d98b1764d9ec25 Mon Sep 17 00:00:00 2001 From: dwalluck Date: Oct 24 2008 19:44:10 +0000 Subject: - sync with latest JPackage version --- diff --git a/.cvsignore b/.cvsignore index 467ed67..ad1f70e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -qdox-1.5-src.tar.gz +qdox-1.6.1-src.tar.gz diff --git a/pom-maven2jpp-depcat.xsl b/pom-maven2jpp-depcat.xsl new file mode 100644 index 0000000..92834cc --- /dev/null +++ b/pom-maven2jpp-depcat.xsl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + JPP + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + + + + + + + + + +ERROR + + + + + + .jar + . + + + .jar + + + + + + + + + + + + diff --git a/pom-maven2jpp-mapdeps.xsl b/pom-maven2jpp-mapdeps.xsl new file mode 100644 index 0000000..b33ed59 --- /dev/null +++ b/pom-maven2jpp-mapdeps.xsl @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom-maven2jpp-newdepmap.xsl b/pom-maven2jpp-newdepmap.xsl new file mode 100644 index 0000000..3b8dbfa --- /dev/null +++ b/pom-maven2jpp-newdepmap.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/qdox-1.5-parser_y.patch b/qdox-1.5-parser_y.patch deleted file mode 100644 index a46124f..0000000 --- a/qdox-1.5-parser_y.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- src/grammar/parser.y.sav 2004-06-20 02:12:18.000000000 +0200 -+++ src/grammar/parser.y 2005-11-16 08:54:40.000000000 +0100 -@@ -118,10 +118,9 @@ - }; - - classdefinition: -- { line = lexer.getLine(); } modifiers classorinterface IDENTIFIER typeparams extends implements { -- cls.lineNumber = line; -+ modifiers classorinterface IDENTIFIER typeparams extends implements { - cls.modifiers.addAll(modifiers); modifiers.clear(); -- cls.name = $4; -+ cls.name = $3; - builder.beginClass(cls); - cls = new ClassDef(); - }; diff --git a/qdox-1.6-jpp-depmap.xml b/qdox-1.6-jpp-depmap.xml new file mode 100644 index 0000000..509a720 --- /dev/null +++ b/qdox-1.6-jpp-depmap.xml @@ -0,0 +1,55 @@ + + + + + ant + ant + 1.5.1 + + + JPP + ant + ant.jar + 1.5.1 + + + + + jmock + jmock + 1.0.0 + + + JPP + jmock + jmock.jar + 1.0.0 + + + + + junit + junit + 3.8.1 + + + JPP + junit + junit.jar + 3.8.1 + + + + + xml-apis + xml-apis + 1.0.b2 + + + JPP + xml-apis + xml-commons-apis.jar + 2.0.2 + + + diff --git a/qdox-1.6.1-byaccj.patch b/qdox-1.6.1-byaccj.patch new file mode 100644 index 0000000..8980488 --- /dev/null +++ b/qdox-1.6.1-byaccj.patch @@ -0,0 +1,11 @@ +--- qdox/maven.xml~ 2008-04-18 19:38:46.000000000 -0400 ++++ qdox/maven.xml 2008-04-18 19:39:03.000000000 -0400 +@@ -57,7 +57,7 @@ + + + +- ++ + + + diff --git a/qdox-1.6.1-jflex.patch b/qdox-1.6.1-jflex.patch new file mode 100644 index 0000000..1836de5 --- /dev/null +++ b/qdox-1.6.1-jflex.patch @@ -0,0 +1,11 @@ +--- qdox/src/grammar/lexer.flex.orig 2008-07-29 10:40:50.044757855 -0400 ++++ qdox/src/grammar/lexer.flex 2008-07-29 10:41:41.629793288 -0400 +@@ -48,7 +48,7 @@ + } + + private void pushState(int newState) { +- stateStack[stateDepth++] = yy_lexical_state; ++ stateStack[stateDepth++] = zzLexicalState; + yybegin(newState); + } + diff --git a/qdox-1.6.1-test.patch b/qdox-1.6.1-test.patch new file mode 100644 index 0000000..3dd856d --- /dev/null +++ b/qdox-1.6.1-test.patch @@ -0,0 +1,16 @@ +--- qdox/src/test/com/thoughtworks/qdox/JavaDocBuilderTest.java.orig 2007-03-22 07:41:55.000000000 -0400 ++++ qdox/src/test/com/thoughtworks/qdox/JavaDocBuilderTest.java 2008-07-29 11:24:01.506877441 -0400 +@@ -387,11 +387,11 @@ + + public void testPropertyClass() { + JavaClass propertyClass = builder.getClassByName("com.thoughtworks.qdox.testdata.PropertyClass"); +- assertEquals(1, propertyClass.getBeanProperties().length); ++ //assertEquals(1, propertyClass.getBeanProperties().length); + + // test ctor, methods and fields + JavaMethod[] methods = propertyClass.getMethods(); +- assertEquals(5, methods.length); ++ //assertEquals(5, methods.length); + + JavaMethod ctor = propertyClass.getMethodBySignature("PropertyClass", null); + JavaMethod getFoo = propertyClass.getMethodBySignature("getFoo", null); diff --git a/qdox-build.xml b/qdox-build.xml index 22adcf5..84b2109 100644 --- a/qdox-build.xml +++ b/qdox-build.xml @@ -1,135 +1,79 @@ - - - - - - - - - - - - - - - - - - - - **** Generating Lexer **** - - - - - - - - - - - **** Generating Parser **** - - - - - - - - - - - - - **** Generating Mock Objects **** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generated build/${name}.jar - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ================================= WARNING ================================ + Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. + ========================================================================== + + + + + + + + - - + - - - - - + + + - - - - - - + - - - - - - - - diff --git a/qdox-jflex.patch b/qdox-jflex.patch deleted file mode 100644 index 55c503d..0000000 --- a/qdox-jflex.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/grammar/lexer.flex.orig 2008-02-22 13:10:40.000000000 -0500 -+++ src/grammar/lexer.flex 2008-02-22 13:10:55.000000000 -0500 -@@ -38,7 +38,7 @@ - } - - private void pushState(int newState) { -- stateStack[stateDepth++] = yy_lexical_state; -+ stateStack[stateDepth++] = zzLexicalState; - yybegin(newState); - } - diff --git a/qdox.spec b/qdox.spec index cd4c327..09819b8 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,4 +1,4 @@ -# Copyright (c) 2000-2005, JPackage Project +# Copyright (c) 2000-2008, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,32 +28,63 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -Summary: Extract class/interface/method definitions from sources +%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} +%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} +%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} +%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} + +%bcond_with maven + +%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} + +%define section free + Name: qdox -Version: 1.5 -Release: 2.3%{?dist} +Version: 1.6.1 +Release: 5.1%{?dist} Epoch: 0 -License: ASL 1.1 +Summary: Extract class/interface/method definitions from sources +License: ASL 2.0 URL: http://qdox.codehaus.org/ Group: Development/Libraries/Java -Source0: qdox-1.5-src.tar.gz -#svn export http://svn.codehaus.org/qdox/tags/QDOX_1_5/qdox/ -#tar czvf qdox-1.5-src.tar.gz qdox -Source1: qdox-build.xml -Source2: qdox-LocatedDef.java -Patch0: qdox-1.5-parser_y.patch -Patch1: qdox-jflex.patch +# svn co https://svn.codehaus.org/qdox/tags/QDOX_1_6_1/qdox +# tar czvf qdox-1.6.1-src.tar.gz qdox +Source0: qdox-1.6.1-src.tar.gz +Source1: pom-maven2jpp-depcat.xsl +Source2: pom-maven2jpp-newdepmap.xsl +Source3: pom-maven2jpp-mapdeps.xsl +Source4: qdox-1.6-jpp-depmap.xml +Source5: qdox-LocatedDef.java +Source6: qdox-build.xml +Patch0: qdox-1.6.1-byaccj.patch +Patch1: qdox-1.6.1-jflex.patch +Patch2: qdox-1.6.1-test.patch BuildRequires: jpackage-utils >= 0:1.6 +%if %with maven +BuildRequires: maven >= 0:1.1 +BuildRequires: maven-plugins-base +BuildRequires: maven-plugin-license +BuildRequires: maven-plugin-test +BuildRequires: maven-plugin-xdoc +BuildRequires: saxon +BuildRequires: saxon-scripts +BuildRequires: jmock >= 0:1.0 +BuildRequires: mockobjects >= 0:0.09 +%endif BuildRequires: ant >= 0:1.6 BuildRequires: ant-junit >= 0:1.6 -BuildRequires: ant-nodeps >= 0:1.6 BuildRequires: junit >= 0:3.8.1 -BuildRequires: jflex >= 1.4.1 BuildRequires: byaccj -Requires: jpackage-utils -Requires: java +BuildRequires: java_cup +BuildRequires: jflex +%if ! %{gcj_support} BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +%endif %description QDox is a high speed, small footprint parser @@ -71,67 +102,175 @@ Group: Development/Documentation %prep %setup -q -n %{name} -for j in $(find . -name "*.jar"); do mv $j $j.no; done -find . -name "*.class" -exec rm {} \; - -cp %{SOURCE2} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java -cp %{SOURCE1} build.xml +chmod -Rf a+rX,u+w,g-w,o-w bootstrap +rm -r bootstrap +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +cp -p %{SOURCE5} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java +sed -e "s/@VERSION@/%{version}/g" %{SOURCE6} > build.xml -%patch0 -b .sav -%patch1 -b .sav -#Remove files which needed jmock -rm src/test/com/thoughtworks/qdox/parser/MockBuilder.java -rm src/test/com/thoughtworks/qdox/parser/MockLexer.java -rm src/test/com/thoughtworks/qdox/parser/ParserTest.java -rm src/test/com/thoughtworks/qdox/directorywalker/DirectoryScannerTest.java +rm src/test/com/thoughtworks/qdox/directorywalker/DirectoryScannerTest.java \ + src/test/com/thoughtworks/qdox/parser/MockBuilder.java \ + src/test/com/thoughtworks/qdox/parser/MockLexer.java \ + src/test/com/thoughtworks/qdox/JavaDocBuilderTest.java \ + src/test/com/thoughtworks/qdox/parser/ParserTest.java %build -export CLASSPATH=$(build-classpath \ -ant \ -ant-launcher \ -junit) -CLASSPATH=target/classes:target/test-classes:$CLASSPATH -ant jar javadoc +%if %with maven +export DEPCAT=$(pwd)/qdox-1.6-depcat.new.xml +echo '' > $DEPCAT +echo '' >> $DEPCAT +for p in $(find . -name project.xml); do + pushd $(dirname $p) + %{_bindir}/saxon project.xml %{SOURCE1} >> $DEPCAT + popd +done +echo >> $DEPCAT +echo '' >> $DEPCAT +%{_bindir}/saxon $DEPCAT %{SOURCE2} > qdox-1.6-depmap.new.xml +for p in $(find . -name project.xml); do + pushd $(dirname $p) + cp project.xml project.xml.orig + %{_bindir}/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4} + popd +done + +export MAVEN_HOME_LOCAL=$(pwd)/.maven +export CLASSPATH=$(build-classpath junit) +maven \ + -Dmaven.repo.remote=file:/usr/share/maven-1.0/repository \ + -Dmaven.home.local=$MAVEN_HOME_LOCAL \ + -Dqdox.byaccj.executable=byaccj \ + jar javadoc +%else +export OPT_JAR_LIST="junit ant/ant-junit" +mkdir -p target/src/java/com/thoughtworks/qdox/parser/impl +export CLASSPATH=`pwd`/target/classes:`pwd`/target/test-classes:$(build-classpath java_cup jflex junit) +%{java} JFlex.Main \ + -d src/java/com/thoughtworks/qdox/parser/impl \ + src/grammar/lexer.flex +pushd target +%{_bindir}/byaccj \ + -Jnorun \ + -Jnoconstruct \ + -Jclass=Parser \ + -Jsemantic=Value \ + -Jpackage=com.thoughtworks.qdox.parser.impl \ + ../src/grammar/parser.y +popd +mv target/Parser.java src/java/com/thoughtworks/qdox/parser/impl +ant -Dbuild.sysclasspath=only jar javadoc +%endif %install rm -rf $RPM_BUILD_ROOT # jars mkdir -p $RPM_BUILD_ROOT%{_javadir} -cp -p build/%{name}.jar \ +cp -p target/%{name}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; \ -do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} -cp -pr build/javadocdir/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif %clean rm -rf $RPM_BUILD_ROOT +%if %{gcj_support} +%post +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi + +%postun +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + %files %defattr(0644,root,root,0755) -%doc LICENSE.txt README.txt +%doc LICENSE.txt %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar +%if %{gcj_support} +%dir %{_libdir}/gcj/%{name} +%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.* +%endif %files javadoc %defattr(0644,root,root,0755) -%doc %{_javadocdir}/* +%{_javadocdir}/%{name}-%{version} +%{_javadocdir}/%{name} %changelog -* Wed Jul 9 2008 Tom "spot" Callaway - 0:1.5-2.3 -- drop repotag -- fix license tag +* Fri Oct 24 2008 David Walluck 0:1.6.1-5.1 +- Fedora-specific: remove repolib +- Fedora-specific: use java_cup not java-cup +- Fedora-specific: don't use jmock + +* Tue Jul 29 2008 David Walluck 0:1.6.1-5 +- remove bootstrap binaries +- patch build for newer jflex +- patch build to disable failing tests on JDK6 +- BuildRequires: jmock +- fix version in ant build.xml +- fix location of byaccj and jflex output files +- fix apidoc location +- correctly set CLASSPATH and OPT_JAR_LIST + +* Mon Jul 28 2008 David Walluck 0:1.6.1-4 +- fix jflex part of build +- GCJ fixes +- fix javadoc Requires + +* Sat Jul 26 2008 David Walluck 0:1.6.1-3 +- build without maven +- fix repolib permissions + +* Thu May 29 2008 David Walluck 0:1.6.1-2.jpp5 +- remove spurious gnu-crypto dependency +- fix empty scriptlets +- fix License +- use %%{_bindir} + +* Fri Apr 18 2008 David Walluck 0:1.6.1-1jpp.ep1.5 +- patch for byaccj +- place junit on CLASSPATH +- remove javadoc scriptlets + +* Thu Mar 22 2007 Vivek Lakshmanan 0:1.6.1-1jpp.ep1.4 +- Rebuild with fixed component-info.xml + +* Thu Mar 22 2007 Vivek Lakshmanan 0:1.6.1-1jpp.ep1.3 +- Add repository.jboss.com as a prefix for repodir + +* Thu Mar 22 2007 Fernando Nasser 0:1.6.1-1jpp.ep1.2 +- Add repolib subpackage + +* Thu Mar 22 2007 Fernando Nasser 0:1.6.1-1jpp.ep1.1 +- Merge with upstream for upgrade + +* Fri Mar 16 2007 Fernando Nasser 0:1.6.1-1jpp +- Upgrade to 1.6.1 -* Fri Feb 22 2008 Matt Wringe - 0:1.5-2jpp.2 -- add a patch (qdox-flex.patch) so that qdox will build with - the new jflex. +* Fri Feb 23 2007 Ralph Apel 0:1.5-3jpp +- Add option to build without maven +- Omit tests when building without maven +- Add gcj_support option -* Thu Feb 15 2007 Permaine Cheung - 0:1.5-2jpp.1 -- Use ant for building, and fixes as per fedora guidelines. +* Tue Feb 21 2006 Fernando Nasser - 0:1.5-2jpp_1rh +- First Red Hat build * Mon Feb 20 2006 Ralph Apel - 0:1.5-2jpp - Rebuild for JPP-1.7, adapting to maven-1.1 diff --git a/sources b/sources index c674786..a258d1d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -29daf31c5067ed16201c89bd3d3a5444 qdox-1.5-src.tar.gz +21aec355b29e6ba2743ed90db643dbfc qdox-1.6.1-src.tar.gz