]> git.pld-linux.org Git - packages/python.git/blob - python-no_ndbm.patch
- adapterized (avoid macros with /usr/include/{ncurses,freetype}*)
[packages/python.git] / python-no_ndbm.patch
1 --- Python-2.3/setup.py Thu Jul 10 12:48:39 2003
2 +++ Python-2.3.new/setup.py     Thu Aug 28 15:02:31 2003
3 @@ -584,28 +584,8 @@
4  
5          # The standard Unix dbm module:
6          if platform not in ['cygwin']:
7 -            if find_file("ndbm.h", inc_dirs, []) is not None:
8 -                # Some systems have -lndbm, others don't
9 -                if self.compiler.find_library_file(lib_dirs, 'ndbm'):
10 -                    ndbm_libs = ['ndbm']
11 -                else:
12 -                    ndbm_libs = []
13 -                exts.append( Extension('dbm', ['dbmmodule.c'],
14 -                                       define_macros=[('HAVE_NDBM_H',None)],
15 -                                       libraries = ndbm_libs ) )
16 -            elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
17 -                  and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
18 -                exts.append( Extension('dbm', ['dbmmodule.c'],
19 -                                       define_macros=[('HAVE_GDBM_NDBM_H',None)],
20 -                                       libraries = ['gdbm'] ) )
21 -            elif db_incs is not None:
22 -                exts.append( Extension('dbm', ['dbmmodule.c'],
23 -                                       library_dirs=dblib_dir,
24 -                                       runtime_library_dirs=dblib_dir,
25 -                                       include_dirs=db_incs,
26 -                                       define_macros=[('HAVE_BERKDB_H',None),
27 -                                                      ('DB_DBM_HSEARCH',None)],
28 -                                       libraries=dblibs))
29 +            exts.append( Extension('dbm', ['dbmmodule.c'],
30 +                                   libraries = ['gdbm', 'gdbm_compat'] ) )
31  
32          # Anthony Baxter's gdbm module.  GNU dbm(3) will require -lgdbm:
33          if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
34 --- Python-2.3/Modules/dbmmodule.c      Fri Nov 22 23:29:31 2002
35 +++ Python-2.3.new/Modules/dbmmodule.c  Thu Aug 28 14:51:48 2003
36 @@ -11,22 +11,12 @@
37  /* Some Linux systems install gdbm/ndbm.h, but not ndbm.h.  This supports
38   * whichever configure was able to locate.
39   */
40 -#if defined(HAVE_NDBM_H)
41  #include <ndbm.h>
42  #if defined(PYOS_OS2) && !defined(PYCC_GCC)
43  static char *which_dbm = "ndbm";
44  #else
45  static char *which_dbm = "GNU gdbm";  /* EMX port of GDBM */
46  #endif
47 -#elif defined(HAVE_GDBM_NDBM_H)
48 -#include <gdbm/ndbm.h>
49 -static char *which_dbm = "GNU gdbm";
50 -#elif defined(HAVE_BERKDB_H)
51 -#include <db.h>
52 -static char *which_dbm = "Berkeley DB";
53 -#else
54 -#error "No ndbm.h available!"
55 -#endif
56  
57  typedef struct {
58         PyObject_HEAD
This page took 0.073095 seconds and 3 git commands to generate.