From eb5c19eec916716395059568de4b4215c1964fd2 Mon Sep 17 00:00:00 2001
From: Thomas Laroche <tho.laroche@gmail.com>
Date: Thu, 12 Jun 2014 15:44:33 +0200
Subject: [PATCH 1/2] Add extra/swt

Changes from upstream : removed download choice based on architecture, this is always recompiled from source
---
 extra/swt/PKGBUILD      | 53 +++++++++++++++++++++++++++++++++++++++++
 extra/swt/build-swt.xml | 17 +++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 extra/swt/PKGBUILD
 create mode 100644 extra/swt/build-swt.xml

diff --git a/extra/swt/PKGBUILD b/extra/swt/PKGBUILD
new file mode 100644
index 000000000..355f6be93
--- /dev/null
+++ b/extra/swt/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
+
+# ALARM: Thomas Laroche <tho.laroche@gmail.com>
+#  - removed download choice based on architecture, this is always recompiled from source
+
+pkgname=swt
+pkgver=4.3.2
+pkgrel=1.1
+_date=201402211700
+pkgdesc='An open source widget toolkit for Java'
+arch=('i686' 'x86_64' 'armv6h')
+url='http://www.eclipse.org/swt/'
+license=('EPL')
+depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst')
+optdepends=('libgnomeui' 'glu' 'webkitgtk2')
+makedepends=('java-environment' 'libxtst' 'glu' 'libgnomeui' 'unzip' 'pkgconfig' 'webkitgtk2' 'apache-ant')
+sha256sums=('49c8d6252c0027ad430a9dc5e19c99a392653e6f98ea8183d633114efca67013'
+              '6bb48007a95e3d8c6b577cc9cc4b61a51ce928b04f4fcd393cf72f8f727fe923')
+source=(http://download.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86.zip
+        build-swt.xml)
+# To test this pkg:
+# http://www.eclipse.org/swt/examples.php#standaloneOutsideEclipse
+# http://download.eclipse.org/eclipse/downloads/
+
+build() {
+  cd ${srcdir}
+  unzip -oq src.zip -d src
+
+  . /etc/profile.d/jdk.sh
+  . /etc/profile.d/apache-ant.sh
+
+  # Shared objects
+  cd src
+  ./build.sh
+
+  # SWT jar
+  ant -f ../build-swt.xml compile
+}
+
+package() {
+  cd ${srcdir}/src
+
+  # Shared objects
+  export OUTPUT_DIR=${pkgdir}/usr/lib
+  install -dm755 ${OUTPUT_DIR} 
+  make -f make_linux.mak install
+
+  # SWT jar
+  ant -f ../build-swt.xml jar
+  install -Dm755 ../swt.jar ${pkgdir}/usr/share/java/swt-${pkgver}.jar
+  ln -s swt-${pkgver}.jar ${pkgdir}/usr/share/java/swt.jar
+}
diff --git a/extra/swt/build-swt.xml b/extra/swt/build-swt.xml
new file mode 100644
index 000000000..a161204f8
--- /dev/null
+++ b/extra/swt/build-swt.xml
@@ -0,0 +1,17 @@
+<project name="SWT" default="jar" basedir=".">
+   <property name="src" location="."/>
+   <property name="build" location="build"/>
+
+   <target name="init">
+      <tstamp/>
+      <mkdir dir="${build}"/>
+   </target>
+
+   <target name="compile" depends="init" description="Compile the SWT toolset">
+      <javac srcdir="${src}" destdir="${build}" target="1.6" />
+   </target>
+
+   <target name="jar">
+      <jar destfile="swt.jar" basedir="${build}"/>
+   </target>
+</project>

From cf9ceef7f4a36bf01c0fe21b15252dc0158a2e23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mikay=C3=A9?= <tho.laroche@gmail.com>
Date: Fri, 13 Jun 2014 12:07:54 +0200
Subject: [PATCH 2/2] extra/swt fixes

---
 extra/swt/PKGBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extra/swt/PKGBUILD b/extra/swt/PKGBUILD
index 355f6be93..9e86f7929 100644
--- a/extra/swt/PKGBUILD
+++ b/extra/swt/PKGBUILD
@@ -6,10 +6,10 @@
 
 pkgname=swt
 pkgver=4.3.2
-pkgrel=1.1
+pkgrel=1
 _date=201402211700
 pkgdesc='An open source widget toolkit for Java'
-arch=('i686' 'x86_64' 'armv6h')
+arch=('i686' 'x86_64')
 url='http://www.eclipse.org/swt/'
 license=('EPL')
 depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst')