[arch-commits] CVS update of extra/lib/swt (PKGBUILD build-swt.xml)

Jan de Groot jgc at archlinux.org
Sun Aug 26 10:42:19 UTC 2007


    Date: Sunday, August 26, 2007 @ 06:42:19
  Author: jgc
    Path: /home/cvs-extra/extra/lib/swt

   Added: build-swt.xml (1.1)
Modified: PKGBUILD (1.11 -> 1.12)

upgpkg: swt 3.3-1
Build from source, makedepend on the correct libraries, fix issues with mozilla/xulrunner linking


---------------+
 PKGBUILD      |   69 ++++++++++++++++++++++++++++++++++++++------------------
 build-swt.xml |   17 +++++++++++++
 2 files changed, 64 insertions(+), 22 deletions(-)


Index: extra/lib/swt/PKGBUILD
diff -u extra/lib/swt/PKGBUILD:1.11 extra/lib/swt/PKGBUILD:1.12
--- extra/lib/swt/PKGBUILD:1.11	Tue May  8 01:36:17 2007
+++ extra/lib/swt/PKGBUILD	Sun Aug 26 06:42:18 2007
@@ -1,33 +1,58 @@
-# $Id: PKGBUILD,v 1.11 2007/05/08 05:36:17 daniel Exp $
+# $Id: PKGBUILD,v 1.12 2007/08/26 10:42:18 jgc Exp $
 # Maintainer: simo <simo at archlinux.org>
 pkgname=swt
-pkgver=3.2.2
+pkgver=3.3
 pkgrel=1
 pkgdesc="An open source widget toolkit for Java"
+_date=200706251500
 arch=(i686 x86_64)
 url="http://www.eclipse.org/swt/"
-license=""
-depends=('jre')
-makedepends=()
-source=(http://www.gtlib.gatech.edu/pub/eclipse/eclipse/downloads/drops/R-3.2.2-200702121330/$pkgname-$pkgver-gtk-linux-x86.zip)
-md5sums=('e1340b6c7cf9b617145667b15b02fd49')
-#Arch64 Sources
-#no more available
-#[ "$CARCH" = "x86_64" ] &&  source=(http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.2-200606291905/$pkgname-$pkgver-gtk-linux-x86_64.zip)
-[ "$CARCH" = "x86_64" ] && source=(http://www.gtlib.gatech.edu/pub/eclipse/eclipse/downloads/drops/R-3.2.2-200702121330/$pkgname-$pkgver-gtk-linux-x86_64.zip)
-[ "$CARCH" = "x86_64" ] && md5sums=('d678cedc336a58b0147081b56de6a1f3')
+license=('EPL')
+depends=('java-runtime')
+makedepends=('java-gcj-compat' 'libxtst' 'mesa' 'libgnomeui' 'xulrunner')
+source=(http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86.zip
+	build-swt.xml)
+noextract=(swt-${pkgver}-gtk-linux-x86.zip)
+md5sums=('7398cdf9340cb131b76ed98495239520'
+         'f5e548bc26a0f1f3c18131be76face40')
+if [ "${CARCH}" = "x86_64" ]; then
+  source=(http://download.eclipse.org/eclipse/downloads/drops/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-x86_64.zip
+          build-swt.xml)
+  noextract=(swt-${pkgver}-gtk-linux-x86_64.zip)
+fi
 
 build() {
+  cd ${startdir}/src
+  unzip -jqo ${startdir}/src/swt-${pkgver}-gtk-linux-*.zip "*src.zip"
+  unzip -qo src.zip
+  rm -rf about_files
+  mkdir src
+  mv org src/
+  cp build-swt.xml build.xml || return 1
 
-# cd to Arch64 directory.
+  [ "${CARCH}" = "x86_64" ] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
 
-if [ "$CARCH" = "x86_64" ]; then
-      cd $startdir/src/swt-M20070212-1330-gtk-linux-x86_64
-else  cd $startdir/src/swt-M20070212-1330-gtk-linux-x86
-fi 
-
-  for i in libswt*.so; do
-	  install -D -m755 $i $startdir/pkg/usr/share/java/swt/$i
-  done
-  install -D -m644 swt.jar $startdir/pkg/usr/share/java/swt/swt.jar
+  make -f make_linux.mak make_awt || return 1
+  make -f make_linux.mak make_swt || return 1
+  make -f make_linux.mak make_atk || return 1
+  make -f make_linux.mak make_gnome || return 1
+  MOZILLA_INCLUDES="`pkg-config --cflags xulrunner-xpcom`" \
+  MOZILLA_LIBS="`pkg-config --libs xulrunner-xpcom` -Wl,-R/opt/mozilla/lib/xulrunner" \
+    make -f make_linux.mak make_mozilla || return 1
+  XULRUNNER_INCLUDES="`pkg-config --cflags xulrunner-xpcom`" \
+  XULRUNNER_LIBS="`pkg-config --libs xulrunner-xpcom` -Wl,-R/opt/mozilla/lib/xulrunner" \
+    make -f make_linux.mak make_xulrunner || return 1
+
+  make -f make_linux.mak make_cairo || return 1
+  make -f make_linux.mak make_glx || return 1
+ 
+  ant compile || return 1
+  cp version.txt build/version.txt
+  cp src/org/eclipse/swt/internal/SWTMessages.properties build/org/eclipse/swt/internal/
+
+  ant jar || return 1
+
+  install -D -m644 swt.jar ${startdir}/pkg/usr/share/java/swt.jar
+  mkdir -p ${startdir}/pkg/usr/lib
+  install -m755 *.so ${startdir}/pkg/usr/lib/
 }
Index: extra/lib/swt/build-swt.xml
diff -u /dev/null extra/lib/swt/build-swt.xml:1.1
--- /dev/null	Sun Aug 26 06:42:18 2007
+++ extra/lib/swt/build-swt.xml	Sun Aug 26 06:42:18 2007
@@ -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>
+
+   <target name="jar">
+      <jar destfile="swt.jar" basedir="${build}"/>
+   </target>
+</project>




More information about the arch-commits mailing list