1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../python2/uclibc.patch.uclibc
5 # Copyright (C) 2004 - 2017 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
16 libgdbm.so supplies compatibility functions to dbm functionality in libgdbm_compat.so,
17 but putting both of those libraries into ndbm_libs resulted in gdbm_errno not found,
18 even though this symbol is present in libgdbm.so, and this library is even loaded
19 before ./python complains about the missing symbol. I can only assume there's a
20 linking error with uclibcs dynamic loader, therefore let it fall back to the bdb
23 --- Python-2.4/setup.py.orig 2004-11-13 03:13:34.000000000 -0800
24 +++ Python-2.4/setup.py 2005-01-24 16:50:44.000000000 -0800
27 # The standard Unix dbm module:
28 if platform not in ['cygwin']:
29 - if find_file("ndbm.h", inc_dirs, []) is not None:
30 - # Some systems have -lndbm, others don't
31 - if self.compiler.find_library_file(lib_dirs, 'ndbm'):
32 - ndbm_libs = ['ndbm']
35 - exts.append( Extension('dbm', ['dbmmodule.c'],
36 - define_macros=[('HAVE_NDBM_H',None)],
37 - libraries = ndbm_libs ) )
38 - elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
39 - and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
40 - exts.append( Extension('dbm', ['dbmmodule.c'],
41 - define_macros=[('HAVE_GDBM_NDBM_H',None)],
42 - libraries = ['gdbm'] ) )
43 - elif db_incs is not None:
44 + #if find_file("ndbm.h", inc_dirs, []) is not None:
45 + # # Some systems have -lndbm, others don't
46 + # if self.compiler.find_library_file(lib_dirs, 'ndbm'):
47 + # ndbm_libs = ['ndbm']
50 + # exts.append( Extension('dbm', ['dbmmodule.c'],
51 + # define_macros=[('HAVE_NDBM_H',None)],
52 + # libraries = ndbm_libs ) )
53 + #elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
54 + # and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
55 + # exts.append( Extension('dbm', ['dbmmodule.c'],
56 + # define_macros=[('HAVE_GDBM_NDBM_H',None)],
57 + # libraries = ['gdbm'] ) )
58 + if db_incs is not None:
59 exts.append( Extension('dbm', ['dbmmodule.c'],
60 library_dirs=dblib_dir,
61 runtime_library_dirs=dblib_dir,