0026-Add-an-option-to-disable-bsddb.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. From cfad2bcae8f572a9422ce5a6adb4caa7c0e521ad Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:30:06 +0100
  4. Subject: [PATCH] Add an option to disable bsddb
  5. bsddb has an external dependency on Berkeley DB. Since we want to be
  6. able to build Python without it, this patch adds an option to disable
  7. the build/installation of this Python module.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  10. ---
  11. Makefile.pre.in | 8 ++++++--
  12. configure.ac | 22 ++++++++++++++++++++++
  13. 2 files changed, 28 insertions(+), 2 deletions(-)
  14. diff --git a/Makefile.pre.in b/Makefile.pre.in
  15. index e5d0dd7..2582574 100644
  16. --- a/Makefile.pre.in
  17. +++ b/Makefile.pre.in
  18. @@ -1043,7 +1043,7 @@ LIBSUBDIRS= site-packages \
  19. email email/mime \
  20. ensurepip ensurepip/_bundled \
  21. json \
  22. - logging bsddb csv importlib wsgiref \
  23. + logging csv importlib wsgiref \
  24. ctypes ctypes/macholib \
  25. idlelib idlelib/Icons \
  26. distutils distutils/command \
  27. @@ -1059,7 +1059,6 @@ TESTSUBDIRS = test test/audiodata test/capath test/data \
  28. test/tracedmodules \
  29. email/test email/test/data \
  30. json/tests \
  31. - bsddb/test \
  32. ctypes/test \
  33. idlelib/idle_test \
  34. distutils/tests \
  35. @@ -1100,6 +1099,11 @@ ifeq (@EXPAT@,yes)
  36. LIBSUBDIRS += $(XMLLIBSUBDIRS)
  37. endif
  38. +ifeq (@BSDDB@,yes)
  39. +LIBSUBDIRS += bsddb
  40. +TESTSUBDIRS += bsddb/test
  41. +endif
  42. +
  43. libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
  44. @for i in $(SCRIPTDIR) $(LIBDEST); \
  45. do \
  46. diff --git a/configure.ac b/configure.ac
  47. index 09cb3de..524614c 100644
  48. --- a/configure.ac
  49. +++ b/configure.ac
  50. @@ -2834,6 +2834,28 @@ AC_ARG_ENABLE(nis,
  51. DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
  52. fi])
  53. +AC_ARG_ENABLE(dbm,
  54. + AS_HELP_STRING([--disable-dbm], [disable DBM]),
  55. + [ if test "$enableval" = "no"; then
  56. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm"
  57. + fi])
  58. +
  59. +AC_ARG_ENABLE(gdbm,
  60. + AS_HELP_STRING([--disable-gdbm], [disable GDBM]),
  61. + [ if test "$enableval" = "no"; then
  62. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm"
  63. + fi])
  64. +
  65. +AC_SUBST(BSDDB)
  66. +AC_ARG_ENABLE(bsddb,
  67. + AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]),
  68. + [ if test "$enableval" = "no"; then
  69. + BSDDB=no
  70. + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bsddb"
  71. + else
  72. + BSDDB=yes
  73. + fi], [ BSDDB=yes ])
  74. +
  75. AC_ARG_ENABLE(unicodedata,
  76. AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
  77. [ if test "$enableval" = "no"; then
  78. --
  79. 2.7.4