diff -du texlive-20120701-source/Build.vine texlive-20120701-source/Build
--- texlive-20120701-source/Build.vine	2012-04-12 07:56:52.000000000 +0900
+++ texlive-20120701-source/Build	2012-09-17 17:17:19.586568491 +0900
@@ -109,7 +109,27 @@
         $TL_CONF_XDVI_TOOLKIT \
         $TL_CONFIGURE_ARGS \
         "$@" \
-  && eval $TL_BUILD_ENV time $TL_MAKE $TL_MAKE_FLAGS $TL_TARGET
+  || exit 1
+
+  (cd ..
+  ## Avoid pollution from internal libraries.
+  rm -rf ./libs/{expat,freetype2,gd,jpeg,libpng,libttf,ncurses,type1,t1lib,unzip,xpdf,zlib} || exit 1
+  ## XXX Hacks to avoid accidental version clashs with system libraries.
+  hack_libs=(
+      zlib
+      libpng
+      t1lib
+      freetype2
+      gd
+      xpdf
+  )
+  for i in "${hack_libs[@]}"; do 
+      mkdir -p ./libs/${i}
+      touch ./libs/${i}/configure
+  done
+  )
+
+  eval $TL_BUILD_ENV time $TL_MAKE $TL_MAKE_FLAGS $TL_TARGET
   
   # Too arcane to try to propagate the exit status through a pipeline.
   # Just use a temp file.

Diff finished.  Mon Sep 17 17:19:31 2012
