Index: common/blfs-tool-deps/901-libxml2
===================================================================
--- common/blfs-tool-deps/901-libxml2	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/901-libxml2	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -7,5 +7,27 @@
 ./configure --prefix=/usr
 make
-make install
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+	for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+	  [[ -z $(ls $dir) ]] && rmdir -v $dir
+	done
+	for dir in $PKG_DEST/usr/{lib,share}; do
+	  [[ -z $(ls $dir) ]] && rmdir -v $dir
+	done
+	for dir in $PKG_DEST/{lib,usr}; do
+	  [[ -z $(ls $dir) ]] && rmdir -v $dir
+	done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/902-libxslt
===================================================================
--- common/blfs-tool-deps/902-libxslt	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/902-libxslt	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -7,5 +7,27 @@
 ./configure --prefix=/usr
 make
-make install
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/903-tidy
===================================================================
--- common/blfs-tool-deps/903-tidy	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/903-tidy	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -8,6 +8,32 @@
 ./configure --prefix=/usr
 make
-make install
-make -C htmldoc install_apidocs
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+install -v -m644 -D htmldoc/tidy.1 \
+                    $PKG_DEST/usr/share/man/man1/tidy.1
+install -v -m755 -d $PKG_DEST/usr/share/doc/tidy-cvs_20101110
+install -v -m644    htmldoc/*.{html,gif,css} \
+                    $PKG_DEST/usr/share/doc/tidy-cvs_20101110
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/904-unzip
===================================================================
--- common/blfs-tool-deps/904-unzip	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/904-unzip	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -6,7 +6,37 @@
 cd $PKGDIR
 
-patch -Np1 -i ../unzip-5.52-security_fix-1.patch
-make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux
-make prefix=/usr install
+case `uname -m` in
+  i?86)
+    sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile
+    make -f unix/Makefile linux
+    ;;
+  *)
+    sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile
+    make -f unix/Makefile linux_noasm
+    ;;
+esac
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make prefix=$PKG_DEST/usr install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/905-docbook-xml
===================================================================
--- common/blfs-tool-deps/905-docbook-xml	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/905-docbook-xml	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -9,75 +9,75 @@
 cd docbook-xml
 unzip ../docbook-xml-4.5.zip
-install -v -d -m755 /usr/share/xml/docbook/xml-dtd-4.5
-install -v -d -m755 /etc/xml
+install -v -d -m755 $PKG_DEST/usr/share/xml/docbook/xml-dtd-4.5
+install -v -d -m755 $PKG_DEST/etc/xml
 chown -R root:root .
 cp -v -af docbook.cat *.dtd ent/ *.mod \
-    /usr/share/xml/docbook/xml-dtd-4.5
-if [ ! -e /etc/xml/docbook ]; then
-    xmlcatalog --noout --create /etc/xml/docbook
+    $PKG_DEST/usr/share/xml/docbook/xml-dtd-4.5
+if [ ! -e $PKG_DEST/etc/xml/docbook ]; then
+    xmlcatalog --noout --create $PKG_DEST/etc/xml/docbook
 fi
 xmlcatalog --noout --add "public" \
     "-//OASIS//DTD DocBook XML V4.5//EN" \
     "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "public" \
     "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "rewriteSystem" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
 xmlcatalog --noout --add "rewriteURI" \
     "http://www.oasis-open.org/docbook/xml/4.5" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
-    /etc/xml/docbook
-if [ ! -e /etc/xml/catalog ]; then
-    xmlcatalog --noout --create /etc/xml/catalog
+    $PKG_DEST/etc/xml/docbook
+if [ ! -e $PKG_DEST/etc/xml/catalog ]; then
+    xmlcatalog --noout --create $PKG_DEST/etc/xml/catalog
 fi
 xmlcatalog --noout --add "delegatePublic" \
     "-//OASIS//ENTITIES DocBook XML" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
 xmlcatalog --noout --add "delegatePublic" \
     "-//OASIS//DTD DocBook XML" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
 xmlcatalog --noout --add "delegateSystem" \
     "http://www.oasis-open.org/docbook/" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
 xmlcatalog --noout --add "delegateURI" \
     "http://www.oasis-open.org/docbook/" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
 for DTDVERSION in 4.1.2 4.2 4.3 4.4
 do
@@ -85,22 +85,25 @@
     "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
     "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
   xmlcatalog --noout --add "rewriteSystem" \
     "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
   xmlcatalog --noout --add "rewriteURI" \
     "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
     "file:///usr/share/xml/docbook/xml-dtd-4.5" \
-    /etc/xml/docbook
+    $PKG_DEST/etc/xml/docbook
   xmlcatalog --noout --add "delegateSystem" \
     "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
   xmlcatalog --noout --add "delegateURI" \
     "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
     "file:///etc/xml/docbook" \
-    /etc/xml/catalog
+    $PKG_DEST/etc/xml/catalog
 done
+export PKGDIR=/sources/docbook-xml
+packInstall
+rm -rf $PKG_DEST
 cd ..
 rm -rf docbook-xml
Index: common/blfs-tool-deps/907-gpm
===================================================================
--- common/blfs-tool-deps/907-gpm	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/907-gpm	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -6,11 +6,37 @@
 cd $PKGDIR
 
-patch -Np1 -i ../gpm-1.20.1-segfault-1.patch
-patch -Np1 -i ../gpm-1.20.1-silent-1.patch
 ./configure --prefix=/usr --sysconfdir=/etc
-LDFLAGS="$LDFLAGS -lm" make
-make install
-cp -v conf/gpm-root.conf /etc
-ldconfig
+make
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+ln -v -s libgpm.so.2.1.0 $PKG_DEST/usr/lib/libgpm.so
+mkdir -pv $PKG_DEST/etc
+install -v -m644 conf/gpm-root.conf $PKG_DEST/etc
+install -v -m755 -d $PKG_DEST/usr/share/doc/gpm-1.20.6
+chmod   -v   755    doc/{changes,support}
+chmod   -v   644    doc/{changes/*,support/*,FAQ,HACK_GPM,README*}
+cp      -v -R       doc/{FAQ,HACK_GPM,README*,changes,support} \
+                    $PKG_DEST/usr/share/doc/gpm-1.20.6
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/908-lynx
===================================================================
--- common/blfs-tool-deps/908-lynx	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/908-lynx	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -8,5 +8,5 @@
 ./configure --prefix=/usr \
             --sysconfdir=/etc/lynx \
-            --datadir=/usr/share/doc/lynx-2.8.6 \
+            --datadir=/usr/share/doc/lynx-2.8.7rel.2 \
             --with-zlib \
             --with-bzlib \
@@ -14,6 +14,28 @@
             --enable-locale-charset
 make
-make install-full
-chgrp -v -R root /usr/share/doc/lynx-2.8.6/lynx_doc
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install-full
+chgrp -v -R root $PKG_DEST/usr/share/doc/lynx-2.8.7rel.2/lynx_doc
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/909-sudo
===================================================================
--- common/blfs-tool-deps/909-sudo	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/909-sudo	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -6,10 +6,37 @@
 cd $PKGDIR
 
-patch -Np1 -i ../sudo-1.6.8p12-envvar_fix-1.patch
-./configure --prefix=/usr --libexecdir=/usr/lib \
-    --enable-noargs-shell --with-ignore-dot --with-all-insults \
-    --enable-shell-sets-home
+./configure --prefix=/usr \
+            --libexecdir=/usr/lib \
+            --with-ignore-dot \
+            --with-all-insults \
+            --enable-shell-sets-home \
+            --disable-root-sudo \
+            --with-logfac=auth \
+            --without-pam \
+            --without-sendmail
 make
-make install
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/910-wget
===================================================================
--- common/blfs-tool-deps/910-wget	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ common/blfs-tool-deps/910-wget	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -6,7 +6,31 @@
 cd $PKGDIR
 
-./configure --prefix=/usr --sysconfdir=/etc
+./configure --prefix=/usr \
+            --sysconfdir=/etc \
+            --without-ssl
 make
-make install
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
 
 exit
Index: common/blfs-tool-deps/911-sqlite
===================================================================
--- common/blfs-tool-deps/911-sqlite	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/911-sqlite	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# $Id:$
+
+set -e
+cd $PKGDIR
+
+CFLAGS="-g -O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1" \
+            ./configure --prefix=/usr \
+            --enable-threadsafe \
+            --enable-readline \
+            --enable-dynamic-extensions &&
+make
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
+
+exit
Index: common/blfs-tool-deps/911-subversion
===================================================================
--- common/blfs-tool-deps/911-subversion	(revision d09e32ad28b93e9c807041047f208faf5646dc37)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/bash
-
-# $Id$
-
-set -e
-cd $PKGDIR
-
-./configure --prefix=/usr \
-            --without-berkeley-db \
-            --with-installbuilddir=/usr/lib/apr-0
-make
-make install
-rm doc/{Makefile,doxygen.conf}
-find doc -type d -exec chmod 755 {} \;
-find doc -type f -exec chmod 644 {} \;
-install -v -m755 -d /usr/share/doc/subversion-1.3.1
-cp -v -R doc/* /usr/share/doc/subversion-1.3.1
-
-exit
Index: common/blfs-tool-deps/912-apr
===================================================================
--- common/blfs-tool-deps/912-apr	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/912-apr	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# $Id:$
+
+set -e
+cd $PKGDIR
+
+patch -Np1 -i ../apr-1.4.5-config.patch
+./configure
+make
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
+
+exit
Index: common/blfs-tool-deps/913-apr-util
===================================================================
--- common/blfs-tool-deps/913-apr-util	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/913-apr-util	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# $Id:$
+
+set -e
+cd $PKGDIR
+
+patch -Np1 -i ../apr-util-1.4.1-config.patch
+./configure --with-apr=/usr/bin/apr-1-config
+make
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
+
+exit
Index: common/blfs-tool-deps/914-subversion
===================================================================
--- common/blfs-tool-deps/914-subversion	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/914-subversion	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# $Id: $
+
+set -e
+cd $PKGDIR
+
+./configure --prefix=/usr
+make
+if ! [ -z $PKG_DEST ]; then
+	mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
+	ln -sv share/{man,doc,info} $PKG_DEST/usr
+	case $(uname -m) in
+	 x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
+	esac
+fi
+make DESTDIR=$PKG_DEST install
+install -v -m755 -d $PKG_DEST/usr/share/doc/subversion-1.7.1
+cp -v -R doc/* $PKG_DEST/usr/share/doc/subversion-1.7.1
+if ! [ -z $PKG_DEST ]; then 
+	rm -fv $PKG_DEST/{,usr/}lib64 
+	rm -fv $PKG_DEST/usr/{man,doc,info}
+        for dir in $PKG_DEST/usr/share/{doc,info,man}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/usr/{lib,share}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+        for dir in $PKG_DEST/{lib,usr}; do
+          [[ -z $(ls $dir) ]] && rmdir -v $dir
+        done
+	packInstall
+fi
+rm -rf $PKG_DEST
+
+exit
Index: common/blfs-tool-deps/apr-1.4.5-config.patch
===================================================================
--- common/blfs-tool-deps/apr-1.4.5-config.patch	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/apr-1.4.5-config.patch	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,37 @@
+Submitted By:            Pierre Labastie
+Date:                    2011-12-27
+Initial Package Version: 1.4.5 (taken from BLFS patch for httpd-2.2.0)
+Upstream Status:         Not submitted (jhalfs specific)
+Origin:                  jhalfs
+Description:             Modify the layout for installing Apache Portable Runtime
+
+diff -Naur apr-1.4.5-orig/config.layout apr-1.4.5/config.layout
+--- apr-1.4.5-orig/config.layout	2004-11-24 22:51:51.000000000 +0000
++++ apr-1.4.5/config.layout		2005-12-14 21:06:37.000000000 +0000
+@@ -11,18 +11,18 @@
+ 
+ #   Classical APR path layout designed for parallel installs.
+ <Layout apr>
+-    prefix:        /usr/local/apr
++    prefix:        /usr
+     exec_prefix:   ${prefix}
+     bindir:        ${exec_prefix}/bin
+-    sbindir:       ${exec_prefix}/bin
++    sbindir:       ${exec_prefix}/sbin
+     libdir:        ${exec_prefix}/lib
+-    libexecdir:    ${exec_prefix}/modules
+-    mandir:        ${prefix}/man
+-    sysconfdir:    ${prefix}/conf
+-    datadir:       ${prefix}
+-    installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
+-    includedir:    ${prefix}/include/apr-${APR_MAJOR_VERSION}
+-    localstatedir: ${prefix}
++    libexecdir:    ${exec_prefix}/lib/apache
++    mandir:        ${prefix}/share/man
++    sysconfdir:    /etc/apache
++    datadir:       /srv/www
++    installbuilddir: ${libexecdir}/build
++    includedir:    ${prefix}/include/apache
++    localstatedir: ${datadir}
+     libsuffix:     -${APR_MAJOR_VERSION}
+ </Layout>
Index: common/blfs-tool-deps/apr-util-1.4.1-config.patch
===================================================================
--- common/blfs-tool-deps/apr-util-1.4.1-config.patch	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
+++ common/blfs-tool-deps/apr-util-1.4.1-config.patch	(revision 7072e1faf4f91f0343e9ff11221b19c8fcc6de87)
@@ -0,0 +1,31 @@
+diff -Naur apr-util-1.4.1.orig/config.layout apr-util-1.4.1/config.layout
+--- apr-util-1.4.1.orig/config.layout	2005-02-09 13:18:43.000000000 +0100
++++ apr-util-1.4.1/config.layout	2011-12-27 19:29:41.667841632 +0100
+@@ -11,18 +11,18 @@
+ 
+ #   Classical APR-util path layout designed for parallel installs.
+ <Layout apr-util>
+-    prefix:        /usr/local/apr
++    prefix:        /usr
+     exec_prefix:   ${prefix}
+     bindir:        ${exec_prefix}/bin
+-    sbindir:       ${exec_prefix}/bin
++    sbindir:       ${exec_prefix}/sbin
+     libdir:        ${exec_prefix}/lib
+-    libexecdir:    ${exec_prefix}/modules
+-    mandir:        ${prefix}/man
+-    sysconfdir:    ${prefix}/conf
+-    datadir:       ${prefix}
+-    installbuilddir: ${datadir}/build
+-    includedir:    ${prefix}/include/apr-${APRUTIL_MAJOR_VERSION}
+-    localstatedir: ${prefix}
++    libexecdir:    ${exec_prefix}/lib/apache
++    mandir:        ${prefix}/share/man
++    sysconfdir:    /etc/apache
++    datadir:       /srv/www
++    installbuilddir: ${libexecdir}/build
++    includedir:    ${prefix}/include/apache
++    localstatedir: ${datadir}
+     libsuffix:     -${APRUTIL_MAJOR_VERSION}
+ </Layout>
+ 
