- Build 1.6 plugins when building with IcedTea.

This commit is contained in:
Ben Konrath 2007-09-07 18:51:16 +00:00
parent 4c39e13c12
commit 06b780e3e1
2 changed files with 41 additions and 26 deletions

View File

@ -5,5 +5,4 @@ Exec=eclipse
Icon=eclipse.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;IDE;Development;Java;X-Red-Hat-Base;
Categories=IDE;Development;Java;X-Red-Hat-Base;

View File

@ -23,7 +23,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
Release: 17%{?dist}
Release: 18%{?dist}
License: Eclipse Public License
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@ -562,8 +562,14 @@ for plugin in jdt.apt.pluggable.core jdt.compiler.tool jdt.compiler.apt; do
sed --in-place "s/org.eclipse.$plugin:0.0.0,$version,//" features/org.eclipse.jdt/build.xml
linenum=$(grep -no $plugin features/org.eclipse.jdt/build.xml | cut -d : -f 1)
sed --in-place -e "$linenum,$(expr $linenum + 4)d" features/org.eclipse.jdt/build.xml
# If we're build with IcedTea then we don't want to remove the plugins from the
# feature.xml because we will build these plugins after the main build. This
# allows us to produce 1.5 bytecode for all of the SDK except for the parts that
# explicitly use Java 1.6. This enables GCJ to work with Eclipse on all platforms.
%if ! %{gcj_support}
linenum=$(grep -no $plugin features/org.eclipse.jdt/feature.xml | cut -d : -f 1)
sed --in-place -e "$(expr $linenum - 1),$(expr $linenum + 5)d" features/org.eclipse.jdt/feature.xml
%endif
linenum=$(grep -no "dir=\"plugins/org.eclipse.$plugin" assemble.org.eclipse.sdk.linux.gtk.%{eclipse_arch}.xml | cut -d : -f 1)
sed --in-place -e "$linenum,$(expr $linenum + 2)d" assemble.org.eclipse.sdk.linux.gtk.%{eclipse_arch}.xml
linenum=$(grep -no "value=\"org.eclipse.$plugin" assemble.org.eclipse.sdk.linux.gtk.%{eclipse_arch}.xml | cut -d : -f 1)
@ -675,18 +681,34 @@ ant \
-DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \
-Dlibsconfig=true -DjavacSource=1.5 -DjavacTarget=1.5 -DcompilerArg="-encoding ISO-8859-1 -nowarn"
## Build the FileInitializer application
# build 1.6 when building with IcedTea
SDK=$(cd eclipse && pwd)
mkdir -p home
homedir=$(cd home && pwd)
LAUNCHERVERSION=$(ls $SDK/plugins | grep equinox.launcher_ | sed 's/org.eclipse.equinox.launcher_//')
%if ! %{gcj_support}
for plugin in jdt.compiler.tool jdt.compiler.apt jdt.apt.pluggable.core; do
pushd plugins/org.eclipse.$plugin
java -cp $SDK/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
org.eclipse.core.launcher.Main \
-application org.eclipse.ant.core.antRunner \
build.update.jar \
-vmargs -Duser.home=$homedir
popd
done
%endif
## Build the FileInitializer application
PDEPLUGINVERSION=$(ls $SDK/plugins | grep pde.build | sed 's/org.eclipse.pde.build_//')
pushd equinox-incubator
mkdir -p build home
homedir=$(cd home && pwd)
mkdir -p build
# This can go away when package build handles plugins (not just features)
echo "<project default=\"main\"><target name=\"main\"></target></project>" > build/assemble.org.eclipse.equinox.initializer.all.xml
echo "<project default=\"main\"><target name=\"main\"></target></project>" > build/package.org.eclipse.equinox.initializer.all.xml
LAUNCHERVERSION=$(ls $SDK/plugins | grep equinox.launcher_ | sed 's/org.eclipse.equinox.launcher_//')
java -cp $SDK/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
-Duser.home=$homedir \
org.eclipse.core.launcher.Main \
@ -729,6 +751,13 @@ cp launchertmp/eclipse $RPM_BUILD_ROOT%{_datadir}/eclipse
cp features/org.eclipse.platform/gtk/eclipse.ini $RPM_BUILD_ROOT%{_datadir}/eclipse
%endif
# Install 1.6 plugins when building with IcedTea
%if ! %{gcj_support}
for plugin in jdt.apt.pluggable.core jdt.compiler.tool jdt.compiler.apt; do
cp plugins/org.eclipse.$plugin/org.eclipse.$plugin_*.jar $RPM_BUILD_ROOT%{_datadir}/eclipse/plugins
done
%endif
# Add a compatibility symlink to startup.jar
pushd $RPM_BUILD_ROOT%{_datadir}/%{name}
LAUNCHERNAME=$(ls plugins | grep equinox.launcher_)
@ -912,22 +941,6 @@ desktop-file-validate %{SOURCE2}
# freedesktop.org menu entry
install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
# Put Fedora Core version into about.mappings of org.eclipse.sdk and
# org.eclipse.platform to show it in Eclipse about dialog.
# (courtesy Debian Eclipse packagers)
# FIXME use the third id
SDKPLUGINVERSION=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep eclipse.sdk_ | sed "s/org.eclipse.sdk_//")
pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.sdk_$SDKPLUGINVERSION
OS_VERSION=$(cat /etc/*-release | head -n 1)
sed -e "s/\(0=.*\)/\1 ($OS_VERSION)/" < about.mappings > about.mappings.tmp
mv about.mappings.tmp about.mappings
popd
PLATFORMPLUGINVERSION=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep eclipse.platform_ | sed "s/org.eclipse.platform_//")
pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.platform_$PLATFORMPLUGINVERSION
sed -e "s/\(0=.*\)/\1 ($OS_VERSION)/" < about.mappings > about.mappings.tmp
mv about.mappings.tmp about.mappings
popd
# Create a script that can be used to make a symlink tree of the
# eclipse platform.
cp %{SOURCE16} copy-platform
@ -1502,9 +1515,9 @@ fi
%{_libdir}/gcj/%{name}/jdimodel.jar.*
%{_libdir}/gcj/%{name}/jdi.jar.*
%else
#%{_datadir}/%{name}/plugins/org.eclipse.jdt.apt.pluggable.core_*
#%{_datadir}/%{name}/plugins/org.eclipse.jdt.compiler.apt_*
#%{_datadir}/%{name}/plugins/org.eclipse.jdt.compiler.tool_*
%{_datadir}/%{name}/plugins/org.eclipse.jdt.apt.pluggable.core_*
%{_datadir}/%{name}/plugins/org.eclipse.jdt.compiler.apt_*
%{_datadir}/%{name}/plugins/org.eclipse.jdt.compiler.tool_*
%endif
%files pde
@ -1564,6 +1577,9 @@ fi
%endif
%changelog
* Fri Sep 07 2007 Ben Konrath <bkonrath@redhat.com> 3.3.0-18
- Build 1.6 plugins when building with IcedTea.
* Fri Sep 07 2007 Ben Konrath <bkonrath@redhat.com> 3.3.0-17
- Update Fedora Eclipse product plugin to fix Welcome page.