PKGBUILDs/extra/swt/PKGBUILD
2009-10-09 21:23:22 -05:00

63 lines
2.3 KiB
Bash

# $Id: PKGBUILD 44715 2009-07-03 18:14:17Z jgc $
# Maintainer: simo <simo@archlinux.org>
pkgname=swt
pkgver=3.4
pkgrel=2
pkgdesc="An open source widget toolkit for Java"
_date=200806172000
arch=(i686 x86_64)
url="http://www.eclipse.org/swt/"
license=('EPL')
depends=('java-runtime>=6' 'gtk2>=2.16.2' 'libxtst')
optdepends=('libgnomeui' 'xulrunner' 'mesa')
makedepends=('openjdk6' 'libxtst' 'mesa' 'libgnomeui' 'xulrunner>=1.9.1' 'unzip' 'pkgconfig' 'apache-ant')
if [ "${CARCH}" = "i686" ]; then
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=('b6bf01aa408377f2fe5f617a4dea1876'
'f5e548bc26a0f1f3c18131be76face40')
fi
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)
md5sums=('d1caf792ac86f211edcd6f08501a4807'
'f5e548bc26a0f1f3c18131be76face40')
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
[ "${CARCH}" = "x86_64" ] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
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
export MOZILLA_INCLUDES="`pkg-config --cflags libxul`"
export MOZILLA_LIBS="-Wl,-R`pkg-config libxul --variable=libdir` `pkg-config libxul --libs`"
export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}"
export XULRUNNER_LIBS="${MOZILLA_LIBS}"
make -f make_linux.mak make_mozilla || return 1
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/
}