python-2.7-110-optional-db.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Add an option to disable bsddb
  2. bsddb has an external dependency on Berkeley DB. Since we want to be
  3. able to build Python without it, this patch adds an option to disable
  4. the build/installation of this Python module.
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  7. ---
  8. Makefile.pre.in | 10 ++++++++--
  9. configure.in | 22 ++++++++++++++++++++++
  10. 2 files changed, 30 insertions(+), 2 deletions(-)
  11. Index: Python-2.7.2/Makefile.pre.in
  12. ===================================================================
  13. --- Python-2.7.2.orig/Makefile.pre.in
  14. +++ Python-2.7.2/Makefile.pre.in
  15. @@ -861,7 +861,7 @@
  16. email email/mime \
  17. json \
  18. sqlite3 \
  19. - logging bsddb csv importlib wsgiref \
  20. + logging csv importlib wsgiref \
  21. ctypes ctypes/macholib idlelib idlelib/Icons \
  22. distutils distutils/command \
  23. multiprocessing multiprocessing/dummy \
  24. @@ -873,7 +873,7 @@
  25. LIBSUBDIRS += test test/data \
  26. test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
  27. test/tracedmodules email/test email/test/data \
  28. - json/tests bsddb/test \
  29. + json/tests \
  30. ctypes/test distutils/tests unittest/test
  31. endif
  32. @@ -914,6 +914,13 @@
  33. LIBSUBDIRS += $(XMLLIBSUBDIRS)
  34. endif
  35. +ifeq (@BSDDB@,yes)
  36. +LIBSUBDIRS += bsddb
  37. +ifeq (@TEST_MODULES@,yes)
  38. +LIBSUBDIRS += bsddb/test
  39. +endif
  40. +endif
  41. +
  42. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  43. @for i in $(SCRIPTDIR) $(LIBDEST); \
  44. do \
  45. Index: Python-2.7.2/configure.in
  46. ===================================================================
  47. --- Python-2.7.2.orig/configure.in
  48. +++ Python-2.7.2/configure.in
  49. @@ -2436,6 +2436,28 @@
  50. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
  51. fi])
  52. +AC_ARG_ENABLE(dbm,
  53. + AS_HELP_STRING([--disable-dbm], [disable DBM]),
  54. + [ if test "$enableval" = "no"; then
  55. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm"
  56. + fi])
  57. +
  58. +AC_ARG_ENABLE(gdbm,
  59. + AS_HELP_STRING([--disable-gdbm], [disable GDBM]),
  60. + [ if test "$enableval" = "no"; then
  61. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm"
  62. + fi])
  63. +
  64. +AC_SUBST(BSDDB)
  65. +AC_ARG_ENABLE(bsddb,
  66. + AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]),
  67. + [ if test "$enableval" = "no"; then
  68. + BSDDB=no
  69. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bsddb"
  70. + else
  71. + BSDDB=yes
  72. + fi], [ BSDDB=yes ])
  73. +
  74. AC_ARG_ENABLE(unicodedata,
  75. AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
  76. [ if test "$enableval" = "no"; then