diff --git a/templates/python/patches/python-2.6-db-4.8.patch b/templates/python/patches/python-2.6-db-4.8.patch new file mode 100644 index 00000000000..2032f924c4b --- /dev/null +++ b/templates/python/patches/python-2.6-db-4.8.patch @@ -0,0 +1,123 @@ +Index: setup.py +=================================================================== +--- setup.py (revision 74955) ++++ setup.py (working copy) +@@ -695,7 +695,7 @@ + # a release. Most open source OSes come with one or more + # versions of BerkeleyDB already installed. + +- max_db_ver = (4, 7) ++ max_db_ver = (4, 8) + min_db_ver = (3, 3) + db_setup_debug = False # verbose debug prints from this script? + +Index: Modules/_bsddb.c +=================================================================== +--- Modules/_bsddb.c (revision 74955) ++++ Modules/_bsddb.c (working copy) +@@ -215,7 +215,11 @@ + #define DB_BUFFER_SMALL ENOMEM + #endif + ++#if (DBVER < 48) ++#define DB_GID_SIZE DB_XIDDATASIZE ++#endif + ++ + /* --------------------------------------------------------------------- */ + /* Structure definitions */ + +@@ -4501,7 +4505,11 @@ + DBTxnObject *txn; + #define PREPLIST_LEN 16 + DB_PREPLIST preplist[PREPLIST_LEN]; ++#if (DBVER < 48) + long retp; ++#else ++ u_int32_t retp; ++#endif + + CHECK_ENV_NOT_CLOSED(self); + +@@ -4522,7 +4530,7 @@ + flags=DB_NEXT; /* Prepare for next loop pass */ + for (i=0; i= 42) + {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS}, +@@ -7089,6 +7101,7 @@ + ADD_INT(d, DB_MAX_PAGES); + ADD_INT(d, DB_MAX_RECORDS); + ++#if (DBVER < 48) + #if (DBVER >= 42) + ADD_INT(d, DB_RPCCLIENT); + #else +@@ -7096,7 +7109,11 @@ + /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */ + _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); + #endif ++#endif ++ ++#if (DBVER < 48) + ADD_INT(d, DB_XA_CREATE); ++#endif + + ADD_INT(d, DB_CREATE); + ADD_INT(d, DB_NOMMAP); +@@ -7113,7 +7130,13 @@ + ADD_INT(d, DB_INIT_TXN); + ADD_INT(d, DB_JOINENV); + ++#if (DBVER >= 48) ++ ADD_INT(d, DB_GID_SIZE); ++#else + ADD_INT(d, DB_XIDDATASIZE); ++ /* Allow new code to work in old BDB releases */ ++ _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE); ++#endif + + ADD_INT(d, DB_RECOVER); + ADD_INT(d, DB_RECOVER_FATAL); diff --git a/templates/python/patches/python-2.6-gdbm.patch b/templates/python/patches/python-2.6-gdbm.patch new file mode 100644 index 00000000000..f0920d1ea19 --- /dev/null +++ b/templates/python/patches/python-2.6-gdbm.patch @@ -0,0 +1,11 @@ +--- setup.py 2008-09-30 10:15:45.000000000 +1000 ++++ setup.py 2008-12-07 16:04:01.000000000 +1000 +@@ -1013,7 +1013,7 @@ + if self.compiler.find_library_file(lib_dirs, 'ndbm'): + ndbm_libs = ['ndbm'] + else: +- ndbm_libs = [] ++ ndbm_libs = ['gdbm', 'gdbm_compat'] + exts.append( Extension('dbm', ['dbmmodule.c'], + define_macros=[('HAVE_NDBM_H',None)], + libraries = ndbm_libs ) ) diff --git a/templates/python/patches/python-2.6-internal-expat.patch b/templates/python/patches/python-2.6-internal-expat.patch new file mode 100644 index 00000000000..86252abef00 --- /dev/null +++ b/templates/python/patches/python-2.6-internal-expat.patch @@ -0,0 +1,33 @@ +--- setup.py 2008-04-22 12:12:24.613554757 +0300 ++++ setup.py 2008-04-22 12:13:09.276544063 +0300 +@@ -1035,18 +1035,15 @@ + # + # More information on Expat can be found at www.libexpat.org. + # +- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat') +- define_macros = [ +- ('HAVE_EXPAT_CONFIG_H', '1'), +- ] ++ # Use system expat ++ expatinc = '/usr/include' ++ define_macros = [] + + exts.append(Extension('pyexpat', + define_macros = define_macros, + include_dirs = [expatinc], ++ libraries = ['expat'], + sources = ['pyexpat.c', +- 'expat/xmlparse.c', +- 'expat/xmlrole.c', +- 'expat/xmltok.c', + ], + )) + +@@ -1058,6 +1055,7 @@ + exts.append(Extension('_elementtree', + define_macros = define_macros, + include_dirs = [expatinc], ++ libraries = ['expat'], + sources = ['_elementtree.c'], + )) + diff --git a/templates/python/patches/python-2.6-readline.patch b/templates/python/patches/python-2.6-readline.patch new file mode 100644 index 00000000000..60a3f3b45f8 --- /dev/null +++ b/templates/python/patches/python-2.6-readline.patch @@ -0,0 +1,23 @@ +--- Modules/readline.c 2008-11-04 12:43:31.000000000 -0800 ++++ Modules/readline.c 2009-04-22 15:50:49.000000000 -0700 +@@ -759,6 +759,10 @@ + static char ** + flex_complete(char *text, int start, int end) + { ++#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER ++ rl_completion_append_character ='\0'; ++ rl_completion_suppress_append = 0; ++#endif + Py_XDECREF(begidx); + Py_XDECREF(endidx); + begidx = PyInt_FromLong((long) start); +@@ -799,11 +803,8 @@ + rl_completer_word_break_characters = + strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); + /* All nonalphanums except '.' */ +-#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER +- rl_completion_append_character ='\0'; +-#endif + + begidx = PyInt_FromLong(0L); + endidx = PyInt_FromLong(0L); diff --git a/templates/python/template b/templates/python/template index e826895c9bd..848b34529e3 100644 --- a/templates/python/template +++ b/templates/python/template @@ -1,6 +1,7 @@ # Template build file for 'python'. pkgname=python version=2.6.3 +revision=1 wrksrc="Python-$version" distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.bz2" configure_args="--with-threads --enable-ipv6 --with-signal-module" @@ -21,7 +22,6 @@ long_desc=" adaptable as an extension language for existing applications." subpackages="devel" - Add_dependency full glibc Add_dependency full zlib Add_dependency full readline @@ -29,5 +29,11 @@ Add_dependency full bzip2 Add_dependency full gdbm Add_dependency full openssl Add_dependency full expat +Add_dependency full db Add_dependency build ncurses Add_dependency run ncurses-libs + +pre_configure() +{ + export OPT="${XBPS_CFLAGS} -fwrapv" +}