build.xml: fix for encoding error with sun-java/openjdk 7 [release 5.2-11mamba;Wed Mar 12 2014]
This commit is contained in:
parent
0a16a3ef88
commit
fa885d084c
@ -1,2 +1,4 @@
|
||||
# jakarta-bcel
|
||||
|
||||
This is a version of Apache's Byte Code Engineering Library (BCEL) that has been modified by the findbugs developers. The modifications add some new functionality, and also introduce a number of performance optimizations to address findbugs performance problems. Some of the performance optimizations induce API changes, so this version of BCEL is not compatible with the vanilla upstream version
|
||||
|
||||
|
1007
jakarta-bcel-5.2-bcel.diff
Normal file
1007
jakarta-bcel-5.2-bcel.diff
Normal file
File diff suppressed because it is too large
Load Diff
186
jakarta-bcel-5.2-build.xml
Normal file
186
jakarta-bcel-5.2-build.xml
Normal file
@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--build.xml generated by maven from project.xml version 5.2
|
||||
on date June 26 2007, time 1708-->
|
||||
<project default="jar" name="bcel" basedir=".">
|
||||
<!--Load local and user build preferences-->
|
||||
<property file="build.properties"></property>
|
||||
<!--Build properties-->
|
||||
<property name="defaulttargetdir" value="${basedir}/target"></property>
|
||||
<property name="libdir" value="${basedir}/lib"></property>
|
||||
<property name="classesdir" value="${basedir}/target/classes"></property>
|
||||
<property name="distdir" value="${basedir}/dist"></property>
|
||||
<property name="javadocdir" value="${basedir}/dist/docs/api"></property>
|
||||
<property name="final.name" value="bcel-5.2"></property>
|
||||
<property name="proxy.host" value=""></property>
|
||||
<property name="proxy.port" value=""></property>
|
||||
<property name="proxy.username" value=""></property>
|
||||
<property name="proxy.password" value=""></property>
|
||||
<path id="build.classpath">
|
||||
<pathelement location="${libdir}/regexp.jar"></pathelement>
|
||||
</path>
|
||||
<target name="init" description="o Initializes some properties">
|
||||
<mkdir dir="${libdir}"></mkdir>
|
||||
<condition property="noget">
|
||||
<equals arg2="only" arg1="${build.sysclasspath}"></equals>
|
||||
</condition>
|
||||
<!--Test if JUNIT is present in ANT classpath-->
|
||||
<available property="Junit.present" classname="junit.framework.Test"></available>
|
||||
<!--Test if user defined a proxy-->
|
||||
<condition property="useProxy">
|
||||
<and>
|
||||
<isset property="proxy.host"></isset>
|
||||
<not>
|
||||
<equals trim="true" arg2="" arg1="${proxy.host}"></equals>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="compile" description="o Compile the code" depends="get-deps">
|
||||
<mkdir dir="${classesdir}"></mkdir>
|
||||
<javac target="1.5" destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
|
||||
<src>
|
||||
<pathelement location="${basedir}/src/java"></pathelement>
|
||||
</src>
|
||||
<classpath refid="build.classpath"></classpath>
|
||||
</javac>
|
||||
<mkdir dir="${classesdir}/META-INF"></mkdir>
|
||||
<copy todir="${classesdir}/META-INF">
|
||||
<fileset dir="${basedir}/.">
|
||||
<include name="NOTICE.txt"></include>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="jar" description="o Create the jar" depends="compile,test">
|
||||
<jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
|
||||
</target>
|
||||
<target name="clean" description="o Clean up the generated directories">
|
||||
<delete dir="${defaulttargetdir}"></delete>
|
||||
<delete dir="${distdir}"></delete>
|
||||
</target>
|
||||
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
|
||||
<mkdir dir="dist"></mkdir>
|
||||
<copy todir="dist">
|
||||
<fileset dir="${defaulttargetdir}" includes="*.jar"></fileset>
|
||||
<fileset dir="${basedir}" includes="LICENSE*, README*"></fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
|
||||
<fail message="There were test failures."></fail>
|
||||
</target>
|
||||
<target name="internal-test" if="Junit.present" depends="junit-present,compile-tests"></target>
|
||||
<target name="junit-present" unless="Junit.present" depends="init">
|
||||
<echo>================================= WARNING ================================</echo>
|
||||
<echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
|
||||
<echo>==========================================================================</echo>
|
||||
</target>
|
||||
<target name="compile-tests" if="Junit.present" depends="junit-present,compile"></target>
|
||||
<target name="javadoc" description="o Generate javadoc" depends="get-deps">
|
||||
<mkdir dir="${javadocdir}"></mkdir>
|
||||
<tstamp>
|
||||
<format pattern="2002-yyyy" property="year"></format>
|
||||
</tstamp>
|
||||
<property name="copyright" value="Copyright &copy; Apache Software Foundation. All Rights Reserved."></property>
|
||||
<property name="title" value="jakarta-bcel 5.2 API"></property>
|
||||
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/java" packagenames="org.apache.bcel.*" encoding="ISO-8859-1">
|
||||
<classpath>
|
||||
<path refid="build.classpath"></path>
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target name="get-dep-regexp.jar" description="o Download the dependency : regexp.jar" unless="regexp.jar" depends="init,setProxy,noProxy,get-custom-dep-regexp.jar">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/regexp.jar" usetimestamp="true" ignoreerrors="true" src="file:/usr/share/maven/repository/JPP/jars/regexp.jar"></get>
|
||||
</target>
|
||||
<target name="get-custom-dep-regexp.jar" if="regexp.jar" depends="init,setProxy,noProxy">
|
||||
<mkdir dir="${libdir}/JPP/jars/"></mkdir>
|
||||
<get dest="${libdir}/JPP/jars/regexp.jar" usetimestamp="true" ignoreerrors="true" src="${regexp.jar}"></get>
|
||||
</target>
|
||||
<target name="get-deps" unless="noget" depends="get-dep-regexp.jar"></target>
|
||||
<target name="setProxy" if="useProxy" depends="init">
|
||||
<!--Proxy settings works only with a JDK 1.2 and higher.-->
|
||||
<echo>Proxy used :</echo>
|
||||
<echo>Proxy host [${proxy.host}]</echo>
|
||||
<echo>Proxy port [${proxy.port}]</echo>
|
||||
<echo>Proxy user [${proxy.username}]</echo>
|
||||
<setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyhost="${proxy.host}"></setproxy>
|
||||
</target>
|
||||
<target name="noProxy" unless="useProxy" depends="init">
|
||||
<echo>Proxy not used.</echo>
|
||||
</target>
|
||||
<target name="install-maven">
|
||||
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar"></get>
|
||||
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar"></unjar>
|
||||
</target>
|
||||
<!-- can rename this target when we get the docs sorted out -->
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- D O C S -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
<target
|
||||
name="check_for_jdom">
|
||||
|
||||
<available
|
||||
property="jdom.present"
|
||||
classname="org.jdom.JDOMException">
|
||||
<classpath>
|
||||
<pathelement location="${jakarta.site2}/lib/${jdom.jar}"/>
|
||||
</classpath>
|
||||
</available>
|
||||
</target>
|
||||
|
||||
<target
|
||||
depends="check_for_jdom"
|
||||
name="docs-prepare-error"
|
||||
unless="jdom.present">
|
||||
|
||||
<echo>
|
||||
The Jakarta-Site2 module is not present! Please check
|
||||
to make sure that you have checked it out from CVS.
|
||||
|
||||
<http://jakarta.apache.org/site/jakarta-site2.html>
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<target
|
||||
name="xdocs"
|
||||
depends="docs-prepare-error"
|
||||
description="--> generates the HTML documentation"
|
||||
if="jdom.present">
|
||||
|
||||
<taskdef
|
||||
name="anakia"
|
||||
classname="org.apache.velocity.anakia.AnakiaTask">
|
||||
<classpath>
|
||||
<fileset dir="${jakarta.site2}/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<anakia
|
||||
basedir="${docs.src}"
|
||||
destdir="${docs.dest}/"
|
||||
extension=".html"
|
||||
style="./site.vsl"
|
||||
projectFile="stylesheets/project.xml"
|
||||
excludes="**/stylesheets/** empty.xml"
|
||||
includes="**/*.xml"
|
||||
lastModifiedCheck="true"
|
||||
templatePath="${jakarta.site2}/xdocs/stylesheets">
|
||||
</anakia>
|
||||
|
||||
<copy
|
||||
todir="${docs.dest}/images"
|
||||
filtering="no">
|
||||
|
||||
<fileset dir="${docs.src}/images">
|
||||
<include name="**/*.gif"/>
|
||||
<include name="**/*.jpeg"/>
|
||||
<include name="**/*.jpg"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
11
jakarta-bcel-5.2-project_properties.patch
Normal file
11
jakarta-bcel-5.2-project_properties.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- project.properties.sav 2007-06-26 15:21:10.000000000 +0200
|
||||
+++ project.properties 2007-06-26 15:21:35.000000000 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
maven.changes.issue.template = %URL%/bugzilla/show_bug.cgi?id=%ISSUE%
|
||||
|
||||
-maven.xdoc.jsl = ../commons-build/commons-site.jsl
|
||||
+maven.xdoc.jsl = file:${basedir}/commons-build/commons-site.jsl
|
||||
maven.xdoc.date = left
|
||||
maven.xdoc.poweredby.image = maven-feather.png
|
||||
maven.xdoc.version = ${pom.currentVersion}
|
11
jakarta-bcel-5.2.pom
Normal file
11
jakarta-bcel-5.2.pom
Normal file
@ -0,0 +1,11 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>bcel</groupId>
|
||||
<artifactId>bcel</artifactId>
|
||||
<version>5.2</version>
|
||||
<dependencies>
|
||||
<groupId>regexp</groupId>
|
||||
<artifactId>regexp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependencies>
|
||||
</project>
|
222
jakarta-bcel.spec
Normal file
222
jakarta-bcel.spec
Normal file
@ -0,0 +1,222 @@
|
||||
%define javahome %{_jvmdir}/jdk
|
||||
%define bootstrap 1
|
||||
Name: jakarta-bcel
|
||||
Version: 5.2
|
||||
Release: 11mamba
|
||||
Summary: Apache's Byte Code Engineering Library (BCEL)
|
||||
Group: Development/Libraries/Java
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://jakarta.apache.org/bcel/
|
||||
#Source0: http://mirror.soluzionisis.com/apache/jakarta/bcel/source/bcel-%{version}-src.tar.gz
|
||||
#svn export https://svn.apache.org/repos/asf/jakarta/bcel/tags/BCEL_5_2
|
||||
#tar czvf BCEL-5.2-src-svn.tar.gz BCEL_5_2
|
||||
Source0: BCEL-5.2-src-svn.tar.gz
|
||||
Source1: jakarta-bcel-5.2-bcel.diff
|
||||
Source2: jakarta-bcel-5.2-build.xml
|
||||
# http://cvs.fedoraproject.org/repo/dist/bcel/
|
||||
Source3: bcel-jakarta-site2.tar.gz
|
||||
Source4: jakarta-bcel-5.2.pom
|
||||
Patch0: jakarta-bcel-5.2-project_properties.patch
|
||||
License: Apache Software License 2.0
|
||||
BuildRequires: antlr
|
||||
%if ! %bootstrap
|
||||
BuildRequires: apache-anakia
|
||||
%endif
|
||||
BuildRequires: apache-ant
|
||||
%if "%{stage1}" != "1"
|
||||
BuildRequires: apache-ant-regexp
|
||||
BuildRequires: jakarta-commons-collections
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: java-dom
|
||||
BuildRequires: java-excalibur-avalon-logkit
|
||||
BuildRequires: jakarta-regexp
|
||||
BuildRequires: java-velocity
|
||||
BuildRequires: werken-xpath
|
||||
%endif
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: libgcc
|
||||
BuildRequires: libgcj4-devel
|
||||
BuildRequires: libz-devel
|
||||
## AUTOBUILDREQ-END
|
||||
Requires: jpackage-utils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
This is a version of Apache's Byte Code Engineering Library (BCEL) that has been modified by the findbugs developers. The modifications add some new functionality, and also introduce a number of performance optimizations to address findbugs performance problems. Some of the performance optimizations induce API changes, so this version of BCEL is not compatible with the vanilla upstream version
|
||||
|
||||
%package javadoc
|
||||
Group: Documentation
|
||||
Summary: Manual for %{name}
|
||||
|
||||
%description javadoc
|
||||
Apache's Byte Code Engineering Library (BCEL)
|
||||
|
||||
This package contains API documentation for %{name}.
|
||||
|
||||
%package manual
|
||||
Group: Documentation
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description manual
|
||||
Apache's Byte Code Engineering Library (BCEL)
|
||||
|
||||
This package contains documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n BCEL_5_2
|
||||
|
||||
gzip -dc %{SOURCE3} | tar xf -
|
||||
|
||||
for j in $(find . -name "*.jar"); do
|
||||
mv $j $j.no
|
||||
done
|
||||
|
||||
cp %{SOURCE2} build.xml
|
||||
mkdir jakarta-site2/lib
|
||||
pushd jakarta-site2/lib/
|
||||
%if "%{stage1}" != "1"
|
||||
ln -sf $(build-classpath jdom) .
|
||||
ln -sf $(build-classpath velocity) .
|
||||
ln -sf $(build-classpath commons-collections) .
|
||||
ln -sf $(build-classpath excalibur/avalon-logkit) .
|
||||
ln -sf $(build-classpath werken-xpath) .
|
||||
%endif
|
||||
popd
|
||||
%patch0 -b .sav
|
||||
#ln -s %{_javadir}/regexp-1.5.jar regexp.jar
|
||||
|
||||
sed -i 's/\r//' docs/verifier/V_API_SD.eps docs/eps/classloader.fig
|
||||
|
||||
%build
|
||||
export JAVA_HOME=%{javahome}
|
||||
|
||||
export CLASSPATH=""
|
||||
%if ! %bootstrap
|
||||
CLASSPATH=$CLASSPATH:$(build-classpath anakia)
|
||||
%endif
|
||||
%if "%{stage1}" != "1"
|
||||
CLASSPATH=$CLASSPATH:$(build-classpath antlr commons-collections excalibur/avalon-logkit)
|
||||
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 jdom oro velocity werken-xpath ant/ant-apache-regexp)
|
||||
%else
|
||||
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2)
|
||||
%endif
|
||||
ant \
|
||||
-Dbuild.dest=build/classes \
|
||||
-Dbuild.dir=build \
|
||||
-Ddocs.dest=docs \
|
||||
-Ddocs.src=xdocs \
|
||||
-Djakarta.site2=jakarta-site2 \
|
||||
-Djdom.jar="file://$(build-classpath jdom)" \
|
||||
-Dregexp.jar="file://$(build-classpath regexp)" \
|
||||
dist xdocs test
|
||||
|
||||
# -Dbuild.dest=build/classes -Dbuild.dir=build -Ddocs.dest=docs \
|
||||
# -Ddocs.src=xdocs -Djdom.jar=$(build-classpath jdom) \
|
||||
# -Dregexp.jar="file://$(build-classpath regexp)" \
|
||||
# jar javadoc
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
||||
|
||||
install -m 644 dist/bcel-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/bcel-%{version}.jar
|
||||
|
||||
%add_to_maven_depmap bcel bcel %{version} JPP bcel
|
||||
%add_to_maven_depmap org.apache.bcel bcel %{version} JPP bcel
|
||||
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/maven2/poms/JPP-bcel.pom
|
||||
|
||||
(
|
||||
cd %{buildroot}%{_javadir}
|
||||
for jar in *-%{version}*; do
|
||||
ln -s ${jar} `echo $jar | %{__sed} "s|-%{version}||g"`
|
||||
done
|
||||
)
|
||||
|
||||
mkdir -p %{buildroot}%{_javadocdir}/bcel-%{version}
|
||||
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/bcel-%{version}
|
||||
ln -s bcel-%{version} %{buildroot}%{_javadocdir}/bcel
|
||||
|
||||
%if "%{stage1}" != "1"
|
||||
sed -i "s|./api/index.html|%{_javadocdir}/bcel-%{version}/index.html|" docs/index.html
|
||||
%{_bindir}/aot-compile-rpm
|
||||
%endif
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_javadir}/bcel-%{version}.jar
|
||||
%{_javadir}/bcel.jar
|
||||
%if "%{stage1}" != "1"
|
||||
%{_libdir}/gcj/jakarta-bcel/bcel-%{version}.jar.db
|
||||
%{_libdir}/gcj/jakarta-bcel/bcel-%{version}.jar.so
|
||||
%endif
|
||||
%{_datadir}/maven2/poms
|
||||
%{_mavendepmapfragdir}
|
||||
%doc dist/*.txt dist/README.html
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root)
|
||||
%{_javadocdir}/bcel-%{version}
|
||||
%{_javadocdir}/bcel
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc docs/*
|
||||
|
||||
%changelog
|
||||
* Wed Mar 12 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 5.2-11mamba
|
||||
- build.xml: fix for encoding error with sun-java/openjdk 7
|
||||
|
||||
* Wed Mar 23 2011 gil <puntogil@libero.it> 5.2-10mamba
|
||||
- rebuilt with java-openjdk & java-gcj-compat support
|
||||
|
||||
* Thu Nov 04 2010 gil <puntogil@libero.it> 5.2-9mamba
|
||||
- rebuilt devel
|
||||
|
||||
* Thu Dec 10 2009 gil <puntogil@libero.it> 5.2-8mamba
|
||||
- rebuilt with anakia support
|
||||
|
||||
* Sat Oct 03 2009 gil <puntogil@libero.it> 5.2-7mamba
|
||||
- added new subpackage: manual
|
||||
- edit the API link in the index.html file in the subpackage manual
|
||||
- added %%post %%postun ( ,javadoc)
|
||||
|
||||
* Sat Oct 03 2009 gil <puntogil@libero.it> 5.2-6mamba
|
||||
- rebuilt with system excalibur-avalon-logkit
|
||||
|
||||
* Wed Mar 18 2009 gil <puntogil@libero.it> 5.2-5mamba
|
||||
- used cvs source
|
||||
|
||||
* Sat Mar 14 2009 gil <puntogil@libero.it> 5.2-4mamba
|
||||
- rebuilt
|
||||
|
||||
* Mon Mar 09 2009 gil <puntogil@libero.it> 5.2-3mamba
|
||||
- rebuilt
|
||||
|
||||
* Mon Mar 09 2009 gil <puntogil@libero.it> 5.2-2mamba
|
||||
- rebuilt
|
||||
|
||||
* Wed Feb 18 2009 gil <puntogil@libero.it> 5.2-1mamba
|
||||
- package created by autospec
|
Loading…
Reference in New Issue
Block a user