blob: 02526d79a63e4e9fa9ba861974fe9e9b08566386 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: solnce <echo c29sbmNlQHJhdGFqY3phay5vbmU= | base64 -d>
# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
pkgname=swt
pkgver=4.34
pkgrel=2
_date=202411201800
pkgdesc='An open source widget toolkit for Java'
arch=('x86_64')
url='https://www.eclipse.org/swt/'
license=('EPL-2.0')
depends=('java-runtime>=17' 'libxtst')
makedepends=(
'ant'
'glu'
'gtk3'
'gtk4'
'java-runtime>=17'
'pkgconfig'
'unzip'
'webkit2gtk'
)
optdepends=('glu' 'gtk3' 'gtk4')
_archive="${pkgname}-${pkgver}-gtk-linux-${arch}.zip"
source=(
"https://download.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}/${_archive}"
"build-swt.xml"
)
noextract=("$_archive")
sha256sums=('2fd34dbe0d15f96bb23060c62c6a70696518e6d2cd77b45ccc0dfcabc56c18c6'
'e382ae40d3a437b10a960bab81800a5e372769011ab591de2ce11426d52e6b37')
prepare() {
unzip -oq "$_archive" -d "$pkgname-$pkgver"
cd "$pkgname-$pkgver"
unzip -oq src.zip
}
build() {
cd "$pkgname-$pkgver"
export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get)
export SWT_JAVA_HOME=${JAVA_HOME}
ant -f $srcdir/build-swt.xml compile
ant -f $srcdir/build-swt.xml jar
}
package() {
cd "$pkgname-$pkgver"
# SWT jar
install -Dm644 swt.jar "$pkgdir/usr/share/java/swt-$pkgver.jar"
ln -s "swt-$pkgver.jar" "$pkgdir/usr/share/java/swt.jar"
# Shared objects
install -d "$pkgdir/usr/lib"
sed -i 's/\(-fPIC\)/\1 -Wno-error=deprecated-declarations/' library/build.sh
OUTPUT_DIR="$pkgdir/usr/lib" ./library/build.sh -gtk-all install
}
|