default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

apply_patch_dir patches &&

autoreconf -fi &&
automake       &&

if [[ $IRDROID == y ]]; then
  patch -Np1 <<EOT
--- lirc-0.9.4d/plugins/irtoy.c.orig	2017-01-23 10:23:38.000000000 +0100
+++ lirc-0.9.4d/plugins/irtoy.c	2017-02-05 16:42:19.203099837 +0100
@@ -171,13 +171,16 @@
 static int setPin(unsigned int pin, int state)
 {
 	unsigned int mask = 1 << pin;
-
+#if 0
 	IOdirections &= ~mask;
 	if (state)
 		IOdata |= mask;
 	else
 		IOdata &= ~mask;
 	return setIOData();
+#else
+	return 0;
+#endif
 }
 
 static ssize_t
EOT
fi

