Improvements to the build

This commit is contained in:
Krzysztof Daniel 2013-07-31 11:06:35 +02:00
parent c9dcad54c9
commit 804ccff5ca
2 changed files with 356 additions and 16 deletions

340
eclipse-bug-386377.patch Normal file
View File

@ -0,0 +1,340 @@
From 7aae376547c5f3306e311ce91c475c9a9667a0a0 Mon Sep 17 00:00:00 2001
From: Krzysztof Daniel <kdaniel@redhat.com>
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 @@
<ws>cocoa</ws>
<arch>x86_64</arch>
</properties>
-
+ <profiles>
+ <profile>
+ <id>build-native-launchers-cocoa.macosx.x86_64</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>cocoa.macosx.x86_64</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version> 1.7 </version>
+ <executions>
+ <execution>
+ <id>compile-executable-natives</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <ant antfile="../../../../features/org.eclipse.equinox.executable.feature/library/carbon/build.xml" dir="../../features/org.eclipse.equinox.executable.feature/library/carbon/" target="build_eclipse"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>bsf</groupId>
+ <artifactId>bsf</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
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 @@
<ws>gtk</ws>
<arch>x86</arch>
</properties>
+ <profiles>
+ <profile>
+ <id>build-native-launchers-gtk.linux.x86</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>gtk.linux.x86</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version> 1.7 </version>
+ <executions>
+ <execution>
+ <id>compile-executable-natives</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <ant antfile="../../../../features/org.eclipse.equinox.executable.feature/library/gtk/build.xml" dir="../../features/org.eclipse.equinox.executable.feature/library/gtk/" target="build_eclipse"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>bsf</groupId>
+ <artifactId>bsf</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
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 @@
<ws>gtk</ws>
<arch>x86_64</arch>
</properties>
+ <profiles>
+ <profile>
+ <id>build-native-launchers-gtk.linux.x86_64</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>gtk.linux.x86_64</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version> 1.7 </version>
+ <executions>
+ <execution>
+ <id>compile-executable-natives</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <ant antfile="../../../../features/org.eclipse.equinox.executable.feature/library/gtk/build.xml" dir="../../features/org.eclipse.equinox.executable.feature/library/gtk/" target="build_eclipse"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>bsf</groupId>
+ <artifactId>bsf</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
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 @@
<ws>win32</ws>
<arch>x86</arch>
</properties>
+
+ <profiles>
+ <profile>
+ <id>build-native-launchers-win32.win32.x86</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>win32.win32.x86</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version> 1.7 </version>
+ <executions>
+ <execution>
+ <id>compile-executable-natives</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <ant antfile="../../../../features/org.eclipse.equinox.executable.feature/library/win32/build.xml" dir="../../features/org.eclipse.equinox.executable.feature/library/win32/" target="build_eclipse"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>bsf</groupId>
+ <artifactId>bsf</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
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 @@
<ws>win32</ws>
<arch>x86_64</arch>
</properties>
+
+ <profiles>
+ <profile>
+ <id>build-native-launchers-win32.win32.x86_64</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>win32.win32.x86_64</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version> 1.7 </version>
+ <executions>
+ <execution>
+ <id>compile-executable-natives</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <ant antfile="../../../../features/org.eclipse.equinox.executable.feature/library/win32/build.xml" dir="../../features/org.eclipse.equinox.executable.feature/library/win32/" target="build_eclipse"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>bsf</groupId>
+ <artifactId>bsf</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.7R2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-apache-bsf</artifactId>
+ <version>1.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
--
1.8.3.1

View File

@ -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