summaryrefslogtreecommitdiffstats
path: root/oncology/dpfhack_display/build-dpf-lcd4linux.sh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-20 23:21:48 +0200
committermakefu <github@syntax-fehler.de>2011-08-20 23:21:48 +0200
commit37e09437c2f20ac269f8d2b7f9c7f7cd325f0585 (patch)
treee1ea709db90614f48c7d7b2a2162236b8ef69889 /oncology/dpfhack_display/build-dpf-lcd4linux.sh
parent9bbf4fa73c2d48864e58d624629bd4bac7a69673 (diff)
oncology: initial commit
oncology will analyse the current krebs status
Diffstat (limited to 'oncology/dpfhack_display/build-dpf-lcd4linux.sh')
-rwxr-xr-xoncology/dpfhack_display/build-dpf-lcd4linux.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/oncology/dpfhack_display/build-dpf-lcd4linux.sh b/oncology/dpfhack_display/build-dpf-lcd4linux.sh
new file mode 100755
index 00000000..75df2646
--- /dev/null
+++ b/oncology/dpfhack_display/build-dpf-lcd4linux.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+PREREQUISITES='pkg-config aclocal automake autoconf'
+
+for i in $PREREQUISITES; do
+ if [ -z `which $i` ]; then
+ echo missing tool "'$i'". Please install package.
+ err=1
+ fi
+done
+
+if [ $err ]; then
+ echo "Error, cancelling"
+ exit
+fi
+
+# Allow to pass on dpf distribution location, if not pwd:
+
+if [ -z $1 ]; then
+ DPFLIB_LOCATION=`pwd`
+else
+ DPFLIB_LOCATION=$1
+fi
+
+if [ -e lcd4linux ]; then
+ echo "lcd4linux installed, not fetching"
+else
+ # Check out source from SVN
+ svn co -r1142 https://ssl.bulix.org/svn/lcd4linux/trunk lcd4linux
+fi
+
+cd lcd4linux
+
+# Apply patch
+if [ -e drv_dpf.c ]; then
+ echo "Existing drv_dpf.c found, not patching"
+else
+ patch -p1 < ../lcd4linux-svn1142-dpf.patch
+fi
+
+export CPPFLAGS="-I$DPFLIB_LOCATION/dpflib -I$DPFLIB_LOCATION/include"
+export LDFLAGS=-L$DPFLIB_LOCATION/dpflib
+
+if [ -e Makefile ]; then
+ echo "Not configuring, Makefile found"
+else
+ ./bootstrap
+ # Feel free to configure this differently:
+ ./configure --with-drivers=DPF
+fi
+
+make