110-optional-db.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: b/Makefile.pre.in
  12. ===================================================================
  13. --- a/Makefile.pre.in
  14. +++ b/Makefile.pre.in
  15. @@ -965,7 +965,7 @@
  16. email email/mime \
  17. ensurepip ensurepip/_bundled \
  18. json \
  19. - logging bsddb csv importlib wsgiref \
  20. + logging csv importlib wsgiref \
  21. ctypes ctypes/macholib \
  22. idlelib idlelib/Icons \
  23. distutils distutils/command \
  24. @@ -981,7 +981,6 @@
  25. test/tracedmodules \
  26. email/test email/test/data \
  27. json/tests \
  28. - bsddb/test \
  29. ctypes/test \
  30. idlelib/idle_test \
  31. distutils/tests \
  32. @@ -1022,6 +1021,11 @@
  33. LIBSUBDIRS += $(XMLLIBSUBDIRS)
  34. endif
  35. +ifeq (@BSDDB@,yes)
  36. +LIBSUBDIRS += bsddb
  37. +TESTSUBDIRS += bsddb/test
  38. +endif
  39. +
  40. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  41. @for i in $(SCRIPTDIR) $(LIBDEST); \
  42. do \
  43. Index: b/configure.ac
  44. ===================================================================
  45. --- a/configure.ac
  46. +++ b/configure.ac
  47. @@ -2662,6 +2662,28 @@
  48. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
  49. fi])
  50. +AC_ARG_ENABLE(dbm,
  51. + AS_HELP_STRING([--disable-dbm], [disable DBM]),
  52. + [ if test "$enableval" = "no"; then
  53. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm"
  54. + fi])
  55. +
  56. +AC_ARG_ENABLE(gdbm,
  57. + AS_HELP_STRING([--disable-gdbm], [disable GDBM]),
  58. + [ if test "$enableval" = "no"; then
  59. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm"
  60. + fi])
  61. +
  62. +AC_SUBST(BSDDB)
  63. +AC_ARG_ENABLE(bsddb,
  64. + AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]),
  65. + [ if test "$enableval" = "no"; then
  66. + BSDDB=no
  67. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bsddb"
  68. + else
  69. + BSDDB=yes
  70. + fi], [ BSDDB=yes ])
  71. +
  72. AC_ARG_ENABLE(unicodedata,
  73. AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
  74. [ if test "$enableval" = "no"; then