diff --git a/libtextcat/makefile.mk b/libtextcat/makefile.mk
index 74c64bf..fbf8d21 100644
--- a/libtextcat/makefile.mk
+++ b/libtextcat/makefile.mk
@@ -57,7 +57,7 @@ ADDITIONAL_FILES= \
 #CONFIGURE_DIR=$(BUILD_DIR)
 
 #relative to CONFIGURE_DIR
-CONFIGURE_ACTION=configure CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)"
+CONFIGURE_ACTION=configure CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" --prefix=$(TMPDIR)
 CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL))
 
 BUILD_ACTION=make
diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk
index 0d92de9..aae3b4f 100644
--- a/redland/raptor/makefile.mk
+++ b/redland/raptor/makefile.mk
@@ -130,7 +130,7 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
 CONFIGURE_DIR=
 CONFIGURE_ACTION=.$/configure
 # do not enable grddl parser (#i93768#)
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml
+CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml --prefix=$(TMPDIR)
 BUILD_ACTION=$(GNUMAKE)
 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
 BUILD_DIR=$(CONFIGURE_DIR)
diff --git a/redland/rasqal/makefile.mk b/redland/rasqal/makefile.mk
index fba6460..fc70419 100644
--- a/redland/rasqal/makefile.mk
+++ b/redland/rasqal/makefile.mk
@@ -126,7 +126,7 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
 
 CONFIGURE_DIR=
 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml
+CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml --prefix=$(TMPDIR)
 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
 BUILD_DIR=$(CONFIGURE_DIR)
diff --git a/redland/redland/makefile.mk b/redland/redland/makefile.mk
index 710d7d6..dd60f0d 100644
--- a/redland/redland/makefile.mk
+++ b/redland/redland/makefile.mk
@@ -132,7 +132,7 @@ XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
 
 CONFIGURE_DIR=
 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
-CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml
+CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml --prefix=$(TMPDIR)
 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
 BUILD_DIR=$(CONFIGURE_DIR)
diff --git a/hunspell/hunspell-1.2.8.patch b/hunspell/hunspell-1.2.8.patch
index 37b7964..e6fd962 100644
--- a/hunspell/hunspell-1.2.8.patch
+++ b/hunspell/hunspell-1.2.8.patch
@@ -619,3 +619,15 @@
              p++;
          }
          if (i > 0 && buf[i - 1] == '\n') {
+diff --git a/hunspell/unxlngi6.pro/misc/build/hunspell-1.2.8/tests/test.sh b/hunspell/unxlngi6.pro/misc/build/hunspell-1.1.12/tests/test.sh
+index 90080f6..f069517 100755
+--- a/hunspell/unxlngi6.pro/misc/build/hunspell-1.2.8/tests/test.sh
++++ b/hunspell/unxlngi6.pro/misc/build/hunspell-1.2.8/tests/test.sh
+--- misc/hunspell-1.2.8/tests/test.sh	Sep  4 01:25:35 2007
++++ misc/build/hunspell-1.2.8/tests/test.sh	Jun 18 11:53:11 2008
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ export LC_ALL="C"
+ 
+ function check_valgrind_log () {
