Index: trunk/essentials/sys-apps/prefix-portage/Makefile.kmk
===================================================================
--- trunk/essentials/sys-apps/prefix-portage/Makefile.kmk	(revision 3492)
+++ trunk/essentials/sys-apps/prefix-portage/Makefile.kmk	(revision 3492)
@@ -0,0 +1,50 @@
+# $Id: Makefile.kmk 3085 2007-04-09 23:51:18Z bird $
+## @file
+#
+# kNIX Makefile for prefix-portage.
+#
+# Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
+#
+#
+# This file is part of kNIX.
+#
+# kNIX is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kNIX is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kNIX; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#
+
+#ifdef NOT_BOOTSTRAPPING_KNIX
+#export WANT_AUTOMAKE=1.9
+#export PATH:=/@unixroot/bin;/@unixroot/usr/bin;/@unixroot/sbin;/@unixroot/usr/sbin;$(PATH)
+#
+#PM_VERSION = 
+#
+#OPT_CONFIG = \
+#	--with-user=portage \
+#	--with-group=portage \
+#	--with-rootuser=root \
+#	--with-wheelgid=0 \
+#	--with-offset="/@unixroot/" \
+#	--with-default-path="/@unixroot/bin;/@unixroot/usr/local/bin;/@unixroot/usr/bin;"
+#	
+#
+#pm_topdir := ../../..
+#include $(pm_topdir)/ports-make/gnugccomf.gmk
+#
+#else
+
+include kNIX-bootstrap.kmk
+
+#endif
+
Index: trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap-os2.x86-subst-install.vars
===================================================================
--- trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap-os2.x86-subst-install.vars	(revision 3492)
+++ trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap-os2.x86-subst-install.vars	(revision 3492)
@@ -0,0 +1,120 @@
+SHELL="/@unixroot/bin/sh.exe"
+PATH_SEPARATOR=";"
+PACKAGE_NAME="portage"
+PACKAGE_TARNAME="portage-prefix"
+PACKAGE_VERSION="2.1.20"
+PACKAGE_STRING="portage 2.1.20"
+PACKAGE_BUGREPORT="grobian@gentoo.org"
+exec_prefix="/@unixroot/usr"
+prefix="/@unixroot/usr"
+program_transform_name="s,x,x,"
+bindir="/@unixroot/usr/bin"
+sbindir="/@unixroot/usr/sbin"
+libexecdir="/@unixroot/usr/libexec"
+datarootdir="/@unixroot/usr/share"
+datadir="/@unixroot/usr/share"
+sysconfdir="/@unixroot/etc"
+sharedstatedir="/@unixroot/usr/com"
+localstatedir="/@unixroot/usr/var"
+includedir="/@unixroot/usr/include"
+oldincludedir="/@unixroot/usr/include"
+docdir="/@unixroot/usr/share/doc/portage-prefix"
+infodir="/@unixroot/usr/share/info"
+htmldir="/@unixroot/usr/share/doc/portage-prefix"
+dvidir="/@unixroot/usr/share/doc/portage-prefix"
+pdfdir="/@unixroot/usr/share/doc/portage-prefix"
+psdir="/@unixroot/usr/share/doc/portage-prefix"
+libdir="/@unixroot/usr/lib"
+localedir="/@unixroot/usr/share/locale"
+mandir="/@unixroot/usr/share/man"
+DEFS="-DPACKAGE_NAME=\"portage\" -DPACKAGE_TARNAME=\"portage-prefix\" -DPACKAGE_VERSION=\"2.1.20\" -DPACKAGE_STRING=\"portage\\\\ 2.1.20\" -DPACKAGE_BUGREPORT=\"grobian@gentoo.org\" -DPACKAGE=\"portage-prefix\" -DVERSION=\"2.1.20\" -DHAVE_LIBC=1 -DHAVE_LIBDL=1 -DHAVE_LIBGCC=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETOPT_H=1 -DHAVE_STDIO_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_GETCWD=1 -DHAVE_MKDIR=1 -DHAVE_REGCOMP=1 -DHAVE_RMDIR=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRSPN=1 -DHAVE_STRSTR=1"
+ECHO_C=""
+ECHO_N="-n"
+ECHO_T=""
+LIBS="-lgcc -ldl -lc "
+build_alias=""
+host_alias=""
+target_alias=""
+build="i486-pc-os2-knix"
+build_cpu="i486"
+build_vendor="pc"
+build_os="os2-emx"
+host="i486-pc-os2-knix"
+host_cpu="i486"
+host_vendor="pc"
+host_os="os2-emx"
+target="i486-pc-os2-knix"
+target_cpu="i486"
+target_vendor="pc"
+target_os="os2-knix"
+INSTALL_PROGRAM=""
+INSTALL_SCRIPT=""
+INSTALL_DATA=" -m 644"
+CYGPATH_W="echo"
+PACKAGE="portage-prefix"
+VERSION="2.1.20"
+ACLOCAL="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run aclocal-1.9"
+AUTOCONF="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run autoconf"
+AUTOMAKE="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run automake-1.9"
+AUTOHEADER="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run autoheader"
+MAKEINFO="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run makeinfo"
+install_sh="D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/install-sh"
+STRIP=""
+INSTALL_STRIP_PROGRAM="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/install-sh -c -s"
+mkdir_p="mkdir -p --"
+AWK="gawk.exe"
+SET_MAKE=""
+am__leading_dot="."
+AMTAR="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run tar"
+am__tar="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run tar chof - \"$tardir\""
+am__untar="D:/coding/libc/svn/trunk/out/os2.x86/release/dist/bin/ash.exe D:/coding/libc/svn/trunk/essentials/sys-apps/prefix-portage/missing --run tar xf -"
+CC="gcc"
+CFLAGS="-g -Zomf"
+LDFLAGS="-Zomf -Zmap -Zstack 1024 -Zhigh-mem -g"
+CPPFLAGS=""
+ac_ct_CC="gcc"
+EXEEXT=".exe"
+OBJEXT="o"
+DEPDIR=".deps"
+am__include="include"
+am__quote=""
+AMDEP_TRUE=""
+AMDEP_FALSE="#"
+AMDEPBACKSLASH="\\\\"
+CCDEPMODE="depmode=gcc3"
+am__fastdepCC_TRUE=""
+am__fastdepCC_FALSE="#"
+LN_S="ln.exe -s"
+GREP="/@unixroot/usr/bin/grep.exe"
+EGREP="/@unixroot/usr/bin/grep.exe -E"
+XCU_ID="/@unixroot/bin/id.exe"
+PYTHON="/@unixroot/usr/bin/python.exe"
+RM="/@unixroot/bin/rm.exe"
+MV="/@unixroot/bin/mv.exe"
+BASENAME="/@unixroot/bin/basename.exe"
+DIRNAME="/@unixroot/bin/dirname.exe"
+BASH="/@unixroot/bin/bash.exe"
+SED="/@unixroot/usr/bin/sed.exe"
+WGET="/@unixroot/usr/bin/wget.exe"
+FIND="/@unixroot/usr/bin/find.exe"
+XARGS="/@unixroot/usr/bin/xargs.exe"
+CPP="gcc -E"
+ALLOCA=""
+portageuser="portage"
+portagegroup="portage"
+wheelgid="0"
+rootuser="root"
+rootuid="0"
+DOMAIN_PREFIX="/@unixroot"
+DEFAULT_PATH="/@unixroot/usr/bin:/@unixroot/bin;/@unixroot/usr/local/bin;/@unixroot/usr/bin;"
+ARCH="x86-os2"
+PORTAGE_BASE="/@unixroot/usr/lib/portage"
+INSTALL_PYTHON_SOURCES_TRUE=""
+INSTALL_PYTHON_SOURCES_FALSE="#"
+BUILD_TBZ2TOOL_TRUE=""
+BUILD_TBZ2TOOL_FALSE="#"
+BUILD_MISSINGOS_TRUE="#"
+BUILD_MISSINGOS_FALSE=""
+LIBOBJS=""
+LTLIBOBJS=""
+all_configurevars=" SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S GREP EGREP XCU_ID PYTHON RM MV BASENAME DIRNAME BASH SED WGET FIND XARGS CPP ALLOCA portageuser portagegroup wheelgid rootuser rootuid DOMAIN_PREFIX DEFAULT_PATH ARCH PORTAGE_BASE INSTALL_PYTHON_SOURCES_TRUE INSTALL_PYTHON_SOURCES_FALSE BUILD_TBZ2TOOL_TRUE BUILD_TBZ2TOOL_FALSE BUILD_MISSINGOS_TRUE BUILD_MISSINGOS_FALSE LIBOBJS LTLIBOBJS"
Index: trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap.kmk
===================================================================
--- trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap.kmk	(revision 3492)
+++ trunk/essentials/sys-apps/prefix-portage/kNIX-bootstrap.kmk	(revision 3492)
@@ -0,0 +1,446 @@
+# $Id: kNIX-bootstrap.kmk 3045 2007-04-08 13:32:44Z bird $
+## @file
+#
+# kNIX Makefile for prefix-portage
+#
+# Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
+#
+#
+# This file is part of kLIBC.
+#
+# kLIBC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kLIBC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kLIBC; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#
+
+DEPTH = ../../..
+include $(PATH_KBUILD)/header.kmk
+
+#
+# First, a couple of templates so we can use the subst-install script.
+#
+TEMPLATE_portagedata = portage data.
+TEMPLATE_portagedata_EXTENDS = gendata
+# 1: source  2: destination, 3: target
+TEMPLATE_portagedata_INSTALLER = $(ASH) $(PATH_TARGET)/subst-install \
+	"--installcmd=$(INSTALL_EXT)$(if $(mode), -m $(mode))$(if $(uid),-o $(uid))$(if $(gid),-g $(gid))" $1 $2
+TEMPLATE_portagedata_ORDERDEPS = \
+	$(PATH_TARGET)/subst-install.sh \
+	$(PATH_TARGET)/subst-install.vars
+
+TEMPLATE_portagescript = portage data.
+TEMPLATE_portagescript_EXTENDS = genscript
+# 1: source  2: destination, 3: target
+TEMPLATE_portagescript_INSTALLER = $(ASH) $(PATH_TARGET)/subst-install \
+	"--installcmd=$(INSTALL_EXT)$(if $(mode), -m $(mode))$(if $(uid),-o $(uid))$(if $(gid),-g $(gid))" $1 $2
+TEMPLATE_portagescript_ORDERDEPS = \
+	$(PATH_TARGET)/subst-install.sh \
+	$(PATH_TARGET)/subst-install.vars
+
+$(PATH_TARGET)/subst-install: subst-install.in | $$(call DIRDEP,$$(@D))
+	$(INSTALL) -m 0775 $^ $@
+
+$(PATH_TARGET)/subst-install.vars: kNIX-bootstrap-os2.x86-subst-install.vars | $$(call DIRDEP,$$(@D))
+	$(INSTALL) -m 0664 $^ $@
+
+# temporary hack while ORDERDEPS doesn't work on INSTALLS.
+OTHERS += $(PATH_TARGET)/subst-install.vars $(PATH_TARGET)/subst-install
+OTHERS_CLEAN += $(PATH_TARGET)/subst-install.vars $(PATH_TARGET)/subst-install
+
+
+#
+# Now all the installation targets.
+#
+
+INSTALLS += portage.etc
+portage.etc_TEMPLATE = portagedata
+portage.etc_INST = etc/
+portage.etc_DIRS = \
+	portage
+portage.etc_SOURCES = \
+	cnf/etc-update.conf \
+	cnf/dispatch-conf.conf \
+	cnf/make.globals \
+	$(PATH_TARGET)/make.conf.example
+#????=>env.d/05portage.envd
+## @todo fix the file mode and owner:group.
+
+$(PATH_TARGET)/make.conf.example: cnf/make.conf | $$(call DIRDEP,$$(@D))
+	$(RM) -f -- $@
+	$(CP) -f -- cnf/make.conf $@
+	# patch ....
+
+INSTALLS += portage.usr.lib.portage.bin
+portage.usr.lib.portage.bin_TEMPLATE = portagescript
+portage.usr.lib.portage.bin_INST = usr/lib/portage/bin/
+portage.usr.lib.portage.bin_SOURCES = \
+	bin/archive-conf \
+	bin/check-implicit-pointer-usage.py \
+	bin/chkcontents \
+	bin/clean_locks \
+	bin/dispatch-conf \
+	bin/dobin \
+	bin/doconfd \
+	bin/dodir \
+	bin/dodoc \
+	bin/doenvd \
+	bin/doexe \
+	bin/dohard \
+	bin/dohtml \
+	bin/doinfo \
+	bin/doinitd \
+	bin/doins \
+	bin/dolib \
+	bin/dolib.a \
+	bin/dolib.so \
+	bin/doman \
+	bin/domo \
+	bin/dosbin \
+	bin/dosed \
+	bin/dosym \
+	bin/ebuild \
+	bin/ebuild.sh \
+	bin/ecompress \
+	bin/ecompressdir \
+	bin/emaint \
+	bin/emake \
+	bin/emerge \
+	bin/emerge-webrsync \
+	bin/env-update \
+	bin/env-update.sh \
+	bin/eprefixify \
+	bin/etc-update \
+	bin/find-requires \
+	bin/fix-db.py \
+	bin/fixdbentries \
+	bin/fixpackages \
+	bin/fowners \
+	bin/fperms \
+	bin/isolated-functions.sh \
+	bin/md5check.py \
+	bin/md5check.sh \
+	bin/misc-functions.sh \
+	bin/newbin \
+	bin/newconfd \
+	bin/newdoc \
+	bin/newenvd \
+	bin/newexe \
+	bin/newinitd \
+	bin/newins \
+	bin/newlib.a \
+	bin/newlib.so \
+	bin/newman \
+	bin/newsbin \
+	bin/pemerge.py \
+	bin/pkgname \
+	bin/portageq \
+	bin/portage_gpg_update.sh \
+	bin/prepall \
+	bin/prepalldocs \
+	bin/prepallinfo \
+	bin/prepallman \
+	bin/prepallstrip \
+	bin/prepinfo \
+	bin/preplib \
+	bin/prepman \
+	bin/prepstrip \
+	bin/quickpkg \
+	bin/regenworld \
+	bin/repoman \
+	bin/sed \
+	bin/xpak
+#portage.usr.lib.portage.bin_SYMLINKS = \
+#    donewins=>newins
+
+PROGRAMS += tbz2tool
+tbz2tool_TEMPLATE = usr.bin
+tbz2tool_INST = usr/bin/ usr/lib/portage/bin/
+tbz2tool_SOURCES = \
+	src/tbz2tool.c
+
+INSTALLS += portage.usr.lib.portage.pym
+portage.usr.lib.portage.pym_TEMPLATE = portagedata
+portage.usr.lib.portage.pym_INST = usr/lib/portage/pym/
+portage.usr.lib.portage.pym_SOURCES = \
+	pym/cvstree.py \
+	pym/eclass_cache.py \
+	pym/emergehelp.py \
+	pym/getbinpkg.py \
+	pym/output.py \
+	pym/portage_checksum.py \
+	pym/portage_compat_namespace.py \
+	pym/portage_const.py \
+	pym/portage_data.py \
+	pym/portage_debug.py \
+	pym/portage_dep.py \
+	pym/portage_exception.py \
+	pym/portage_exec.py \
+	pym/portage_gpg.py \
+	pym/portage_localization.py \
+	pym/portage_locks.py \
+	pym/portage_mail.py \
+	pym/portage_manifest.py \
+	pym/portage_news.py \
+	pym/portage_selinux.py \
+	pym/portage_update.py \
+	pym/portage_util.py \
+	pym/portage_versions.py \
+	pym/xpak.py
+
+INSTALLS += portage.usr.lib.portage.pym.emerge
+portage.usr.lib.portage.pym.emerge_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.emerge_INST = usr/lib/portage/pym/emerge/
+portage.usr.lib.portage.pym.emerge_SOURCES = \
+	pym/emerge/__init__.py \
+	pym/emerge/help.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage
+portage.usr.lib.portage.pym.portage_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage_INST = usr/lib/portage/pym/portage/
+portage.usr.lib.portage.pym.portage_SOURCES = \
+	pym/portage/__init__.py \
+	pym/portage/checksum.py \
+	pym/portage/const.py \
+	pym/portage/const_autotool.py \
+	pym/portage/cvstree.py \
+	pym/portage/data.py \
+	pym/portage/debug.py \
+	pym/portage/dep.py \
+	pym/portage/dispatch_conf.py \
+	pym/portage/eclass_cache.py \
+	pym/portage/exception.py \
+	pym/portage/getbinpkg.py \
+	pym/portage/gpg.py \
+	pym/portage/localization.py \
+	pym/portage/locks.py \
+	pym/portage/mail.py \
+	pym/portage/manifest.py \
+	pym/portage/news.py \
+	pym/portage/output.py \
+	pym/portage/process.py \
+	pym/portage/selinux.py \
+	pym/portage/update.py \
+	pym/portage/util.py \
+	pym/portage/versions.py \
+	pym/portage/xpak.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.cache
+portage.usr.lib.portage.pym.portage.cache_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.cache_INST = usr/lib/portage/pym/portage/cache/
+portage.usr.lib.portage.pym.portage.cache_SOURCES = \
+	pym/portage/cache/__init__.py \
+	pym/portage/cache/anydbm.py \
+	pym/portage/cache/cache_errors.py \
+	pym/portage/cache/flat_hash.py \
+	pym/portage/cache/flat_list.py \
+	pym/portage/cache/fs_template.py \
+	pym/portage/cache/mappings.py \
+	pym/portage/cache/metadata.py \
+	pym/portage/cache/metadata_overlay.py \
+	pym/portage/cache/sql_template.py \
+	pym/portage/cache/sqlite.py \
+	pym/portage/cache/template.py \
+	pym/portage/cache/util.py \
+	pym/portage/cache/volatile.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.dbapi
+portage.usr.lib.portage.pym.portage.dbapi_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.dbapi_INST = usr/lib/portage/pym/portage/dbapi/
+portage.usr.lib.portage.pym.portage.dbapi_SOURCES = \
+	pym/portage/dbapi/__init__.py \
+	pym/portage/dbapi/bintree.py \
+	pym/portage/dbapi/porttree.py \
+	pym/portage/dbapi/vartree.py \
+	pym/portage/dbapi/virtual.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.elog
+portage.usr.lib.portage.pym.portage.elog_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.elog_INST = usr/lib/portage/pym/portage/elog/
+portage.usr.lib.portage.pym.portage.elog_SOURCES = \
+	pym/portage/elog/__init__.py \
+	pym/portage/elog/filtering.py \
+	pym/portage/elog/messages.py \
+	pym/portage/elog/mod_custom.py \
+	pym/portage/elog/mod_echo.py \
+	pym/portage/elog/mod_mail.py \
+	pym/portage/elog/mod_mail_summary.py \
+	pym/portage/elog/mod_save.py \
+	pym/portage/elog/mod_save_summary.py \
+	pym/portage/elog/mod_syslog.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.env
+portage.usr.lib.portage.pym.portage.env_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.env_INST = usr/lib/portage/pym/portage/env/
+portage.usr.lib.portage.pym.portage.env_SOURCES = \
+	pym/portage/env/__init__.py \
+	pym/portage/env/config.py \
+	pym/portage/env/loaders.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests
+portage.usr.lib.portage.pym.portage.tests_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests_INST = usr/lib/portage/pym/portage/tests/
+portage.usr.lib.portage.pym.portage.tests_SOURCES = \
+	pym/portage/tests/__init__.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.bin
+portage.usr.lib.portage.pym.portage.tests.bin_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.bin_INST = usr/lib/portage/pym/portage/tests/bin/
+portage.usr.lib.portage.pym.portage.tests.bin_SOURCES = \
+	pym/portage/tests/bin/__init__.py \
+	pym/portage/tests/bin/setup_env.py \
+	pym/portage/tests/bin/test_dobin.py \
+	pym/portage/tests/bin/test_dodir.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.dep
+portage.usr.lib.portage.pym.portage.tests.dep_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.dep_INST = usr/lib/portage/pym/portage/tests/dep/
+portage.usr.lib.portage.pym.portage.tests.dep_SOURCES = \
+	pym/portage/tests/dep/__init__.py \
+	pym/portage/tests/dep/test_dep_getcpv.py \
+	pym/portage/tests/dep/test_dep_getslot.py \
+	pym/portage/tests/dep/test_dep_getusedeps.py \
+	pym/portage/tests/dep/test_get_operator.py \
+	pym/portage/tests/dep/test_isjustname.py \
+	pym/portage/tests/dep/test_isvalidatom.py \
+	pym/portage/tests/dep/test_match_from_list.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.env
+portage.usr.lib.portage.pym.portage.tests.env_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.env_INST = usr/lib/portage/pym/portage/tests/env/
+portage.usr.lib.portage.pym.portage.tests.env_SOURCES = \
+	pym/portage/tests/env/config/__init__.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.env.config
+portage.usr.lib.portage.pym.portage.tests.env.config_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.env.config_INST = usr/lib/portage/pym/portage/tests/env/config/
+portage.usr.lib.portage.pym.portage.tests.env.config_SOURCES = \
+	pym/portage/tests/env/config/test_PackageKeywordsFile.py \
+	pym/portage/tests/env/config/test_PackageMaskFile.py \
+	pym/portage/tests/env/config/test_PackageUseFile.py \
+	pym/portage/tests/env/config/test_PortageModulesFile.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.news
+portage.usr.lib.portage.pym.portage.tests.news_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.news_INST = usr/lib/portage/pym/portage/tests/news/
+portage.usr.lib.portage.pym.portage.tests.news_SOURCES = \
+	pym/portage/tests/news/__init__.py \
+	pym/portage/tests/news/test_NewsItem.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.util
+portage.usr.lib.portage.pym.portage.tests.util_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.util_INST = usr/lib/portage/pym/portage/tests/utils/
+portage.usr.lib.portage.pym.portage.tests.util_SOURCES = \
+	pym/portage/tests/util/__init__.py \
+	pym/portage/tests/util/test_grabdict.py \
+	pym/portage/tests/util/test_normalizedPath.py \
+	pym/portage/tests/util/test_stackDictList.py \
+	pym/portage/tests/util/test_stackDicts.py \
+	pym/portage/tests/util/test_stackLists.py \
+	pym/portage/tests/util/test_uniqueArray.py \
+	pym/portage/tests/util/test_varExpand.py
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.versions
+portage.usr.lib.portage.pym.portage.tests.versions_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.versions_INST = usr/lib/portage/pym/portage/tests/versions/
+portage.usr.lib.portage.pym.portage.tests.versions_SOURCES = \
+	pym/portage/tests/versions/__init__.py \
+	pym/portage/tests/versions/test_vercmp.py 
+
+INSTALLS += portage.usr.lib.portage.pym.portage.tests.xpak
+portage.usr.lib.portage.pym.portage.tests.xpak_TEMPLATE = portagedata
+portage.usr.lib.portage.pym.portage.tests.xpak_INST = usr/lib/portage/pym/portage/tests/xpak/
+portage.usr.lib.portage.pym.portage.tests.xpak_SOURCES = \
+	pym/portage/tests/xpak/__init__.py \
+	pym/portage/tests/xpak/test_decodeint.py
+
+INSTALLS += portage.man
+portage.man_TEMPLATE = usr.bin.man
+portage.man_SOURCES = \
+	man/dispatch-conf.1 \
+	man/ebuild.1 \
+	man/emerge.1 \
+	man/env-update.1 \
+	man/etc-update.1 \
+	man/quickpkg.1 \
+	man/repoman.1 \
+	man/ebuild.5 \
+	man/make.conf.5 \
+	man/portage.5
+
+INSTALLS += portage.doc
+portage.doc_TEMPATE = usr.bin.doc
+portage.doc_SOURCES = \
+	ChangeLog \
+	NEWS \
+	RELEASE-NOTES
+
+INSTALLS += portage.bin
+portage.bin_TEMPLATE = usr.bin
+portage.bin_SYMLINKS = \
+	ebuild=>../lib/portage/bin/ebuild \
+	emerge=>../lib/portage/bin/emerge \
+	portageq=>../lib/portage/bin/portageq \
+	quickpkg=>../lib/portage/bin/quickpkg \
+	repoman=>../lib/portage/bin/repoman
+
+INSTALLS += portage.sbin
+portage.sbin_TEMPLATE = usr.sbin
+portage.sbin_SYMLINKS = \
+	archive-conf=>../lib/portage/bin/archive-conf \
+	dispatch-conf=>../lib/portage/bin/dispatch-conf \
+	emaint=>../lib/portage/bin/emaint \
+	emerge-webrsync=>../lib/portage/bin/emerge-webrsync \
+	env-update=>../lib/portage/bin/env-update \
+	etc-update=>../lib/portage/bin/etc-update \
+	fixpackages=>../lib/portage/bin/fixpackages \
+	regenworld=>../lib/portage/bin/regenworld
+
+
+#
+# Bootstrap config
+#
+INSTALLS += portage.bootstrap.config
+portage.bootstrap.config_TEMPLATE = portagedata
+portage.bootstrap.config_INST = etc/
+portage.bootstrap.config_SOURCES = \
+	$(PATH_TARGET)/make.conf
+portage.bootstrap.config_SYMLINKS = \
+	make.profile=>$(PATH_ROOT)/kNIXPortage/profiles/default-knix/os2/2007.0/
+
+$(PATH_TARGET)/make.conf: Makefile.kmk
+	$(RM) -f -- $@
+	$(APPEND) $@ '# This is an bootstrap make.conf automatically generated by'
+	$(APPEND) $@ '# sys-apps/portage/Makefile.kmk. This is tailored for bird.'
+ifeq ($(BUILD_TYPE),debug)
+	$(APPEND) $@ 'CFLAGS="-g -O0"'
+endif
+	$(APPEND) $@ 'CXXFLAGS="$${CFLAGS}"'
+	$(APPEND) $@ 'PORTDIR_OVERLAY="$(PATH_ROOT)/kNIXPortage"'
+	$(APPEND) $@ 'GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://128.213.5.34/gentoo http://mirrors.tds.net/gentoo http://mirror.datapipe.net/gentoo"'
+	$(APPEND) $@ 'USE="-nls"'
+	$(APPEND) $@ 'FEATURES="-collision-protect"'
+	if test -d $(PATH_INS)/usr/portage && test ! -L $(PATH_INS)/usr/portage; then \
+		$(RMDIR_EXT) $(PATH_INS)/usr/portage; \
+	fi
+	$(RM) -f $(PATH_INS)/usr/portage
+	$(LN) -s $(PATH_ROOT)/portage/ $(PATH_INS)/usr/portage
+	@$(ECHO) '***'
+	@$(ECHO) '*** Download a recent portage snapshot and unpack it in the root.'
+	@$(ECHO) '*** wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/snapshots/portage-latest.tar.bz2'
+	@$(ECHO) '*** tar xpjf portage-latest.tar.bz2'
+	@$(ECHO) '***'
+
+
+include $(PATH_KBUILD)/footer.kmk
+
