summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python/files/patches')
-rw-r--r--dev-lang/python/files/patches/2.4-mimetypes_apache.patch11
-rw-r--r--dev-lang/python/files/patches/2.4.1-libdir.patch176
-rw-r--r--dev-lang/python/files/patches/2.4.1-st_flags.patch185
-rw-r--r--dev-lang/python/files/patches/2.4.2-readline.patch287
-rw-r--r--dev-lang/python/files/patches/2.4.3-libdir.patch156
5 files changed, 815 insertions, 0 deletions
diff --git a/dev-lang/python/files/patches/2.4-mimetypes_apache.patch b/dev-lang/python/files/patches/2.4-mimetypes_apache.patch
new file mode 100644
index 0000000..7254aa0
--- /dev/null
+++ b/dev-lang/python/files/patches/2.4-mimetypes_apache.patch
@@ -0,0 +1,11 @@
+--- Lib/mimetypes.py.old 2004-01-24 21:48:39.957577048 +0000
++++ Lib/mimetypes.py 2004-01-24 21:49:27.023421952 +0000
+@@ -33,6 +33,8 @@
+
+ knownfiles = [
+ "/etc/mime.types",
++ "/etc/apache/conf/mime.types", # Apache 1.x for Gentoo
++ "/etc/apache2/conf/mime.types", # Apache 2.x for Gentoo
+ "/usr/local/etc/httpd/conf/mime.types",
+ "/usr/local/lib/netscape/mime.types",
+ "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2
diff --git a/dev-lang/python/files/patches/2.4.1-libdir.patch b/dev-lang/python/files/patches/2.4.1-libdir.patch
new file mode 100644
index 0000000..9312ddd
--- /dev/null
+++ b/dev-lang/python/files/patches/2.4.1-libdir.patch
@@ -0,0 +1,176 @@
+--- Python-2.4.1/Lib/distutils/command/install.py
++++ Python-2.4.1/Lib/distutils/command/install.py
+@@ -39,15 +39,15 @@ else:
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/@@GENTOO_LIBDIR@/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+- 'purelib': '$base/lib/python',
++ 'purelib': '$base/@@GENTOO_LIBDIR/python',
+- 'platlib': '$base/lib/python',
++ 'platlib': '$base/@@GENTOO_LIBDIR@@/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+--- Python-2.4.1/Lib/distutils/sysconfig.py
++++ Python-2.4.1/Lib/distutils/sysconfig.py
+@@ -99,9 +99,9 @@ def get_python_lib(plat_specific=0, stan
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+--- Python-2.4.1/Lib/site.py
++++ Python-2.4.1/Lib/site.py
+@@ -179,10 +179,20 @@ def addsitepackages(known_paths):
+ sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
+ elif os.sep == '/':
+ sitedirs = [os.path.join(prefix,
++ "@@GENTOO_LIBDIR@@",
++ "python" + sys.version[:3],
++ "site-packages"),
++ os.path.join(prefix,
+ "lib",
+ "python" + sys.version[:3],
+ "site-packages"),
++ os.path.join(prefix, "lib64", "site-python"),
+ os.path.join(prefix, "lib", "site-python")]
++ tmp_sitedirs = []
++ for sdir in sitedirs:
++ if sdir not in tmp_sitedirs:
++ tmp_sitedirs.append(sdir)
++ sitedirs = tmp_sitedirs
+ sitedirs = [os.path.join(prefix,"lib","portage","pym")] + sitedirs
+ else:
+ sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
+--- Python-2.4.1/Makefile.pre.in
++++ Python-2.4.1/Makefile.pre.in
+@@ -79,9 +79,9 @@ exec_prefix= @exec_prefix@
+
+ # Expanded directories
+ BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++LIBDIR= $(exec_prefix)/@@GENTOO_LIBDIR@@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+--- Python-2.4.1/Modules/Setup.dist
++++ Python-2.4.1/Modules/Setup.dist
+@@ -400,7 +400,7 @@ GLHACK=-Dclear=__GLclear
+ #DB=/usr/local/BerkeleyDB.4.0
+ #DBLIBVER=4.0
+ #DBINC=$(DB)/include
+-#DBLIB=$(DB)/lib
++DBLIB=$(DB)/@@GENTOO_LIBDIR@@
+ #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+
+ # Historical Berkeley DB 1.85
+@@ -446,7 +446,7 @@ GLHACK=-Dclear=__GLclear
+ # Andrew Kuchling's zlib module.
+ # This require zlib 1.1.3 (or later).
+ # See http://www.gzip.org/zlib/
+-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
++#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
+
+ # Interface to the Expat XML parser
+ #
+--- Python-2.4.1/Modules/getpath.c
++++ Python-2.4.1/Modules/getpath.c
+@@ -113,7 +113,7 @@
+
+ #ifndef PYTHONPATH
+ #define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
+- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
+ #endif
+
+ #ifndef LANDMARK
+@@ -125,6 +125,7 @@ static char exec_prefix[MAXPATHLEN+1];
+ static char progpath[MAXPATHLEN+1];
+ static char *module_search_path = NULL;
+ static char lib_python[] = "lib/python" VERSION;
++static char lib_exec_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
+
+ static void
+ reduce(char *dir)
+@@ -321,7 +322,7 @@ search_for_exec_prefix(char *argv0_path,
+ strncpy(exec_prefix, delim+1, MAXPATHLEN);
+ else
+ strncpy(exec_prefix, home, MAXPATHLEN);
+- joinpath(exec_prefix, lib_python);
++ joinpath(exec_prefix, lib_exec_python);
+ joinpath(exec_prefix, "lib-dynload");
+ return 1;
+ }
+@@ -338,7 +339,7 @@ search_for_exec_prefix(char *argv0_path,
+ copy_absolute(exec_prefix, argv0_path);
+ do {
+ n = strlen(exec_prefix);
+- joinpath(exec_prefix, lib_python);
++ joinpath(exec_prefix, lib_exec_python);
+ joinpath(exec_prefix, "lib-dynload");
+ if (isdir(exec_prefix))
+ return 1;
+@@ -348,7 +349,7 @@ search_for_exec_prefix(char *argv0_path,
+
+ /* Look at configure's EXEC_PREFIX */
+ strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, lib_python);
++ joinpath(exec_prefix, lib_exec_python);
+ joinpath(exec_prefix, "lib-dynload");
+ if (isdir(exec_prefix))
+ return 1;
+@@ -525,7 +526,7 @@ calculate_path(void)
+ fprintf(stderr,
+ "Could not find platform dependent libraries <exec_prefix>\n");
+ strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, "lib/lib-dynload");
++ joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
+ }
+ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
+
+--- Python-2.4.1/setup.py
++++ Python-2.4.1/setup.py
+@@ -274,7 +275,7 @@ class PyBuildExt(build_ext):
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+ lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
++ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
+ '/lib', '/usr/lib',
+ ]
+ inc_dirs = self.compiler.include_dirs + ['/usr/include']
+@@ -437,11 +438,11 @@ class PyBuildExt(build_ext):
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+ readline_libs.append('curses')
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
+ libraries=readline_libs) )
+ if platform not in ['mac']:
+ # crypt module.
+@@ -1015,7 +1016,7 @@ class PyBuildExt(build_ext):
+ added_lib_dirs.append('/usr/openwin/lib')
+ elif os.path.exists('/usr/X11R6/include'):
+ include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib64')
++ added_lib_dirs.append('/usr/X11R6/lib')
+ added_lib_dirs.append('/usr/X11R6/lib')
+ elif os.path.exists('/usr/X11R5/include'):
+ include_dirs.append('/usr/X11R5/include')
diff --git a/dev-lang/python/files/patches/2.4.1-st_flags.patch b/dev-lang/python/files/patches/2.4.1-st_flags.patch
new file mode 100644
index 0000000..a042bd2
--- /dev/null
+++ b/dev-lang/python/files/patches/2.4.1-st_flags.patch
@@ -0,0 +1,185 @@
+Only in Python-2.4.1-st_flags/: autom4te.cache
+diff -ur Python-2.4.1/configure Python-2.4.1-st_flags/configure
+--- Python-2.4.1/configure 2005-03-29 01:23:02.000000000 +0200
++++ Python-2.4.1-st_flags/configure 2005-06-19 01:26:10.485461096 +0200
+@@ -16411,6 +16411,116 @@
+
+ fi
+
++echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
++echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
++if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++static struct stat ac_aggr;
++if (ac_aggr.st_flags)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_stat_st_flags=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++static struct stat ac_aggr;
++if (sizeof ac_aggr.st_flags)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_stat_st_flags=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_member_struct_stat_st_flags=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
++if test $ac_cv_member_struct_stat_st_flags = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_FLAGS 1
++_ACEOF
++
++
++fi
++
+ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+ echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
+ if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+diff -ur Python-2.4.1/configure.in Python-2.4.1-st_flags/configure.in
+--- Python-2.4.1/configure.in 2005-03-29 01:23:34.000000000 +0200
++++ Python-2.4.1-st_flags/configure.in 2005-06-19 01:25:34.050000128 +0200
+@@ -2421,6 +2421,7 @@
+ AC_STRUCT_TIMEZONE
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
+ AC_CHECK_MEMBERS([struct stat.st_blksize])
++AC_CHECK_MEMBERS([struct stat.st_flags])
+ AC_STRUCT_ST_BLOCKS
+
+ AC_MSG_CHECKING(for time.h that defines altzone)
+Only in Python-2.4.1-st_flags/: configure.in.orig
+diff -ur Python-2.4.1/Modules/posixmodule.c Python-2.4.1-st_flags/Modules/posixmodule.c
+--- Python-2.4.1/Modules/posixmodule.c 2005-03-13 23:18:26.000000000 +0100
++++ Python-2.4.1-st_flags/Modules/posixmodule.c 2005-06-19 01:25:34.048000432 +0200
+@@ -703,6 +703,9 @@
+ #ifdef HAVE_STRUCT_STAT_ST_RDEV
+ {"st_rdev", "device type (if inode device)"},
+ #endif
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++ {"st_flags", "flags set onf ile"},
++#endif
+ {0}
+ };
+
+@@ -724,6 +727,12 @@
+ #define ST_RDEV_IDX ST_BLOCKS_IDX
+ #endif
+
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++#define ST_FLAGS_IDX (ST_RDEV_IDX+1)
++#else
++#define ST_FLAGS_IDX ST_RDEV_IDX
++#endif
++
+ static PyStructSequence_Desc stat_result_desc = {
+ "stat_result", /* name */
+ stat_result__doc__, /* doc */
+@@ -887,6 +896,10 @@
+ PyStructSequence_SET_ITEM(v, ST_RDEV_IDX,
+ PyInt_FromLong((long)st.st_rdev));
+ #endif
++#ifdef HAVE_STRUCT_STAT_ST_FLAGS
++ PyStructSequence_SET_ITEM(v, ST_FLAGS_IDX,
++ PyInt_FromLong((long)st.st_flags));
++#endif
+
+ if (PyErr_Occurred()) {
+ Py_DECREF(v);
+Only in Python-2.4.1-st_flags/Modules: posixmodule.c.orig
+diff -ur Python-2.4.1/pyconfig.h.in Python-2.4.1-st_flags/pyconfig.h.in
+--- Python-2.4.1/pyconfig.h.in 2004-10-13 17:30:55.000000000 +0200
++++ Python-2.4.1-st_flags/pyconfig.h.in 2005-06-19 01:26:10.971387224 +0200
+@@ -480,6 +480,9 @@
+ /* Define to 1 if `st_blocks' is member of `struct stat'. */
+ #undef HAVE_STRUCT_STAT_ST_BLOCKS
+
++/* Define to 1 if `st_flags' is member of `struct stat'. */
++#undef HAVE_STRUCT_STAT_ST_FLAGS
++
+ /* Define to 1 if `st_rdev' is member of `struct stat'. */
+ #undef HAVE_STRUCT_STAT_ST_RDEV
+
+Only in Python-2.4.1-st_flags/: pyconfig.h.in~
diff --git a/dev-lang/python/files/patches/2.4.2-readline.patch b/dev-lang/python/files/patches/2.4.2-readline.patch
new file mode 100644
index 0000000..7c5ab7d
--- /dev/null
+++ b/dev-lang/python/files/patches/2.4.2-readline.patch
@@ -0,0 +1,287 @@
+diff -u configure configure
+--- configure 2005-03-29 00:23:02.000000000 +0100
++++ configure 2005-04-26 14:14:49.373258580 +0100
+@@ -19306,6 +19306,217 @@
+
+ fi
+
++# what library does readline need to be linked with
++READLINE_SHARED_LIBADD=""
++echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
++echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
++if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lncurses $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char tgetent ();
++int
++main ()
++{
++tgetent ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ncurses_tgetent=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_ncurses_tgetent=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
++echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
++if test $ac_cv_lib_ncurses_tgetent = yes; then
++ READLINE_SHARED_LIBADD="-lncurses"
++else
++ echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
++echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
++if test "${ac_cv_lib_curses_tgetent+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcurses $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char tgetent ();
++int
++main ()
++{
++tgetent ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_curses_tgetent=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_curses_tgetent=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
++echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
++if test $ac_cv_lib_curses_tgetent = yes; then
++ READLINE_SHARED_LIBADD="-lcurses"
++else
++ echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
++echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
++if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ltermcap $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char tgetent ();
++int
++main ()
++{
++tgetent ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_termcap_tgetent=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_termcap_tgetent=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
++echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
++if test $ac_cv_lib_termcap_tgetent = yes; then
++ READLINE_SHARED_LIBADD="-ltermcap"
++fi
++
++
++fi
++
++
++fi
++
++
+ # check for readline 2.1
+ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
+ echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
+@@ -19313,7 +19524,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lreadline -ltermcap $LIBS"
++LIBS="-lreadline $READLINE_SHARED_LIBADD $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -19445,7 +19656,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lreadline -ltermcap $LIBS"
++LIBS="-lreadline $READLINE_SHARED_LIBADD $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -19519,7 +19730,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lreadline -ltermcap $LIBS"
++LIBS="-lreadline $READLINE_SHARED_LIBADD $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+diff -u configure.in configure.in
+--- configure.in 2005-03-29 00:23:34.000000000 +0100
++++ configure.in 2005-04-26 14:01:03.721206572 +0100
+@@ -2846,10 +2846,18 @@
+ [Define this if you have flockfile(), getc_unlocked(), and funlockfile()])
+ fi
+
++# what library does readline need to be linked with
++READLINE_SHARED_LIBADD=""
++AC_CHECK_LIB(ncurses, tgetent, [READLINE_SHARED_LIBADD="-lncurses"],
++ AC_CHECK_LIB(curses, tgetent, [READLINE_SHARED_LIBADD="-lcurses"],
++ AC_CHECK_LIB(termcap, tgetent, [READLINE_SHARED_LIBADD="-ltermcap"])
++ )
++ )
++
+ # check for readline 2.1
+ AC_CHECK_LIB(readline, rl_callback_handler_install,
+ AC_DEFINE(HAVE_RL_CALLBACK, 1,
+- [Define if you have readline 2.1]), , -ltermcap)
++ [Define if you have readline 2.1]), , $READLINE_SHARED_LIBADD)
+
+ # check for readline 2.2
+ AC_TRY_CPP([#include <readline/readline.h>],
+@@ -2865,12 +2873,12 @@
+ # check for readline 4.0
+ AC_CHECK_LIB(readline, rl_pre_input_hook,
+ AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
+- [Define if you have readline 4.0]), , -ltermcap)
++ [Define if you have readline 4.0]), , $READLINE_SHARED_LIBADD)
+
+ # check for readline 4.2
+ AC_CHECK_LIB(readline, rl_completion_matches,
+ AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
+- [Define if you have readline 4.2]), , -ltermcap)
++ [Define if you have readline 4.2]), , $READLINE_SHARED_LIBADD)
+
+ # also in readline 4.2
+ AC_TRY_CPP([#include <readline/readline.h>],
+
diff --git a/dev-lang/python/files/patches/2.4.3-libdir.patch b/dev-lang/python/files/patches/2.4.3-libdir.patch
new file mode 100644
index 0000000..f75c756
--- /dev/null
+++ b/dev-lang/python/files/patches/2.4.3-libdir.patch
@@ -0,0 +1,156 @@
+diff -ur Python-2.4.3.orig/Lib/distutils/command/install.py Python-2.4.3/Lib/distutils/command/install.py
+--- Python-2.4.3.orig/Lib/distutils/command/install.py 2005-01-20 19:15:39.000000000 +0000
++++ Python-2.4.3/Lib/distutils/command/install.py 2006-08-16 15:15:27.000000000 +0100
+@@ -38,8 +38,8 @@
+
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
++ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+Only in Python-2.4.3/Lib/distutils/command: install.py~
+diff -ur Python-2.4.3.orig/Lib/distutils/sysconfig.py Python-2.4.3/Lib/distutils/sysconfig.py
+--- Python-2.4.3.orig/Lib/distutils/sysconfig.py 2005-01-06 23:16:03.000000000 +0000
++++ Python-2.4.3/Lib/distutils/sysconfig.py 2006-08-16 15:16:47.000000000 +0100
+@@ -100,7 +100,7 @@
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+Only in Python-2.4.3/Lib/distutils: sysconfig.py~
+diff -ur Python-2.4.3.orig/Lib/site.py Python-2.4.3/Lib/site.py
+--- Python-2.4.3.orig/Lib/site.py 2006-08-16 15:06:40.000000000 +0100
++++ Python-2.4.3/Lib/site.py 2006-08-16 15:19:21.000000000 +0100
+@@ -179,10 +179,10 @@
+ sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
+ elif os.sep == '/':
+ sitedirs = [os.path.join(prefix,
+- "lib",
++ "@@GENTOO_LIBDIR@@",
+ "python" + sys.version[:3],
+ "site-packages"),
+- os.path.join(prefix, "lib", "site-python")]
++ os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python")]
+ sitedirs = [os.path.join(prefix,"lib","portage","pym")] + sitedirs
+ else:
+ sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
+Only in Python-2.4.3/Lib: site.py~
+diff -ur Python-2.4.3.orig/Makefile.pre.in Python-2.4.3/Makefile.pre.in
+--- Python-2.4.3.orig/Makefile.pre.in 2006-03-13 13:08:41.000000000 +0000
++++ Python-2.4.3/Makefile.pre.in 2006-08-16 15:11:25.000000000 +0100
+@@ -79,11 +79,11 @@
+
+ # Expanded directories
+ BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++LIBDIR= $(exec_prefix)/@@GENTOO_LIBDIR@@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
+
+ # Detailed destination directories
+ BINLIBDEST= $(LIBDIR)/python$(VERSION)
+Only in Python-2.4.3: Makefile.pre.in~
+diff -ur Python-2.4.3.orig/Modules/Setup.dist Python-2.4.3/Modules/Setup.dist
+--- Python-2.4.3.orig/Modules/Setup.dist 2005-12-27 17:37:16.000000000 +0000
++++ Python-2.4.3/Modules/Setup.dist 2006-08-16 15:19:14.000000000 +0100
+@@ -401,7 +401,7 @@
+ #DB=/usr/local/BerkeleyDB.4.0
+ #DBLIBVER=4.0
+ #DBINC=$(DB)/include
+-#DBLIB=$(DB)/lib
++DBLIB=$(DB)/@@GENTOO_LIBDIR@@
+ #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+
+ # Historical Berkeley DB 1.85
+@@ -447,7 +447,7 @@
+ # Andrew Kuchling's zlib module.
+ # This require zlib 1.1.3 (or later).
+ # See http://www.gzip.org/zlib/
+-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
++zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
+
+ # Interface to the Expat XML parser
+ #
+Only in Python-2.4.3/Modules: Setup.dist~
+diff -ur Python-2.4.3.orig/Modules/getpath.c Python-2.4.3/Modules/getpath.c
+--- Python-2.4.3.orig/Modules/getpath.c 2006-02-20 17:37:39.000000000 +0000
++++ Python-2.4.3/Modules/getpath.c 2006-08-16 15:21:21.000000000 +0100
+@@ -112,8 +112,8 @@
+ #endif
+
+ #ifndef PYTHONPATH
+-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
+- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \
++ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
+ #endif
+
+ #ifndef LANDMARK
+@@ -124,7 +124,7 @@
+ static char exec_prefix[MAXPATHLEN+1];
+ static char progpath[MAXPATHLEN+1];
+ static char *module_search_path = NULL;
+-static char lib_python[] = "lib/python" VERSION;
++static char lib_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
+
+ static void
+ reduce(char *dir)
+@@ -529,7 +529,7 @@
+ fprintf(stderr,
+ "Could not find platform dependent libraries <exec_prefix>\n");
+ strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, "lib/lib-dynload");
++ joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
+ }
+ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
+
+Only in Python-2.4.3/Modules: getpath.c~
+diff -ur Python-2.4.3.orig/setup.py Python-2.4.3/setup.py
+--- Python-2.4.3.orig/setup.py 2006-08-16 15:06:37.000000000 +0100
++++ Python-2.4.3/setup.py 2006-08-16 15:13:53.000000000 +0100
+@@ -275,8 +275,7 @@
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+ lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
++ '@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
+ ]
+ inc_dirs = self.compiler.include_dirs + ['/usr/include']
+ exts = []
+@@ -441,11 +440,11 @@
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+ readline_libs.append('curses')
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
+ libraries=readline_libs) )
+ if platform not in ['mac']:
+ # crypt module.
+@@ -1023,8 +1022,7 @@
+ added_lib_dirs.append('/usr/openwin/lib')
+ elif os.path.exists('/usr/X11R6/include'):
+ include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib64')
+- added_lib_dirs.append('/usr/X11R6/lib')
++ added_lib_dirs.append('/usr/X11R6/@@GENTOO_LIBDIR@@')
+ elif os.path.exists('/usr/X11R5/include'):
+ include_dirs.append('/usr/X11R5/include')
+ added_lib_dirs.append('/usr/X11R5/lib')
+Only in Python-2.4.3: setup.py~