From 23b638242ace28a21d6a97366f29c66d6ca192d9 Mon Sep 17 00:00:00 2001 From: gil Date: Sat, 6 Jan 2024 07:48:30 +0100 Subject: [PATCH] rebuilt with java-gcj-compat support [release 1.3.2-3mamba;Sat Mar 12 2011] --- README.md | 2 + objectweb-anttask-1.3.2-ant.patch | 47 ++++++++++++++++ objectweb-anttask.spec | 93 +++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 objectweb-anttask-1.3.2-ant.patch create mode 100644 objectweb-anttask.spec diff --git a/README.md b/README.md index 8552287..ea861d7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # objectweb-anttask +ObjectWeb Ant task + diff --git a/objectweb-anttask-1.3.2-ant.patch b/objectweb-anttask-1.3.2-ant.patch new file mode 100644 index 0000000..6b4ac88 --- /dev/null +++ b/objectweb-anttask-1.3.2-ant.patch @@ -0,0 +1,47 @@ +--- src/org/objectweb/util/ant/MultipleCopy.java 2006-04-07 09:11:56.000000000 +0200 ++++ src/org/objectweb/util/ant/MultipleCopy.java-gil 2010-01-09 04:32:50.000000000 +0100 +@@ -10,6 +10,7 @@ + import org.apache.tools.ant.taskdefs.Copy; + import org.apache.tools.ant.types.FileSet; + import org.apache.tools.ant.types.PatternSet; ++import org.apache.tools.ant.types.ResourceCollection; + + import java.io.File; + import java.util.StringTokenizer; +@@ -101,8 +102,26 @@ + } + + // deal with the filesets +- for (int i = 0; i < filesets.size(); i++) { +- FileSet fs = (FileSet) filesets.elementAt(i); ++ // this patch is taken from ant 1.6.5-1.7.0 diff ++ /* for historical and performance reasons we have to do ++ things in a rather complex way. ++ ++ (1) Move is optimized to move directories if a fileset ++ has been included completely, therefore FileSets need a ++ special treatment. This is also required to support ++ the failOnError semantice (skip filesets with broken ++ basedir but handle the remaining collections). ++ ++ (2) We carry around a few protected methods that work ++ on basedirs and arrays of names. To optimize stuff, all ++ resources with the same basedir get collected in ++ separate lists and then each list is handled in one go. ++ */ ++ for (int i = 0; i < rcs.size(); i++) { ++ ResourceCollection rc = (ResourceCollection) rcs.elementAt(i); ++ // Step (1) - beware of the ZipFileSet ++ if (rc instanceof FileSet && rc.isFilesystemOnly()) { ++ FileSet fs = (FileSet) rc; + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + File fromDir = fs.getDir(getProject()); + +@@ -110,6 +129,7 @@ + String[] srcDirs = ds.getIncludedDirectories(); + + scan(fromDir, destDir, srcFiles, srcDirs); ++ } + } + + // do all the copy operations now... diff --git a/objectweb-anttask.spec b/objectweb-anttask.spec new file mode 100644 index 0000000..2a47355 --- /dev/null +++ b/objectweb-anttask.spec @@ -0,0 +1,93 @@ +%define javahome %{_jvmdir}/jdk +Name: objectweb-anttask +Version: 1.3.2 +Release: 3mamba +Summary: ObjectWeb Ant task +Group: Development/Libraries/Java +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://forge.objectweb.org/projects/monolog/ +Source0: http://download.forge.objectweb.org/monolog/ow_util_ant_tasks_%{version}.zip +Patch0: objectweb-anttask-1.3.2-ant.patch +License: LGPL +BuildRequires: apache-ant +BuildRequires: jpackage-utils +%if "%{stage1}" != "1" +BuildRequires: objectweb-asm2 +%endif +BuildRequires: xalan-j2 +Requires: jpackage-utils +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +ObjectWeb Ant task + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -c %{name}-%{version} +for j in $(find . -name "*.jar"); do + mv $j $j.no +done +for j in $(find . -name "*.class"); do + rm -rf $j +done +%patch0 -p0 + +%build +export JAVA_HOME=%javahome +%if "%{stage1}" != "1" +export CLASSPATH=$(build-classpath asm2 xalan-j2) +%else +mv externals/asm-2.1.jar.no externals/asm-2.1.jar +export CLASSPATH=$(build-classpath xalan-j2) +%endif +ant -Dbuild.compiler=modern -Dbuild.sysclasspath=first jar jdoc + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +mkdir -p %{buildroot}%{_javadir} + +install -m 644 output/lib/ow_util_ant_tasks.jar \ + %{buildroot}%{_javadir}/objectweb-anttask-%{version}.jar + +( + cd %{buildroot}%{_javadir} + for jar in *-%{version}*; do + ln -s ${jar} `echo $jar | sed "s|-%{version}||g"` + done +) + +mkdir -p %{buildroot}%{_javadocdir}/objectweb-anttask-%{version} +cp -pr output/jdoc/* %{buildroot}%{_javadocdir}/objectweb-anttask-%{version} +ln -sf objectweb-anttask-%{version} %{buildroot}%{_javadocdir}/objectweb-anttask + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_javadir}/objectweb-anttask-%{version}.jar +%{_javadir}/objectweb-anttask.jar + +%files javadoc +%defattr(-,root,root) +%{_javadocdir}/objectweb-anttask-%{version} +%{_javadocdir}/objectweb-anttask + +%changelog +* Sat Mar 12 2011 gil 1.3.2-3mamba +- rebuilt with java-gcj-compat support + +* Sat Jan 09 2010 gil 1.3.2-2mamba +- rebuilt with objectweb-asm2 and xalan-j2 support + +* Thu Feb 12 2009 gil 1.3.2-1mamba +- package created by autospec