From 804ccff5ca3b3180fa562ed3bc16a7ce2bba6a27 Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Wed, 31 Jul 2013 11:06:35 +0200 Subject: [PATCH] Improvements to the build --- eclipse-bug-386377.patch | 340 +++++++++++++++++++++++++++++++++++++++ eclipse.spec | 32 ++-- 2 files changed, 356 insertions(+), 16 deletions(-) create mode 100644 eclipse-bug-386377.patch diff --git a/eclipse-bug-386377.patch b/eclipse-bug-386377.patch new file mode 100644 index 0000000..121b781 --- /dev/null +++ b/eclipse-bug-386377.patch @@ -0,0 +1,340 @@ +From 7aae376547c5f3306e311ce91c475c9a9667a0a0 Mon Sep 17 00:00:00 2001 +From: Krzysztof Daniel +Date: Tue, 30 Jul 2013 12:22:42 +0200 +Subject: [PATCH] Build executables in the first run. + +--- + bundles/org.eclipse.equinox.executable/pom.xml | 265 --------------------- + .../pom.xml | 56 ++++- + .../pom.xml | 55 +++++ + .../pom.xml | 55 +++++ + .../pom.xml | 56 +++++ + .../pom.xml | 56 +++++ + 6 files changed, 277 insertions(+), 266 deletions(-) + +diff --git a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml +index 5a15c5b..d4fb54e 100644 +--- a/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml ++++ b/bundles/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/pom.xml +@@ -28,5 +28,59 @@ + cocoa + x86_64 + +- ++ ++ ++ build-native-launchers-cocoa.macosx.x86_64 ++ ++ ++ native ++ cocoa.macosx.x86_64 ++ ++ ++ ++ ++ ++ maven-antrun-plugin ++ 1.7 ++ ++ ++ compile-executable-natives ++ generate-resources ++ ++ ++ ++ ++ ++ ++ run ++ ++ ++ ++ ++ ++ bsf ++ bsf ++ 2.4.0 ++ ++ ++ rhino ++ js ++ 1.7R2 ++ ++ ++ org.apache.ant ++ ant-apache-bsf ++ 1.8.3 ++ ++ ++ org.apache.ant ++ ant-nodeps ++ 1.8.1 ++ ++ ++ ++ ++ ++ ++ + +diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml +index 59f46ae..e7616ed 100644 +--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml ++++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86/pom.xml +@@ -28,4 +28,59 @@ + gtk + x86 + ++ ++ ++ build-native-launchers-gtk.linux.x86 ++ ++ ++ native ++ gtk.linux.x86 ++ ++ ++ ++ ++ ++ maven-antrun-plugin ++ 1.7 ++ ++ ++ compile-executable-natives ++ generate-resources ++ ++ ++ ++ ++ ++ ++ run ++ ++ ++ ++ ++ ++ bsf ++ bsf ++ 2.4.0 ++ ++ ++ rhino ++ js ++ 1.7R2 ++ ++ ++ org.apache.ant ++ ant-apache-bsf ++ 1.8.3 ++ ++ ++ org.apache.ant ++ ant-nodeps ++ 1.8.1 ++ ++ ++ ++ ++ ++ ++ + +diff --git a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml +index d639b6e..8bf7d74 100644 +--- a/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml ++++ b/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/pom.xml +@@ -28,4 +28,59 @@ + gtk + x86_64 + ++ ++ ++ build-native-launchers-gtk.linux.x86_64 ++ ++ ++ native ++ gtk.linux.x86_64 ++ ++ ++ ++ ++ ++ maven-antrun-plugin ++ 1.7 ++ ++ ++ compile-executable-natives ++ generate-resources ++ ++ ++ ++ ++ ++ ++ run ++ ++ ++ ++ ++ ++ bsf ++ bsf ++ 2.4.0 ++ ++ ++ rhino ++ js ++ 1.7R2 ++ ++ ++ org.apache.ant ++ ant-apache-bsf ++ 1.8.3 ++ ++ ++ org.apache.ant ++ ant-nodeps ++ 1.8.1 ++ ++ ++ ++ ++ ++ ++ + +diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml +index e0b59be..f82005c 100644 +--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml ++++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86/pom.xml +@@ -29,4 +29,60 @@ + win32 + x86 + ++ ++ ++ ++ build-native-launchers-win32.win32.x86 ++ ++ ++ native ++ win32.win32.x86 ++ ++ ++ ++ ++ ++ maven-antrun-plugin ++ 1.7 ++ ++ ++ compile-executable-natives ++ generate-resources ++ ++ ++ ++ ++ ++ ++ run ++ ++ ++ ++ ++ ++ bsf ++ bsf ++ 2.4.0 ++ ++ ++ rhino ++ js ++ 1.7R2 ++ ++ ++ org.apache.ant ++ ant-apache-bsf ++ 1.8.3 ++ ++ ++ org.apache.ant ++ ant-nodeps ++ 1.8.1 ++ ++ ++ ++ ++ ++ ++ + +diff --git a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml +index ce4252c..4b72b1f 100644 +--- a/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml ++++ b/bundles/org.eclipse.equinox.launcher.win32.win32.x86_64/pom.xml +@@ -29,4 +29,60 @@ + win32 + x86_64 + ++ ++ ++ ++ build-native-launchers-win32.win32.x86_64 ++ ++ ++ native ++ win32.win32.x86_64 ++ ++ ++ ++ ++ ++ maven-antrun-plugin ++ 1.7 ++ ++ ++ compile-executable-natives ++ generate-resources ++ ++ ++ ++ ++ ++ ++ run ++ ++ ++ ++ ++ ++ bsf ++ bsf ++ 2.4.0 ++ ++ ++ rhino ++ js ++ 1.7R2 ++ ++ ++ org.apache.ant ++ ant-apache-bsf ++ 1.8.3 ++ ++ ++ org.apache.ant ++ ant-nodeps ++ 1.8.1 ++ ++ ++ ++ ++ ++ ++ + +-- +1.8.3.1 + diff --git a/eclipse.spec b/eclipse.spec index 17a74d9..4b1acdf 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -125,6 +125,8 @@ Patch27: %{pkg_name}-bug-408505.patch Patch28: %{pkg_name}-bug-404448.patch +Patch29: %{pkg_name}-bug-386377.patch + BuildRequires: ant >= 1.8.3 BuildRequires: rsync BuildRequires: jpackage-utils >= 0:1.5, make, gcc @@ -348,6 +350,9 @@ tar --strip-components=1 -xf %{SOURCE1} %patch26 %patch27 %patch28 +pushd rt.equinox.framework +%patch29 -p1 +popd #Disable as many things as possible to make the build faster. We care only for Eclipse. %pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder @@ -389,6 +394,7 @@ tar --strip-components=1 -xf %{SOURCE1} %pom_disable_module bundles/org.eclipse.swt.gtk.aix.ppc64 eclipse.platform.swt.binaries %pom_disable_module bundles/org.eclipse.swt.gtk.solaris.sparc eclipse.platform.swt.binaries %pom_disable_module bundles/org.eclipse.swt.gtk.solaris.x86 eclipse.platform.swt.binaries +%pom_disable_module bundles/org.eclipse.swt.gtk.hpux.ia64 eclipse.platform.swt.binaries %pom_disable_module bundles/org.sat4j.core rt.equinox.p2 %pom_disable_module bundles/org.sat4j.pb rt.equinox.p2 @@ -474,28 +480,22 @@ cp -rf %{_libdir}/eclipse/dropins/sdk/plugins/org.eclipse.pde.core_* .m2/p2/repo find eclipse.platform.ua -name pom.xml -exec sed -i -e 's@org.apache.lucene<@org.apache.lucene.core<@g' {} \; +#this is not really necessary but reduces the build time. +pushd eclipse.platform.swt.binaries/bundles/ + for bundle in `ls | grep "org.eclipse.swt" | grep -v -e "org.eclipse.swt.gtk.linux.%{eclipse_arch}$"` ; do + if [ -e $bundle/pom.xml ]; then + %pom_xpath_remove "/pom:project/pom:build" $bundle/pom.xml + fi + done +popd + %build %{?scl:%scl_maven_opts} #This is the lowest value where the build succeeds. 512m is not enough. export MAVEN_OPTS="-Xmx900m -XX:CompileCommand=exclude,org/eclipse/tycho/core/osgitools/EquinoxResolver,newState ${MAVEN_OPTS}" - -#keep it here for secondary platforms. -mvn-rpmbuild install:install-file -Dfile=/usr/share/java/eclipse/jdt.core.jar -DgroupId=org.eclipse.jdt \ - -DartifactId=org.eclipse.jdt.core -Dversion=3.9.0.v20130604-1421 -Dpackaging=jar -DskipTychoVersionCheck \ - -Dtycho.local.keepTarget - -# workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=386377 -pushd rt.equinox.framework/bundles/org.eclipse.equinox.executable/library/gtk/ - export JAVA_HOME=%{java_home} - ant -popd +export JAVA_HOME=%{java_home} pushd eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.%{eclipse_arch} - #keep it here for secondary platforms. - mvn-rpmbuild install:install-file -Dfile=/usr/share/java/eclipse/jdt.core.jar -DgroupId=org.eclipse.jdt \ - -DartifactId=org.eclipse.jdt.core -Dversion=3.9.0.v20130604-1421 -Dpackaging=jar -DskipTychoVersionCheck \ - -Dtycho.local.keepTarget - mvn-rpmbuild clean verify \ -Dmaven.test.skip=true -Dnative=gtk.linux.%{eclipse_arch} -DskipTychoVersionCheck \ -Dtycho.local.keepTarget -Dmaven.repo.local=../../../.m2