From 7e81cac78402518ca4030fbdcc7a8a2683e197d0 Mon Sep 17 00:00:00 2001 From: gbenson Date: Tue, 12 Apr 2005 13:58:57 +0000 Subject: [PATCH] BC-compile the two core jars --- .cvsignore | 2 +- ant.spec | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index b281d6d..8f4535e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ apache-ant-1.6.2-src.tar.gz apache-ant-1.6.2 -noarch +i386 *.src.rpm diff --git a/ant.spec b/ant.spec index 45ebf93..7430f71 100644 --- a/ant.spec +++ b/ant.spec @@ -28,7 +28,6 @@ Requires: java-devel BuildRequires: jaxp_parser_impl BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: java-devel -BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Obsoletes: ant-optional ant-optional-full # RHUG @@ -349,6 +348,11 @@ export CLASSPATH=$(%{_bindir}/build-classpath jaxp_parser_impl xml-commons-apis export JAVA_HOME sh build.sh --noconfig jars javadocs +# BC-compile the two core jars +for jar in %{name} %{name}-launcher; do + nativify build/lib/$jar.jar build/lib/lib$jar.jar.so +done + # ----------------------------------------------------------------------------- %install @@ -388,6 +392,25 @@ cp -p build/lib/%{name}-trax.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-trax (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}/%{name} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +# solibs +mkdir -p $RPM_BUILD_ROOT%{_libdir} +cp -p build/lib/lib%{name}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}-%{version}.jar.so +cp -p build/lib/lib%{name}-launcher.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}-launcher-%{version}.jar.so + +# solib aliases +(cd $RPM_BUILD_ROOT%{_libdir} && for so in lib*-%{version}.jar.so; do ln -sf ${so} `echo $so| sed "s|-%{version}||g"`; done) + +# gcjdb +gcjdbdir=`gcj-dbtool -p %{_libdir}`.d +mkdir -p $RPM_BUILD_ROOT$gcjdbdir +gcj-dbtool -n $RPM_BUILD_ROOT$gcjdbdir/%{name}-%{version}.db 80000 +gcj-dbtool -f $RPM_BUILD_ROOT$gcjdbdir/%{name}-%{version}.db \ + $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar \ + %{_libdir}/lib%{name}-%{version}.jar.so +gcj-dbtool -f $RPM_BUILD_ROOT$gcjdbdir/%{name}-%{version}.db \ + $RPM_BUILD_ROOT%{_javadir}/%{name}-launcher-%{version}.jar \ + %{_libdir}/lib%{name}-launcher-%{version}.jar.so + # scripts: remove dos and os/2 scripts rm -f src/script/*.bat rm -f src/script/*.cmd @@ -441,6 +464,12 @@ rm -f %{_javadir}/ant-optional.jar # ----------------------------------------------------------------------------- +%post +rebuild-gcj-db %{_libdir} + +%postun +rebuild-gcj-db %{_libdir} + %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} @@ -471,6 +500,11 @@ fi %{ant_home}/etc/junit-frames-xalan1.xsl %dir %{ant_home}/lib %dir %{_sysconfdir}/%{name}.d +%{_libdir}/lib%{name}.jar.so +%{_libdir}/lib%{name}-launcher.jar.so +%{_libdir}/lib%{name}-%{version}.jar.so +%{_libdir}/lib%{name}-launcher-%{version}.jar.so +%{_libdir}/*/*/%{name}-%{version}.db %files antlr %defattr(0644,root,root,0755) @@ -589,6 +623,9 @@ fi # ----------------------------------------------------------------------------- %changelog +* Tue Apr 12 2005 Gary Benson +- BC-compile the two core jars. + * Fri Apr 08 2005 Andrew Overholt 1.6.2-3jpp_4fc - Back out ant-apache-javac-ecj.patch and ant.orig changes as they stop eclipse from building.