Index: Makefile
===================================================================
--- /dev/null
+++ Makefile
@@ -0,0 +1 @@
+include ../Makefile.common
Index: disable_archs.sh
===================================================================
--- /dev/null
+++ disable_archs.sh
@@ -0,0 +1,98 @@
+# This script tries to mimic what Fedora does in eclipse.spec, that is to disable the
+# compilation of unneeded platforms and architectures, to save build time. In order to
+# follow Solus' standards, this script won't butcher source files directly in packge.yml
+# but it will have to be run manually to generate a proper .patch file that,
+# in turn, will have to be MANUALLY REVIEWED.
+
+
+disable_module() {
+ # $1: module name
+ # $2: pom.xml directory (without filename at its end)
+ sed -i -e "\#$1#d" "$2/pom.xml"
+}
+
+remove_plugin_by_id(){
+ # $1: plugin id
+ # $2: file path
+ perl -i -pe "BEGIN{undef \$/;} s/.*<\/environments>/$tycho_env/smg" "$1/pom.xml"
+}
+
+replace_environments eclipse-platform-parent
+replace_environments eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests
+replace_environments eclipse.platform.ui/bundles/org.eclipse.e4.ui.swt.gtk
+
+for b in $(ls eclipse.platform.swt.binaries/bundles | grep -P -e 'org.eclipse.swt\.(?!gtk\.linux.x86_64$)'); do
+ module=$(grep ">bundles/$b<" eclipse.platform.swt.binaries/pom.xml || :)
+ if [ -n "$module" ]; then
+ disable_module "bundles/$b" eclipse.platform.swt.binaries
+ # Add $b among the excluded modules (use perl to append line before '')
+ perl -plne "print \"\" if(/<\/excludes>/);" -i eclipse.platform.ui/features/org.eclipse.e4.rcp/pom.xml
+ fi
+done
+for b in $(ls rt.equinox.framework/bundles | grep -P -e 'org.eclipse.equinox.launcher\.(?!gtk\.linux.x86_64$)'); do
+ module=$(grep ">bundles/$b<" rt.equinox.framework/pom.xml || :)
+ if [ -n "$module" ]; then
+ disable_module "bundles/$b" rt.equinox.framework
+ remove_plugin_by_id "$b" rt.equinox.framework/features/org.eclipse.equinox.executable.feature/feature.xml
+ fi
+done
+for b in $((cd rt.equinox.bundles/bundles && ls -d *{macosx,win32,linux}*) | grep -P -e 'org.eclipse.equinox.security\.(?!linux\.x86_64$)'); do
+ disable_module "bundles/$b" rt.equinox.bundles
+ remove_plugin_by_id "$b" rt.equinox.p2/features/org.eclipse.equinox.p2.core.feature/feature.xml
+done
+for b in $(ls eclipse.platform.team/bundles/org.eclipse.core.net/fragments/ | grep -P -e 'org.eclipse.core.net\.(?!linux.x86_64$)'); do
+ disable_module "bundles/org.eclipse.core.net/fragments/$b" eclipse.platform.team
+done
+for b in $(ls eclipse.platform.resources/bundles/ | grep -P -e 'org.eclipse.core.filesystem\.(?!linux\.x86_64$)'); do
+ module=$(grep ">bundles/$b<" eclipse.platform.resources/pom.xml || :)
+ if [ -n "$module" ]; then
+ disable_module "bundles/$b" eclipse.platform.resources
+ remove_plugin_by_id "$b" eclipse.platform.resources/tests/org.eclipse.core.tests.filesystem.feature/feature.xml
+ fi
+done
+
+
+disable_module 'org.eclipse.jdt.launching.macosx' eclipse.jdt.debug
+disable_module 'org.eclipse.jdt.launching.ui.macosx' eclipse.jdt.debug
+disable_module 'bundles/org.eclipse.compare.win32' eclipse.platform.team
+disable_module 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa' eclipse.platform.ui/bundles
+disable_module 'org.eclipse.ui.cocoa' eclipse.platform.ui/bundles
+disable_module 'org.eclipse.ui.win32' eclipse.platform.ui/bundles
+disable_module 'bundles/org.eclipse.core.resources.win32.x86' eclipse.platform.resources
+disable_module 'bundles/org.eclipse.core.resources.win32.x86_64' eclipse.platform.resources
+disable_module 'examples/org.eclipse.swt.examples.ole.win32' eclipse.platform.swt
+
+for f in eclipse.jdt/org.eclipse.jdt-feature/feature.xml \
+ eclipse.platform.ui/features/org.eclipse.e4.rcp/feature.xml \
+ eclipse.platform.releng/features/org.eclipse.rcp/feature.xml \
+ eclipse.platform.releng/features/org.eclipse.platform-feature/feature.xml; do
+ remove_plugin_by_os 'macosx' $f
+ remove_plugin_by_os 'win32' $f
+ for arch in x86 arm aarch64 ppc64 ppc64le s390x; do
+ remove_plugin_by_arch "$arch" $f
+ done
+done
Index: package.yml
===================================================================
--- /dev/null
+++ package.yml
@@ -0,0 +1,34 @@
+name : eclipse
+version : 4.7.3
+release : 1
+source :
+ # This is R4_7_3 tag hash
+ - git|git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git : 55b9ca7d605a184b79a99cbce062b611d9a2a2cc
+license : EPL-1.0
+component : programming.ide
+summary : Multilanguage IDE and RAD
+description: |
+ things
+networking : yes
+builddeps :
+ - pkgconfig(cairo)
+ - pkgconfig(glu)
+ - pkgconfig(gtk+-2.0)
+ - pkgconfig(gtk+-3.0)
+ - pkgconfig(xtst)
+ - apache-maven
+ - openjdk-8-devel
+rundeps :
+ - openjdk-8
+setup : |
+ %apply_patches
+ mkdir m2
+ find . -name "pom.xml"|while read fname; do
+ sed -i -E 's/.*(ppc|macos|win).*<\/module>//g' "$fname"
+ done
+build : |
+ export MAVEN_OPTS="-Dmaven.repo.local=~/.m2"
+ export JAVA_HOME='/usr/lib64/openjdk-8'
+ mvn clean verify -DskipTests=true -Dnative=gtk.linux.x86_64
+install : |
+ %make_install