summary refs log tree commit diff
path: root/pkgs/development/compilers/gwt/builder.sh
blob: b14a0432ea58f0c352a02627421ab4ffd07c4694 (plain) (blame)
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
source $stdenv/setup

tar xfvj $src
mkdir -p $out
cp -av $name $out

# Create wrapper scripts so that the GWT compiler/host work

libPath="$libstdcpp5/lib:$glib/lib:$gtk/lib:$atk/lib:$pango/lib:$libX11/lib:$libXt/lib:$out/$name/mozilla-1.7.12"

mkdir -p $out/bin

cat > $out/bin/gwt-compile <<EOF
#!/bin/sh

export LD_LIBRARY_PATH=$libPath
export LIBXCB_ALLOW_SLOPPY_LOCK=1 # Workaround for bug in Java AWT implementation

$jdk/bin/java -Xmx256m -cp "\$CLASSPATH:$out/$name/gwt-user.jar:$out/$name/gwt-dev-linux.jar" com.google.gwt.dev.Compiler \$@
EOF
chmod 755 $out/bin/gwt-compile

cat > $out/bin/gwt-shell <<EOF
#!/bin/sh

export LD_LIBRARY_PATH=$libPath
export LIBXCB_ALLOW_SLOPPY_LOCK=1 # Workaround for bug in Java AWT implementation

$jdk/bin/java -Xmx256m -cp "\$CLASSPATH:$out/$name/gwt-user.jar:$out/$name/gwt-dev-linux.jar" com.google.gwt.dev.GWTShell \$@
EOF
chmod 755 $out/bin/gwt-shell